diff --git a/.gitattributes b/.gitattributes index 94af433ee123..4015cbedb78e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -36,6 +36,11 @@ src/jsc/bindings/headers.h linguist-generated packages/bun-uws/fuzzing/seed-corpus/**/* linguist-generated test/expected-durations.json linguist-generated +# Committed bindgen output for the vendored bssl-sys crate (see +# src/bssl/bindings/README.md and regenerate.sh there). +src/bssl/bindings/wrapper_*.rs linguist-generated +src/bssl/bindings/wrapper.c linguist-generated + src/jsc/bindings/sqlite/sqlite3.c linguist-vendored src/jsc/bindings/sqlite/sqlite3_local.h linguist-vendored src/simdutf_sys/bun-simdutf.cpp linguist-vendored diff --git a/.gitignore b/.gitignore index f6c9ce4cdf79..39316333c0cf 100644 --- a/.gitignore +++ b/.gitignore @@ -216,3 +216,4 @@ src/jsc/bindings/GeneratedBindings.zig # Web Streams rewrite working notes (design docs, spec transcription, review logs). # Kept locally for the ongoing work; not part of the source tree. /specs/ +.rewrite-specs/ diff --git a/.prettierignore b/.prettierignore index 536b6b45fb7e..558deb0cfd36 100644 --- a/.prettierignore +++ b/.prettierignore @@ -25,3 +25,11 @@ docs/bundler/minifier.mdx # `_`/`*` differently every pass), so autofix.ci ping-pongs commits forever. # Not authored by hand; no value in normalizing it. docs/.rust-rewrite-verified-claims.md + +# committed bindgen outputs (regenerated by regenerate.sh), not hand-authored +src/bssl/bindings + +# prettier has no fixed point on this file (it flips the indentation of one +# nested list item back and forth every pass), so autofix.ci ping-pongs +# commits forever. Same class as docs/.rust-rewrite-verified-claims.md above. +src/usockets/docs/semantics.md diff --git a/Cargo.lock b/Cargo.lock index 7b8ae79d6080..ef7638d48830 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,6 +117,17 @@ dependencies = [ "cipher", ] +[[package]] +name = "bssl-macros" +version = "0.1.0" + +[[package]] +name = "bssl-sys" +version = "0.1.0" +dependencies = [ + "bssl-macros", +] + [[package]] name = "bstr" version = "1.12.1" @@ -270,6 +281,7 @@ dependencies = [ "bun_platform", "bun_runtime", "bun_sys", + "bun_usockets", "libc", ] @@ -342,6 +354,13 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bun_bssl" +version = "0.0.0" +dependencies = [ + "bssl-sys", +] + [[package]] name = "bun_bundler" version = "0.0.0" @@ -749,7 +768,7 @@ dependencies = [ "bun_ptr", "bun_sys", "bun_threading", - "bun_uws", + "bun_usockets", "const_format", "enum-map", "enumset", @@ -846,7 +865,8 @@ dependencies = [ "bun_sys", "bun_threading", "bun_url", - "bun_uws", + "bun_usockets", + "bun_uws_shim", "bun_wyhash", "bun_zlib", "bun_zstd", @@ -882,8 +902,8 @@ dependencies = [ "bun_picohttp", "bun_ptr", "bun_sha_hmac", - "bun_uws", - "bun_uws_sys", + "bun_usockets", + "bun_uws_shim", "bun_zlib", "const_format", "enum-map", @@ -985,7 +1005,6 @@ dependencies = [ "bun_threading", "bun_transpiler", "bun_url", - "bun_uws", "bun_which", "bun_wyhash", "bun_zlib", @@ -1063,7 +1082,7 @@ dependencies = [ "bun_spawn_sys", "bun_sys", "bun_threading", - "bun_uws_sys", + "bun_usockets", "const_format", "enum-map", "enumset", @@ -1212,7 +1231,8 @@ dependencies = [ "bun_threading", "bun_transpiler", "bun_url", - "bun_uws", + "bun_usockets", + "bun_uws_shim", "bun_watcher", "bun_wyhash", "bytemuck", @@ -1705,8 +1725,8 @@ dependencies = [ "bun_threading", "bun_transpiler", "bun_url", - "bun_uws", - "bun_uws_sys", + "bun_usockets", + "bun_uws_shim", "bun_valkey", "bun_watcher", "bun_which", @@ -1942,6 +1962,7 @@ dependencies = [ "bun_spawn_sys", "bun_sys", "bun_threading", + "bun_usockets", "bun_which", "libc", "scopeguard", @@ -2007,8 +2028,8 @@ dependencies = [ "bun_ptr", "bun_sha_hmac", "bun_sql", - "bun_uws", - "bun_uws_sys", + "bun_usockets", + "bun_uws_shim", "const_format", "enum-map", "enumset", @@ -2169,47 +2190,37 @@ dependencies = [ ] [[package]] -name = "bun_uws" +name = "bun_usockets" version = "0.0.0" dependencies = [ - "bitflags", - "bstr", - "bun_boringssl", + "bun_alloc", + "bun_bssl", "bun_core", - "bun_jsc_macros", - "bun_opaque", + "bun_dns", + "bun_errno", + "bun_libuv_sys", "bun_ptr", - "bun_uws_sys", - "const_format", - "enum-map", - "enumset", + "bun_windows_sys", "libc", - "scopeguard", - "strum", + "thiserror", ] [[package]] -name = "bun_uws_sys" +name = "bun_uws_shim" version = "0.0.0" dependencies = [ "bitflags", "bstr", "bun_alloc", - "bun_boringssl_sys", + "bun_boringssl", "bun_core", - "bun_errno", "bun_http_types", - "bun_libuv_sys", + "bun_jsc_macros", "bun_opaque", - "bun_paths", - "bun_windows_sys", - "const_format", - "enum-map", - "enumset", - "libc", + "bun_ptr", + "bun_usockets", "scopeguard", "strum", - "thiserror", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3d43080b43ff..030478ad5617 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,10 +76,10 @@ members = [ "src/mimalloc_sys", "src/semver_jsc", "src/standalone_graph", - "src/uws", "src/wyhash", "src/hash", "src/boringssl_sys", + "src/bssl", "src/bun_core", "src/bun_core_macros", "src/bun_output_tags", @@ -87,7 +87,8 @@ members = [ "src/router", "src/shell_parser", "src/tcc_sys", - "src/uws_sys", + "src/usockets", + "src/uws_shim", "src/zstd", "src/options_types", "src/output", @@ -181,11 +182,10 @@ overflow-checks = false # back to "warn" (their priority 0 beats the group's -1) where a warning level # is intentional. warnings = { level = "deny", priority = -1 } -# `bun_asan` / `bun_debug` / `socket_fault_injection` are set via RUSTFLAGS -# (`--cfg=...` + `--check-cfg=cfg(...)`) by scripts/build/rust.ts; register -# them here so a plain `cargo build` / `cargo check` (without those flags) -# doesn't warn. -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bun_asan)', 'cfg(bun_debug)', 'cfg(socket_fault_injection)'] } +# `bun_asan` / `bun_debug` are set via RUSTFLAGS (`--cfg=...` + +# `--check-cfg=cfg(...)`) by scripts/build/rust.ts; register them here so a +# plain `cargo build` / `cargo check` (without those flags) doesn't warn. +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bun_asan)', 'cfg(bun_debug)'] } # link.exe unconditionally prints "Creating library X.dll.lib and object # X.dll.exp" to stdout when linking each proc-macro DLL on Windows hosts; # there is no linker flag to suppress it. The lint already exempts itself @@ -423,10 +423,10 @@ bun_alloc = { path = "src/bun_alloc" } bun_mimalloc_sys = { path = "src/mimalloc_sys" } bun_semver_jsc = { path = "src/semver_jsc" } bun_standalone_graph = { path = "src/standalone_graph" } -bun_uws = { path = "src/uws" } bun_wyhash = { path = "src/wyhash" } bun_hash = { path = "src/hash" } bun_boringssl_sys = { path = "src/boringssl_sys" } +bun_bssl = { path = "src/bssl" } bun_core = { path = "src/bun_core" } bun_core_macros = { path = "src/bun_core_macros" } bun_output_tags = { path = "src/bun_output_tags" } @@ -436,7 +436,8 @@ bun_shell_parser = { path = "src/shell_parser" } bun_spawn = { path = "src/spawn" } bun_spawn_sys = { path = "src/spawn_sys" } bun_tcc_sys = { path = "src/tcc_sys" } -bun_uws_sys = { path = "src/uws_sys" } +bun_usockets = { path = "src/usockets" } +bun_uws_shim = { path = "src/uws_shim" } bun_zstd = { path = "src/zstd" } bun_options_types = { path = "src/options_types" } bun_bunfig = { path = "src/bunfig" } diff --git a/packages/bun-usockets/src/bsd.c b/packages/bun-usockets/src/bsd.c deleted file mode 100644 index 4f6a25df1214..000000000000 --- a/packages/bun-usockets/src/bsd.c +++ /dev/null @@ -1,1852 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2021. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Todo: this file should lie in networking/bsd.c */ - -#define __APPLE_USE_RFC_3542 - -#include "libusockets.h" -#include "internal/internal.h" -#include "internal/fault_inject.h" - -#include -#include - -#if BUN_DEBUG -// Debug network traffic logging -static FILE *debug_recv_file = NULL; -static FILE *debug_send_file = NULL; -static int debug_logging_initialized = 0; - -static void init_debug_logging() { - if (debug_logging_initialized) return; - debug_logging_initialized = 1; - - const char *recv_path = getenv("BUN_RECV"); - const char *send_path = getenv("BUN_SEND"); - if (recv_path) if (!debug_recv_file) debug_recv_file = fopen(recv_path, "w"); - if (send_path) if (!debug_send_file) debug_send_file = fopen(send_path, "w"); -} -#endif - -#ifndef _WIN32 -// Necessary for the stdint include -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#else /* _WIN32 */ -#include -#endif - -#if defined(__APPLE__) -extern int Bun__doesMacOSVersionSupportSendRecvMsgX(); -#endif - - -/* We need to emulate sendmmsg, recvmmsg on platform who don't have it */ -int bsd_sendmmsg(LIBUS_SOCKET_DESCRIPTOR fd, struct udp_sendbuf* sendbuf, int flags) { -#if defined(_WIN32)// || defined(__APPLE__) - for (int i = 0; i < sendbuf->num; i++) { - while (1) { - int ret = 0; - struct sockaddr *addr = (struct sockaddr *)sendbuf->addresses[i]; - if (!addr || addr->sa_family == AF_UNSPEC) { - ret = send(fd, sendbuf->payloads[i], sendbuf->lengths[i], flags); - } else if (addr->sa_family == AF_INET) { - socklen_t len = sizeof(struct sockaddr_in); - ret = sendto(fd, sendbuf->payloads[i], sendbuf->lengths[i], flags, addr, len); - } else if (addr->sa_family == AF_INET6) { - socklen_t len = sizeof(struct sockaddr_in6); - ret = sendto(fd, sendbuf->payloads[i], sendbuf->lengths[i], flags, addr, len); - } else { - errno = EAFNOSUPPORT; - return -1; - } - int err = WSAGetLastError(); - if (ret < 0) { - if (err == WSAEINTR) continue; - if (err == WSAEWOULDBLOCK) return i; - return ret; - } - break; - } - } - return sendbuf->num; -#elif defined(__APPLE__) - // sendmsg_x does not support addresses. - if (!sendbuf->has_empty && !sendbuf->has_addresses && Bun__doesMacOSVersionSupportSendRecvMsgX()) { - while (1) { - int ret = sendmsg_x(fd, sendbuf->msgvec, sendbuf->num, flags); - if (ret >= 0) return ret; - // If we receive EMSGSIZE, we should use the fallback code. - if (errno == EMSGSIZE) break; - if (errno != EINTR) return ret; - } - } - - for (size_t i = 0, count = sendbuf->num; i < count; i++) { - while (1) { - ssize_t ret = sendmsg(fd, &sendbuf->msgvec[i].msg_hdr, flags); - if (ret < 0) { - if (errno == EINTR) continue; - if (errno == EAGAIN || errno == EWOULDBLOCK) return i; - return ret; - } - break; - } - } - - return sendbuf->num; -#else - while (1) { - int ret = sendmmsg(fd, sendbuf->msgvec, sendbuf->num, flags | MSG_NOSIGNAL); - if (ret >= 0 || errno != EINTR) return ret; - } -#endif -} - -int bsd_recvmmsg(LIBUS_SOCKET_DESCRIPTOR fd, struct udp_recvbuf *recvbuf, int flags) { -#if defined(_WIN32) - socklen_t addr_len = sizeof(struct sockaddr_storage); - while (1) { - ssize_t ret = recvfrom(fd, recvbuf->buf, LIBUS_RECV_BUFFER_LENGTH, flags, (struct sockaddr *)&recvbuf->addr, &addr_len); - if (ret < 0) { - int err = WSAGetLastError(); - if (err == WSAEINTR) continue; - /* Winsock surfaces ICMP "port/host unreachable" from a previous - * sendto as WSAECONNRESET (or WSAENETRESET for TTL-expired) on the - * next recv. That's per-destination, not per-socket, so treat it as - * "no packet" and retry — bubbling it up makes loop.c close the - * socket and tear down every conn that shares it (e.g. the QUIC - * client endpoint). Mirrors libuv's uv__udp_recv handling. */ - if (err == WSAECONNRESET || err == WSAENETRESET) continue; - return ret; - } - recvbuf->recvlen = ret; - return 1; - } -#elif defined(__APPLE__) - if (Bun__doesMacOSVersionSupportSendRecvMsgX()) { - while (1) { - int ret = recvmsg_x(fd, recvbuf->msgvec, LIBUS_UDP_RECV_COUNT, flags); - if (ret >= 0 || errno != EINTR) return ret; - } - } - - for (int i = 0; i < LIBUS_UDP_RECV_COUNT; ++i) { - while (1) { - ssize_t ret = recvmsg(fd, &recvbuf->msgvec[i].msg_hdr, flags); - if (ret < 0) { - if (errno == EINTR) continue; - if (errno == EAGAIN || errno == EWOULDBLOCK) return i; - return ret; - } - recvbuf->msgvec[i].msg_len = ret; - break; - } - } - return LIBUS_UDP_RECV_COUNT; -#else - while (1) { - int ret = recvmmsg(fd, (struct mmsghdr *)&recvbuf->msgvec, LIBUS_UDP_RECV_COUNT, flags, 0); - if (ret >= 0 || errno != EINTR) return ret; - } -#endif -} - -void bsd_udp_setup_recvbuf(struct udp_recvbuf *recvbuf, void *databuf, size_t databuflen) { -#if defined(_WIN32) - recvbuf->buf = databuf; - recvbuf->buflen = databuflen; -#else - // assert(databuflen > LIBUS_UDP_MAX_SIZE * LIBUS_UDP_RECV_COUNT); - memset(recvbuf, 0, sizeof(struct udp_recvbuf)); - for (size_t i = 0; i < LIBUS_UDP_RECV_COUNT; i++) { - recvbuf->iov[i].iov_base = (char*)databuf + i * LIBUS_UDP_MAX_SIZE; - recvbuf->iov[i].iov_len = LIBUS_UDP_MAX_SIZE; - - struct msghdr mh = {}; - memset(&mh, 0, sizeof(struct msghdr)); - mh.msg_name = &recvbuf->addr[i]; - mh.msg_namelen = sizeof(struct sockaddr_storage); - mh.msg_iov = &recvbuf->iov[i]; - mh.msg_iovlen = 1; - mh.msg_control = recvbuf->control[i]; - mh.msg_controllen = sizeof(recvbuf->control[i]); - recvbuf->msgvec[i].msg_hdr = mh; - } -#endif -} - -int bsd_udp_setup_sendbuf(struct udp_sendbuf *buf, size_t bufsize, void** payloads, size_t* lengths, void** addresses, int num) { -#if defined(_WIN32) - buf->payloads = payloads; - buf->lengths = lengths; - buf->addresses = addresses; - buf->num = num; - return num; -#else - // TODO: can we skip empty messages altogether? Do we really need to send 0-length messages? - buf->has_empty = 0; - - // sendmsg_x docs states it does not support addresses. - buf->has_addresses = 0; - - struct mmsghdr *msgvec = buf->msgvec; - // todo check this math - size_t count = (bufsize - sizeof(struct udp_sendbuf)) / (sizeof(struct mmsghdr) + sizeof(struct iovec)); - if (count > num) { - count = num; - } - struct iovec *iov = (struct iovec *) (msgvec + count); - for (int i = 0; i < count; i++) { - struct sockaddr *addr = (struct sockaddr *)addresses[i]; - socklen_t addr_len = 0; - if (addr) { - addr_len = addr->sa_family == AF_INET ? sizeof(struct sockaddr_in) - : addr->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) - : 0; - if (addr_len > 0) { - buf->has_addresses = 1; - } - } - iov[i].iov_base = payloads[i]; - iov[i].iov_len = lengths[i]; - msgvec[i].msg_hdr.msg_name = addresses[i]; - msgvec[i].msg_hdr.msg_namelen = addr_len; - msgvec[i].msg_hdr.msg_control = NULL; - msgvec[i].msg_hdr.msg_controllen = 0; - msgvec[i].msg_hdr.msg_iov = iov + i; - msgvec[i].msg_hdr.msg_iovlen = 1; - msgvec[i].msg_hdr.msg_flags = 0; - msgvec[i].msg_len = 0; - - - if (lengths[i] == 0) { - buf->has_empty = 1; - } - } - buf->num = count; - return count; -#endif -} - -// this one is needed for knowing the destination addr of udp packet -// an udp socket can only bind to one port, and that port never changes -// this function returns ONLY the IP address, not any port -int bsd_udp_packet_buffer_local_ip(struct udp_recvbuf *msgvec, int index, char *ip) { -#if defined(_WIN32) || defined(__APPLE__) - return 0; // not supported -#else - struct msghdr *mh = &((struct mmsghdr *) msgvec)[index].msg_hdr; - for (struct cmsghdr *cmsg = CMSG_FIRSTHDR(mh); cmsg != NULL; cmsg = CMSG_NXTHDR(mh, cmsg)) { - // ipv6 or ipv4 - if (cmsg->cmsg_level == IPPROTO_IP) { -#if defined(IP_PKTINFO) - if (cmsg->cmsg_type == IP_PKTINFO) { - struct in_pktinfo *pi = (struct in_pktinfo *) CMSG_DATA(cmsg); - memcpy(ip, &pi->ipi_addr, 4); - return 4; - } -#endif -#if defined(IP_RECVDSTADDR) - if (cmsg->cmsg_type == IP_RECVDSTADDR) { - memcpy(ip, (struct in_addr *) CMSG_DATA(cmsg), 4); - return 4; - } -#endif - } - - if (cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) { - struct in6_pktinfo *pi6 = (struct in6_pktinfo *) CMSG_DATA(cmsg); - memcpy(ip, &pi6->ipi6_addr, 16); - return 16; - } - } - - return 0; // no length - -#endif -} - -char *bsd_udp_packet_buffer_peer(struct udp_recvbuf *msgvec, int index) { -#if defined(_WIN32) - return (char *)&msgvec->addr; -#else - return ((struct mmsghdr *) msgvec)[index].msg_hdr.msg_name; -#endif -} - -char *bsd_udp_packet_buffer_payload(struct udp_recvbuf *msgvec, int index) { -#if defined(_WIN32) - return msgvec->buf; -#else - return ((struct mmsghdr *) msgvec)[index].msg_hdr.msg_iov[0].iov_base; -#endif -} - -int bsd_udp_packet_buffer_payload_length(struct udp_recvbuf *msgvec, int index) { -#if defined(_WIN32) - return msgvec->recvlen; -#else - /* Clamp to the per-datagram buffer capacity so a truncated datagram can - * never report more bytes than we actually copied, even if the underlying - * kernel (e.g. Darwin's recvmsg_x) reports the original datagram length. */ - int len = ((struct mmsghdr *) msgvec)[index].msg_len; - return len > (int)LIBUS_UDP_MAX_SIZE ? (int)LIBUS_UDP_MAX_SIZE : len; -#endif -} - -int bsd_udp_packet_buffer_truncated(struct udp_recvbuf *msgvec, int index) { -#if defined(_WIN32) - /* On Windows, WSARecvFrom signals truncation via WSAEMSGSIZE on recv, - * which we don't currently surface here. */ - return 0; -#else - return (((struct mmsghdr *) msgvec)[index].msg_hdr.msg_flags & MSG_TRUNC) ? 1 : 0; -#endif -} - -LIBUS_SOCKET_DESCRIPTOR apple_no_sigpipe(LIBUS_SOCKET_DESCRIPTOR fd) { -#ifdef __APPLE__ - if (fd != LIBUS_SOCKET_ERROR) { - int no_sigpipe = 1; - setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &no_sigpipe, sizeof(int)); - } -#endif - return fd; -} - -static LIBUS_SOCKET_DESCRIPTOR win32_set_nonblocking(LIBUS_SOCKET_DESCRIPTOR fd) { -#if _WIN32 - if (fd != LIBUS_SOCKET_ERROR) { - // libuv will set non-blocking, but only on poll init! - // we need it to be set on connect as well - DWORD yes = 1; - ioctlsocket(fd, FIONBIO, &yes); - } - return fd; -#else - return fd; -#endif -} - -LIBUS_SOCKET_DESCRIPTOR bsd_set_nonblocking(LIBUS_SOCKET_DESCRIPTOR fd) { -/* Libuv will set windows sockets as non-blocking */ -#ifndef _WIN32 - if (LIKELY(fd != LIBUS_SOCKET_ERROR)) { - int flags = fcntl(fd, F_GETFL, 0); - - // F_GETFL supports O_NONBLOCK - fcntl(fd, F_SETFL, flags | O_NONBLOCK); - - flags = fcntl(fd, F_GETFD, 0); - - // F_GETFD supports FD_CLOEXEC - fcntl(fd, F_SETFD, flags | FD_CLOEXEC); - } -#endif - - return fd; -} - -static int setsockopt_6_or_4(LIBUS_SOCKET_DESCRIPTOR fd, int option4, int option6, const void *option_value, socklen_t option_len) { - int res = setsockopt(fd, IPPROTO_IPV6, option6, option_value, option_len); - - if (res == 0) { - return 0; - } - -#ifdef _WIN32 - const int err = WSAGetLastError(); - if (err == WSAENOPROTOOPT || err == WSAEINVAL) { -#else - if (errno == ENOPROTOOPT || errno == EINVAL) { -#endif - return setsockopt(fd, IPPROTO_IP, option4, option_value, option_len); - } - - return res; -} - -void bsd_socket_nodelay(LIBUS_SOCKET_DESCRIPTOR fd, int enabled) { - setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &enabled, sizeof(enabled)); -} - -int bsd_socket_broadcast(LIBUS_SOCKET_DESCRIPTOR fd, int enabled) { - return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled)); -} - -int bsd_socket_multicast_loopback(LIBUS_SOCKET_DESCRIPTOR fd, int enabled) { - return setsockopt_6_or_4(fd, IP_MULTICAST_LOOP, IPV6_MULTICAST_LOOP, &enabled, sizeof(enabled)); -} - -int bsd_socket_multicast_interface(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_storage *addr) { -#ifdef _WIN32 - if (fd == SOCKET_ERROR){ - WSASetLastError(WSAEBADF); - errno = EBADF; - return -1; - } -#endif - - if (addr->ss_family == AF_INET) { - const struct sockaddr_in *addr4 = (const struct sockaddr_in*) addr; - int first_octet = ntohl(addr4->sin_addr.s_addr) >> 24; - // 224.0.0.0 through 239.255.255.255 (224.0.0.0/4) are multicast addresses - // and thus not valid interface addresses. - if (!(224 <= first_octet && first_octet <= 239)) { - return setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &addr4->sin_addr, sizeof(addr4->sin_addr)); - } - } - - if (addr->ss_family == AF_INET6) { - const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6*) addr; - return setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &addr6->sin6_scope_id, sizeof(addr6->sin6_scope_id)); - } - -#ifdef _WIN32 - WSASetLastError(WSAEINVAL); -#endif - errno = EINVAL; - return -1; -} - -static int bsd_socket_set_membership4(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_in *addr, const struct sockaddr_in *iface, int drop) { - struct ip_mreq mreq; - memset(&mreq, 0, sizeof(mreq)); - - mreq.imr_multiaddr.s_addr = addr->sin_addr.s_addr; - - if (iface != NULL) { - mreq.imr_interface.s_addr = iface->sin_addr.s_addr; - } else { - mreq.imr_interface.s_addr = htonl(INADDR_ANY); - } - - int option = drop ? IP_DROP_MEMBERSHIP : IP_ADD_MEMBERSHIP; - return setsockopt(fd, IPPROTO_IP, option, &mreq, sizeof(mreq)); -} - -static int bsd_socket_set_membership6(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_in6 *addr, const struct sockaddr_in6 *iface, int drop) { - struct ipv6_mreq mreq; - memset(&mreq, 0, sizeof(mreq)); - mreq.ipv6mr_multiaddr = addr->sin6_addr; - if (iface != NULL) { - mreq.ipv6mr_interface = iface->sin6_scope_id; - } - int option = drop ? IPV6_LEAVE_GROUP : IPV6_JOIN_GROUP; - return setsockopt(fd, IPPROTO_IPV6, option, &mreq, sizeof(mreq)); -} - -int bsd_socket_set_membership(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_storage *addr, const struct sockaddr_storage *iface, int drop) { - if (iface != NULL && addr->ss_family != iface->ss_family) { - errno = EINVAL; - return -1; - } - - if (addr->ss_family == AF_INET6) { - return bsd_socket_set_membership6(fd, (const struct sockaddr_in6*) addr, (const struct sockaddr_in6*) iface, drop); - } else { - return bsd_socket_set_membership4(fd, (const struct sockaddr_in*) addr, (const struct sockaddr_in*) iface, drop); - } -} - -static int bsd_socket_set_source_specific_membership4(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_in *source, const struct sockaddr_in *group, const struct sockaddr_in *iface, int drop) { - struct ip_mreq_source mreq; - memset(&mreq, 0, sizeof(mreq)); - - if (iface != NULL) { - mreq.imr_interface.s_addr = iface->sin_addr.s_addr; - } else { - mreq.imr_interface.s_addr = htonl(INADDR_ANY); - } - - mreq.imr_sourceaddr.s_addr = source->sin_addr.s_addr; - mreq.imr_multiaddr.s_addr = group->sin_addr.s_addr; - - int option = drop? IP_DROP_SOURCE_MEMBERSHIP : IP_ADD_SOURCE_MEMBERSHIP; - - return setsockopt(fd, IPPROTO_IP, option, &mreq, sizeof(mreq)); -} - -static int bsd_socket_set_source_specific_membership6(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_in6 *source, const struct sockaddr_in6 *group, const struct sockaddr_in6 *iface, int drop) { - struct group_source_req mreq; - memset(&mreq, 0, sizeof(mreq)); - - if (iface != NULL) { - mreq.gsr_interface = iface->sin6_scope_id; - } - - memcpy(&mreq.gsr_source, source, sizeof(mreq.gsr_source)); - memcpy(&mreq.gsr_group, group, sizeof(mreq.gsr_group)); - - int option = drop? MCAST_LEAVE_SOURCE_GROUP : MCAST_JOIN_SOURCE_GROUP; - - return setsockopt(fd, IPPROTO_IPV6, option, &mreq, sizeof(mreq)); -} - -int bsd_socket_set_source_specific_membership(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_storage *source, const struct sockaddr_storage *group, const struct sockaddr_storage *iface, int drop) { - if (source->ss_family == group->ss_family && (iface == NULL || group->ss_family == iface->ss_family)) { - if (source->ss_family == AF_INET) { - return bsd_socket_set_source_specific_membership4(fd, (const struct sockaddr_in*) source, (const struct sockaddr_in*) group, (const struct sockaddr_in*) iface, drop); - } else if (source->ss_family == AF_INET6) { - return bsd_socket_set_source_specific_membership6(fd, (const struct sockaddr_in6*) source, (const struct sockaddr_in6*) group, (const struct sockaddr_in6*) iface, drop); - } - } - -#ifdef _WIN32 - WSASetLastError(WSAEINVAL); -#endif - errno = EINVAL; - return -1; -} - -static int bsd_socket_ttl_any(LIBUS_SOCKET_DESCRIPTOR fd, int ttl, int ipv4, int ipv6) { - if (ttl < 1 || ttl > 255) { -#ifdef _WIN32 - WSASetLastError(WSAEINVAL); -#endif - errno = EINVAL; - return -1; - } - - return setsockopt_6_or_4(fd, ipv4, ipv6, &ttl, sizeof(ttl)); -} - -int bsd_socket_ttl_unicast(LIBUS_SOCKET_DESCRIPTOR fd, int ttl) { - return bsd_socket_ttl_any(fd, ttl, IP_TTL, IPV6_UNICAST_HOPS); -} - -int bsd_socket_ttl_multicast(LIBUS_SOCKET_DESCRIPTOR fd, int ttl) { - return bsd_socket_ttl_any(fd, ttl, IP_MULTICAST_TTL, IPV6_MULTICAST_HOPS); -} - -int bsd_socket_keepalive(LIBUS_SOCKET_DESCRIPTOR fd, int on, unsigned int delay) { - -#ifndef _WIN32 - if(setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on))) { - return errno; - } - - if (!on) - return 0; - - if (delay == 0) - return -1; - - -#ifdef TCP_KEEPIDLE - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) - return errno; -#elif defined(TCP_KEEPALIVE) - /* Darwin/macOS uses TCP_KEEPALIVE in place of TCP_KEEPIDLE. */ - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay))) - return errno; -#endif - -#ifdef TCP_KEEPINTVL - int intvl = 1; /* 1 second; same as default on Win32 */ - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &intvl, sizeof(intvl))) - return errno; -#endif - -#ifdef TCP_KEEPCNT - int cnt = 10; /* 10 retries; same as hardcoded on Win32 */ - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt))) - return errno; -#endif - - return 0; - #else - if (setsockopt(fd, - SOL_SOCKET, - SO_KEEPALIVE, - (const char*)&on, - sizeof on) == -1) { - return WSAGetLastError(); - } - - if (!on) - return 0; - - if (delay < 1) { - #ifdef LIBUS_USE_LIBUV - return -4071; //UV_EINVAL; - #else - //TODO: revisit this when IOCP loop is implemented without libuv here - return 4071; - #endif - } - if (setsockopt(fd, - IPPROTO_TCP, - TCP_KEEPALIVE, - (const char*)&delay, - sizeof delay) == -1) { - return WSAGetLastError(); - } - - return 0; - #endif -} - -/* IP type-of-service / traffic-class. The option level depends on the socket - * family (IP_TOS for IPv4, IPV6_TCLASS for IPv6), detected via getsockname. - * Returns 0 on success or a negative platform errno on failure (the negative - * convention matches what node:net's ErrnoException expects). */ -static int bsd_socket_tos_level(LIBUS_SOCKET_DESCRIPTOR fd, int *level, int *option) { - struct sockaddr_storage storage; - socklen_t addrlen = sizeof(storage); - if (getsockname(fd, (struct sockaddr *) &storage, &addrlen)) { -#ifdef _WIN32 - return -WSAGetLastError(); -#else - return -errno; -#endif - } - if (storage.ss_family == AF_INET) { - *level = IPPROTO_IP; - *option = IP_TOS; - } else if (storage.ss_family == AF_INET6) { - *level = IPPROTO_IPV6; - *option = IPV6_TCLASS; - } else { - return -EINVAL; - } - return 0; -} - -int bsd_socket_set_tos(LIBUS_SOCKET_DESCRIPTOR fd, int tos) { - int level, option; - int err = bsd_socket_tos_level(fd, &level, &option); - if (err) return err; -#ifdef _WIN32 - if (setsockopt(fd, level, option, (const char *) &tos, sizeof(tos))) { - return -WSAGetLastError(); - } -#else - if (setsockopt(fd, level, option, &tos, sizeof(tos))) { - return -errno; - } -#endif - return 0; -} - -int bsd_socket_get_tos(LIBUS_SOCKET_DESCRIPTOR fd) { - int level, option; - int err = bsd_socket_tos_level(fd, &level, &option); - if (err) return err; - int tos = 0; - socklen_t len = sizeof(tos); -#ifdef _WIN32 - if (getsockopt(fd, level, option, (char *) &tos, (int *) &len)) { - return -WSAGetLastError(); - } -#else - if (getsockopt(fd, level, option, &tos, &len)) { - return -errno; - } -#endif - return tos; -} - -void bsd_socket_flush(LIBUS_SOCKET_DESCRIPTOR fd) { - // Linux TCP_CORK has the same underlying corking mechanism as with MSG_MORE -#ifdef TCP_CORK - int enabled = 0; - setsockopt(fd, IPPROTO_TCP, TCP_CORK, &enabled, sizeof(int)); -#endif -} - -LIBUS_SOCKET_DESCRIPTOR bsd_create_socket(int domain, int type, int protocol, int *err) { - if (err != NULL) { - *err = 0; - } - - LIBUS_SOCKET_DESCRIPTOR created_fd; -#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK) - const int flags = SOCK_CLOEXEC | SOCK_NONBLOCK; - do { - created_fd = socket(domain, type | flags, protocol); - } while (IS_EINTR(created_fd)); - - if (UNLIKELY(created_fd == -1)) { - if (err != NULL) { - *err = errno; - } - return LIBUS_SOCKET_ERROR; - } - - return apple_no_sigpipe(created_fd); -#else - do { - created_fd = socket(domain, type, protocol); - } while (IS_EINTR(created_fd)); - - if (UNLIKELY(created_fd == -1)) { - if (err != NULL) { - *err = errno; - } - return LIBUS_SOCKET_ERROR; - } - - return bsd_set_nonblocking(apple_no_sigpipe(created_fd)); -#endif -} - -void bsd_close_socket(LIBUS_SOCKET_DESCRIPTOR fd) { -#ifdef _WIN32 - closesocket(fd); -#else - close(fd); -#endif -} - -void bsd_shutdown_socket(LIBUS_SOCKET_DESCRIPTOR fd) { -#ifdef _WIN32 - shutdown(fd, SD_SEND); -#else - shutdown(fd, SHUT_WR); -#endif -} - -void bsd_shutdown_socket_read(LIBUS_SOCKET_DESCRIPTOR fd) { -#ifdef _WIN32 - shutdown(fd, SD_RECEIVE); -#else - shutdown(fd, SHUT_RD); -#endif -} - -void internal_finalize_bsd_addr(struct bsd_addr_t *addr) { - // parse, so to speak, the address - if (addr->mem.ss_family == AF_INET6) { - addr->ip = (char *) &((struct sockaddr_in6 *) addr)->sin6_addr; - addr->ip_length = sizeof(struct in6_addr); - addr->port = ntohs(((struct sockaddr_in6 *) addr)->sin6_port); - } else if (addr->mem.ss_family == AF_INET) { - addr->ip = (char *) &((struct sockaddr_in *) addr)->sin_addr; - addr->ip_length = sizeof(struct in_addr); - addr->port = ntohs(((struct sockaddr_in *) addr)->sin_port); - } else { - addr->ip_length = 0; - addr->port = -1; - } -} - -int bsd_local_addr(LIBUS_SOCKET_DESCRIPTOR fd, struct bsd_addr_t *addr) { - addr->len = sizeof(addr->mem); - if (getsockname(fd, (struct sockaddr *) &addr->mem, &addr->len)) { - return -1; - } - internal_finalize_bsd_addr(addr); - return 0; -} - -int bsd_remote_addr(LIBUS_SOCKET_DESCRIPTOR fd, struct bsd_addr_t *addr) { - addr->len = sizeof(addr->mem); - if (getpeername(fd, (struct sockaddr *) &addr->mem, &addr->len)) { - return -1; - } - internal_finalize_bsd_addr(addr); - return 0; -} - -char *bsd_addr_get_ip(struct bsd_addr_t *addr) { - return addr->ip; -} - -int bsd_addr_get_ip_length(struct bsd_addr_t *addr) { - return addr->ip_length; -} - -int bsd_addr_get_port(struct bsd_addr_t *addr) { - return addr->port; -} - -// called by dispatch_ready_poll -LIBUS_SOCKET_DESCRIPTOR bsd_accept_socket(LIBUS_SOCKET_DESCRIPTOR fd, struct bsd_addr_t *addr) { - LIBUS_SOCKET_DESCRIPTOR accepted_fd; - - ssize_t injected = 0; int unused = 0; - if (US_FAULT_CHECK(US_FAULT_ACCEPT, fd, injected, unused)) return LIBUS_SOCKET_ERROR; - (void)injected; (void)unused; - - while (1) { - addr->len = sizeof(addr->mem); - -#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK) - // Linux, FreeBSD - accepted_fd = accept4(fd, (struct sockaddr *) addr, &addr->len, SOCK_CLOEXEC | SOCK_NONBLOCK); -#else - // Windows, OS X - accepted_fd = accept(fd, (struct sockaddr *) addr, &addr->len); -#endif - - if (UNLIKELY(IS_EINTR(accepted_fd))) { - continue; - } - - /* We cannot rely on addr since it is not initialized if failed */ - if (accepted_fd == LIBUS_SOCKET_ERROR) { - return LIBUS_SOCKET_ERROR; - } - -#ifdef __APPLE__ - /* A bug in XNU (the macOS kernel) can cause accept() to return a socket but addrlen=0. - * This happens when an IPv4 connection is made to an IPv6 dual-stack listener - * and the connection is immediately aborted (sends RST packet). - * However, there might be buffered data from connectx() before the abort. */ - if (addr->len == 0) { - /* Check if there's any pending data before discarding the socket */ - char peek_buf[1]; - ssize_t has_data = recv(accepted_fd, peek_buf, 1, MSG_PEEK | MSG_DONTWAIT); - - if (has_data <= 0) { - /* No data available, socket is truly dead - discard it */ - bsd_close_socket(accepted_fd); - continue; /* Try to accept the next connection */ - } - /* If has_data > 0, let the socket through - there's buffered data to read */ - } -#endif - - break; - } - - internal_finalize_bsd_addr(addr); - -#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK) -// skip the extra fcntl calls. - return accepted_fd; -#else - return bsd_set_nonblocking(apple_no_sigpipe(accepted_fd)); -#endif -} - -ssize_t bsd_recv(LIBUS_SOCKET_DESCRIPTOR fd, void *buf, int length, int flags) { - ssize_t injected = 0; - if (US_FAULT_CHECK(US_FAULT_RECV, fd, injected, length)) return injected; - while (1) { - ssize_t ret = recv(fd, buf, length, flags); - - if (UNLIKELY(IS_EINTR(ret))) { - continue; - } - -#if BUN_DEBUG - // Debug logging for received data - if (ret > 0) { - init_debug_logging(); - if (debug_recv_file) { - fwrite(buf, 1, ret, debug_recv_file); - fflush(debug_recv_file); - } - } -#endif - - return ret; - } -} - -#if !defined(_WIN32) -ssize_t bsd_recvmsg(LIBUS_SOCKET_DESCRIPTOR fd, struct msghdr *msg, int flags) { - ssize_t injected = 0; int unused = 0; - if (US_FAULT_CHECK(US_FAULT_RECVMSG, fd, injected, unused)) return injected; - (void)unused; - while (1) { - ssize_t ret = recvmsg(fd, msg, flags); - - if (UNLIKELY(IS_EINTR(ret))) { - continue; - } - - return ret; - } -} -#endif - -#if !defined(_WIN32) -#include - -ssize_t bsd_writev(LIBUS_SOCKET_DESCRIPTOR fd, const struct us_iovec_t *iov, int count) { - ssize_t injected = 0; int unused = 0; - if (US_FAULT_CHECK(US_FAULT_WRITEV, fd, injected, unused)) return injected; - (void)unused; - /* POSIX writev fails with EINVAL above IOV_MAX (1024 on Linux/macOS); cap and - * let the caller's partial-write handling carry the remainder. */ - if (count > 1024) { - count = 1024; - } - while (1) { - ssize_t written = writev(fd, (const struct iovec *)iov, count); - if (UNLIKELY(IS_EINTR(written))) { - continue; - } - return written; - } -} - -ssize_t bsd_write2(LIBUS_SOCKET_DESCRIPTOR fd, const char *header, int header_length, const char *payload, int payload_length) { - ssize_t injected = 0; int unused = 0; - if (US_FAULT_CHECK(US_FAULT_WRITEV, fd, injected, unused)) return injected; - (void)unused; - struct iovec chunks[2]; - - chunks[0].iov_base = (char *)header; - chunks[0].iov_len = header_length; - chunks[1].iov_base = (char *)payload; - chunks[1].iov_len = payload_length; - - while (1) { - ssize_t written = writev(fd, chunks, 2); - - if (UNLIKELY(IS_EINTR(written))) { - continue; - } - - return written; - } -} -#else -ssize_t bsd_writev(LIBUS_SOCKET_DESCRIPTOR fd, const struct us_iovec_t *iov, int count) { - ssize_t total = 0; - for (int i = 0; i < count; i++) { - ssize_t written = bsd_send(fd, (const char *)iov[i].iov_base, (int)iov[i].iov_len); - if (written > 0) total += written; - if (written != (ssize_t)iov[i].iov_len) break; - } - return total > 0 ? total : -1; -} - -ssize_t bsd_write2(LIBUS_SOCKET_DESCRIPTOR fd, const char *header, int header_length, const char *payload, int payload_length) { - ssize_t written = bsd_send(fd, header, header_length); - if (written == header_length) { - ssize_t second_write = bsd_send(fd, payload, payload_length); - if (second_write > 0) { - written += second_write; - } - } - return written; -} -#endif - -ssize_t bsd_send(LIBUS_SOCKET_DESCRIPTOR fd, const char *buf, int length) { - ssize_t injected = 0; - if (US_FAULT_CHECK(US_FAULT_SEND, fd, injected, length)) return injected; - while (1) { - // MSG_MORE (Linux), MSG_PARTIAL (Windows), TCP_NOPUSH (BSD) - -#ifndef MSG_NOSIGNAL -#define MSG_NOSIGNAL 0 -#endif - - // use TCP_NOPUSH - ssize_t rc = send(fd, buf, length, MSG_NOSIGNAL | MSG_DONTWAIT); - - if (UNLIKELY(IS_EINTR(rc))) { - continue; - } - -#if BUN_DEBUG - // Debug logging for sent data - if (rc > 0) { - init_debug_logging(); - if (debug_send_file) { - fwrite(buf, 1, rc, debug_send_file); - fflush(debug_send_file); - } - } -#endif - - return rc; - } -} - -#if !defined(_WIN32) -ssize_t bsd_sendmsg(LIBUS_SOCKET_DESCRIPTOR fd, const struct msghdr *msg, int flags) { - ssize_t injected = 0; int unused = 0; - if (US_FAULT_CHECK(US_FAULT_SENDMSG, fd, injected, unused)) return injected; - (void)unused; - while (1) { - ssize_t rc = sendmsg(fd, msg, flags); - - if (UNLIKELY(IS_EINTR(rc))) { - continue; - } - - return rc; - } -} -#endif - -int bsd_would_block() { -#ifdef _WIN32 - return WSAGetLastError() == WSAEWOULDBLOCK; -#else - return errno == EWOULDBLOCK;// || errno == EAGAIN; -#endif -} - -/* Transient kernel resource exhaustion from send(): the connection is still - * healthy and a later retry can succeed. Kept distinct from bsd_would_block() - * so recv() callers that use that to mean EOF-vs-error do not start spinning - * on ENOBUFS. */ -int bsd_send_is_transient_error() { -#ifdef _WIN32 - return WSAGetLastError() == WSAENOBUFS; -#else - return errno == ENOBUFS || errno == ENOMEM; -#endif -} - -static int us_internal_bind_and_listen(LIBUS_SOCKET_DESCRIPTOR listenFd, struct sockaddr *listenAddr, socklen_t listenAddrLength, int backlog, int* error) { - int result; - do - result = bind(listenFd, listenAddr, listenAddrLength); - while (IS_EINTR(result)); - - if (result == -1) { - *error = LIBUS_ERR; - return -1; - } - - do - result = listen(listenFd, backlog); - while (IS_EINTR(result)); - *error = LIBUS_ERR; - - return result; -} - -static int bsd_set_reuseaddr(LIBUS_SOCKET_DESCRIPTOR listenFd) { - const int one = 1; -#if defined(SO_REUSEPORT) && !defined(__linux__) && !defined(__GNU__) - return setsockopt(listenFd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); -#else - return setsockopt(listenFd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); -#endif -} - -static int bsd_set_reuseport(LIBUS_SOCKET_DESCRIPTOR listenFd) { -#if defined(SO_REUSEPORT) && !defined(_WIN32) - const int one = 1; - return setsockopt(listenFd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); -#else -#if _WIN32 - WSASetLastError(WSAEOPNOTSUPP); -#endif - errno = ENOTSUP; - return -1; -#endif -} - -static int bsd_set_reuse(LIBUS_SOCKET_DESCRIPTOR listenFd, int options) { - int result = 0; - - if ((options & LIBUS_LISTEN_EXCLUSIVE_PORT)) { -#if _WIN32 - const int one = 1; - result = setsockopt(listenFd, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, &one, sizeof(one)); - if (result != 0) { - return result; - } -#endif - } - - if ((options & LIBUS_LISTEN_REUSE_ADDR)) { - result = bsd_set_reuseaddr(listenFd); - if (result != 0) { - return result; - } - } - - if ((options & LIBUS_LISTEN_REUSE_PORT)) { - result = bsd_set_reuseport(listenFd); - if (result != 0) { - if (errno == ENOTSUP) { - if ((options & LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE) == 0) { - errno = 0; - return 0; - } - } - - return result; - } - } - - return 0; -} - -inline __attribute__((always_inline)) LIBUS_SOCKET_DESCRIPTOR bsd_bind_listen_fd( - LIBUS_SOCKET_DESCRIPTOR listenFd, - struct addrinfo *listenAddr, - int port, - int options, - int* error -) { - - if (bsd_set_reuse(listenFd, options) != 0) { - return LIBUS_SOCKET_ERROR; - } - -#if defined(SO_REUSEADDR) && !_WIN32 - // Unlike on Unix, here we don't set SO_REUSEADDR, because it doesn't just - // allow binding to addresses that are in use by sockets in TIME_WAIT, it - // effectively allows 'stealing' a port which is in use by another application. - // See libuv issue #1360. - int one = 1; - setsockopt(listenFd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); -#endif - -#ifdef IPV6_V6ONLY - if (listenAddr->ai_family == AF_INET6) { - int enabled = (options & LIBUS_SOCKET_IPV6_ONLY) != 0; - if (setsockopt(listenFd, IPPROTO_IPV6, IPV6_V6ONLY, &enabled, sizeof(enabled)) != 0) { - return LIBUS_SOCKET_ERROR; - } - } -#endif - - if (us_internal_bind_and_listen(listenFd, listenAddr->ai_addr, (socklen_t) listenAddr->ai_addrlen, 512, error)) { - return LIBUS_SOCKET_ERROR; - } - - return listenFd; -} - -int bsd_set_defer_accept(LIBUS_SOCKET_DESCRIPTOR listenFd) { -#if defined(TCP_DEFER_ACCEPT) - /* nginx uses 1 second here: there's no way to know how long a connection sat in the - * defer queue (or whether it bypassed it via syncookies), so a short timeout lets the - * application's own idle timeout take over for clients that connect but never send. */ - int timeout = 1; - return setsockopt(listenFd, IPPROTO_TCP, TCP_DEFER_ACCEPT, &timeout, sizeof(timeout)) == 0; -#elif defined(SO_ACCEPTFILTER) - struct accept_filter_arg afa; - memset(&afa, 0, sizeof(afa)); - strcpy(afa.af_name, "dataready"); - return setsockopt(listenFd, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)) == 0; -#else - (void) listenFd; - return 0; -#endif -} - -// return LIBUS_SOCKET_ERROR or the fd that represents listen socket -// listen both on ipv6 and ipv4 -LIBUS_SOCKET_DESCRIPTOR bsd_create_listen_socket(const char *host, int port, int options, int* error) { - struct addrinfo hints, *result; - memset(&hints, 0, sizeof(struct addrinfo)); - - hints.ai_flags = AI_PASSIVE; - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - - char port_string[16]; - snprintf(port_string, 16, "%d", port); - - if (getaddrinfo(host, port_string, &hints, &result)) { - return LIBUS_SOCKET_ERROR; - } - - LIBUS_SOCKET_DESCRIPTOR listenFd = LIBUS_SOCKET_ERROR; - struct addrinfo *listenAddr; - for (struct addrinfo *a = result; a != NULL; a = a->ai_next) { - if (a->ai_family == AF_INET6) { - listenFd = bsd_create_socket(a->ai_family, a->ai_socktype, a->ai_protocol, NULL); - if (listenFd == LIBUS_SOCKET_ERROR) { - continue; - } - - listenAddr = a; - if (bsd_bind_listen_fd(listenFd, listenAddr, port, options, error) != LIBUS_SOCKET_ERROR) { - freeaddrinfo(result); - return listenFd; - } - - bsd_close_socket(listenFd); - } - } - - for (struct addrinfo *a = result; a != NULL; a = a->ai_next) { - if (a->ai_family == AF_INET) { - listenFd = bsd_create_socket(a->ai_family, a->ai_socktype, a->ai_protocol, NULL); - if (listenFd == LIBUS_SOCKET_ERROR) { - continue; - } - - listenAddr = a; - if (bsd_bind_listen_fd(listenFd, listenAddr, port, options, error) != LIBUS_SOCKET_ERROR) { - freeaddrinfo(result); - return listenFd; - } - - bsd_close_socket(listenFd); - } - } - - freeaddrinfo(result); - return LIBUS_SOCKET_ERROR; -} - -#ifndef _WIN32 -#include -#else -#include -#include -#endif -#include -#include - -#if defined(__APPLE__) -// Per-thread chdir. Not declared in any public header, but a stable syscall since macOS 10.5. -// Passing -1 clears the per-thread cwd override. -extern int __pthread_fchdir(int fd); -#endif - -static LIBUS_SOCKET_DESCRIPTOR bsd_create_unix_socket_address(const char *path, size_t path_len, int* dirfd_workaround_for_unix_path_len, struct sockaddr_un *server_address, size_t* addrlen) { - memset(server_address, 0, sizeof(struct sockaddr_un)); - server_address->sun_family = AF_UNIX; - - if (path_len == 0) { - #if defined(_WIN32) - // simulate ENOENT - SetLastError(ERROR_PATH_NOT_FOUND); - #else - errno = ENOENT; - #endif - return LIBUS_SOCKET_ERROR; - } - - *addrlen = sizeof(struct sockaddr_un); - - #if defined(__linux__) - // Unix socket addresses have a maximum length of 108 bytes on Linux - // As a workaround, we can use /proc/self/fd/ as a directory to shorten the path - if (path_len >= sizeof(server_address->sun_path) && path[0] != '\0') { - size_t dirname_len = path_len; - // get the basename - while (dirname_len > 1 && path[dirname_len - 1] != '/') { - dirname_len--; - } - - // if the path is just a single character, or the path is too long, we cannot use this method - if (dirname_len < 2 || (path_len - dirname_len + 1) >= sizeof(server_address->sun_path)) { - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - char dirname_buf[4096]; - if (dirname_len + 1 > sizeof(dirname_buf)) { - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - memcpy(dirname_buf, path, dirname_len); - dirname_buf[dirname_len] = 0; - - int socket_dir_fd = open(dirname_buf, O_CLOEXEC | O_PATH | O_DIRECTORY, 0700); - if (socket_dir_fd == -1) { - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - int sun_path_len = snprintf(server_address->sun_path, sizeof(server_address->sun_path), "/proc/self/fd/%d/%s", socket_dir_fd, path + dirname_len); - if (sun_path_len >= sizeof(server_address->sun_path) || sun_path_len < 0) { - close(socket_dir_fd); - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - *dirfd_workaround_for_unix_path_len = socket_dir_fd; - return 0; - } else if (path_len < sizeof(server_address->sun_path)) { - memcpy(server_address->sun_path, path, path_len); - - // abstract domain sockets - if (server_address->sun_path[0] == 0) { - *addrlen = offsetof(struct sockaddr_un, sun_path) + path_len; - } - - return 0; - } - #endif - - #if defined(__APPLE__) - // sun_path is 104 bytes on macOS. /dev/fd/N/ is not traversable like /proc/self/fd/N/ on Linux, - // so instead we open the parent directory and let the caller __pthread_fchdir() into it and - // bind/connect with a relative basename. - if (path_len >= sizeof(server_address->sun_path)) { - size_t dirname_len = path_len; - while (dirname_len > 1 && path[dirname_len - 1] != '/') { - dirname_len--; - } - - size_t basename_len = path_len - dirname_len; - if (dirname_len < 2 || basename_len + 1 >= sizeof(server_address->sun_path)) { - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - char dirname_buf[4096]; - if (dirname_len + 1 > sizeof(dirname_buf)) { - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - memcpy(dirname_buf, path, dirname_len); - dirname_buf[dirname_len] = 0; - - int socket_dir_fd = open(dirname_buf, O_CLOEXEC | O_RDONLY | O_DIRECTORY); - if (socket_dir_fd == -1) { - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - - memcpy(server_address->sun_path, path + dirname_len, basename_len); - server_address->sun_path[basename_len] = 0; - - *dirfd_workaround_for_unix_path_len = socket_dir_fd; - return 0; - } - #endif - - if (path_len >= sizeof(server_address->sun_path)) { - #if defined(_WIN32) - // simulate ENAMETOOLONG - SetLastError(ERROR_FILENAME_EXCED_RANGE); - #else - errno = ENAMETOOLONG; - #endif - - return LIBUS_SOCKET_ERROR; - } - - memcpy(server_address->sun_path, path, path_len); - return 0; -} - -static LIBUS_SOCKET_DESCRIPTOR internal_bsd_create_listen_socket_unix(const char* path, int options, struct sockaddr_un* server_address, size_t addrlen, int* error) { - LIBUS_SOCKET_DESCRIPTOR listenFd = LIBUS_SOCKET_ERROR; - - listenFd = bsd_create_socket(AF_UNIX, SOCK_STREAM, 0, NULL); - - if (listenFd == LIBUS_SOCKET_ERROR) { - return LIBUS_SOCKET_ERROR; - } - - if (us_internal_bind_and_listen(listenFd, (struct sockaddr *) server_address, (socklen_t) addrlen, 512, error)) { - #if defined(_WIN32) - int shouldSimulateENOENT = WSAGetLastError() == WSAENETDOWN; - #endif - bsd_close_socket(listenFd); - #if defined(_WIN32) - if (shouldSimulateENOENT) { - SetLastError(ERROR_PATH_NOT_FOUND); - } - #endif - return LIBUS_SOCKET_ERROR; - } - - return listenFd; -} - -LIBUS_SOCKET_DESCRIPTOR bsd_create_listen_socket_unix(const char *path, size_t len, int options, int* error) { - int dirfd_workaround_for_unix_path_len = -1; - struct sockaddr_un server_address; - size_t addrlen = 0; - if (bsd_create_unix_socket_address(path, len, &dirfd_workaround_for_unix_path_len, &server_address, &addrlen)) { - /* The path could not be expressed as a sockaddr_un (the basename - * exceeds sun_path even with the dirfd workaround); surface the errno - * so the caller can report something better than a codeless failure. */ - if (error && errno) *error = errno; - return LIBUS_SOCKET_ERROR; - } - -#if defined(__APPLE__) - if (dirfd_workaround_for_unix_path_len != -1) { - if (__pthread_fchdir(dirfd_workaround_for_unix_path_len) != 0) { - close(dirfd_workaround_for_unix_path_len); - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - } -#endif - - LIBUS_SOCKET_DESCRIPTOR listenFd = internal_bsd_create_listen_socket_unix(path, options, &server_address, addrlen, error); - -#if defined(__APPLE__) - if (dirfd_workaround_for_unix_path_len != -1) { - int saved_errno = errno; - __pthread_fchdir(-1); - close(dirfd_workaround_for_unix_path_len); - errno = saved_errno; - } -#elif defined(__linux__) - if (dirfd_workaround_for_unix_path_len != -1) { - close(dirfd_workaround_for_unix_path_len); - } -#endif - - return listenFd; -} - -LIBUS_SOCKET_DESCRIPTOR bsd_create_udp_socket(const char *host, int port, int options, int *err) { - if (err != NULL) { - *err = 0; - } - - struct addrinfo hints, *result; - memset(&hints, 0, sizeof(struct addrinfo)); - - hints.ai_flags = AI_PASSIVE; - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_DGRAM; - - char port_string[16]; - snprintf(port_string, 16, "%d", port); - - int gai_result = getaddrinfo(host, port_string, &hints, &result); - if (gai_result != 0) { - if (err != NULL) { - *err = -gai_result; - } - return LIBUS_SOCKET_ERROR; - } - - LIBUS_SOCKET_DESCRIPTOR listenFd = LIBUS_SOCKET_ERROR; - struct addrinfo *listenAddr = NULL; - for (struct addrinfo *a = result; a && listenFd == LIBUS_SOCKET_ERROR; a = a->ai_next) { - if (a->ai_family == AF_INET6) { - listenFd = bsd_create_socket(a->ai_family, a->ai_socktype, a->ai_protocol, err); - listenAddr = a; - } - } - - for (struct addrinfo *a = result; a && listenFd == LIBUS_SOCKET_ERROR; a = a->ai_next) { - if (a->ai_family == AF_INET) { - listenFd = bsd_create_socket(a->ai_family, a->ai_socktype, a->ai_protocol, err); - listenAddr = a; - } - } - - if (listenFd == LIBUS_SOCKET_ERROR) { - freeaddrinfo(result); - return LIBUS_SOCKET_ERROR; - } - - if (bsd_set_reuse(listenFd, options) != 0) { - if (err != NULL) { -#ifdef _WIN32 - *err = WSAGetLastError(); -#else - *err = errno; -#endif - } - bsd_close_socket(listenFd); - freeaddrinfo(result); - return LIBUS_SOCKET_ERROR; - } - -#ifdef IPV6_V6ONLY - if (listenAddr->ai_family == AF_INET6) { - int enabled = (options & LIBUS_SOCKET_IPV6_ONLY) != 0; - if (setsockopt(listenFd, IPPROTO_IPV6, IPV6_V6ONLY, &enabled, sizeof(enabled)) != 0) { - return LIBUS_SOCKET_ERROR; - } - } -#endif - - /* We need destination address for udp packets in both ipv6 and ipv4 */ - -/* On FreeBSD this option seems to be called like so */ -#ifndef IPV6_RECVPKTINFO -#define IPV6_RECVPKTINFO IPV6_PKTINFO -#endif - - int enabled = 1; - if (setsockopt(listenFd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &enabled, sizeof(enabled)) == -1) { - if (errno == ENOPROTOOPT || errno == EINVAL) { -#if defined(IP_PKTINFO) - setsockopt(listenFd, IPPROTO_IP, IP_PKTINFO, &enabled, sizeof(enabled)); -#elif defined(IP_RECVDSTADDR) - setsockopt(listenFd, IPPROTO_IP, IP_RECVDSTADDR, &enabled, sizeof(enabled)); -#endif - } - } - - /* These are used for getting the ECN */ - if (setsockopt(listenFd, IPPROTO_IPV6, IPV6_RECVTCLASS, &enabled, sizeof(enabled)) == -1) { - if (errno == ENOPROTOOPT || errno == EINVAL) { - setsockopt(listenFd, IPPROTO_IP, IP_RECVTOS, &enabled, sizeof(enabled)); - } - } - -#if defined(_WIN32) - /* By default Winsock reports ICMP "port unreachable" from a previous - * sendto as WSAECONNRESET on the next recv. bsd_recvmmsg already swallows - * it, but disabling the report at the source means a queued ICMP can't - * race ahead of a real packet in WSARecvFrom either. */ - { - DWORD off = 0, br; - WSAIoctl(listenFd, SIO_UDP_CONNRESET, &off, sizeof(off), NULL, 0, &br, NULL, NULL); -#ifdef SIO_UDP_NETRESET - WSAIoctl(listenFd, SIO_UDP_NETRESET, &off, sizeof(off), NULL, 0, &br, NULL, NULL); -#endif - } -#endif - -#if defined(__linux__) - /* Linux suppresses ICMP errors (port unreachable, host unreachable, TTL - * exceeded, etc.) on unconnected UDP sockets by default. Enabling - * IP_RECVERR/IPV6_RECVERR surfaces them as errors on the next send/recv, - * rather than silently dropping them. Matches libuv. */ -#ifdef IP_RECVERR - setsockopt(listenFd, IPPROTO_IP, IP_RECVERR, &enabled, sizeof(enabled)); -#endif -#ifdef IPV6_RECVERR - if (listenAddr->ai_family == AF_INET6) { - setsockopt(listenFd, IPPROTO_IPV6, IPV6_RECVERR, &enabled, sizeof(enabled)); - } -#endif -#endif - - /* We bind here as well */ - if (bind(listenFd, listenAddr->ai_addr, (socklen_t) listenAddr->ai_addrlen)) { - if (err != NULL) { -#ifdef _WIN32 - *err = WSAGetLastError(); -#else - *err = errno; -#endif - } - bsd_close_socket(listenFd); - freeaddrinfo(result); - return LIBUS_SOCKET_ERROR; - } - - freeaddrinfo(result); - if (err != NULL) { - *err = 0; - } - return listenFd; -} - -int bsd_connect_udp_socket(LIBUS_SOCKET_DESCRIPTOR fd, const char *host, int port) { - struct addrinfo hints, *result; - memset(&hints, 0, sizeof(struct addrinfo)); - - hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_DGRAM; - - char port_string[16]; - snprintf(port_string, 16, "%d", port); - - int gai_error = getaddrinfo(host, port_string, &hints, &result); - - if (gai_error != 0) { - return gai_error; - } - - if (result == NULL) { - return -1; - } - - for (struct addrinfo *rp = result; rp != NULL; rp = rp->ai_next) { - if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) { - freeaddrinfo(result); - return 0; - } - } - - freeaddrinfo(result); - return (int)LIBUS_SOCKET_ERROR; -} - -int bsd_disconnect_udp_socket(LIBUS_SOCKET_DESCRIPTOR fd) { - struct sockaddr addr; - memset(&addr, 0, sizeof(addr)); - addr.sa_family = AF_UNSPEC; - #ifdef __APPLE__ - addr.sa_len = sizeof(addr); - #endif - - int res = connect(fd, &addr, sizeof(addr)); - // EAFNOSUPPORT is harmless in this case - we just want to disconnect - if (res == 0 || -#ifdef _WIN32 - WSAGetLastError() == WSAEAFNOSUPPORT -#else - errno == EAFNOSUPPORT -#endif - ) { - return 0; - } else { - return -1; - } -} - -// int bsd_udp_packet_buffer_ecn(void *msgvec, int index) { - -// #if defined(_WIN32) || defined(__APPLE__) -// errno = ENOSYS; -// return -1; -// #else -// // we should iterate all control messages once, after recvmmsg and then only fetch them with these functions -// struct msghdr *mh = &((struct mmsghdr *) msgvec)[index].msg_hdr; -// for (struct cmsghdr *cmsg = CMSG_FIRSTHDR(mh); cmsg != NULL; cmsg = CMSG_NXTHDR(mh, cmsg)) { -// // do we need to get TOS from ipv6 also? -// if (cmsg->cmsg_level == IPPROTO_IP) { -// if (cmsg->cmsg_type == IP_TOS) { -// uint8_t tos = *(uint8_t *)CMSG_DATA(cmsg); -// return tos & 3; -// } -// } - -// if (cmsg->cmsg_level == IPPROTO_IPV6) { -// if (cmsg->cmsg_type == IPV6_TCLASS) { -// // is this correct? -// uint8_t tos = *(uint8_t *)CMSG_DATA(cmsg); -// return tos & 3; -// } -// } -// } -// #endif - -// //printf("We got no ECN!\n"); -// return 0; // no ecn defaults to 0 -// } - -static int bsd_do_connect_raw(LIBUS_SOCKET_DESCRIPTOR fd, struct sockaddr *addr, size_t namelen) -{ - ssize_t injected = 0; int unused = 0; - if (US_FAULT_CHECK(US_FAULT_CONNECT, fd, injected, unused)) return errno; - (void)injected; (void)unused; -#ifdef _WIN32 - while (1) { - if (connect(fd, (struct sockaddr *)addr, namelen) == 0) { - return 0; - } - - int err = WSAGetLastError(); - switch (err) { - case WSAEINPROGRESS: - case WSAEWOULDBLOCK: - case WSAEALREADY: { - return 0; - } - case WSAEINTR: { - continue; - } - default: { - return err; - } - } - } - - -#else - int r; - do { - errno = 0; - r = connect(fd, (struct sockaddr *)addr, namelen); - } while (IS_EINTR(r)); - - // connect() can return -1 with an errno of 0. - // the errno is the correct one in that case. - if (r == -1 && errno != 0) { - if (errno == EINPROGRESS) { - return 0; - } - - return errno; - } - - return 0; -#endif -} - -#ifdef _WIN32 - -static int convert_null_addr(const struct sockaddr_storage *addr, struct sockaddr_storage* result) { - // 1. check that all addrinfo results are 0.0.0.0 or :: - if (addr->ss_family == AF_INET) { - struct sockaddr_in *addr4 = (struct sockaddr_in *) addr; - if (addr4->sin_addr.s_addr == htonl(INADDR_ANY)) { - memcpy(result, addr, sizeof(struct sockaddr_in)); - ((struct sockaddr_in *) result)->sin_addr.s_addr = htonl(INADDR_LOOPBACK); - return 1; - } - } else if (addr->ss_family == AF_INET6) { - struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *) addr; - if (memcmp(&addr6->sin6_addr, &in6addr_any, sizeof(struct in6_addr)) == 0) { - memcpy(result, addr, sizeof(struct sockaddr_in6)); - memcpy(&((struct sockaddr_in6 *) result)->sin6_addr, &in6addr_loopback, sizeof(struct in6_addr)); - return 1; - } - } - return 0; -} - -static int is_loopback(struct sockaddr_storage *sockaddr) { - if (sockaddr->ss_family == AF_INET) { - struct sockaddr_in *addr = (struct sockaddr_in *) sockaddr; - return addr->sin_addr.s_addr == htonl(INADDR_LOOPBACK); - } else if (sockaddr->ss_family == AF_INET6) { - struct sockaddr_in6 *addr = (struct sockaddr_in6 *) sockaddr; - return memcmp(&addr->sin6_addr, &in6addr_loopback, sizeof(struct in6_addr)) == 0; - } else { - return 0; - } -} -#endif - -LIBUS_SOCKET_DESCRIPTOR bsd_create_connect_socket(struct sockaddr_storage *addr, struct sockaddr_storage *local_addr, int options) { - LIBUS_SOCKET_DESCRIPTOR fd = bsd_create_socket(addr->ss_family, SOCK_STREAM, 0, NULL); - if (fd == LIBUS_SOCKET_ERROR) { - return LIBUS_SOCKET_ERROR; - } - - /* Bind to the requested local address/port before connecting (the - * `localAddress`/`localPort` connect options). A failure here - typically - * EADDRINUSE or EADDRNOTAVAIL - fails the connect with that errno. */ - if (local_addr) { -#ifndef _WIN32 - /* Match libuv's uv__tcp_bind: set SO_REUSEADDR so binding the local - * port succeeds when earlier connections on that port are still in - * TIME_WAIT. Not set on Windows, where SO_REUSEADDR would allow - * stealing a port that is actively in use (see libuv win/tcp.c). */ - int on = 1; - setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); -#endif - socklen_t local_len = local_addr->ss_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); - if (bind(fd, (struct sockaddr *) local_addr, local_len)) { -#ifdef _WIN32 - int bind_err = WSAGetLastError(); - bsd_close_socket(fd); - WSASetLastError(bind_err); -#else - int bind_err = errno; - bsd_close_socket(fd); - errno = bind_err; -#endif - return LIBUS_SOCKET_ERROR; - } - } - -#ifdef _WIN32 - win32_set_nonblocking(fd); - - // On windows we can't connect to the null address directly. - // To match POSIX behavior, we need to connect to localhost instead. - struct sockaddr_storage converted; - if (convert_null_addr(addr, &converted)) { - addr = &converted; - } - - // This sets the socket to fail quickly if no connection can be established to localhost, - // instead of waiting for the default 2 seconds. This is necessary because we always try to connect - // using IPv6 first, but it's possible that whatever we want to connect to is only listening on IPv4. - // see https://github.com/libuv/libuv/blob/bf61390769068de603e6deec8e16623efcbe761a/src/win/tcp.c#L806 - TCP_INITIAL_RTO_PARAMETERS retransmit_ioctl; - DWORD bytes; - if (is_loopback(addr)) { - memset(&retransmit_ioctl, 0, sizeof(retransmit_ioctl)); - retransmit_ioctl.Rtt = TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS; - retransmit_ioctl.MaxSynRetransmissions = TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS; - WSAIoctl(fd, - SIO_TCP_INITIAL_RTO, - &retransmit_ioctl, - sizeof(retransmit_ioctl), - NULL, - 0, - &bytes, - NULL, - NULL); - } - -#endif - int rc = bsd_do_connect_raw(fd, (struct sockaddr*) addr, addr->ss_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)); - - if (rc != 0) { - bsd_close_socket(fd); - return LIBUS_SOCKET_ERROR; - } - return fd; -} - -static LIBUS_SOCKET_DESCRIPTOR internal_bsd_create_connect_socket_unix(const char *server_path, size_t len, int options, struct sockaddr_un* server_address, const size_t addrlen) { - LIBUS_SOCKET_DESCRIPTOR fd = bsd_create_socket(AF_UNIX, SOCK_STREAM, 0, NULL); - - if (fd == LIBUS_SOCKET_ERROR) { - return LIBUS_SOCKET_ERROR; - } - - win32_set_nonblocking(fd); - - if (bsd_do_connect_raw(fd, (struct sockaddr *)server_address, addrlen) != 0) { - bsd_close_socket(fd); - return LIBUS_SOCKET_ERROR; - } - - return fd; -} - -LIBUS_SOCKET_DESCRIPTOR bsd_create_connect_socket_unix(const char *server_path, size_t len, int options) { - struct sockaddr_un server_address; - size_t addrlen = 0; - int dirfd_workaround_for_unix_path_len = -1; - if (bsd_create_unix_socket_address(server_path, len, &dirfd_workaround_for_unix_path_len, &server_address, &addrlen)) { - return LIBUS_SOCKET_ERROR; - } - -#if defined(__APPLE__) - if (dirfd_workaround_for_unix_path_len != -1) { - if (__pthread_fchdir(dirfd_workaround_for_unix_path_len) != 0) { - close(dirfd_workaround_for_unix_path_len); - errno = ENAMETOOLONG; - return LIBUS_SOCKET_ERROR; - } - } -#endif - - LIBUS_SOCKET_DESCRIPTOR fd = internal_bsd_create_connect_socket_unix(server_path, len, options, &server_address, addrlen); - -#if defined(__APPLE__) - if (dirfd_workaround_for_unix_path_len != -1) { - int saved_errno = errno; - __pthread_fchdir(-1); - close(dirfd_workaround_for_unix_path_len); - errno = saved_errno; - } -#elif defined(__linux__) - if (dirfd_workaround_for_unix_path_len != -1) { - close(dirfd_workaround_for_unix_path_len); - } -#endif - - return fd; -} diff --git a/packages/bun-usockets/src/context.c b/packages/bun-usockets/src/context.c deleted file mode 100644 index 6bd57a6887cb..000000000000 --- a/packages/bun-usockets/src/context.c +++ /dev/null @@ -1,827 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "internal/internal.h" -#include "libusockets.h" -#include -#include -#include -#ifndef _WIN32 -#include -#include -#endif -#define CONCURRENT_CONNECTIONS 4 - -#if defined(BUN_DEBUG) || (defined(__has_feature) && __has_feature(address_sanitizer)) || defined(__SANITIZE_ADDRESS__) -#include -#define US_ASSERT(x) assert(x) -#else -#define US_ASSERT(x) ((void)0) -#endif - -// clang-format off - -/* Forward-declared so this file does not depend on OpenSSL headers. */ -/* Opaque SSL_CTX ref helpers — defined in crypto/openssl.c so this file - * stays free of OpenSSL headers. */ - -int us_internal_raw_root_certs(struct us_cert_string_t** out); -int us_raw_root_certs(struct us_cert_string_t**out){ - return us_internal_raw_root_certs(out); -} - -/* ── Group lifecycle ────────────────────────────────────────────────────── */ - -void us_socket_group_init(struct us_socket_group_t *group, struct us_loop_t *loop, - const struct us_socket_vtable_t *vtable, void *ext) { - memset(group, 0, sizeof(*group)); - group->loop = loop; - group->vtable = vtable; - group->ext = ext; -} - -void us_socket_group_deinit(struct us_socket_group_t *group) { - /* The owner is about to free the embedding storage. Every list head and the - * low-prio count must be zero or some socket/listener/DNS request still - * holds s->group / c->group / ls->accept_group into us — that's a UAF the - * caller must close_all() away first. iterator != NULL means we're inside - * a dispatch on this very group; the on_close that triggers deinit is fine - * (unlink_socket already advanced iterator), but a re-entrant deinit from - * inside on_timeout/on_data would tear the floor out from under the sweep. */ - US_ASSERT(group->head_sockets == NULL); - US_ASSERT(group->head_connecting_sockets == NULL); - US_ASSERT(group->head_listen_sockets == NULL); - US_ASSERT(group->low_prio_count == 0); - US_ASSERT(group->iterator == NULL); - if (group->linked) { - us_internal_loop_unlink_group(group->loop, group); - group->linked = 0; - } -} - -/* Close every connecting/connected socket in the group; if `also_listeners`, - * close listen sockets too. Process-exit callers pass 0: a us_listen_socket_t - * is 1:1 owned by a Zig Listener / uWS App that holds a raw pointer to it and - * closes it in finalize(), so closing+freeing it here turns that into a UAF - * (the original LSAN was only the *accepted* sockets, not the listener). */ -void us_socket_group_close_all_ex(struct us_socket_group_t *group, int also_listeners) { - if (also_listeners) { - /* Listeners first — stops new sockets from being accepted into - * head_sockets while we're draining it. */ - while (group->head_listen_sockets) { - us_listen_socket_close(group->head_listen_sockets); - } - } - - struct us_connecting_socket_t *c = group->head_connecting_sockets; - while (c) { - struct us_connecting_socket_t *nextC = c->next_pending; - us_connecting_socket_close(c); - c = nextC; - } - - struct us_socket_t *s = group->head_sockets; - while (s) { - struct us_socket_t *nextS = s->next; - if (us_internal_poll_type(&s->p) & POLL_TYPE_SEMI_SOCKET) { - /* In-flight connect — close_raw skips dispatch for SEMI_SOCKET - * (on_close without on_open is wrong), so the Zig wrapper's - * `socket = .connected` would never detach and finalize() UAFs - * after drainClosedSockets(). Deliver the same on_connect_error - * the natural failure path would have, which detaches the - * wrapper. The handler then closes; if it doesn't, the - * force-drain below catches it. */ - us_dispatch_connect_error(s, ECONNABORTED); - if (!us_socket_is_closed(s)) { - us_internal_socket_close_raw(s, LIBUS_SOCKET_CLOSE_CODE_CONNECTION_RESET, 0); - } - } else { - us_socket_close(s, LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN, 0); - } - s = nextS; - } - - /* TLS sockets may have *deferred* the close above: us_internal_ssl_close - * with code==0 sends close_notify and, on WANT_READ, leaves the socket - * open in head_sockets waiting for the peer's reply. Callers of close_all - * (e.g. Listener.deinit) free the embedding storage immediately after, so - * any survivor's s->group becomes a dangling pointer. The graceful walk - * already flushed close_notify; force-drain the rest synchronously now. */ - while (group->head_sockets) { - us_internal_socket_close_raw(group->head_sockets, LIBUS_SOCKET_CLOSE_CODE_CONNECTION_RESET, 0); - } - - /* Sockets parked in the loop-wide low-prio queue aren't in head_sockets - * (the queue reuses prev/next), so they'd survive the walk above and later - * dereference s->group into freed owner storage. Drain ours out now. */ - if (group->low_prio_count) { - /* Don't pre-unlink — leave low_prio_state==1 so us_socket_close takes - * its low-prio branch (which knows the socket is NOT in head_sockets - * and decrements low_prio_count itself). The cached `next` survives - * the close because that branch rewires the list before dispatch. */ - struct us_internal_loop_data_t *ld = &group->loop->data; - struct us_socket_t *q = ld->low_prio_head; - while (q) { - struct us_socket_t *next = q->next; - if (q->group == group) { - us_socket_close(q, LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN, 0); - } - q = next; - } - US_ASSERT(group->low_prio_count == 0); - } -} - -void us_socket_group_close_all(struct us_socket_group_t *group) { - us_socket_group_close_all_ex(group, 1); -} - -unsigned short us_socket_group_timestamp(struct us_socket_group_t *group) { - return group->timestamp; -} - -__attribute__((always_inline)) struct us_loop_t *us_socket_group_loop(struct us_socket_group_t *group) { - return group->loop; -} - -__attribute__((always_inline)) void *us_socket_group_ext(struct us_socket_group_t *group) { - return group->ext; -} - -struct us_socket_group_t *us_socket_group_next(struct us_socket_group_t *group) { - return group->next; -} - -/* ── Link / unlink ──────────────────────────────────────────────────────── */ - -static inline int us_internal_group_is_empty(struct us_socket_group_t *group) { - return group->head_sockets == NULL - && group->head_connecting_sockets == NULL - && group->head_listen_sockets == NULL - && group->low_prio_count == 0; -} - -static inline void us_internal_group_touched(struct us_socket_group_t *group) { - if (!group->linked) { - us_internal_loop_link_group(group->loop, group); - group->linked = 1; - } -} - -void us_internal_group_maybe_unlink(struct us_socket_group_t *group) { - if (group->linked && us_internal_group_is_empty(group)) { - us_internal_loop_unlink_group(group->loop, group); - group->linked = 0; - } -} - -void us_internal_socket_group_link_socket(struct us_socket_group_t *group, struct us_socket_t *s) { - if (us_socket_is_closed(s)) return; - - s->group = group; - s->next = group->head_sockets; - s->prev = 0; - if (group->head_sockets) { - group->head_sockets->prev = s; - } - group->head_sockets = s; - us_internal_group_touched(group); - us_internal_enable_sweep_timer(group->loop); -} - -void us_internal_socket_group_unlink_socket(struct us_socket_group_t *group, struct us_socket_t *s) { - /* We have to properly update the iterator used to sweep sockets for timeouts */ - if (s == group->iterator) { - group->iterator = s->next; - } - - struct us_socket_t* prev = s->prev; - struct us_socket_t* next = s->next; - if (prev == next) { - group->head_sockets = 0; - } else { - if (prev) { - prev->next = next; - } else { - group->head_sockets = next; - } - if (next) { - next->prev = prev; - } - } - us_internal_disable_sweep_timer(group->loop); - us_internal_group_maybe_unlink(group); -} - -void us_internal_socket_group_link_connecting_socket(struct us_socket_group_t *group, struct us_connecting_socket_t *c) { - if (c->closed) return; - - c->group = group; - c->next_pending = group->head_connecting_sockets; - c->prev_pending = 0; - if (group->head_connecting_sockets) { - group->head_connecting_sockets->prev_pending = c; - } - group->head_connecting_sockets = c; - us_internal_group_touched(group); - us_internal_enable_sweep_timer(group->loop); -} - -void us_internal_socket_group_unlink_connecting_socket(struct us_socket_group_t *group, struct us_connecting_socket_t *c) { - struct us_connecting_socket_t* prev = c->prev_pending; - struct us_connecting_socket_t* next = c->next_pending; - if (prev == next) { - group->head_connecting_sockets = 0; - } else { - if (prev) { - prev->next_pending = next; - } else { - group->head_connecting_sockets = next; - } - if (next) { - next->prev_pending = prev; - } - } - us_internal_disable_sweep_timer(group->loop); - us_internal_group_maybe_unlink(group); -} - -/* ── Adopt ──────────────────────────────────────────────────────────────── */ - -struct us_socket_t *us_socket_adopt(struct us_socket_t *s, struct us_socket_group_t *group, - unsigned char kind, int old_ext_size, int ext_size) { - if (us_socket_is_closed(s) || us_socket_is_shut_down(s)) { - return s; - } - struct us_socket_group_t *old_group = s->group; - struct us_loop_t *loop = old_group->loop; - - if (s->flags.low_prio_state != 1) { - /* This properly updates the iterator if in on_timeout */ - us_internal_socket_group_unlink_socket(old_group, s); - } else if (old_group != group) { - /* Stays on the loop-wide low-prio queue, but s->group changes owner — - * keep both groups' invariants consistent so old_group can deinit. */ - old_group->low_prio_count--; - group->low_prio_count++; - us_internal_group_touched(group); - us_internal_group_maybe_unlink(old_group); - } - - struct us_connecting_socket_t *c = s->connect_state; - struct us_socket_t *new_s = s; - if (ext_size != -1) { - struct us_poll_t *poll_ref = &s->p; - new_s = (struct us_socket_t *) us_poll_resize(poll_ref, loop, - sizeof(struct us_socket_t) - sizeof(struct us_poll_t) + old_ext_size, - sizeof(struct us_socket_t) - sizeof(struct us_poll_t) + ext_size); - if (new_s != s) { - /* Mark the old socket as closed */ - s->flags.is_closed = 1; - /* Link this socket to the close-list and let it be deleted after this iteration */ - s->next = loop->data.closed_head; - loop->data.closed_head = s; - /* Mark the old socket as adopted (reallocated) */ - s->flags.adopted = 1; - /* Tell the event loop what is the new socket so we can route subsequent events */ - s->prev = new_s; - if (s->ssl) { - us_internal_ssl_socket_relocated(loop, s, new_s); - } - } - if (c) { - c->connecting_head = new_s; - c->group = group; - c->kind = kind; - us_internal_socket_group_unlink_connecting_socket(old_group, c); - us_internal_socket_group_link_connecting_socket(group, c); - } - } - new_s->group = group; - new_s->kind = kind; - new_s->timeout = 255; - new_s->long_timeout = 255; - - if (new_s->flags.low_prio_state == 1) { - /* update pointers in low-priority queue */ - if (!new_s->prev) loop->data.low_prio_head = new_s; - else new_s->prev->next = new_s; - - if (new_s->next) new_s->next->prev = new_s; - } else { - us_internal_socket_group_link_socket(group, new_s); - } - return new_s; -} - -/* ── Listen ─────────────────────────────────────────────────────────────── */ - -static void us_internal_init_listen_socket(struct us_listen_socket_t *ls, - struct us_socket_group_t *group, - unsigned char kind, struct ssl_ctx_st *ssl_ctx, - int options, int socket_ext_size) { - struct us_socket_t *s = &ls->s; - s->group = group; - s->kind = 0; /* listener itself never dispatches */ - s->ssl = NULL; - s->timeout = 255; - s->long_timeout = 255; - s->flags.low_prio_state = 0; - s->flags.is_paused = 0; - s->flags.is_ipc = 0; - s->flags.is_closed = 0; - s->flags.adopted = 0; - s->flags.allow_half_open = (options & LIBUS_SOCKET_ALLOW_HALF_OPEN); - s->next = 0; - s->prev = 0; - s->connect_state = NULL; - s->connect_next = NULL; - - ls->accept_group = group; - ls->accept_kind = kind; - ls->ssl_ctx = ssl_ctx; - if (ssl_ctx) us_internal_ssl_ctx_up_ref(ssl_ctx); - ls->sni = NULL; - ls->on_server_name = NULL; - ls->socket_ext_size = socket_ext_size; - ls->deferred_accept = 0; - - /* Link into the group so close_all() / test-isolation can find it. */ - ls->next = group->head_listen_sockets; - group->head_listen_sockets = ls; - us_internal_group_touched(group); -} - -struct us_listen_socket_t *us_socket_group_listen(struct us_socket_group_t *group, - unsigned char kind, struct ssl_ctx_st *ssl_ctx, - const char *host, int port, int options, int socket_ext_size, int *error) { - LIBUS_SOCKET_DESCRIPTOR listen_socket_fd = bsd_create_listen_socket(host, port, options, error); - if (listen_socket_fd == LIBUS_SOCKET_ERROR) { - return 0; - } - - struct us_poll_t *p = us_create_poll(group->loop, 0, sizeof(struct us_listen_socket_t)); - us_poll_init(p, listen_socket_fd, POLL_TYPE_SEMI_SOCKET); - if (us_poll_start_rc(p, group->loop, LIBUS_SOCKET_READABLE) != 0) { - /* EPOLL_CTL_ADD failed (e.g. ENOSPC at fs.epoll.max_user_watches). - * Report via both the out-param and thread-local errno: Bun.listen - * reads *error, Bun.serve reads errno. */ - int saved_errno = errno; - bsd_close_socket(listen_socket_fd); - us_poll_free(p, group->loop); - *error = saved_errno; - errno = saved_errno; - return 0; - } - - struct us_listen_socket_t *ls = (struct us_listen_socket_t *) p; - us_internal_init_listen_socket(ls, group, kind, ssl_ctx, options, socket_ext_size); - - if (options & LIBUS_LISTEN_DEFER_ACCEPT) { - ls->deferred_accept = bsd_set_defer_accept(listen_socket_fd); - } - - return ls; -} - -struct us_listen_socket_t *us_socket_group_listen_unix(struct us_socket_group_t *group, - unsigned char kind, struct ssl_ctx_st *ssl_ctx, - const char *path, size_t pathlen, int options, int socket_ext_size, int *error) { - LIBUS_SOCKET_DESCRIPTOR listen_socket_fd = bsd_create_listen_socket_unix(path, pathlen, options, error); - if (listen_socket_fd == LIBUS_SOCKET_ERROR) { - return 0; - } - - struct us_poll_t *p = us_create_poll(group->loop, 0, sizeof(struct us_listen_socket_t)); - us_poll_init(p, listen_socket_fd, POLL_TYPE_SEMI_SOCKET); - if (us_poll_start_rc(p, group->loop, LIBUS_SOCKET_READABLE) != 0) { - int saved_errno = errno; - bsd_close_socket(listen_socket_fd); - us_poll_free(p, group->loop); - *error = saved_errno; - errno = saved_errno; - return 0; - } - - struct us_listen_socket_t *ls = (struct us_listen_socket_t *) p; - us_internal_init_listen_socket(ls, group, kind, ssl_ctx, options, socket_ext_size); - - return ls; -} - -void us_listen_socket_close(struct us_listen_socket_t *ls) { - struct us_socket_t *s = &ls->s; - if (!us_socket_is_closed(s)) { - struct us_socket_group_t *group = ls->accept_group; - struct us_loop_t *loop = s->group->loop; - us_poll_stop((struct us_poll_t *) s, loop); - bsd_close_socket(us_poll_fd((struct us_poll_t *) s)); - - us_internal_listen_socket_ssl_free(ls); - - /* Unlink from group->head_listen_sockets (singly-linked). */ - for (struct us_listen_socket_t **pp = &group->head_listen_sockets; *pp; pp = &(*pp)->next) { - if (*pp == ls) { *pp = ls->next; break; } - } - ls->next = NULL; - us_internal_group_maybe_unlink(group); - - /* Link this socket to the close-list and let it be deleted after this iteration */ - s->next = loop->data.closed_head; - loop->data.closed_head = s; - s->flags.is_closed = 1; - } - /* We cannot immediately free a listen socket as we can be inside an accept loop */ -} - -__attribute__((always_inline)) void *us_listen_socket_ext(struct us_listen_socket_t *ls) { - return ls + 1; -} - -struct us_listen_socket_t *us_socket_group_head_listen_socket(struct us_socket_group_t *group) { - return group->head_listen_sockets; -} - -struct us_listen_socket_t *us_listen_socket_next(struct us_listen_socket_t *ls) { - return ls->next; -} - -LIBUS_SOCKET_DESCRIPTOR us_listen_socket_get_fd(struct us_listen_socket_t *ls) { - return us_poll_fd(&ls->s.p); -} - -int us_listen_socket_port(struct us_listen_socket_t *ls) { - return us_socket_local_port(&ls->s); -} - -struct us_socket_group_t *us_listen_socket_group(struct us_listen_socket_t *ls) { - return ls->accept_group; -} - -/* ── Connect ────────────────────────────────────────────────────────────── */ - -static inline void us_internal_init_connect_socket(struct us_socket_t *s, - struct us_socket_group_t *group, - unsigned char kind, int options) { - s->group = group; - s->kind = kind; - s->ssl = NULL; - s->timeout = 255; - s->long_timeout = 255; - s->flags.low_prio_state = 0; - s->flags.allow_half_open = (options & LIBUS_SOCKET_ALLOW_HALF_OPEN); - s->flags.is_paused = 0; - s->flags.is_ipc = 0; - s->flags.is_closed = 0; - s->flags.adopted = 0; - s->flags.last_write_failed = 0; - s->connect_state = NULL; - s->connect_next = NULL; -} - -struct us_socket_t *us_socket_group_connect_resolved_dns(struct us_socket_group_t *group, - unsigned char kind, struct ssl_ctx_st *ssl_ctx, - struct sockaddr_storage *addr, struct sockaddr_storage *local_addr, int options, int socket_ext_size) { - LIBUS_SOCKET_DESCRIPTOR connect_socket_fd = bsd_create_connect_socket(addr, local_addr, options); - if (connect_socket_fd == LIBUS_SOCKET_ERROR) { - return NULL; - } - - bsd_socket_nodelay(connect_socket_fd, 1); - - struct us_poll_t *p = us_create_poll(group->loop, 0, sizeof(struct us_socket_t) + socket_ext_size); - us_poll_init(p, connect_socket_fd, POLL_TYPE_SEMI_SOCKET); - if (us_poll_start_rc(p, group->loop, LIBUS_SOCKET_WRITABLE) != 0) { - int saved_errno = errno; - bsd_close_socket(connect_socket_fd); - us_poll_free(p, group->loop); - errno = saved_errno; - return NULL; - } - - struct us_socket_t *socket = (struct us_socket_t *) p; - us_internal_init_connect_socket(socket, group, kind, options); - - /* Fast path has no us_connecting_socket_t to stash ssl_ctx on, so attach - * the SSL state now; on_open will see s->ssl != NULL and route through the - * TLS layer. */ - if (ssl_ctx) { - us_internal_ssl_attach(socket, ssl_ctx, 1, NULL, NULL); - } - - us_internal_socket_group_link_socket(group, socket); - return socket; -} - -static void init_addr_with_port(struct addrinfo* info, int port, struct sockaddr_storage *addr) { - if (info->ai_family == AF_INET) { - struct sockaddr_in *addr_in = (struct sockaddr_in *) addr; - memcpy(addr_in, info->ai_addr, info->ai_addrlen); - addr_in->sin_port = htons(port); - } else { - struct sockaddr_in6 *addr_in6 = (struct sockaddr_in6 *) addr; - memcpy(addr_in6, info->ai_addr, info->ai_addrlen); - addr_in6->sin6_port = htons(port); - } -} - -static bool try_parse_ip(const char *ip_str, int port, struct sockaddr_storage *storage) { - memset(storage, 0, sizeof(struct sockaddr_storage)); - struct sockaddr_in *addr4 = (struct sockaddr_in *)storage; - if (inet_pton(AF_INET, ip_str, &addr4->sin_addr) == 1) { - addr4->sin_port = htons(port); - addr4->sin_family = AF_INET; -#ifdef __APPLE__ - addr4->sin_len = sizeof(struct sockaddr_in); -#endif - return 1; - } - - struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)storage; - if (inet_pton(AF_INET6, ip_str, &addr6->sin6_addr) == 1) { - addr6->sin6_port = htons(port); - addr6->sin6_family = AF_INET6; -#ifdef __APPLE__ - addr6->sin6_len = sizeof(struct sockaddr_in6); -#endif - return 1; - } - - return 0; -} - -void *us_socket_group_connect(struct us_socket_group_t *group, unsigned char kind, - struct ssl_ctx_st *ssl_ctx, const char *host, int port, - const char *local_host, int local_port, int options, - int socket_ext_size, int *has_dns_resolved) { - struct us_loop_t *loop = group->loop; - - /* The local address is always a literal IP (Node validates it as one). */ - struct sockaddr_storage local_addr_storage; - struct sockaddr_storage *local_addr = NULL; - if (local_host && try_parse_ip(local_host, local_port, &local_addr_storage)) { - local_addr = &local_addr_storage; - } - - struct sockaddr_storage addr; - if (try_parse_ip(host, port, &addr)) { - *has_dns_resolved = 1; - return us_socket_group_connect_resolved_dns(group, kind, ssl_ctx, &addr, local_addr, options, socket_ext_size); - } - - struct addrinfo_request *ai_req; - if (Bun__addrinfo_get(loop, host, (uint16_t)port, &ai_req) == 0) { - struct addrinfo_result *result = Bun__addrinfo_getRequestResult(ai_req); - /* A cached resolver failure falls through to the connecting-socket path - * below (same as a multi-address result) so it is reported through the - * same connect-error callback, tagged `error_is_dns`, as an uncached - * one. Bun__addrinfo_set on an already-resolved request defers to the - * loop's dns_ready_head, never re-enters. */ - if (!result->error) { - struct addrinfo_result_entry *entries = result->entries; - if (entries && entries->info.ai_next == NULL) { - struct sockaddr_storage a; - init_addr_with_port(&entries->info, port, &a); - *has_dns_resolved = 1; - struct us_socket_t *s = us_socket_group_connect_resolved_dns(group, kind, ssl_ctx, &a, local_addr, options, socket_ext_size); - Bun__addrinfo_freeRequest(ai_req, s == NULL); - return s; - } - } - } - - /* CodeRabbit: us_calloc is mimalloc, which aborts on OOM (matches the - * other 13 unchecked allocations in this library). A NULL-check here would - * also have to cancel the in-flight ai_req — brittle for an unreachable - * path. */ - struct us_connecting_socket_t *c = us_calloc(1, sizeof(struct us_connecting_socket_t) + socket_ext_size); - c->socket_ext_size = socket_ext_size; - c->options = options; - c->kind = kind; - c->loop = loop; - c->ssl_ctx = ssl_ctx; - if (ssl_ctx) us_internal_ssl_ctx_up_ref(ssl_ctx); - c->timeout = 255; - c->long_timeout = 255; - c->pending_resolve_callback = 1; - c->addrinfo_req = ai_req; - c->port = port; - us_internal_socket_group_link_connecting_socket(group, c); - -#ifdef _WIN32 - loop->uv_loop->active_handles++; -#else - loop->num_polls++; -#endif - - Bun__addrinfo_set(ai_req, c); - - return c; -} - -struct us_socket_t *us_socket_group_connect_unix(struct us_socket_group_t *group, - unsigned char kind, struct ssl_ctx_st *ssl_ctx, - const char *server_path, size_t pathlen, int options, int socket_ext_size) { - LIBUS_SOCKET_DESCRIPTOR connect_socket_fd = bsd_create_connect_socket_unix(server_path, pathlen, options); - if (connect_socket_fd == LIBUS_SOCKET_ERROR) { - return 0; - } - - struct us_poll_t *p = us_create_poll(group->loop, 0, sizeof(struct us_socket_t) + socket_ext_size); - us_poll_init(p, connect_socket_fd, POLL_TYPE_SEMI_SOCKET); - if (us_poll_start_rc(p, group->loop, LIBUS_SOCKET_WRITABLE) != 0) { - int saved_errno = errno; - bsd_close_socket(connect_socket_fd); - us_poll_free(p, group->loop); - errno = saved_errno; - return 0; - } - - struct us_socket_t *connect_socket = (struct us_socket_t *) p; - us_internal_init_connect_socket(connect_socket, group, kind, options); - - if (ssl_ctx) { - us_internal_ssl_attach(connect_socket, ssl_ctx, 1, NULL, NULL); - } - - us_internal_socket_group_link_socket(group, connect_socket); - return connect_socket; -} - -int start_connections(struct us_connecting_socket_t *c, int count) { - int opened = 0; - struct us_socket_group_t *group = c->group; - struct us_loop_t *loop = group->loop; - for (; c->addrinfo_head != NULL && opened < count; c->addrinfo_head = c->addrinfo_head->ai_next) { - struct sockaddr_storage addr; - init_addr_with_port(c->addrinfo_head, c->port, &addr); - /* The deferred-DNS path does not carry a local binding. */ - LIBUS_SOCKET_DESCRIPTOR connect_socket_fd = bsd_create_connect_socket(&addr, NULL, c->options); - if (connect_socket_fd == LIBUS_SOCKET_ERROR) { - continue; - } - bsd_socket_nodelay(connect_socket_fd, 1); - struct us_socket_t *s = (struct us_socket_t *)us_create_poll(loop, 0, sizeof(struct us_socket_t) + c->socket_ext_size); - struct us_poll_t *poll = &s->p; - us_poll_init(poll, connect_socket_fd, POLL_TYPE_SEMI_SOCKET); - if (us_poll_start_rc(poll, loop, LIBUS_SOCKET_WRITABLE) != 0) { - bsd_close_socket(connect_socket_fd); - us_poll_free(poll, loop); - continue; - } - ++opened; - us_internal_init_connect_socket(s, group, c->kind, c->options); - s->timeout = c->timeout; - s->long_timeout = c->long_timeout; - - us_internal_socket_group_link_socket(group, s); - - memcpy((void *)(s + 1), (void *)(c + 1), c->socket_ext_size); - - s->connect_next = c->connecting_head; - c->connecting_head = s; - s->connect_state = c; - } - return opened; -} - -void us_internal_socket_after_resolve(struct us_connecting_socket_t *c) { - /* close_all() may have run between the DNS thread queuing this callback and - * us reaching it; c->group is NULL'd at close so it can't be touched. The - * keep-alive (num_polls/active_handles) was already balanced by the close - * path's Bun__addrinfo_cancel branch. */ - c->pending_resolve_callback = 0; - if (c->closed) { - if (c->addrinfo_req) { - Bun__addrinfo_freeRequest(c->addrinfo_req, 0); - c->addrinfo_req = 0; - } - us_connecting_socket_free(c); - return; - } - - struct us_socket_group_t *group = c->group; -#ifdef _WIN32 - group->loop->uv_loop->active_handles--; -#else - group->loop->num_polls--; -#endif - struct addrinfo_result *result = Bun__addrinfo_getRequestResult(c->addrinfo_req); - if (result->error) { - /* Preserve the getaddrinfo failure so the connect-error callback can - * report the resolver error (ENOTFOUND, ...) instead of the fabricated - * ECONNABORTED that us_connecting_socket_close fills in when `error` - * is still 0. `error_is_dns` tags the namespace: getaddrinfo return - * codes and errnos overlap numerically. */ - c->error = result->error; - c->error_is_dns = 1; - us_connecting_socket_close(c); - return; - } - - c->addrinfo_head = &result->entries->info; - - int opened = start_connections(c, CONCURRENT_CONNECTIONS); - if (opened == 0) { - /* Same as the exhausted path in us_internal_socket_after_open: a - * real connect failure must not be reported as a caller abort. */ - c->error = ECONNREFUSED; - us_connecting_socket_close(c); - } -} - -void us_internal_socket_after_open(struct us_socket_t *s, int error) { - struct us_connecting_socket_t *c = s->connect_state; - #if _WIN32 - if (error == 0) { - if (recv(us_poll_fd((struct us_poll_t*)s), NULL, 0, MSG_PUSH_IMMEDIATE) == SOCKET_ERROR) { - error = WSAGetLastError(); - switch (error) { - case WSAEWOULDBLOCK: - case WSAEINTR: { - error = 0; - break; - } - default: { - break; - } - } - } - } - #endif - if (error) { - if (c) { - for (struct us_socket_t **next = &c->connecting_head; *next; next = &(*next)->connect_next) { - if (*next == s) { - *next = s->connect_next; - break; - } - } - us_socket_close(s, LIBUS_SOCKET_CLOSE_CODE_CONNECTION_RESET, 0); - - if (c->connecting_head == NULL || c->connecting_head->connect_next == NULL) { - int opened = start_connections(c, c->connecting_head == NULL ? CONCURRENT_CONNECTIONS : 1); - if (opened == 0 && c->connecting_head == NULL) { - /* Every resolved address failed to connect. Without this, - * us_connecting_socket_close defaults c->error to - * ECONNABORTED (caller abort) and never invalidates the - * DNS cache entry for the dead host. */ - c->error = ECONNREFUSED; - us_connecting_socket_close(c); - } - } - } else { - us_dispatch_connect_error(s, error); - // It's expected that close is called by the caller - } - } else { - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE); - bsd_socket_nodelay(us_poll_fd(&s->p), 1); - us_internal_poll_set_type(&s->p, POLL_TYPE_SOCKET); - us_socket_timeout(s, 0); - - if (c) { - for (struct us_socket_t *next = c->connecting_head; next; next = next->connect_next) { - if (next != s) { - us_socket_close(next, LIBUS_SOCKET_CLOSE_CODE_CONNECTION_RESET, 0); - } - } - /* Attach TLS now that we know which candidate won. */ - if (c->ssl_ctx) { - us_internal_ssl_attach(s, c->ssl_ctx, 1, NULL, NULL); - } - Bun__addrinfo_freeRequest(c->addrinfo_req, 0); - us_connecting_socket_free(c); - s->connect_state = NULL; - } - - if (s->ssl) { - us_internal_ssl_on_open(s, 1, 0, 0); - } else { - us_dispatch_open(s, 1, 0, 0); - } - } -} - -/* ── Misc ───────────────────────────────────────────────────────────────── */ - -struct us_bun_verify_error_t us_socket_verify_error(struct us_socket_t *s) { - if (s->ssl) { - return us_internal_ssl_verify_error(s); - } - return (struct us_bun_verify_error_t) { .error = 0, .code = NULL, .reason = NULL }; -} diff --git a/packages/bun-usockets/src/crypto/openssl.c b/packages/bun-usockets/src/crypto/openssl.c deleted file mode 100644 index c8528b0016e2..000000000000 --- a/packages/bun-usockets/src/crypto/openssl.c +++ /dev/null @@ -1,2572 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// clang-format off -#if (defined(LIBUS_USE_OPENSSL) || defined(LIBUS_USE_WOLFSSL)) - -#include "internal/internal.h" -#include "internal/fault_inject.h" -#include "libusockets.h" -#include -#include -#include -#include - -/* These are in sni_tree.cpp */ -void *sni_new(); -void sni_free(void *sni, void (*cb)(void *)); -int sni_add(void *sni, const char *hostname, void *user); -void *sni_remove(void *sni, const char *hostname); -void *sni_find(void *sni, const char *hostname); - -#ifdef LIBUS_USE_OPENSSL -#include -#include -#include -#include -#include -#elif LIBUS_USE_WOLFSSL -#include -#include -#include -#include -#include -#endif - -#include "./root_certs_header.h" -#include "./default_ciphers.h" - -/* ────────────────────────────────────────────────────────────────────────── - * Per-socket SSL model. - * - * SSL_CTX is owned externally (SecureContext / listener) and - * never created here outside of us_ssl_ctx_from_options(). Each TLS socket carries a - * heap-allocated us_ssl_socket_data_t at s->ssl, which owns one SSL* built - * from a borrowed SSL_CTX. The loop dispatch path is: - * - * loop.c readable → s->ssl ? us_internal_ssl_on_data : us_dispatch_data - * - * and us_internal_ssl_on_data decrypts then re-enters us_dispatch_data with - * plaintext. Same shape for open/writable/close/end. - * ────────────────────────────────────────────────────────────────────────── */ - -/* Capacity of the parked fatal-error reason (ERR_error_string_n output). - * OpenSSL formats "error:...:reason" strings well under this; anything - * longer is truncated by ERR_error_string_n itself (always NUL-terminated). */ -#define US_SSL_FATAL_ERROR_REASON_MAX 256 - -struct loop_ssl_data { - char *ssl_read_input, *ssl_read_output; - unsigned int ssl_read_input_length; - unsigned int ssl_read_input_offset; - - struct us_socket_t *ssl_socket; - BIO *shared_rbio; - BIO *shared_wbio; - BIO_METHOD *shared_biom; - /* The OpenSSL error string of the fatal SSL error that is about to close - * the current socket (set in the SSL_ERROR_SSL branch immediately before - * ssl_close, consumed by the handshake-failure dispatch inside that - * ssl_close, cleared after use). Lets 'wrong version number' and friends - * reach the JS 'tlsClientError' / client error the way Node reports them. - * A longer reason is truncated: every writer goes through - * ERR_error_string_n, which NUL-terminates and truncates to the buffer - * size (OpenSSL's own error strings stay well under it). */ - char ssl_last_fatal_error[US_SSL_FATAL_ERROR_REASON_MAX]; - /* The socket that parked ssl_last_fatal_error. The scratch is per-loop, so - * a reason parked by one socket must never be reported for another (a - * server and a client in the same process share this loop). */ - void *ssl_last_fatal_error_owner; - - /* Ciphertext write batching: while one us_internal_ssl_write runs, - * BIO_s_custom_write appends each sealed record here instead of issuing one - * raw socket write per 16 KB record; the whole batch reaches the kernel in - * a single write afterwards (node reaches the same shape via its memory - * BIO drained with writev). Lazily allocated, reused across writes. */ - char *ssl_write_batch; - unsigned int ssl_write_batch_len; - unsigned int ssl_write_batch_cap; - int ssl_write_batching; - - /* Single spill slot: ciphertext a partial batch flush could not deliver. - * SSL believes these records were written, so they MUST reach this exact - * socket's fd, in order, before any of its later records. Drained from the - * owner's writable event; while the slot is occupied, other sockets write - * through per record (the pre-batching path). */ - struct us_socket_t *ssl_spill_owner; - char *ssl_spill; - unsigned int ssl_spill_len; - unsigned int ssl_spill_off; -}; - -enum { - HANDSHAKE_PENDING = 0, - HANDSHAKE_COMPLETED = 1, - HANDSHAKE_RENEGOTIATION_PENDING = 2, -}; - -/* No per-socket SSL struct: `s->ssl` IS the BoringSSL `SSL*`, and the 6 state - * bits live in `us_socket_t`'s pointer-alignment padding (see internal.h). - * Per-connection reneg counters and SNI userdata, when needed at all, hang off - * SSL ex_data so the common path (client connect, no reneg) does zero extra - * allocation. */ -#define s_ssl(s) ((SSL *)(s)->ssl) - -/* SNI tree leaf — stored as the void* user in sni_tree.cpp. */ -struct sni_node_t { - SSL_CTX *ctx; - void *user; -}; - -static _Atomic long ssl_ctx_live = 0; - -long us_ssl_ctx_live_count(void) { - return atomic_load(&ssl_ctx_live); -} - -/* ex_data indices, registered once at first SSL_CTX/SSL touch: - * - us_ctx_ex_idx (SSL_CTX): packed reneg {limit:u32,window:u32}; its - * free_func also decrements ssl_ctx_live so the counter tracks ACTUAL - * destruction (refcount→0), not every SSL_CTX_free. - * - us_sni_ex_idx (SSL_CTX): per-domain userdata (uWS HttpRouter*). - * - us_ssl_reneg_state_idx (SSL): per-connection reneg counter, malloc'd on - * first reneg attempt only — never on the hot path. - * - us_ssl_listener_ex_idx (SSL): the accepting us_listen_socket_t*. The - * SSL_CTX is shared and can outlive any one listener, so storing ls as the - * CTX-level servername_arg is a UAF after listener close (and overwritten - * on multi-listen). - * - * SSL_CTX creation runs from both the JS thread (SecureContext, Bun.connect/ - * listen) and the HTTP-client thread (HTTPContext.initWithOpts). A racy `<0` - * check would let two threads each register the ctx_ex_idx free_func, double- - * decrementing ssl_ctx_live forever after. (BoringSSL's CRYPTO_once is - * internal-only, so use the platform primitive directly; root_certs.cpp does - * the same via std::call_once.) */ -static int us_ctx_ex_idx = -1; -static int us_sni_ex_idx = -1; -static int us_ctx_cache_ex_idx = -1; -/* Marks an SSL_CTX whose verification store holds user-provided CAs (the - * ca/caFile options or a later addCACert): the per-socket client attach must - * not replace such a store with the process-shared default roots. */ -static int us_ctx_user_ca_ex_idx = -1; -static int us_ssl_reneg_state_idx = -1; -/* Per-connection async-SNI suspension state (select_certificate_cb retry). */ -static int us_ssl_sni_pending_idx = -1; -static int us_ssl_listener_ex_idx = -1; -/* Set (to a non-NULL marker) only on SSLs attached to a real us_socket_t via - * us_internal_ssl_attach. The new-session callback uses it to ignore SSLs - * owned by other engines (the JS-stream SSL wrapper used for TLS-over-duplex) - * whose BIOs do not point at the loop's shared BIO data. */ -static int us_ssl_is_socket_ex_idx = -1; -/* Defined in Rust (src/uws_sys/SocketKind.rs) so the ordinal tracks the enum. */ -extern const unsigned char BUN_SOCKET_KIND_BUN_SOCKET_TLS; -/* Serialized resumable session parked by the new-session callback until the - * SSL stack unwinds; freed with the SSL if never delivered. */ -static int us_ssl_pending_session_idx = -1; -static int us_ssl_pending_keylog_idx = -1; -#ifdef _WIN32 -static INIT_ONCE us_ex_idx_once = INIT_ONCE_STATIC_INIT; -#else -#include -static pthread_once_t us_ex_idx_once = PTHREAD_ONCE_INIT; -#endif - -#define US_RENEG_PACK(limit, window) ((void *)(uintptr_t)(((uint64_t)(limit) << 32) | (uint32_t)(window))) -#define US_RENEG_LIMIT(p) ((uint32_t)((uint64_t)(uintptr_t)(p) >> 32)) -#define US_RENEG_WINDOW(p) ((uint32_t)((uint64_t)(uintptr_t)(p))) - -/* Async SNICallback suspension state, hung off the SSL via ex_data. - * Allocated the first time a dynamic resolver answers "pending"; freed with - * the SSL. The resolved ctx carries one reference owned by this struct until - * select_cert_cb consumes it (SSL_set_SSL_CTX takes its own). */ -struct us_ssl_sni_pending_t { - /* 0 = none, 1 = waiting for the JS resolution, 2 = resolved, 3 = error */ - int state; - struct ssl_ctx_st *resolved_ctx; -}; - -static void us_ssl_sni_pending_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int index, long argl, void *argp) { - (void)parent; (void)ad; (void)index; (void)argl; (void)argp; - struct us_ssl_sni_pending_t *st = ptr; - if (!st) return; - if (st->resolved_ctx) SSL_CTX_free(st->resolved_ctx); - us_free(st); -} - -struct us_ssl_reneg_state_t { - uint64_t window_start_ms; - uint32_t count; -}; - -static void us_ctx_ex_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int index, long argl, void *argp) { - (void)parent; (void)ptr; (void)ad; (void)index; (void)argl; (void)argp; - atomic_fetch_sub(&ssl_ctx_live, 1); -} -static void us_ssl_reneg_state_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int index, long argl, void *argp) { - (void)parent; (void)ad; (void)index; (void)argl; (void)argp; - us_free(ptr); -} - -/* A new resumable session is ready (for TLS 1.3, the peer's NewSessionTicket - * was just processed; SSL_get_session() right after the handshake only returns - * an unresumable placeholder). This callback fires from inside - * SSL_read/SSL_do_handshake, where running JS could free the SSL out from - * under the caller - so it only serializes the session and parks it on the - * connection. ssl_flush_pending_session() hands it to the socket's session - * callback once the SSL stack has unwound. */ -/* Upper bounds for parked payloads: a serialized SSL_SESSION (i2d) and a - * single keylog line. Anything larger is dropped at the parking site. */ -#define US_SSL_PENDING_SESSION_MAX 65536 -#define US_SSL_PENDING_KEYLOG_LINE_MAX 4096 - -struct us_ssl_pending_session_t { - struct us_ssl_pending_session_t *next; - uint32_t length; - unsigned char data[]; -}; -static void us_ssl_pending_session_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int index, long argl, void *argp) { - (void)parent; (void)ad; (void)index; (void)argl; (void)argp; - struct us_ssl_pending_session_t *pending = ptr; - while (pending) { - struct us_ssl_pending_session_t *next = pending->next; - free(pending); - pending = next; - } -} -/* NSS key-log lines are produced from inside SSL_do_handshake/SSL_read, so - * they are parked on the SSL the same way new sessions are and delivered once - * the read unwinds. The stored bytes already carry the trailing newline Node - * appends before emitting 'keylog'. */ -static void us_ssl_keylog_cb(const SSL *cssl, const char *line) { - SSL *ssl = (SSL *)cssl; - if (!SSL_get_ex_data(ssl, us_ssl_is_socket_ex_idx)) { - return; - } - size_t line_len = strlen(line); - if (line_len == 0 || line_len > US_SSL_PENDING_KEYLOG_LINE_MAX) { - return; - } - struct us_ssl_pending_session_t *pending = - malloc(sizeof(struct us_ssl_pending_session_t) + line_len + 1); - if (!pending) { - return; - } - memcpy(pending->data, line, line_len); - pending->data[line_len] = '\n'; - pending->length = (uint32_t)(line_len + 1); - pending->next = NULL; - struct us_ssl_pending_session_t *head = SSL_get_ex_data(ssl, us_ssl_pending_keylog_idx); - if (!head) { - SSL_set_ex_data(ssl, us_ssl_pending_keylog_idx, pending); - } else { - while (head->next) head = head->next; - head->next = pending; - } -} - -static void ssl_flush_pending_keylog(struct us_socket_t *s) { - if (!s->ssl || us_socket_is_closed(s)) { - return; - } - struct us_ssl_pending_session_t *pending = - SSL_get_ex_data(s->ssl, us_ssl_pending_keylog_idx); - if (!pending) { - return; - } - SSL_set_ex_data(s->ssl, us_ssl_pending_keylog_idx, NULL); - while (pending) { - struct us_ssl_pending_session_t *next = pending->next; - if (!us_socket_is_closed(s) && s->ssl) { - us_dispatch_keylog(s, pending->data, (int)pending->length); - } - free(pending); - pending = next; - } -} - -static int us_ssl_new_session_cb(SSL *ssl, SSL_SESSION *session) { - /* Park only for consumers that will drain the queue: SSLs attached to a - * real us_socket_t (flushed into us_dispatch_session once the read unwinds) - * and SSLs whose owner opted in via us_ssl_enable_pending_events (the - * Rust SSLWrapper behind TLS-over-duplex / named pipes, which polls - * us_ssl_pop_pending_session after its reads). Everything else (fetch, - * WebSocket tunnels) has no consumer - don't queue. */ - if (!SSL_get_ex_data(ssl, us_ssl_is_socket_ex_idx)) { - return 0; - } - int length = i2d_SSL_SESSION(session, NULL); - if (length <= 0 || length > US_SSL_PENDING_SESSION_MAX) { - return 0; - } - struct us_ssl_pending_session_t *pending = - malloc(sizeof(struct us_ssl_pending_session_t) + (size_t)length); - if (!pending) { - return 0; - } - unsigned char *out = pending->data; - pending->length = (uint32_t)i2d_SSL_SESSION(session, &out); - pending->next = NULL; - /* Append: each NewSessionTicket is a distinct resumable session and gets - * its own 'session' event, in arrival order. */ - struct us_ssl_pending_session_t *head = SSL_get_ex_data(ssl, us_ssl_pending_session_idx); - if (!head) { - SSL_set_ex_data(ssl, us_ssl_pending_session_idx, pending); - } else { - while (head->next) head = head->next; - head->next = pending; - } - /* 0: we serialized a copy; the caller keeps ownership of `session`. */ - return 0; -} - -/* Deliver a session parked by the new-session callback. Must only be called - * once the SSL_read/SSL_do_handshake that parked it has returned; the JS it - * runs may close the socket, so callers must check ssl_gone(s) afterwards. */ -static void ssl_flush_pending_session(struct us_socket_t *s) { - if (!s->ssl || us_socket_is_closed(s)) { - return; - } - struct us_ssl_pending_session_t *pending = - SSL_get_ex_data(s->ssl, us_ssl_pending_session_idx); - if (!pending) { - return; - } - SSL_set_ex_data(s->ssl, us_ssl_pending_session_idx, NULL); - while (pending) { - struct us_ssl_pending_session_t *next = pending->next; - if (!us_socket_is_closed(s) && s->ssl) { - us_dispatch_session(s, pending->data, (int)pending->length); - } - free(pending); - pending = next; - } -} - -/* Defined in `src/runtime/api/bun/SSLContextCache.rs`: tombstones the cache entry on - * SSL_CTX refcount→0 so the per-VM weak SSL_CTX cache learns the pointer is - * dead without holding a ref of its own. */ -extern void bun_ssl_ctx_cache_on_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, - int index, long argl, void *argp); - -static void us_ex_idx_init(void) { - us_ctx_ex_idx = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, us_ctx_ex_free); - us_sni_ex_idx = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, NULL); - us_ctx_cache_ex_idx = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, bun_ssl_ctx_cache_on_free); - us_ctx_user_ca_ex_idx = SSL_CTX_get_ex_new_index(0, NULL, NULL, NULL, NULL); - us_ssl_reneg_state_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, us_ssl_reneg_state_free); - us_ssl_sni_pending_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, us_ssl_sni_pending_free); - us_ssl_listener_ex_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); - us_ssl_is_socket_ex_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL); - us_ssl_pending_session_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, us_ssl_pending_session_free); - us_ssl_pending_keylog_idx = SSL_get_ex_new_index(0, NULL, NULL, NULL, us_ssl_pending_session_free); -} - -#ifdef _WIN32 -static BOOL CALLBACK us_ex_idx_init_win(PINIT_ONCE o, PVOID p, PVOID *c) { - (void)o; (void)p; (void)c; - us_ex_idx_init(); - return TRUE; -} -#endif - -static inline void us_ex_idx_ensure(void) { -#ifdef _WIN32 - InitOnceExecuteOnce(&us_ex_idx_once, us_ex_idx_init_win, NULL, NULL); -#else - pthread_once(&us_ex_idx_once, us_ex_idx_init); -#endif -} - -static inline int us_ssl_ctx_ex_idx(void) { - us_ex_idx_ensure(); - return us_ctx_ex_idx; -} - -/* TLS-over-duplex / named-pipe owners (the Rust SSLWrapper): opt this SSL - * into the parked session/keylog queues so us_ssl_new_session_cb / - * us_ssl_keylog_cb collect them. There is no us_socket_t to flush into - * us_dispatch_*, so the wrapper drains the queues with - * us_ssl_pop_pending_* once its SSL_read/SSL_do_handshake stack unwinds. */ -void us_ssl_enable_pending_events(SSL *ssl) { - us_ex_idx_ensure(); - SSL_set_ex_data(ssl, us_ssl_is_socket_ex_idx, (void *)1); -} - -static int us_ssl_pop_pending(SSL *ssl, int idx, unsigned char *out, int out_cap) { - if (idx < 0) return 0; - struct us_ssl_pending_session_t *pending = SSL_get_ex_data(ssl, idx); - if (!pending) return 0; - SSL_set_ex_data(ssl, idx, pending->next); - int len = (int)pending->length; - if (len > out_cap) { - /* The parking sites cap entries (64 KB sessions, 4 KB+1 keylog lines) and - * callers pass buffers at least that large, so this is unreachable; drop - * the entry rather than overflow. */ - len = 0; - } else { - memcpy(out, pending->data, (size_t)len); - } - free(pending); - return len; -} - -/* Pop the oldest parked session/keylog entry into `out` (cap `out_cap`). - * Returns the byte length, or 0 when the queue is empty. Entries arrive in - * parking order; each pop hands over exactly one entry. */ -int us_ssl_pop_pending_session(SSL *ssl, unsigned char *out, int out_cap) { - return us_ssl_pop_pending(ssl, us_ssl_pending_session_idx, out, out_cap); -} - -int us_ssl_pop_pending_keylog(SSL *ssl, unsigned char *out, int out_cap) { - return us_ssl_pop_pending(ssl, us_ssl_pending_keylog_idx, out, out_cap); -} - -int us_ssl_ctx_cache_ex_idx(void) { - us_ex_idx_ensure(); - return us_ctx_cache_ex_idx; -} - -static inline void us_reneg_policy(SSL *ssl, uint32_t *limit, uint32_t *window) { - void *packed = us_ctx_ex_idx >= 0 - ? SSL_CTX_get_ex_data(SSL_get_SSL_CTX(ssl), us_ctx_ex_idx) : NULL; - *limit = packed ? US_RENEG_LIMIT(packed) : 3; - *window = packed ? US_RENEG_WINDOW(packed) : 600; -} - -static inline struct us_ssl_reneg_state_t *us_reneg_state(SSL *ssl) { - us_ex_idx_ensure(); - struct us_ssl_reneg_state_t *st = SSL_get_ex_data(ssl, us_ssl_reneg_state_idx); - if (!st) { - st = us_calloc(1, sizeof(*st)); - SSL_set_ex_data(ssl, us_ssl_reneg_state_idx, st); - } - return st; -} - -/* socket.c — raw TCP FIN that does NOT re-enter the SSL layer. */ -extern void us_internal_socket_raw_shutdown(struct us_socket_t *s); - -static void ssl_update_handshake(struct us_socket_t *s); - -/* ── BIO plumbing ───────────────────────────────────────────────────────── - * The same shared mem-BIO pair is reused for every SSL* on a loop. The write - * BIO sends ciphertext straight to the wire via raw_write (which never - * re-enters the SSL layer). */ - -int passphrase_cb(char *buf, int size, int rwflag, void *u) { - const char *passphrase = (const char *)u; - size_t passphrase_length = strlen(passphrase); - if (passphrase_length > (size_t)size) return -1; - memcpy(buf, passphrase, passphrase_length); - return (int)passphrase_length; -} - -static int BIO_s_custom_create(BIO *bio) { - BIO_set_init(bio, 1); - return 1; -} - -static long BIO_s_custom_ctrl(BIO *bio, int cmd, long num, void *user) { - switch (cmd) { - case BIO_CTRL_FLUSH: - return 1; - default: - return 0; - } -} - -/* Save/restore the per-loop BIO routing state around a JS callback that runs - * from inside SSL_do_handshake/SSL_read: user JS that writes to or destroys a - * different TLS socket on the same loop re-points loop_ssl_data->ssl_socket - * (and may consume the read-input window), and the interrupted handshake's - * next BIO_write would otherwise land on that other socket's fd. */ -void us_internal_ssl_loop_state_save(void *ssl_ptr, void **out) { - SSL *ssl = (SSL *)ssl_ptr; - struct loop_ssl_data *d = (struct loop_ssl_data *)BIO_get_data(SSL_get_wbio(ssl)); - out[0] = d; - out[1] = d ? (void *)d->ssl_socket : NULL; - out[2] = d ? (void *)d->ssl_read_input : NULL; - out[3] = d ? (void *)(uintptr_t)d->ssl_read_input_length : NULL; - out[4] = d ? (void *)(uintptr_t)d->ssl_read_input_offset : NULL; -} - -void us_internal_ssl_loop_state_restore(void **saved) { - struct loop_ssl_data *d = (struct loop_ssl_data *)saved[0]; - if (!d) return; - d->ssl_socket = (struct us_socket_t *)saved[1]; - d->ssl_read_input = (char *)saved[2]; - d->ssl_read_input_length = (unsigned int)(uintptr_t)saved[3]; - d->ssl_read_input_offset = (unsigned int)(uintptr_t)saved[4]; -} - -static int BIO_s_custom_write(BIO *bio, const char *data, int length) { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)BIO_get_data(bio); - - /* A callback run from inside SSL_do_handshake/SSL_read marked this socket - * for deferred destruction (an SNI abort, or JS destroying the socket): the - * connection is being dropped without a TLS-level goodbye, so swallow - * whatever BoringSSL tries to flush (typically the fatal alert). The bytes - * are reported as written so the SSL state machine completes its error - * path instead of retrying. */ - if (loop_ssl_data->ssl_socket && loop_ssl_data->ssl_socket->ssl_pending_detach) { - BIO_clear_retry_flags(bio); - return length; - } - - if (loop_ssl_data->ssl_write_batching) { - /* Append the sealed record; the batch hits the kernel once, after - * SSL_write returns. Reporting the full length keeps BoringSSL sealing - * the next record instead of parking a partial one. */ - unsigned int needed = loop_ssl_data->ssl_write_batch_len + (unsigned int)length; - if (needed > loop_ssl_data->ssl_write_batch_cap) { - unsigned int new_cap = loop_ssl_data->ssl_write_batch_cap ? loop_ssl_data->ssl_write_batch_cap : 65536; - while (new_cap < needed) new_cap *= 2; - char *grown = us_realloc(loop_ssl_data->ssl_write_batch, new_cap); - if (!grown) { - /* Earlier sealed records sit in the batch and SSL's sequence numbers have - * already advanced past them; writing the current record first would break - * wire order (bad_record_mac at the peer). Same as the spill OOM path: the - * connection cannot stay coherent. */ - if (loop_ssl_data->ssl_socket) - loop_ssl_data->ssl_socket->ssl_fatal_error = 1; - BIO_clear_retry_flags(bio); - return length; - } - loop_ssl_data->ssl_write_batch = grown; - loop_ssl_data->ssl_write_batch_cap = new_cap; - } - memcpy(loop_ssl_data->ssl_write_batch + loop_ssl_data->ssl_write_batch_len, data, (size_t)length); - loop_ssl_data->ssl_write_batch_len = needed; - BIO_clear_retry_flags(bio); - return length; - } - int written = us_socket_raw_write(loop_ssl_data->ssl_socket, data, length); - - BIO_clear_retry_flags(bio); - if (!written) { - BIO_set_retry_write(bio); - return -1; - } - return written; -} - -/* Flush the ciphertext batch to its socket in one write. A partial write - * spills the remainder into the loop's single spill slot - SSL already - * counts those records as delivered, so they are drained (in order, to this - * socket only) from its writable event. Returns 1 when the wire took - * everything, 0 when a spill is now pending. */ -static int ssl_flush_write_batch(struct loop_ssl_data *loop_ssl_data, struct us_socket_t *s) { - unsigned int len = loop_ssl_data->ssl_write_batch_len; - if (!len) return 1; - loop_ssl_data->ssl_write_batch_len = 0; - int written = us_socket_raw_write(s, loop_ssl_data->ssl_write_batch, (int)len); - if (written < 0) written = 0; - if ((unsigned int)written < len) { - unsigned int remainder = len - (unsigned int)written; - char *spill = us_malloc(remainder); - if (!spill) { - /* Out of memory with ciphertext in flight: the connection cannot stay - * coherent (SSL already advanced its sequence numbers). Drop it. */ - s->ssl_fatal_error = 1; - return 0; - } - memcpy(spill, loop_ssl_data->ssl_write_batch + written, remainder); - loop_ssl_data->ssl_spill = spill; - loop_ssl_data->ssl_spill_len = remainder; - loop_ssl_data->ssl_spill_off = 0; - loop_ssl_data->ssl_spill_owner = s; - return 0; - } - return 1; -} - -/* Try to drain the spill slot for `s`. Returns 1 when clear (or not ours), - * 0 while ciphertext is still pending for this socket. */ -static int ssl_drain_spill(struct loop_ssl_data *loop_ssl_data, struct us_socket_t *s) { - if (loop_ssl_data->ssl_spill_owner != s) return 1; - unsigned int pending = loop_ssl_data->ssl_spill_len - loop_ssl_data->ssl_spill_off; - int written = us_socket_raw_write(s, loop_ssl_data->ssl_spill + loop_ssl_data->ssl_spill_off, (int)pending); - if (written < 0) written = 0; - loop_ssl_data->ssl_spill_off += (unsigned int)written; - if (loop_ssl_data->ssl_spill_off == loop_ssl_data->ssl_spill_len) { - us_free(loop_ssl_data->ssl_spill); - loop_ssl_data->ssl_spill = NULL; - loop_ssl_data->ssl_spill_len = 0; - loop_ssl_data->ssl_spill_off = 0; - loop_ssl_data->ssl_spill_owner = NULL; - return 1; - } - return 0; -} - -/* Release the spill slot when its owner dies (close path). */ -static void ssl_release_spill(struct us_loop_t *loop, struct us_socket_t *s) { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)loop->data.ssl_data; - if (loop_ssl_data && loop_ssl_data->ssl_spill_owner == s) { - /* Hard close with ciphertext still spilled: give the kernel one last - * chance to take it (it usually can - the spill is bounded small). */ - ssl_drain_spill(loop_ssl_data, s); - } - if (loop_ssl_data && loop_ssl_data->ssl_spill_owner == s) { - us_free(loop_ssl_data->ssl_spill); - loop_ssl_data->ssl_spill = NULL; - loop_ssl_data->ssl_spill_len = 0; - loop_ssl_data->ssl_spill_off = 0; - loop_ssl_data->ssl_spill_owner = NULL; - } -} - -void us_internal_ssl_socket_relocated(struct us_loop_t *loop, struct us_socket_t *old_s, - struct us_socket_t *new_s) { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)loop->data.ssl_data; - if (!loop_ssl_data) return; - if (loop_ssl_data->ssl_spill_owner == old_s) { - loop_ssl_data->ssl_spill_owner = new_s; - } - if (loop_ssl_data->ssl_last_fatal_error_owner == (void *)old_s) { - loop_ssl_data->ssl_last_fatal_error_owner = (void *)new_s; - } -} - -static int BIO_s_custom_read(BIO *bio, char *dst, int length) { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)BIO_get_data(bio); - - BIO_clear_retry_flags(bio); - if (!loop_ssl_data->ssl_read_input_length) { - BIO_set_retry_read(bio); - return -1; - } - - if ((unsigned int)length > loop_ssl_data->ssl_read_input_length) { - length = loop_ssl_data->ssl_read_input_length; - } - - memcpy(dst, loop_ssl_data->ssl_read_input + loop_ssl_data->ssl_read_input_offset, length); - - loop_ssl_data->ssl_read_input_offset += length; - loop_ssl_data->ssl_read_input_length -= length; - return length; -} - -static struct loop_ssl_data *ssl_set_loop_data(struct us_socket_t *s) { - struct us_loop_t *loop = s->group->loop; - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)loop->data.ssl_data; - - loop_ssl_data->ssl_read_input_length = 0; - loop_ssl_data->ssl_read_input_offset = 0; - loop_ssl_data->ssl_socket = s; - return loop_ssl_data; -} - -/* The loop's shared TLS plaintext buffer. Split out so the fault injector can - * fail this one allocation: a 512 KiB malloc only returns NULL where the OS - * does not overcommit, which is the only place the crash was ever seen. */ -static char *ssl_alloc_read_output(void) { -#if defined(LIBUS_SOCKET_FAULT_INJECTION) && LIBUS_SOCKET_FAULT_INJECTION - ssize_t injected = 0; - int unused = 0; - if (US_FAULT_CHECK(US_FAULT_SSL_LOOP_BUFFER, -1, injected, unused)) return NULL; -#endif - return us_malloc(LIBUS_RECV_BUFFER_LENGTH + LIBUS_RECV_BUFFER_PADDING * 2); -} - -void us_internal_init_loop_ssl_data(struct us_loop_t *loop) { - if (!loop->data.ssl_data) { - struct loop_ssl_data *loop_ssl_data = us_calloc(1, sizeof(struct loop_ssl_data)); - if (!loop_ssl_data) Bun__outOfMemory(); - loop_ssl_data->ssl_read_output = ssl_alloc_read_output(); - if (!loop_ssl_data->ssl_read_output) Bun__outOfMemory(); - - OPENSSL_init_ssl(0, NULL); - - loop_ssl_data->shared_biom = BIO_meth_new(BIO_TYPE_MEM, "µS BIO"); - if (!loop_ssl_data->shared_biom) Bun__outOfMemory(); - BIO_meth_set_create(loop_ssl_data->shared_biom, BIO_s_custom_create); - BIO_meth_set_write(loop_ssl_data->shared_biom, BIO_s_custom_write); - BIO_meth_set_read(loop_ssl_data->shared_biom, BIO_s_custom_read); - BIO_meth_set_ctrl(loop_ssl_data->shared_biom, BIO_s_custom_ctrl); - - loop_ssl_data->shared_rbio = BIO_new(loop_ssl_data->shared_biom); - loop_ssl_data->shared_wbio = BIO_new(loop_ssl_data->shared_biom); - if (!loop_ssl_data->shared_rbio || !loop_ssl_data->shared_wbio) Bun__outOfMemory(); - BIO_set_data(loop_ssl_data->shared_rbio, loop_ssl_data); - BIO_set_data(loop_ssl_data->shared_wbio, loop_ssl_data); - - loop->data.ssl_data = loop_ssl_data; - } -} - -void us_internal_free_loop_ssl_data(struct us_loop_t *loop) { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)loop->data.ssl_data; - if (loop_ssl_data) { - us_free(loop_ssl_data->ssl_read_output); - us_free(loop_ssl_data->ssl_write_batch); - us_free(loop_ssl_data->ssl_spill); - BIO_free(loop_ssl_data->shared_rbio); - BIO_free(loop_ssl_data->shared_wbio); - BIO_meth_free(loop_ssl_data->shared_biom); - us_free(loop_ssl_data); - /* us_internal_init_loop_ssl_data's guard reads this: leaving it dangling - * would hand a freed loop_ssl_data back to the next TLS socket. */ - loop->data.ssl_data = NULL; - } -} - -/* ── SSL_CTX construction ────────────────────────────────────────────────── */ - -static int us_ssl_ctx_use_privatekey_content(SSL_CTX *ctx, const char *content, int type) { - int reason_code, ret = 0; - BIO *in; - EVP_PKEY *pkey = NULL; - if (content == NULL) return 0; - in = BIO_new_mem_buf(content, strlen(content)); - if (in == NULL) { - OPENSSL_PUT_ERROR(SSL, ERR_R_BUF_LIB); - goto end; - } - - if (type == SSL_FILETYPE_PEM) { - reason_code = ERR_R_PEM_LIB; - pkey = PEM_read_bio_PrivateKey(in, NULL, SSL_CTX_get_default_passwd_cb(ctx), - SSL_CTX_get_default_passwd_cb_userdata(ctx)); - } else if (type == SSL_FILETYPE_ASN1) { - reason_code = ERR_R_ASN1_LIB; - pkey = d2i_PrivateKey_bio(in, NULL); - } else { - OPENSSL_PUT_ERROR(SSL, SSL_R_BAD_SSL_FILETYPE); - goto end; - } - - if (pkey == NULL) { - OPENSSL_PUT_ERROR(SSL, reason_code); - goto end; - } - ret = SSL_CTX_use_PrivateKey(ctx, pkey); - EVP_PKEY_free(pkey); -end: - BIO_free(in); - return ret; -} - -static int add_ca_cert_to_ctx_store(SSL_CTX *ctx, const char *content, X509_STORE *store) { - X509 *x = NULL; - ERR_clear_error(); - int count = 0; - if (content == NULL) return 0; - BIO *in = BIO_new_mem_buf(content, strlen(content)); - if (in == NULL) { - OPENSSL_PUT_ERROR(SSL, ERR_R_BUF_LIB); - goto end; - } - - while ((x = PEM_read_bio_X509(in, NULL, SSL_CTX_get_default_passwd_cb(ctx), - SSL_CTX_get_default_passwd_cb_userdata(ctx)))) { - X509_STORE_add_cert(store, x); - if (!SSL_CTX_add_client_CA(ctx, x)) { - X509_free(x); - BIO_free(in); - return 0; - } - count++; - X509_free(x); - } -end: - BIO_free(in); - if (count == 0) { - /* The PEM loop terminates with PEM_R_NO_START_LINE once there are no - * (more) CERTIFICATE blocks. A PEM document that contains no - * certificates at all - Node's test suite passes a private key here - is - * ignored the way Node ignores it rather than failing the whole context. - * Content that is not PEM at all, or a malformed certificate block, is - * still an error. */ - unsigned long pem_err = ERR_peek_last_error(); - if ((pem_err == 0 || (ERR_GET_LIB(pem_err) == ERR_LIB_PEM && - ERR_GET_REASON(pem_err) == PEM_R_NO_START_LINE)) && - strstr(content, "-----BEGIN ") != NULL) { - ERR_clear_error(); - return 1; - } - return 0; - } - ERR_clear_error(); - return 1; -} - -static int us_ssl_ctx_use_certificate_chain(SSL_CTX *ctx, const char *content) { - BIO *in; - int ret = 0; - X509 *x = NULL; - - ERR_clear_error(); - if (content == NULL) return 0; - in = BIO_new_mem_buf(content, strlen(content)); - if (in == NULL) { - OPENSSL_PUT_ERROR(SSL, ERR_R_BUF_LIB); - goto end; - } - - x = PEM_read_bio_X509_AUX(in, NULL, SSL_CTX_get_default_passwd_cb(ctx), - SSL_CTX_get_default_passwd_cb_userdata(ctx)); - if (x == NULL) { - OPENSSL_PUT_ERROR(SSL, ERR_R_PEM_LIB); - goto end; - } - - ret = SSL_CTX_use_certificate(ctx, x); - if (ERR_peek_error() != 0) ret = 0; - - if (ret) { - X509 *ca; - int r; - uint32_t err; - - SSL_CTX_clear_chain_certs(ctx); - while ((ca = PEM_read_bio_X509( - in, NULL, SSL_CTX_get_default_passwd_cb(ctx), - SSL_CTX_get_default_passwd_cb_userdata(ctx))) != NULL) { - r = SSL_CTX_add0_chain_cert(ctx, ca); - if (!r) { - X509_free(ca); - ret = 0; - goto end; - } - } - err = ERR_peek_last_error(); - if (ERR_GET_LIB(err) == ERR_LIB_PEM && - ERR_GET_REASON(err) == PEM_R_NO_START_LINE) { - ERR_clear_error(); - } else { - ret = 0; - } - } -end: - X509_free(x); - BIO_free(in); - return ret; -} - -static int us_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) { - /* Always continue; the user inspects via us_socket_verify_error after - * on_handshake. See SSL_verify_cb docs — returning 1 lets us defer the - * decision to JS without aborting mid-handshake. */ - return 1; -} - -/* Drop the strdup'd passphrase. Called as soon as private-key load completes - * (the only consumer of the passwd_cb), so the secret never outlives ctx - * construction and SSL_CTX_free() is sufficient on every later path. Also - * called on the build-error path before SSL_CTX_free. */ -static void ssl_ctx_drop_passphrase(SSL_CTX *ctx) { - void *password = SSL_CTX_get_default_passwd_cb_userdata(ctx); - if (password) { - us_free(password); - SSL_CTX_set_default_passwd_cb_userdata(ctx, NULL); - } -} - -static void ssl_ctx_build_fail(SSL_CTX *ctx) { - ssl_ctx_drop_passphrase(ctx); - /* ex_data slot already set right after SSL_CTX_new, so the free_func will - * decrement ssl_ctx_live on this SSL_CTX_free. */ - SSL_CTX_free(ctx); -} - -/* Exported for quic.c (lsquic configures ALPN/transport-params on the SSL_CTX - * directly) and as the body of us_ssl_ctx_from_options. */ -SSL_CTX *us_ssl_ctx_build_raw(struct us_bun_socket_context_options_t options, - enum create_bun_socket_error_t *err) { - ERR_clear_error(); - - SSL_CTX *ssl_context = SSL_CTX_new(TLS_method()); - atomic_fetch_add(&ssl_ctx_live, 1); - /* Register the live-count free_func first thing so every exit (including - * build_fail) balances. The packed reneg policy reuses the same slot. */ - SSL_CTX_set_ex_data(ssl_context, us_ssl_ctx_ex_idx(), NULL); - - /* Default options we rely on — changing these breaks the BIO logic. */ - SSL_CTX_set_read_ahead(ssl_context, 1); - SSL_CTX_set_mode(ssl_context, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); - /* Honor explicit minVersion/maxVersion (Node's secureProtocol/min/maxVersion); - * default to a TLS1.2 floor when no minimum is requested. */ - SSL_CTX_set_min_proto_version(ssl_context, options.ssl_min_version ? options.ssl_min_version : TLS1_2_VERSION); - if (options.ssl_max_version) { - SSL_CTX_set_max_proto_version(ssl_context, options.ssl_max_version); - } - - if (options.ssl_prefer_low_memory_usage) { - SSL_CTX_set_mode(ssl_context, SSL_MODE_RELEASE_BUFFERS); - } - - if (options.passphrase) { -#ifdef _WIN32 - SSL_CTX_set_default_passwd_cb_userdata(ssl_context, (void *)_strdup(options.passphrase)); -#else - SSL_CTX_set_default_passwd_cb_userdata(ssl_context, (void *)strdup(options.passphrase)); -#endif - SSL_CTX_set_default_passwd_cb(ssl_context, passphrase_cb); - } - - /* Multiple identities (e.g. an RSA and an EC pair, the way Node accepts - * arrays of key/cert or several pfx entries) must be loaded pair-wise: - * loading every certificate first and then every key makes BoringSSL check - * each key against the last certificate loaded and fail with - * KEY_TYPE_MISMATCH on a mixed configuration. With pair-wise loading the - * later identity replaces the earlier one in the legacy slot, which is the - * documented BoringSSL behaviour the adapted tests expect. */ - int interleave_identities = !options.cert_file_name && !options.key_file_name && - options.cert && options.key && - options.cert_count == options.key_count && - options.cert_count > 1; - if (interleave_identities) { - for (unsigned int i = 0; i < options.cert_count; i++) { - if (us_ssl_ctx_use_certificate_chain(ssl_context, options.cert[i]) != 1 || - us_ssl_ctx_use_privatekey_content(ssl_context, options.key[i], SSL_FILETYPE_PEM) != 1) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - } - } else { - if (options.cert_file_name) { - if (SSL_CTX_use_certificate_chain_file(ssl_context, options.cert_file_name) != 1) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - } else if (options.cert && options.cert_count > 0) { - for (unsigned int i = 0; i < options.cert_count; i++) { - if (us_ssl_ctx_use_certificate_chain(ssl_context, options.cert[i]) != 1) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - } - } - - if (options.key_file_name) { - if (SSL_CTX_use_PrivateKey_file(ssl_context, options.key_file_name, SSL_FILETYPE_PEM) != 1) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - } else if (options.key && options.key_count > 0) { - for (unsigned int i = 0; i < options.key_count; i++) { - if (us_ssl_ctx_use_privatekey_content(ssl_context, options.key[i], SSL_FILETYPE_PEM) != 1) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - } - } - } - /* passwd_cb is only consulted by SSL_CTX_use_PrivateKey* above; the secret - * is dead now. Dropping it here means SSL_CTX_free() is sufficient cleanup - * everywhere downstream — no special "owner" path. */ - ssl_ctx_drop_passphrase(ssl_context); - - if (options.ca_file_name) { - /* An explicit CA replaces the default trust store (Node.js semantics): - * chains must validate exclusively against the supplied CAs. The SSL_CTX - * already owns a fresh, empty X509_STORE from SSL_CTX_new(), so - * SSL_CTX_load_verify_locations below populates only the user's CAs. */ - STACK_OF(X509_NAME) *ca_list = SSL_load_client_CA_file(options.ca_file_name); - if (ca_list == NULL) { - *err = CREATE_BUN_SOCKET_ERROR_LOAD_CA_FILE; - ssl_ctx_build_fail(ssl_context); - return NULL; - } - SSL_CTX_set_client_CA_list(ssl_context, ca_list); - us_ex_idx_ensure(); - SSL_CTX_set_ex_data(ssl_context, us_ctx_user_ca_ex_idx, (void *)1); - if (SSL_CTX_load_verify_locations(ssl_context, options.ca_file_name, NULL) != 1) { - *err = CREATE_BUN_SOCKET_ERROR_INVALID_CA_FILE; - ssl_ctx_build_fail(ssl_context); - return NULL; - } - SSL_CTX_set_verify(ssl_context, - options.reject_unauthorized ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) - : SSL_VERIFY_PEER, - us_verify_callback); - - } else if (options.ca && options.ca_count > 0) { - us_ex_idx_ensure(); - SSL_CTX_set_ex_data(ssl_context, us_ctx_user_ca_ex_idx, (void *)1); - /* As above: user CAs only, into the SSL_CTX's own initially-empty store — - * otherwise a server doing mTLS with `ca: [internalCA]` would also accept - * any client certificate that chains to a public root. */ - X509_STORE *cert_store = SSL_CTX_get_cert_store(ssl_context); - for (unsigned int i = 0; i < options.ca_count; i++) { - if (!add_ca_cert_to_ctx_store(ssl_context, options.ca[i], cert_store)) { - *err = CREATE_BUN_SOCKET_ERROR_INVALID_CA; - ssl_ctx_build_fail(ssl_context); - return NULL; - } - ERR_clear_error(); - SSL_CTX_set_verify(ssl_context, - options.reject_unauthorized ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) - : SSL_VERIFY_PEER, - us_verify_callback); - } - } else if (options.request_cert) { - /* No per-config CAs are added to this store, so the process-wide shared - * copy (built once) can be used instead of re-parsing the ~150 bundled - * roots for every context - the same approach as Node's root_cert_store. */ - SSL_CTX_set_cert_store(ssl_context, us_get_shared_default_ca_store()); - SSL_CTX_set_verify(ssl_context, - options.reject_unauthorized ? (SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT) - : SSL_VERIFY_PEER, - us_verify_callback); - } - - if (options.dh_params_file_name) { - DH *dh_2048 = NULL; - FILE *paramfile = fopen(options.dh_params_file_name, "r"); - if (paramfile) { - dh_2048 = PEM_read_DHparams(paramfile, NULL, NULL, NULL); - fclose(paramfile); - } else { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - if (dh_2048 == NULL) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - const long set_tmp_dh = SSL_CTX_set_tmp_dh(ssl_context, dh_2048); - DH_free(dh_2048); - if (set_tmp_dh != 1) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - if (!SSL_CTX_set_cipher_list(ssl_context, DEFAULT_CIPHER_LIST)) { - ssl_ctx_build_fail(ssl_context); - return NULL; - } - } - - if (options.ssl_ciphers) { - if (!SSL_CTX_set_cipher_list(ssl_context, options.ssl_ciphers)) { - /* Peek, don't consume: the caller decomposes the queued reason - * (NO_CIPHER_MATCH, INVALID_COMMAND) into the JS error. */ - unsigned long ssl_err = ERR_peek_error(); - if (!(strlen(options.ssl_ciphers) == 0 && ERR_GET_REASON(ssl_err) == SSL_R_NO_CIPHER_MATCH)) { - *err = CREATE_BUN_SOCKET_ERROR_INVALID_CIPHERS; - ssl_ctx_build_fail(ssl_context); - return NULL; - } - ERR_clear_error(); - } - } - - if (options.secure_options) { - SSL_CTX_set_options(ssl_context, options.secure_options); - } - - /* Surface resumable sessions through the new-session callback the way Node - * does: for TLS 1.3 the resumable session only exists once the peer's - * NewSessionTicket arrives, and BoringSSL only exposes it here. NO_INTERNAL - * keeps BoringSSL from also caching it. */ - SSL_CTX_set_session_cache_mode(ssl_context, SSL_SESS_CACHE_CLIENT | - SSL_SESS_CACHE_SERVER | - SSL_SESS_CACHE_NO_INTERNAL | - SSL_SESS_CACHE_NO_AUTO_CLEAR); - SSL_CTX_sess_set_new_cb(ssl_context, us_ssl_new_session_cb); - SSL_CTX_set_keylog_callback(ssl_context, us_ssl_keylog_cb); - return ssl_context; -} - -/* node:tls `secureContext.context.addCACert(pem)`: append the certificates in - * `content` to this context's trust store. Returns 0 when the content is not - * a PEM document or contains a malformed certificate. */ -int us_ssl_ctx_add_ca_cert(SSL_CTX *ctx, const char *content) { - if (!ctx || !content) { - return 0; - } - X509_STORE *store = SSL_CTX_get_cert_store(ctx); - /* Clone-on-write: a context that shares the process-wide default root - * store must get its own copy before a CA is appended, or the addition - * would be visible to every other context in the process - the same - * root_cert_store check Node's SecureContext::AddCACert performs. - * us_get_shared_default_ca_store() up-refs before returning, so release - * the reference taken just for this comparison. */ - X509_STORE *shared = us_get_shared_default_ca_store(); - int store_is_shared = store && store == shared; - X509_STORE_free(shared); - /* A default context built without ca/requestCert keeps the empty store from - * SSL_CTX_new() (verification for it normally comes from the per-socket - * shared-root override). addCACert must EXTEND the default trust set the - * way Node does, so when the store is the shared one - or still empty - - * replace it with a fresh full default store (bundled roots, NODE_EXTRA_CA - * certificates, system CAs when enabled) before appending the user's CA. */ - int store_is_empty = 0; - if (store && !store_is_shared) { - const STACK_OF(X509_OBJECT) *objs = X509_STORE_get0_objects(store); - store_is_empty = objs == NULL || sk_X509_OBJECT_num(objs) == 0; - } - if (store_is_shared || store_is_empty) { - X509_STORE *own = us_get_default_ca_store(); - if (!own) { - return 0; - } - SSL_CTX_set_cert_store(ctx, own); - store = own; - } - if (!store) { - return 0; - } - us_ex_idx_ensure(); - SSL_CTX_set_ex_data(ctx, us_ctx_user_ca_ex_idx, (void *)1); - return add_ca_cert_to_ctx_store(ctx, content, store); -} - -/* node:tls `pfx` support: parse a PKCS#12 blob and hand back PEM-encoded - * key / certificate / extra-chain strings the regular key/cert/ca options can - * consume. Returns 1 on success; the three out-strings are malloc'd and the - * caller frees them with free(). On failure returns 0 and sets *err_reason to - * a static tag: "parse" (not PKCS#12), "mac" (bad passphrase / corrupt), - * "key" (no private key), "cert" (no certificate). */ -static int pem_from_bio(BIO *bio, char **out, size_t *out_len) { - char *mem = NULL; - long n = BIO_get_mem_data(bio, &mem); - if (n <= 0 || !mem) return 0; - char *copy = (char *)malloc((size_t)n + 1); - if (!copy) return 0; - memcpy(copy, mem, (size_t)n); - copy[n] = 0; - *out = copy; - *out_len = (size_t)n; - return 1; -} - -int us_ssl_parse_pkcs12(const char *data, size_t len, const char *pass, - char **out_key, size_t *out_key_len, - char **out_cert, size_t *out_cert_len, - char **out_ca, size_t *out_ca_len, - const char **err_reason) { - *out_key = *out_cert = *out_ca = NULL; - *out_key_len = *out_cert_len = *out_ca_len = 0; - *err_reason = NULL; - int ok = 0; - EVP_PKEY *pkey = NULL; - X509 *cert = NULL; - STACK_OF(X509) *extra = NULL; - PKCS12 *p12 = NULL; - BIO *kb = NULL, *cb = NULL, *ab = NULL; - if (len > INT_MAX) { - /* BIO_new_mem_buf takes an int; a negative value would mean - * "treat as a NUL-terminated string", silently misparsing the blob. */ - *err_reason = "parse"; - return 0; - } - BIO *in = BIO_new_mem_buf(data, (int)len); - if (!in) { - *err_reason = "parse"; - return 0; - } - p12 = d2i_PKCS12_bio(in, NULL); - BIO_free(in); - if (!p12) { - *err_reason = "parse"; - ERR_clear_error(); - return 0; - } - if (!PKCS12_parse(p12, pass ? pass : "", &pkey, &cert, &extra)) { - *err_reason = "mac"; - ERR_clear_error(); - goto done; - } - if (!pkey) { - *err_reason = "key"; - goto done; - } - if (!cert) { - *err_reason = "cert"; - goto done; - } - kb = BIO_new(BIO_s_mem()); - cb = BIO_new(BIO_s_mem()); - if (!kb || !cb || !PEM_write_bio_PrivateKey(kb, pkey, NULL, NULL, 0, NULL, NULL) || - !PEM_write_bio_X509(cb, cert) || !pem_from_bio(kb, out_key, out_key_len) || - !pem_from_bio(cb, out_cert, out_cert_len)) { - *err_reason = "parse"; - goto done; - } - if (extra && sk_X509_num(extra) > 0) { - ab = BIO_new(BIO_s_mem()); - if (ab) { - for (size_t i = 0; i < sk_X509_num(extra); i++) { - PEM_write_bio_X509(ab, sk_X509_value(extra, i)); - } - pem_from_bio(ab, out_ca, out_ca_len); - } - } - ok = 1; -done: - if (!ok) { - free(*out_key); - free(*out_cert); - free(*out_ca); - *out_key = *out_cert = *out_ca = NULL; - } - if (kb) BIO_free(kb); - if (cb) BIO_free(cb); - if (ab) BIO_free(ab); - if (pkey) EVP_PKEY_free(pkey); - if (cert) X509_free(cert); - if (extra) sk_X509_pop_free(extra, X509_free); - if (p12) PKCS12_free(p12); - ERR_clear_error(); - return ok; -} - -SSL_CTX *us_ssl_ctx_from_options(struct us_bun_socket_context_options_t options, - enum create_bun_socket_error_t *err) { - SSL_CTX *ctx = us_ssl_ctx_build_raw(options, err); - if (!ctx) return NULL; - - /* SecureContext is mode-neutral (Node lets one back both tls.connect and - * tls.createServer), so we can't bake client-vs-server into the CTX. CTX - * verify_mode comes purely from options (ca/request_cert/reject_unauthorized) - * in build_raw — for a server that decides whether CertificateRequest is - * sent, so we MUST NOT force VERIFY_PEER here. The per-SSL client override - * (verify mode + trust store) lives in us_internal_ssl_attach. */ - - /* Reneg policy is the only Bun-specific config BoringSSL has nowhere to - * store. Packed into one ex_data slot (no malloc; the void* IS the value) - * so it dies with the SSL_CTX refcount. The slot was already registered in - * build_raw for the live counter; this just overwrites its NULL value. */ - if (options.client_renegotiation_limit || options.client_renegotiation_window) { - SSL_CTX_set_ex_data(ctx, us_ssl_ctx_ex_idx(), - US_RENEG_PACK(options.client_renegotiation_limit, - options.client_renegotiation_window)); - } - - return ctx; -} - -/* SSL_CTX's own refcount IS the refcount; SSL_new() takes one more per socket - * internally, so a socket outlives its SecureContext without help from us. - * Exported so context.c / socket.c stay free of OpenSSL headers. */ -void us_internal_ssl_ctx_up_ref(SSL_CTX *p) { - if (p) SSL_CTX_up_ref(p); -} -void us_internal_ssl_ctx_unref(SSL_CTX *p) { - if (p) SSL_CTX_free(p); -} - -/* ── Per-socket SSL attach/detach ────────────────────────────────────────── */ - -void us_internal_ssl_attach(struct us_socket_t *s, SSL_CTX *ctx, - int is_client, const char *sni, - struct us_listen_socket_t *listener) { - us_internal_init_loop_ssl_data(s->group->loop); - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - - SSL *ssl = SSL_new(ctx); - /* Only Bun.connect / node:tls sockets surface the 'session' event; tagging - * just those keeps the new-session callback a no-op for every other TLS - * consumer (fetch, Bun.serve, postgres, websockets) instead of serializing - * a session per handshake that the dispatch then discards. */ - /* The listener's own kind is always 0; the kind it assigns to accepted - * sockets lives in accept_kind and may not have been copied onto `s` yet - * when its SSL is initialized. */ - if (ssl && (us_socket_kind(s) == BUN_SOCKET_KIND_BUN_SOCKET_TLS || - (listener && listener->accept_kind == BUN_SOCKET_KIND_BUN_SOCKET_TLS))) { - /* The very first TLS attach in a process can be a client connection, and - * nothing on that path has registered the ex_data indices yet - using the - * still--1 index would make CRYPTO_set_ex_data grow its slot array toward - * (size_t)-1. */ - us_ex_idx_ensure(); - SSL_set_ex_data(ssl, us_ssl_is_socket_ex_idx, (void *)1); - } - SSL_set_bio(ssl, loop_ssl_data->shared_rbio, loop_ssl_data->shared_wbio); - BIO_up_ref(loop_ssl_data->shared_rbio); - BIO_up_ref(loop_ssl_data->shared_wbio); - - /* renegotiation: ssl_renegotiate_explicit lets us bound it on the client - * (issues #6197/#5363); never on the server (DoS vector). */ - if (is_client) { - SSL_set_renegotiate_mode(ssl, ssl_renegotiate_explicit); - SSL_set_connect_state(ssl); - if (sni) SSL_set_tlsext_host_name(ssl, sni); - /* The CTX is mode-neutral and may have verify_mode == NONE (no - * ca/requestCert in options). Clients must always run verification so - * verify_error is populated for the JS rejectUnauthorized check — but - * setting VERIFY_PEER on the CTX would make a server using the same - * SecureContext send CertificateRequest. SSL_set_verify scopes the mode to - * this socket; SSL_set0_verify_cert_store gives it the process-shared root - * bundle without touching the CTX (servers using the same CTX never pay - * the ~150-root build). us_verify_callback returns 1 so the handshake - * never aborts here — JS reads verify_error and decides. */ - if (SSL_CTX_get_verify_mode(ctx) == SSL_VERIFY_NONE) { - SSL_set_verify(ssl, SSL_VERIFY_PEER, us_verify_callback); - us_ex_idx_ensure(); - if (!SSL_CTX_get_ex_data(ctx, us_ctx_user_ca_ex_idx)) { - /* Default context: give this socket the process-shared root bundle. - * A context whose store holds user-provided CAs (ca/caFile options or - * addCACert) keeps using its own store - overriding it here would - * hide those CAs from chain verification. */ - X509_STORE *roots = us_get_shared_default_ca_store(); - if (roots) SSL_set0_verify_cert_store(ssl, roots); - } - } - } else { - SSL_set_accept_state(ssl); - SSL_set_renegotiate_mode(ssl, ssl_renegotiate_never); - /* sni_cb recovers ls per-SSL — never via the shared SSL_CTX. */ - us_ex_idx_ensure(); - SSL_set_ex_data(ssl, us_ssl_listener_ex_idx, listener); - } - - s->ssl = ssl; - s->ssl_handshake_state = HANDSHAKE_PENDING; - s->ssl_write_wants_read = 0; - s->ssl_read_wants_write = 0; - s->ssl_fatal_error = 0; - s->ssl_raw_tap = 0; - s->ssl_shutdown_after_spill = 0; - s->ssl_close_after_spill = 0; - s->ssl_in_use = 0; - s->ssl_pending_detach = 0; - s->ssl_pending_close_code = 0; - s->ssl_is_server = is_client ? 0 : 1; -} - -void us_internal_ssl_detach(struct us_socket_t *s) { - /* Error/RST teardowns (us_internal_socket_close_raw) reach here without going - * through us_internal_ssl_close: release any spilled ciphertext this socket - * owns or the loop-wide slot dangles (batching permanently disabled, and a - * reused socket address would drain the dead socket's records). */ - ssl_release_spill(s->group->loop, s); - if (s->ssl) { - if (s->ssl_in_use) { - /* SSL_do_handshake/SSL_read is on the stack (a JS callback run from - * inside it destroyed the socket); freeing now would leave BoringSSL - * working on freed memory when control returns. The driver frees it - * when the call unwinds. */ - s->ssl_pending_detach = 1; - return; - } - SSL_free(s_ssl(s)); - s->ssl = NULL; - /* Same for a parked handshake reason: no dispatch can claim it now, and a - * socket reusing this address would report it as its own failure. */ - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - if (loop_ssl_data && loop_ssl_data->ssl_last_fatal_error_owner == (void *)s) { - loop_ssl_data->ssl_last_fatal_error[0] = 0; - loop_ssl_data->ssl_last_fatal_error_owner = NULL; - } - } -} - -/* ── Verify error reporting ──────────────────────────────────────────────── */ - -const char *us_X509_error_code(long err) { - const char *code = "UNSPECIFIED"; -#define CASE_X509_ERR(CODE) case X509_V_ERR_##CODE: code = #CODE; break; - switch (err) { - CASE_X509_ERR(UNABLE_TO_GET_ISSUER_CERT) - CASE_X509_ERR(UNABLE_TO_GET_CRL) - CASE_X509_ERR(UNABLE_TO_DECRYPT_CERT_SIGNATURE) - CASE_X509_ERR(UNABLE_TO_DECRYPT_CRL_SIGNATURE) - CASE_X509_ERR(UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY) - CASE_X509_ERR(CERT_SIGNATURE_FAILURE) - CASE_X509_ERR(CRL_SIGNATURE_FAILURE) - CASE_X509_ERR(CERT_NOT_YET_VALID) - CASE_X509_ERR(CERT_HAS_EXPIRED) - CASE_X509_ERR(CRL_NOT_YET_VALID) - CASE_X509_ERR(CRL_HAS_EXPIRED) - CASE_X509_ERR(ERROR_IN_CERT_NOT_BEFORE_FIELD) - CASE_X509_ERR(ERROR_IN_CERT_NOT_AFTER_FIELD) - CASE_X509_ERR(ERROR_IN_CRL_LAST_UPDATE_FIELD) - CASE_X509_ERR(ERROR_IN_CRL_NEXT_UPDATE_FIELD) - CASE_X509_ERR(OUT_OF_MEM) - CASE_X509_ERR(DEPTH_ZERO_SELF_SIGNED_CERT) - CASE_X509_ERR(SELF_SIGNED_CERT_IN_CHAIN) - CASE_X509_ERR(UNABLE_TO_GET_ISSUER_CERT_LOCALLY) - CASE_X509_ERR(UNABLE_TO_VERIFY_LEAF_SIGNATURE) - CASE_X509_ERR(CERT_CHAIN_TOO_LONG) - CASE_X509_ERR(CERT_REVOKED) - CASE_X509_ERR(INVALID_CA) - CASE_X509_ERR(PATH_LENGTH_EXCEEDED) - CASE_X509_ERR(INVALID_PURPOSE) - CASE_X509_ERR(CERT_UNTRUSTED) - CASE_X509_ERR(CERT_REJECTED) - CASE_X509_ERR(HOSTNAME_MISMATCH) - } -#undef CASE_X509_ERR - return code; -} - -static long us_internal_verify_peer_certificate(const SSL *ssl, long def) { - if (!ssl) return def; - long err = def; - X509 *peer_cert = SSL_get_peer_certificate(ssl); - if (peer_cert) { - X509_free(peer_cert); - err = SSL_get_verify_result(ssl); - } else { - const SSL_CIPHER *curr_cipher = SSL_get_current_cipher(ssl); - const SSL_SESSION *sess = SSL_get_session(ssl); - if ((curr_cipher && SSL_CIPHER_get_auth_nid(curr_cipher) == NID_auth_psk) || - (sess && SSL_SESSION_get_protocol_version(sess) == TLS1_3_VERSION && - SSL_session_reused(ssl))) { - return X509_V_OK; - } - } - return err; -} - -struct us_bun_verify_error_t us_ssl_socket_verify_error_from_ssl(SSL *ssl) { - long x509_verify_error = - us_internal_verify_peer_certificate(ssl, X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT); - if (x509_verify_error == X509_V_OK) - return (struct us_bun_verify_error_t){.error = 0, .code = NULL, .reason = NULL}; - const char *reason = X509_verify_cert_error_string(x509_verify_error); - const char *code = us_X509_error_code(x509_verify_error); - return (struct us_bun_verify_error_t){.error = x509_verify_error, .code = code, .reason = reason}; -} - -struct us_bun_verify_error_t us_internal_ssl_verify_error(struct us_socket_t *s) { - if (!s->ssl || !s_ssl(s) || us_socket_is_closed(s) || us_internal_ssl_is_shut_down(s)) { - return (struct us_bun_verify_error_t){.error = 0, .code = NULL, .reason = NULL}; - } - return us_ssl_socket_verify_error_from_ssl(s_ssl(s)); -} - -/* ── Handshake state machine ─────────────────────────────────────────────── */ - -/* Park the fatal OpenSSL reason behind a failed SSL_* call where the - * handshake-failure dispatch can find it, then drain the queue and mark the - * socket fatal. Only parks while the handshake is unfinished: that dispatch is - * the sole consumer, so a later reason would linger and be misreported as some - * other socket's handshake failure. */ -static void ssl_park_fatal_reason(struct us_socket_t *s) { - struct loop_ssl_data *loop_ssl_data = - (struct loop_ssl_data *) s->group->loop->data.ssl_data; - if (loop_ssl_data && s->ssl_handshake_state != HANDSHAKE_COMPLETED) { - unsigned long ssl_queue_err = ERR_peek_last_error(); - if (ssl_queue_err != 0) { - ERR_error_string_n(ssl_queue_err, loop_ssl_data->ssl_last_fatal_error, - sizeof(loop_ssl_data->ssl_last_fatal_error)); - loop_ssl_data->ssl_last_fatal_error_owner = s; - } - } - ERR_clear_error(); - s->ssl_fatal_error = 1; -} - -/* The on_handshake callback runs JS which may us_socket_close(s) — that frees - * s->ssl. Every caller MUST check ssl_gone(s) immediately after this returns - * and bail before touching s->ssl again. */ -/* If a fatal handshake reason was parked by `s`, dispatch it as the EPROTO - * failure for `s` and return 1; the per-loop scratch is copied to the stack - * and cleared before the dispatch runs JS. Returns 0 when nothing was parked - * for this socket. */ -static int ssl_dispatch_parked_reason(struct us_socket_t *s) { - struct loop_ssl_data *loop_ssl_data = - (struct loop_ssl_data *) s->group->loop->data.ssl_data; - if (!loop_ssl_data || !loop_ssl_data->ssl_last_fatal_error[0] || - loop_ssl_data->ssl_last_fatal_error_owner != (void *)s) { - return 0; - } - char reason[sizeof(loop_ssl_data->ssl_last_fatal_error)]; - memcpy(reason, loop_ssl_data->ssl_last_fatal_error, sizeof(reason)); - loop_ssl_data->ssl_last_fatal_error[0] = 0; - loop_ssl_data->ssl_last_fatal_error_owner = NULL; - struct us_bun_verify_error_t verify_error = { - .error = -71, .code = "EPROTO", .reason = reason}; - us_dispatch_handshake(s, 0, verify_error); - return 1; -} - -static void ssl_trigger_handshake(struct us_socket_t *s, int success) { - s->ssl_handshake_state = HANDSHAKE_COMPLETED; - /* A fatal SSL protocol error (wrong version number, bad record, ...) was - * recorded just before this failure: report it instead of the X509 verify - * result so Node's tlsClientError / client error carries the OpenSSL - * reason string. */ - if (!success && ssl_dispatch_parked_reason(s)) { - return; - } - struct us_bun_verify_error_t verify_error = us_internal_ssl_verify_error(s); - us_dispatch_handshake(s, success, verify_error); -} - -static void ssl_trigger_handshake_econnreset(struct us_socket_t *s) { - s->ssl_handshake_state = HANDSHAKE_COMPLETED; - /* A fatal SSL protocol error (wrong version number, bad record, ...) was - * recorded just before this close: report it instead of the generic - * disconnected-before-established message so Node's tlsClientError / - * client error carries the OpenSSL reason. */ - if (ssl_dispatch_parked_reason(s)) { - return; - } - struct us_bun_verify_error_t verify_error = { - .error = -46, .code = "ECONNRESET", - .reason = "Client network socket disconnected before secure TLS connection was established"}; - us_dispatch_handshake(s, 0, verify_error); -} - -/* True once a re-entrant us_socket_close() has run inside a dispatch. Any - * `s->ssl` is NULL at that point. */ -static inline int ssl_gone(struct us_socket_t *s) { - return us_socket_is_closed(s) || s->ssl == NULL; -} - -static int ssl_renegotiate(struct us_socket_t *s) { - /* Server-forced renegotiation (HelloRequest -> SSL_ERROR_WANT_RENEGOTIATE). - * Enforce the per-context policy (default 3 per 600s, Node's - * CLIENT_RENEG_LIMIT/CLIENT_RENEG_WINDOW) before re-entering a full - * handshake — otherwise a malicious server can pin a core with - * back-to-back renegotiations. limit == 0 disables renegotiation; window - * == 0 means the per-connection counter never resets. Returning 0 makes - * the caller treat this as SSL_ERROR_SSL and close the connection. */ - uint32_t limit, window; - us_reneg_policy(s_ssl(s), &limit, &window); - struct us_ssl_reneg_state_t *st = us_reneg_state(s_ssl(s)); - s->ssl_handshake_state = HANDSHAKE_RENEGOTIATION_PENDING; - if (!st) { - ssl_trigger_handshake(s, 0); - return 0; - } - /* Wall-clock time can step backwards (NTP, manual adjustment); the - * unsigned subtraction below would underflow and reset the window every - * time. Only treat the window as elapsed when time has moved forward. */ - uint64_t now_ms = (uint64_t)time(NULL) * 1000; - if (st->count == 0 || - (window && now_ms >= st->window_start_ms && - now_ms - st->window_start_ms >= (uint64_t)window * 1000)) { - st->window_start_ms = now_ms; - st->count = 0; - } - if (st->count >= limit) { - ssl_trigger_handshake(s, 0); - return 0; - } - st->count++; - if (!SSL_renegotiate(s_ssl(s))) { - ssl_trigger_handshake(s, 0); - return 0; - } - return 1; -} - -/* Returns 1 if shutdown is complete (or impossible) and the TCP socket may be - * closed; 0 if we sent close_notify but must wait for the peer's. */ -static int ssl_handle_shutdown(struct us_socket_t *s, int force_fast_shutdown) { - if (!s->ssl || us_internal_ssl_is_shut_down(s) || s->ssl_fatal_error || !SSL_is_init_finished(s_ssl(s))) - return 1; - - int state = SSL_get_shutdown(s_ssl(s)); - int sent_shutdown = state & SSL_SENT_SHUTDOWN; - int received_shutdown = state & SSL_RECEIVED_SHUTDOWN; - if (!sent_shutdown || !received_shutdown) { - ssl_set_loop_data(s); - int ret = SSL_shutdown(s_ssl(s)); - if (ret == 0 && force_fast_shutdown) ret = SSL_shutdown(s_ssl(s)); - if (ret < 0) { - int err = SSL_get_error(s_ssl(s), ret); - if (err == SSL_ERROR_SSL || err == SSL_ERROR_SYSCALL) { - ERR_clear_error(); - s->ssl_fatal_error = 1; - return 1; - } - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) { - /* The close_notify could not be flushed (BIO write failed: kernel - * buffer full or peer already gone). There is no retry path — - * SSL_SENT_SHUTDOWN is already set, so on_writable/on_data - * short-circuit through is_shut_down and never re-dispatch the - * alert. Returning 0 here would keep s->ssl (and BoringSSL's - * write_buffer holding the encoded alert) alive until the next - * socket event, which may never arrive — observed as an LSan - * leak in node-https-checkServerIdentity.test.ts when the child - * exits right after server.close(). The deferred-close contract - * documented in us_internal_ssl_close only applies to the - * SSL_shutdown()==0 case where the alert *was* flushed; here it - * never went out, so close now. */ - return 1; - } - s->ssl_fatal_error = 1; - return 1; - } - return ret == 1; - } - return 1; -} - -struct us_socket_t *us_internal_ssl_close(struct us_socket_t *s, int code, void *reason) { - if (s->ssl && s->ssl_in_use) { - /* A JS callback running from inside SSL_do_handshake/SSL_read (ALPN, SNI, - * keylog, ...) destroyed this socket. Reaching ssl_set_loop_data / - * SSL_do_handshake here would re-enter BoringSSL on the same SSL* while - * the outer ssl_run_handshake is still on the stack; defer to the SSL - * driver's epilogue (the same protocol close_raw and ssl_detach honor), - * releasing the spill now so the re-issued close cannot itself defer. */ - ssl_release_spill(s->group->loop, s); - s->ssl_pending_detach = 1; - s->ssl_pending_close_code = (unsigned char) code; - return s; - } - /* node's `_handle.close()` (FAST_SHUTDOWN, no reason) must not cut off spilled - * ciphertext already reported as written: SSL sealed it, so it can only be - * delivered, never re-sent. Mirror ssl_shutdown_after_spill; defer at most once. */ - if (code == LIBUS_SOCKET_CLOSE_CODE_FAST_SHUTDOWN && !reason - && !s->ssl_close_after_spill && !s->ssl_fatal_error && !us_socket_is_closed(s)) { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - if (loop_ssl_data && !ssl_drain_spill(loop_ssl_data, s)) { - s->ssl_close_after_spill = 1; - return s; - } - } - ssl_release_spill(s->group->loop, s); - /* SEMI_SOCKET never connected — SSL was attached eagerly on the fast-path - * connect, but no bytes were ever exchanged. Firing on_handshake(0) here - * lands in JS after onConnectError already tore down `this`/its handlers. */ - if (ssl_gone(s) || (us_internal_poll_type(&s->p) & POLL_TYPE_KIND_MASK) == POLL_TYPE_SEMI_SOCKET) { - return us_internal_socket_close_raw(s, code, reason); - } - ssl_set_loop_data(s); - ssl_update_handshake(s); - if (ssl_gone(s)) return s; - - if (s->ssl_handshake_state != HANDSHAKE_COMPLETED) { - /* Surface ECONNRESET-style handshake failure exactly once so callers - * (fetch, sockets) don't each have to check on_close themselves. */ - ssl_trigger_handshake_econnreset(s); - if (ssl_gone(s)) return s; - } - - /* code != 0 (forceful — `_destroy()` / `_handle.close()` / abort): send - * close_notify best-effort and raw-close now. The Zig destroy path detaches - * + poll_ref.unref() right after, so deferring would orphan the us_socket_t. - * - * code == 0 (graceful — `end()` → markInactive → closeAndDetach(.normal)): - * send close_notify and DEFER the fd close until the peer replies. The - * graceful path keeps `poll_ref` held until onClose runs, so the loop stays - * alive to receive the peer's close_notify/FIN; raw-closing here would let - * the client resolve `close` before the server has even seen our Finished - * under low-prio fan-out (connectionListener race). The actual raw-close - * happens via on_end/ZERO_RETURN re-entering this function with - * SSL_SENT_SHUTDOWN already set (ssl_handle_shutdown then returns 1). */ - if (ssl_handle_shutdown(s, code != 0)) { - return us_internal_socket_close_raw(s, code, reason); - } - return s; -} -#define ssl_close us_internal_ssl_close - -static void ssl_update_handshake(struct us_socket_t *s) { - /* The OpenSSL error queue is per-thread and another socket's failure (a - * server and a client commonly share this thread) may have left entries on - * it; clear it before this socket's handshake step so any reason captured - * below genuinely belongs to this socket's own failure. */ - ERR_clear_error(); - if (!s->ssl || s->ssl_handshake_state != HANDSHAKE_PENDING) return; - - /* SSL_read may have driven the handshake to completion before we got here - * (TLS 1.3 server: client's Finished + close_notify in one segment lands as - * ZERO_RETURN with init already finished). Report success based on what - * BoringSSL actually negotiated, not on whether the peer happens to have - * already closed — RECEIVED_SHUTDOWN after a completed handshake is a clean - * close, not a handshake failure. */ - if (SSL_is_init_finished(s_ssl(s))) { - ssl_trigger_handshake(s, 1); - return; - } - - if (us_socket_is_closed(s) || us_internal_ssl_is_shut_down(s) || - (s_ssl(s) && SSL_get_shutdown(s_ssl(s)) & SSL_RECEIVED_SHUTDOWN)) { - ssl_trigger_handshake(s, 0); - return; - } - - unsigned char ssl_was_in_use = s->ssl_in_use; - s->ssl_in_use = 1; - int result = SSL_do_handshake(s_ssl(s)); - s->ssl_in_use = ssl_was_in_use; - if (!ssl_was_in_use && s->ssl_pending_detach) { - /* A callback run from inside the handshake destroyed this socket; perform - * the deferred close now and do not touch the SSL again. */ - s->ssl_pending_detach = 0; - us_socket_close(s, s->ssl_pending_close_code, NULL); - return; - } - - if (SSL_get_shutdown(s_ssl(s)) & SSL_RECEIVED_SHUTDOWN) { - ssl_close(s, 0, NULL); - return; - } - - if (result <= 0) { - int err = SSL_get_error(s_ssl(s), result); - if (err == SSL_ERROR_PENDING_CERTIFICATE) { - /* Suspended by an async SNICallback: stay in HANDSHAKE_PENDING with no - * poll re-arm; us_socket_sni_resolve() re-drives the handshake when the - * JS resolution arrives. */ - s->ssl_handshake_state = HANDSHAKE_PENDING; - return; - } - if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) { - if (err == SSL_ERROR_SSL || err == SSL_ERROR_SYSCALL) { - ssl_park_fatal_reason(s); - } - ssl_trigger_handshake(s, 0); - return; - } - s->ssl_handshake_state = HANDSHAKE_PENDING; - s->ssl_write_wants_read = 1; - s->flags.last_write_failed = 1; - return; - } - - ssl_trigger_handshake(s, 1); - if (ssl_gone(s)) return; - s->ssl_write_wants_read = 1; -} - -/* ── Event hooks (called from loop.c / socket.c when s->ssl != NULL) ────── */ - -struct us_socket_t *us_internal_ssl_on_open(struct us_socket_t *s, int is_client, - char *ip, int ip_length) { - ssl_set_loop_data(s); - struct us_socket_t *result = us_dispatch_open(s, is_client, ip, ip_length); - if (!result || ssl_gone(result)) return result; - /* Kick the handshake immediately — some peers stall waiting for ClientHello. */ - ssl_set_loop_data(result); - ssl_update_handshake(result); - return result; -} - -struct us_socket_t *us_internal_ssl_on_close(struct us_socket_t *s, int code, void *reason) { - ssl_set_loop_data(s); - struct us_socket_t *ret = us_dispatch_close(s, code, reason); - /* Free SSL after on_close so user code can still inspect ALPN / cert. */ - us_internal_ssl_detach(s); - return ret; -} - -struct us_socket_t *us_internal_ssl_on_end(struct us_socket_t *s) { - ssl_set_loop_data(s); - /* TCP FIN under TLS: the peer's write side is gone, so no close_notify reply - * is coming. Send ours best-effort and raw-close now — deferring (the - * code==0 path in ssl_close) would wait forever, and with native - * allowHalfOpen=true the loop.c caller no longer raw-closes for us. */ - s = ssl_close(s, 0, NULL); - if (s && !us_socket_is_closed(s)) { - s = us_internal_socket_close_raw(s, LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN, NULL); - } - return s; -} - -struct us_socket_t *us_internal_ssl_on_writable(struct us_socket_t *s) { - ssl_set_loop_data(s); - { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - /* Ciphertext from a partial batch flush goes out before anything else; - * while it is pending nothing new may be written for this socket. */ - if (loop_ssl_data && !ssl_drain_spill(loop_ssl_data, s)) { - return s; - } - if (s->ssl_shutdown_after_spill) { - s->ssl_shutdown_after_spill = 0; - us_internal_ssl_shutdown(s); - if (ssl_gone(s)) return s; - } - if (s->ssl_close_after_spill) { - s->ssl_close_after_spill = 0; - return us_internal_ssl_close(s, LIBUS_SOCKET_CLOSE_CODE_FAST_SHUTDOWN, NULL); - } - } - ssl_update_handshake(s); - if (ssl_gone(s)) return s; - - if (s->ssl_read_wants_write) { - s->ssl_read_wants_write = 0; - /* Re-enter the data path with an empty buffer; SSL_read will pull from - * the kernel via the next readable event but this lets it flush any - * pending decrypt that was blocked on a write. */ - s = us_internal_ssl_on_data(s, "", 0); - if (!s || ssl_gone(s)) return s; - } - if (us_internal_ssl_is_shut_down(s)) return s; - - if (s->ssl_handshake_state == HANDSHAKE_COMPLETED) { - s = us_dispatch_writable(s); - } - return s; -} - -struct us_socket_t *us_internal_ssl_on_data(struct us_socket_t *s, char *data, int length) { - /* See ssl_update_handshake: start this socket's SSL processing with a clean - * per-thread error queue so a captured reason cannot belong to another - * socket on the same thread. */ - ERR_clear_error(); - /* An accepted node:tls socket's kind is only assigned after its SSL was - * attached, so the is-a-bun-socket marker the session/keylog callbacks key - * on may still be missing. Set it lazily before the SSL_read that will - * fire those callbacks. */ - if (s->ssl && us_socket_kind(s) == BUN_SOCKET_KIND_BUN_SOCKET_TLS && - !SSL_get_ex_data(s->ssl, us_ssl_is_socket_ex_idx)) { - us_ex_idx_ensure(); - SSL_set_ex_data(s->ssl, us_ssl_is_socket_ex_idx, (void *)1); - } - /* upgradeTLS [raw, _] half observes ciphertext before SSL_read consumes it. - * Skip the empty-flush call from on_writable (length==0 → no real wire bytes). */ - if (s->ssl_raw_tap && length > 0) { - s = us_dispatch_ssl_raw_tap(s, data, length); - if (!s || us_socket_is_closed(s) || !s->ssl) return s; - } - - struct loop_ssl_data *loop_ssl_data = ssl_set_loop_data(s); - - loop_ssl_data->ssl_read_input = data; - loop_ssl_data->ssl_read_input_length = length; - - if (us_socket_is_closed(s)) return NULL; - /* Neither SENT_SHUTDOWN (TLS half-close from `socket.shutdown()` / node:tls - * `_final`) nor a sent FIN (POLL_TYPE_SOCKET_SHUT_DOWN) may skip the read - * loop: a half-closed socket still reads. The peer may have application - * data in flight that has to be delivered before its close_notify (handled - * as ZERO_RETURN below) or FIN closes us - under TLS 1.2 this is the - * NORMAL case for a write()+end() server, because the server finishes its - * handshake (and ends) one flight before the client can reply. Only bail - * when reading is genuinely impossible. */ - if (!s->ssl || !s_ssl(s) || s->ssl_fatal_error) { - ssl_close(s, 0, NULL); - return NULL; - } - - /* DO NOT call ssl_update_handshake() before the SSL_read loop. SSL_read - * drives the handshake itself; firing on_handshake here lets the JS callback - * write() → ssl_set_loop_data() → clobber the BIO buffer that still holds - * piggybacked application data. The on_writable tail-call below (gated on - * ssl_write_wants_read, which on_open()'s update_handshake set) is what - * pulls the server's handshake event through after each round-trip. */ - - int read = 0; -restart: - while (1) { - unsigned char ssl_was_in_use = s->ssl_in_use; - s->ssl_in_use = 1; - int just_read = SSL_read(s_ssl(s), - loop_ssl_data->ssl_read_output + LIBUS_RECV_BUFFER_PADDING + read, - LIBUS_RECV_BUFFER_LENGTH - read); - s->ssl_in_use = ssl_was_in_use; - if (!ssl_was_in_use && s->ssl_pending_detach) { - /* A callback run from inside this read destroyed the socket; perform - * the deferred close now and stop processing. */ - s->ssl_pending_detach = 0; - return us_socket_close(s, s->ssl_pending_close_code, NULL); - } - - if (just_read <= 0) { - int err = SSL_get_error(s_ssl(s), just_read); - /* SSL_ERROR_PENDING_CERTIFICATE: the handshake is suspended waiting for - * an async SNICallback (us_select_cert_cb returned retry). Treat it - * like WANT_READ - stop the read loop, deliver whatever was decrypted, - * and park the socket; us_socket_sni_resolve() re-drives the handshake - * when the JS resolution arrives. */ - if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE && - err != SSL_ERROR_PENDING_CERTIFICATE) { - if (err == SSL_ERROR_WANT_RENEGOTIATE) { - if (ssl_renegotiate(s)) continue; - if (ssl_gone(s)) return NULL; - err = SSL_ERROR_SSL; - } else if (err == SSL_ERROR_ZERO_RETURN) { - /* Remote close_notify. A NewSessionTicket that rode in ahead of the - * close_notify was parked by the new-session callback; deliver it - * first (wire order - the ticket preceded these bytes, and Node's - * NewSessionCallback runs before the data reaches JS), then the - * decrypted data, then close. */ - ssl_flush_pending_session(s); - ssl_flush_pending_keylog(s); - if (ssl_gone(s)) return NULL; - if (read) { - s = us_dispatch_data(s, loop_ssl_data->ssl_read_output + LIBUS_RECV_BUFFER_PADDING, read); - if (!s || ssl_gone(s)) return NULL; - } - ssl_close(s, 0, NULL); - return NULL; - } - - if (err == SSL_ERROR_SSL || err == SSL_ERROR_SYSCALL) { - ssl_park_fatal_reason(s); - } - ssl_close(s, 0, NULL); - loop_ssl_data->ssl_last_fatal_error[0] = 0; - return NULL; - } else { - if (err == SSL_ERROR_WANT_WRITE) s->ssl_read_wants_write = 1; - - /* If the BIO still has unread ciphertext at this point, the TLS - * framing is broken — close. */ - if (loop_ssl_data->ssl_read_input_length) { - return ssl_close(s, 0, NULL); - } - /* SSL_read drove the handshake to completion but returned no app - * data (peer's Finished arrived alone). Fire on_handshake here — - * deferring to the on_writable tail-call lets the low-prio queue - * (SSL_in_init throttles to 5/tick) reorder the server's - * secureConnection event past the client's close under fan-out - * loads. The save/restore below makes this safe even if the JS - * callback writes; with read==0 the buffer is empty anyway. */ - if (s->ssl_handshake_state == HANDSHAKE_PENDING && SSL_is_init_finished(s_ssl(s))) { - ssl_trigger_handshake(s, 1); - if (ssl_gone(s)) return NULL; - loop_ssl_data->ssl_socket = s; - } - if (!read) break; - - /* Deliver any parked session/keylog payloads BEFORE the data: the - * SSL_read that parked them has returned, the ticket preceded these - * bytes on the wire (Node's NewSessionCallback also runs before the - * data reaches JS), and the data dispatch may run JS that closes the - * socket (an agent with keepAlive off destroys it as soon as the - * response completes) - the tail flush below never runs then and the - * parked session would be dropped. ssl_read_input_length is 0 here - * (checked above), so JS writing from the session handler cannot - * clobber pending ciphertext. */ - ssl_flush_pending_session(s); - ssl_flush_pending_keylog(s); - if (ssl_gone(s)) return NULL; - s = us_dispatch_data(s, loop_ssl_data->ssl_read_output + LIBUS_RECV_BUFFER_PADDING, read); - if (!s || ssl_gone(s)) return NULL; - break; - } - } else if (s->ssl_handshake_state != HANDSHAKE_COMPLETED) { - /* SSL_read returned application data with the handshake having - * finished inside it. Fire on_handshake before delivering data so the - * caller can inspect ALPN and re-tag the socket. The save/restore lets - * the JS callback write() without clobbering the BIO buffer that may - * still hold ciphertext for the next SSL_read. (PR #25946 gated this to - * clients because the server-side fire reordered node:http2/grpc-js - * session setup; the save/restore here is what was missing — those - * suites are re-verified below.) */ - char *saved_input = loop_ssl_data->ssl_read_input; - unsigned int saved_length = loop_ssl_data->ssl_read_input_length; - unsigned int saved_offset = loop_ssl_data->ssl_read_input_offset; - ssl_trigger_handshake(s, 1); - if (ssl_gone(s)) return NULL; - loop_ssl_data->ssl_read_input = saved_input; - loop_ssl_data->ssl_read_input_length = saved_length; - loop_ssl_data->ssl_read_input_offset = saved_offset; - loop_ssl_data->ssl_socket = s; - } - - read += just_read; - - if (read == LIBUS_RECV_BUFFER_LENGTH) { - char *saved_input = loop_ssl_data->ssl_read_input; - unsigned int saved_length = loop_ssl_data->ssl_read_input_length; - unsigned int saved_offset = loop_ssl_data->ssl_read_input_offset; - /* Same flush-before-dispatch as the loop exit below; the save/restore - * around this block protects the ciphertext still in the BIO from any - * JS the session handler runs. */ - ssl_flush_pending_session(s); - ssl_flush_pending_keylog(s); - if (ssl_gone(s)) return NULL; - s = us_dispatch_data(s, loop_ssl_data->ssl_read_output + LIBUS_RECV_BUFFER_PADDING, read); - if (!s || ssl_gone(s)) return NULL; - loop_ssl_data->ssl_read_input = saved_input; - loop_ssl_data->ssl_read_input_length = saved_length; - loop_ssl_data->ssl_read_input_offset = saved_offset; - loop_ssl_data->ssl_socket = s; - read = 0; - goto restart; - } - } - - /* If the last SSL_write failed with WANT_READ and we've now read, give the - * application a writable callback — but not if SSL_read just told us it - * needs to write first (would recurse). Re-check s->ssl: any dispatch above may - * have closed and freed s->ssl. */ - if (ssl_gone(s)) return NULL; - if (s->ssl_write_wants_read && !s->ssl_read_wants_write) { - s->ssl_write_wants_read = 0; - s = us_internal_ssl_on_writable(s); - if (!s || ssl_gone(s)) return NULL; - } - - /* The SSL_read loop above is fully unwound; deliver any session the - * new-session callback parked while it ran. The JS this dispatches may - * close the socket. */ - ssl_flush_pending_session(s); - ssl_flush_pending_keylog(s); - if (ssl_gone(s)) return NULL; - - return s; -} - -/* Throttle reading for sockets still in TLS init — the kernel buffers for us - * and the expensive crypto work is the first step, so deprioritising - * mid-handshake sockets keeps fully-established ones responsive under load. */ -int us_internal_ssl_is_low_prio(struct us_socket_t *s) { - return SSL_in_init(s_ssl(s)); -} - -/* ── Socket-level accessors / write / shutdown ───────────────────────────── */ - -int us_internal_ssl_is_shut_down(struct us_socket_t *s) { - /* Check the TCP poll-type directly; us_socket_is_shut_down() is TCP-level - * and does not re-dispatch to SSL. */ - if (us_internal_poll_type(&s->p) == POLL_TYPE_SOCKET_SHUT_DOWN) return 1; - return !s->ssl || !s_ssl(s) || (SSL_get_shutdown(s_ssl(s)) & SSL_SENT_SHUTDOWN) || s->ssl_fatal_error; -} - -int us_internal_ssl_is_handshake_finished(struct us_socket_t *s) { - if (!s->ssl || !s_ssl(s)) return 0; - return SSL_is_init_finished(s_ssl(s)); -} - -int us_internal_ssl_handshake_callback_has_fired(struct us_socket_t *s) { - return s->ssl && s->ssl_handshake_state == HANDSHAKE_COMPLETED; -} - -void *us_internal_ssl_get_native_handle(struct us_socket_t *s) { - return s->ssl ? s_ssl(s) : NULL; -} - -int us_internal_ssl_write(struct us_socket_t *s, const char *data, int length) { - if (us_socket_is_closed(s) || us_internal_ssl_is_shut_down(s) || length == 0) return 0; - - /* Fast-path connect attaches SSL eagerly on a SEMI_SOCKET (see - * us_socket_group_connect_resolved_dns); on_open hasn't fired yet so - * SNI/ALPN aren't on the SSL. SSL_write here would serialize the - * ClientHello without them. Report 0 so the caller buffers; on_open → - * ssl_update_handshake drains it. Mirrors the SEMI_SOCKET guard in - * us_internal_ssl_close above. */ - if ((us_internal_poll_type(&s->p) & POLL_TYPE_KIND_MASK) == POLL_TYPE_SEMI_SOCKET) { - return 0; - } - - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - - /* Earlier batched records of ours must reach the wire before anything new: - * SSL already counts them as written. While they cannot be delivered, the - * caller buffers plaintext (return 0), bounding the in-flight ciphertext. */ - if (!ssl_drain_spill(loop_ssl_data, s)) { - return 0; - } - - loop_ssl_data->ssl_read_input_length = 0; - loop_ssl_data->ssl_socket = s; - - /* Batch this write's records unless another socket's spill occupies the - * slot (then write through per record, the pre-batching behavior). - * - * Plaintext is consumed in record-size slices and the batch flushes every - * few records: the moment the wire blocks we STOP consuming, so the bytes - * we report as written are honest up to one bounded spill. Reporting a - * whole large write as consumed while its ciphertext sat in memory let the - * layers above fire 'finish' and close before the data reached the wire. */ - int batching = (loop_ssl_data->ssl_spill_owner == NULL); - loop_ssl_data->ssl_write_batching = batching; - - int total = 0; - int last_ssl_written = 1; - while (total < length) { - int chunk = length - total; - if (chunk > 16384) chunk = 16384; - last_ssl_written = SSL_write(s_ssl(s), data + total, chunk); - if (last_ssl_written <= 0) break; - total += last_ssl_written; - /* A batching allocation failure marks the socket fatal from inside the BIO; - * stop sealing records for a connection that is being torn down. */ - if (s->ssl_fatal_error) break; - if (batching && loop_ssl_data->ssl_write_batch_len >= 131072) { - if (!ssl_flush_write_batch(loop_ssl_data, s)) break; /* wire blocked: stop consuming */ - if (s->ssl_fatal_error) break; - } - } - loop_ssl_data->ssl_write_batching = 0; - if (batching) { - ssl_flush_write_batch(loop_ssl_data, s); - } - if (s->ssl_fatal_error) return 0; - if (total > 0) return total; - if (last_ssl_written <= 0) { - int err = SSL_get_error(s_ssl(s), last_ssl_written); - if (err == SSL_ERROR_WANT_READ) { - s->ssl_write_wants_read = 1; - } else if (err == SSL_ERROR_SSL || err == SSL_ERROR_SYSCALL) { - /* SSL_write drives the handshake when it has not finished, so this is - * where a handshake-configuration failure (impossible version window, - * no shared cipher) surfaces for a caller that wrote before - * 'secureConnect'. Park the reason: the handshake dispatch this failure - * triggers reports it instead of a bare verification verdict. */ - ssl_park_fatal_reason(s); - } - } - return 0; -} - -void us_internal_ssl_shutdown(struct us_socket_t *s) { - if (us_socket_is_closed(s) || us_internal_ssl_is_shut_down(s)) return; - - /* Spilled ciphertext is data the layers above already count as written; - * a FIN/close_notify now would cut it off. Finish the shutdown from the - * writable event once the spill drains. */ - { - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - if (loop_ssl_data && loop_ssl_data->ssl_spill_owner == s) { - if (!ssl_drain_spill(loop_ssl_data, s)) { - s->ssl_shutdown_after_spill = 1; - return; - } - } - } - - /* BoringSSL has no TLS half-close: once SSL_shutdown sends our - * close_notify, SSL_read refuses to return any further application data - * (SSL_R_PROTOCOL_IS_SHUTDOWN). Node (OpenSSL) keeps reading after sending - * close_notify, and node:net/tls semantics depend on that: a write()+end() - * server must still receive the reply the peer sends after processing our - * data - under TLS 1.2 the server's handshake completes one flight before - * the client's, so that ordering is the norm rather than the exception. - * - * Send the TLS-level close_notify only when the peer's close_notify has - * already arrived (we will never need to read again). Otherwise do a TCP - * half-close (FIN, keep reading): the peer sees EOF after our last record - * and the connection tears down through the normal read-side path when its - * close_notify / FIN arrives. */ - if (!SSL_in_init(s_ssl(s)) && !(SSL_get_shutdown(s_ssl(s)) & SSL_RECEIVED_SHUTDOWN)) { - /* BoringSSL defers post-handshake writes (the TLS 1.3 NewSessionTicket - * messages) until the first SSL_write or SSL_shutdown. We are not sending - * close_notify here, so flush them explicitly before the FIN: a - * zero-length write seals no application record but pushes the pending - * handshake data through the BIO. Without this, a server that ends - * without writing (the tls.Server((s) => s.end()) pattern) never delivers - * its session tickets and clients cannot resume. */ - struct loop_ssl_data *flush_loop_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - flush_loop_data->ssl_read_input_length = 0; - flush_loop_data->ssl_socket = s; - char zero_buf = 0; - SSL_write(s_ssl(s), &zero_buf, 0); - us_internal_socket_raw_shutdown(s); - return; - } - - struct loop_ssl_data *loop_ssl_data = (struct loop_ssl_data *)s->group->loop->data.ssl_data; - loop_ssl_data->ssl_read_input_length = 0; - loop_ssl_data->ssl_socket = s; - - int ret = SSL_shutdown(s_ssl(s)); - - if (SSL_in_init(s_ssl(s)) || SSL_get_quiet_shutdown(s_ssl(s))) { - us_internal_socket_raw_shutdown(s); - return; - } - if (ret < 0) { - int err = SSL_get_error(s_ssl(s), ret); - if (err == SSL_ERROR_SSL || err == SSL_ERROR_SYSCALL) { - ERR_clear_error(); - s->ssl_fatal_error = 1; - } - us_internal_socket_raw_shutdown(s); - } -} - -/* Resume a handshake suspended by an async SNICallback. `ctx` (may be NULL = - * fall through to the default context) carries a reference that this call - * consumes. `error` != 0 aborts the handshake instead. No-op when the socket - * already closed/detached (the pending JS resolution outlived it). */ -void us_socket_sni_resolve(struct us_socket_t *s, struct ssl_ctx_st *ctx, int error) { - if (!s || us_socket_is_closed(s) || !s->ssl || !s_ssl(s)) { - if (ctx) SSL_CTX_free(ctx); - return; - } - if (us_ssl_sni_pending_idx < 0) { - if (ctx) SSL_CTX_free(ctx); - return; - } - struct us_ssl_sni_pending_t *pending = SSL_get_ex_data(s_ssl(s), us_ssl_sni_pending_idx); - if (!pending || pending->state != 1) { - /* Not actually suspended (late/duplicate resolution). */ - if (ctx) SSL_CTX_free(ctx); - return; - } - if (error) { - pending->state = 3; - if (ctx) SSL_CTX_free(ctx); - /* Match the synchronous abort path: the connection is dropped WITHOUT a - * TLS alert (Node's behavior for SNICallback errors). Mark the socket for - * the deferred close before re-driving the handshake, so the BIO swallows - * the handshake_failure alert BoringSSL queues for select_cert_error and - * the epilogue closes the socket; the client just sees the connection go - * away ("disconnected before secure TLS connection was established"). */ - s->ssl_pending_detach = 1; - s->ssl_pending_close_code = 0; - } else { - pending->state = 2; - pending->resolved_ctx = ctx; /* may be NULL = default ctx */ - } - /* Re-drive the handshake; select_cert_cb re-fires and consumes the state. */ - ssl_set_loop_data(s); - ssl_update_handshake(s); -} - -void us_internal_ssl_handshake_abort(struct us_socket_t *s) { - s->ssl_fatal_error = 1; - ssl_close(s, 0, NULL); -} - -/* ── Adopt-TLS (STARTTLS / Bun.connect upgrade) ──────────────────────────── */ - -/* Feed bytes that were already read off the wire (e.g. a ClientHello consumed - * by the plain-TCP layer before the socket was adopted into TLS) through the - * same decrypt path as bytes arriving from the kernel. */ -struct us_socket_t *us_socket_tls_feed(struct us_socket_t *s, const char *data, int length) { - if (us_socket_is_closed(s) || !s->ssl || length <= 0) return s; - return us_internal_ssl_on_data(s, (char *)data, length); -} - -struct us_socket_t *us_socket_adopt_tls(struct us_socket_t *s, - struct us_socket_group_t *group, - unsigned char kind, struct ssl_ctx_st *ssl_ctx, - const char *sni, int is_client, int old_ext_size, - int ext_size) { - if (us_socket_is_closed(s)) return NULL; - - struct us_socket_t *new_s = us_socket_adopt(s, group, kind, old_ext_size, ext_size); - if (!new_s) return NULL; - - /* is_client=0 puts the SSL in accept state (server-side upgrade, e.g. - * `new tls.TLSSocket(acceptedSocket, { isServer: true })`); there is no - * listener for an adopted socket, so SNI resolves from the single ssl_ctx. */ - us_internal_ssl_attach(new_s, ssl_ctx, is_client, sni, NULL); - us_socket_resume(new_s); - /* Do NOT kick the handshake or dispatch on_open here — the caller hasn't - * repointed the ext slot yet, so any dispatch (open/handshake/close) would - * land in the old (TCP) owner. Caller stashes ext, sets kind, fires its own - * onOpen, then calls us_socket_start_tls_handshake() to send ClientHello. */ - return new_s; -} - -void us_socket_start_tls_handshake(struct us_socket_t *s) { - if (!s->ssl || us_socket_is_closed(s)) return; - ssl_set_loop_data(s); - ssl_update_handshake(s); -} - -/* ── SNI on listen sockets ───────────────────────────────────────────────── */ - -static void sni_node_destructor(void *user) { - struct sni_node_t *node = (struct sni_node_t *)user; - if (!node) return; - SSL_CTX_free(node->ctx); - us_free(node); -} - -static struct sni_node_t *resolve_listener_ctx(struct us_listen_socket_t *ls, const char *hostname) { - if (!ls->sni) return NULL; - return (struct sni_node_t *)sni_find(ls->sni, hostname); -} - -/* Extracts the host_name from the ClientHello's server_name extension. - * Returns the length written to `out` (NUL-terminated), or 0 if absent / - * malformed. BoringSSL does document SSL_get_servername as usable inside - * select_certificate_cb (extract_sni runs before the callback), but every - * caller here reads the raw ClientHello instead so the lookup depends only - * on the early-callback contract, not on SSL* handshake state. */ -static size_t us_client_hello_servername(const SSL_CLIENT_HELLO *hello, char *out, size_t out_len) { - const uint8_t *ext; - size_t ext_len; - if (!SSL_early_callback_ctx_extension_get(hello, TLSEXT_TYPE_server_name, &ext, &ext_len)) { - return 0; - } - /* server_name extension: u16 list_len, then entries of (u8 type, u16 len, bytes). */ - if (ext_len < 5) return 0; - size_t list_len = ((size_t)ext[0] << 8) | ext[1]; - if (list_len + 2 != ext_len) return 0; - const uint8_t *p = ext + 2; - size_t remaining = list_len; - while (remaining >= 3) { - uint8_t type = p[0]; - size_t name_len = ((size_t)p[1] << 8) | p[2]; - if (name_len + 3 > remaining) return 0; - if (type == TLSEXT_NAMETYPE_host_name) { - if (name_len == 0 || name_len >= out_len) return 0; - memcpy(out, p + 3, name_len); - out[name_len] = 0; - return name_len; - } - p += 3 + name_len; - remaining -= 3 + name_len; - } - return 0; -} - -/* The async-capable certificate selector. Registered (instead of relying on - * sni_cb alone) on listener contexts that have a dynamic JS resolver, so an - * SNICallback that cannot answer synchronously suspends the handshake - * (ssl_select_cert_retry -> SSL_ERROR_PENDING_CERTIFICATE) instead of falling - * through to the default context. us_socket_sni_resolve() resumes it. */ -static enum ssl_select_cert_result_t us_select_cert_cb(const SSL_CLIENT_HELLO *hello) { - SSL *ssl = hello->ssl; - if (!ssl || us_ssl_listener_ex_idx < 0) return ssl_select_cert_success; - - /* A previous suspension being resumed: consume the stored result. */ - struct us_ssl_sni_pending_t *pending = - us_ssl_sni_pending_idx >= 0 ? SSL_get_ex_data(ssl, us_ssl_sni_pending_idx) : NULL; - if (pending && pending->state == 2) { - pending->state = 0; - if (pending->resolved_ctx) { - SSL_set_SSL_CTX(ssl, pending->resolved_ctx); - SSL_CTX_free(pending->resolved_ctx); - pending->resolved_ctx = NULL; - return ssl_select_cert_success; - } - /* The asynchronous resolution selected nothing (cb(null, null)): fall - * through to the static SNI tree below, exactly like a synchronous - * resolver returning null - the resume must not skip the tree fallback - * the sync path gets. */ - struct us_listen_socket_t *resumed_ls = - (struct us_listen_socket_t *)SSL_get_ex_data(ssl, us_ssl_listener_ex_idx); - if (resumed_ls) { - /* Read the servername from the raw ClientHello, same as the first-call - * path below: that is the read the early-callback contract guarantees - * (SSL_get_servername happens to be populated by the resume re-drive - * today, but the raw parse does not depend on that). */ - char resumed_host[256]; - if (us_client_hello_servername(hello, resumed_host, sizeof(resumed_host))) { - struct sni_node_t *resumed_node = resolve_listener_ctx(resumed_ls, resumed_host); - if (resumed_node) { - SSL_set_SSL_CTX(ssl, resumed_node->ctx); - } - } - } - return ssl_select_cert_success; - } - if (pending && pending->state == 3) { - pending->state = 0; - return ssl_select_cert_error; - } - if (pending && pending->state == 1) { - /* Still waiting (a spurious re-drive); keep suspending. */ - return ssl_select_cert_retry; - } - - struct us_listen_socket_t *ls = - (struct us_listen_socket_t *)SSL_get_ex_data(ssl, us_ssl_listener_ex_idx); - if (!ls || !ls->on_server_name) return ssl_select_cert_success; - - char hostname[256]; - if (!us_client_hello_servername(hello, hostname, sizeof(hostname))) { - return ssl_select_cert_success; - } - - /* The dynamic resolver (the user's SNICallback) runs FIRST, matching Node - * where a user-provided SNICallback replaces the default SNI handling - * entirely - including for the bind hostname, which Listener.rs always - * registers in the static tree (so tree-first would shadow the callback - * for the most-requested name and break per-connection cert rotation). - * The static tree (bind hostname + addContext entries) is the fallback - * when the resolver selects nothing, which is also the no-user-callback - * path: the JS dispatch returns undefined immediately in that case. */ - - /* The socket processing this ClientHello - the JS resolver needs it as the - * resume handle for an asynchronous SNICallback. */ - struct loop_ssl_data *cb_lsd = (struct loop_ssl_data *)BIO_get_data(SSL_get_wbio(ssl)); - struct us_socket_t *cb_socket = cb_lsd ? cb_lsd->ssl_socket : NULL; - - void *saved_loop_state[5]; - us_internal_ssl_loop_state_save(ssl, saved_loop_state); - int abort_handshake = 0; - SSL_CTX *dyn = ls->on_server_name(ls, hostname, &abort_handshake, cb_socket); - us_internal_ssl_loop_state_restore(saved_loop_state); - - if (abort_handshake == 1) { - /* Error/invalid context: drop the connection without an alert (the - * deferred-close + BIO-swallow path, same as sni_cb). */ - struct loop_ssl_data *lsd = (struct loop_ssl_data *)BIO_get_data(SSL_get_wbio(ssl)); - if (lsd && lsd->ssl_socket) { - lsd->ssl_socket->ssl_pending_detach = 1; - lsd->ssl_socket->ssl_pending_close_code = 0; - } - return ssl_select_cert_error; - } - if (abort_handshake == 2) { - /* The JS resolver answered "pending": suspend until us_socket_sni_resolve. */ - if (us_ssl_sni_pending_idx >= 0) { - if (!pending) { - pending = us_calloc(1, sizeof(*pending)); - SSL_set_ex_data(ssl, us_ssl_sni_pending_idx, pending); - } - pending->state = 1; - } - return ssl_select_cert_retry; - } - if (dyn) { - SSL_set_SSL_CTX(ssl, dyn); - SSL_CTX_free(dyn); - return ssl_select_cert_success; - } - - /* No dynamic selection: fall back to the static SNI tree (the bind - * hostname and addContext() entries). */ - struct sni_node_t *node = resolve_listener_ctx(ls, hostname); - if (node) { - SSL_set_SSL_CTX(ssl, node->ctx); - } - return ssl_select_cert_success; -} - -static int sni_cb(SSL *ssl, int *al, void *arg) { - (void)al; (void)arg; - if (!ssl || us_ssl_listener_ex_idx < 0) return SSL_TLSEXT_ERR_NOACK; - /* The listener is per-SSL (set at accept), not the CTX-level arg — the - * SSL_CTX is shared and may outlive any one listener. */ - struct us_listen_socket_t *ls = - (struct us_listen_socket_t *)SSL_get_ex_data(ssl, us_ssl_listener_ex_idx); - if (!ls) return SSL_TLSEXT_ERR_OK; - if (ls->on_server_name) { - /* A dynamic resolver (user SNICallback) exists: us_select_cert_cb already - * ran it - and the static-tree fallback - at the earlier - * select-certificate stage. Consulting the tree again here would - * OVERWRITE the resolver's per-connection selection with the tree entry - * (the bind hostname is always registered there), undoing the - * SNICallback-takes-precedence contract. */ - return SSL_TLSEXT_ERR_OK; - } - const char *hostname = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); - if (hostname && hostname[0]) { - /* Static SNI tree only (no dynamic resolver registered for this - * listener). */ - struct sni_node_t *node = resolve_listener_ctx(ls, hostname); - if (node) { - SSL_set_SSL_CTX(ssl, node->ctx); - } - } - return SSL_TLSEXT_ERR_OK; -} - -int us_listen_socket_add_server_name(struct us_listen_socket_t *ls, - const char *hostname_pattern, - SSL_CTX *ctx, void *user) { - SSL_CTX *default_ctx = ls->ssl_ctx; - if (!default_ctx) return -1; - - if (!ls->sni) { - ls->sni = sni_new(); - /* Idempotent across listeners sharing this SSL_CTX — the callback reads - * the listener off the SSL, not the arg. */ - SSL_CTX_set_tlsext_servername_callback(default_ctx, sni_cb); - } - - struct sni_node_t *node = us_malloc(sizeof(struct sni_node_t)); - node->ctx = ctx; - node->user = user; - SSL_CTX_up_ref(ctx); - /* Stash userdata on the SSL_CTX too so per-socket lookup via - * SSL_get_SSL_CTX works regardless of which ctx the SNI cb selected. */ - us_ex_idx_ensure(); - SSL_CTX_set_ex_data(ctx, us_sni_ex_idx, user); - - if (sni_add(ls->sni, hostname_pattern, node)) { - /* Duplicate hostname — propagate so App.h's `if (result != 0)` rollback - * (which frees the per-domain HttpRouter it just built) actually fires. */ - sni_node_destructor(node); - return 1; - } - return 0; -} - -void us_listen_socket_remove_server_name(struct us_listen_socket_t *ls, - const char *hostname_pattern) { - if (!ls->sni) return; - struct sni_node_t *node = (struct sni_node_t *)sni_remove(ls->sni, hostname_pattern); - sni_node_destructor(node); -} - -void *us_listen_socket_find_server_name_userdata(struct us_listen_socket_t *ls, - const char *hostname_pattern) { - if (!ls->sni) return NULL; - struct sni_node_t *node = (struct sni_node_t *)sni_find(ls->sni, hostname_pattern); - return node ? node->user : NULL; -} - -/* Returns the SSL_CTX registered for `hostname_pattern` via - * us_listen_socket_add_server_name, or NULL. Owned - the caller must release - * the reference. The on_server_name resolvers return owned references (the - * SNI dispatcher frees them after SSL_set_SSL_CTX takes its own), so the - * tree's reference must not be handed out as a borrow. */ -struct ssl_ctx_st *us_listen_socket_find_server_name_ctx(struct us_listen_socket_t *ls, - const char *hostname_pattern) { - if (!ls->sni) return NULL; - struct sni_node_t *node = (struct sni_node_t *)sni_find(ls->sni, hostname_pattern); - if (!node || !node->ctx) return NULL; - SSL_CTX_up_ref(node->ctx); - return node->ctx; -} - -void us_listen_socket_on_server_name(struct us_listen_socket_t *ls, - struct ssl_ctx_st *(*cb)(struct us_listen_socket_t *, const char *, int *, struct us_socket_t *)) { - ls->on_server_name = cb; - /* The dynamic resolver may need to suspend the handshake (async - * SNICallback); only the early select-certificate callback supports retry, - * so register it on the listener's default context. The servername-stage - * sni_cb stays registered for the static SNI tree (it is a no-op when the - * early callback already installed a context). */ - if (ls->ssl_ctx) { - SSL_CTX_set_select_certificate_cb(ls->ssl_ctx, us_select_cert_cb); - } -} - -void *us_socket_server_name_userdata(struct us_socket_t *s) { - if (!s->ssl || !s_ssl(s) || us_sni_ex_idx < 0) return NULL; - return SSL_CTX_get_ex_data(SSL_get_SSL_CTX(s_ssl(s)), us_sni_ex_idx); -} - -void *us_internal_ssl_sni_userdata(struct us_socket_t *s) { - return us_socket_server_name_userdata(s); -} - -void us_internal_listen_socket_ssl_free(struct us_listen_socket_t *ls) { - /* Accepted sockets carry `ls` in per-SSL ex_data so sni_cb can reach the - * listener's SNI tree. Those sockets may outlive the listener (server.close() - * keeps existing connections per Node semantics), so wipe the back-ref now — - * sni_cb returns OK on NULL. Walk only sockets accepted INTO this listener's - * group; uWS apps with multiple listeners on one group are scoped by the - * `== ls` check. */ - if (us_ssl_listener_ex_idx >= 0 && ls->accept_group) { - for (struct us_socket_t *s = ls->accept_group->head_sockets; s; s = s->next) { - if (s->ssl && SSL_get_ex_data((SSL *)s->ssl, us_ssl_listener_ex_idx) == ls) { - SSL_set_ex_data((SSL *)s->ssl, us_ssl_listener_ex_idx, NULL); - } - } - /* Mid-handshake sockets (SSL_in_init → low_prio) are *unlinked* from - * head_sockets while parked in loop->data.low_prio_head, and they're - * exactly the population that will run sni_cb on the next tick. Miss them - * here and sni_cb dereferences `ls` after it's freed. Same group-filter as - * close_all's drain. */ - for (struct us_socket_t *s = ls->accept_group->loop->data.low_prio_head; s; s = s->next) { - if (s->group == ls->accept_group && s->ssl && - SSL_get_ex_data((SSL *)s->ssl, us_ssl_listener_ex_idx) == ls) { - SSL_set_ex_data((SSL *)s->ssl, us_ssl_listener_ex_idx, NULL); - } - } - } - if (ls->ssl_ctx) { - us_internal_ssl_ctx_unref(ls->ssl_ctx); - ls->ssl_ctx = NULL; - } - if (ls->sni) { - sni_free(ls->sni, sni_node_destructor); - ls->sni = NULL; - } -} - -#endif diff --git a/packages/bun-usockets/src/crypto/root_certs.cpp b/packages/bun-usockets/src/crypto/root_certs.cpp index 4257ddeee0dc..644f50cbd8be 100644 --- a/packages/bun-usockets/src/crypto/root_certs.cpp +++ b/packages/bun-usockets/src/crypto/root_certs.cpp @@ -1,6 +1,5 @@ #include "./root_certs.h" #include "./root_certs_header.h" -#include "./internal/internal.h" #include #include #include "./default_ciphers.h" @@ -164,7 +163,7 @@ static void us_internal_init_root_certs( }); } -extern "C" int us_internal_raw_root_certs(struct us_cert_string_t **out) { +extern "C" int us_raw_root_certs(struct us_cert_string_t **out) { *out = root_certs; return root_certs_size; } diff --git a/packages/bun-usockets/src/crypto/sni_tree.cpp b/packages/bun-usockets/src/crypto/sni_tree.cpp deleted file mode 100644 index d824c8daa7c8..000000000000 --- a/packages/bun-usockets/src/crypto/sni_tree.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2020. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* This Server Name Indication hostname tree is written in C++ but could be ported to C. - * Overall it looks like crap, but has no memory allocations in fast path and is O(log n). */ - -#ifndef SNI_TREE_H -#define SNI_TREE_H - -#ifndef LIBUS_NO_SSL - -#include -#include -#include -#include -#include -#include - -/* We only handle a maximum of 10 labels per hostname */ -#define MAX_LABELS 10 - -/* This cannot be shared */ -thread_local void (*sni_free_cb)(void *); - -struct sni_node { - /* Empty nodes must always hold null */ - void *user = nullptr; - std::map> children; - - ~sni_node() { - for (auto &p : children) { - /* The data of our string_views are managed by malloc */ - free((void *) p.first.data()); - - /* Call destructor passed to sni_free only if we hold data. - * This is important since sni_remove does not have sni_free_cb set */ - if (p.second.get()->user) { - sni_free_cb(p.second.get()->user); - } - } - } -}; - -// this can only delete ONE single node, but may cull "empty nodes with null as data" -void *removeUser(struct sni_node *root, unsigned int label, std::string_view *labels, unsigned int numLabels) { - - /* If we are in the bottom (past bottom by one), there is nothing to remove */ - if (label == numLabels) { - void *user = root->user; - /* Mark us for culling on the way up */ - root->user = nullptr; - return user; - } - - /* Is this label a child of root? */ - auto it = root->children.find(labels[label]); - if (it == root->children.end()) { - /* We cannot continue */ - return nullptr; - } - - void *removedUser = removeUser(it->second.get(), label + 1, labels, numLabels); - - /* On the way back up, we may cull empty nodes with no children. - * This ends up being where we remove all nodes */ - if (it->second.get()->children.empty() && it->second.get()->user == nullptr) { - - /* The data of our string_views are managed by malloc */ - free((void *) it->first.data()); - - /* This can only happen with user set to null, otherwise we use sni_free_cb which is unset by sni_remove */ - root->children.erase(it); - } - - return removedUser; -} - -void *getUser(struct sni_node *root, unsigned int label, std::string_view *labels, unsigned int numLabels) { - - /* Do we have labels to match? Otherwise, return where we stand */ - if (label == numLabels) { - return root->user; - } - - /* Try and match by our label */ - auto it = root->children.find(labels[label]); - if (it != root->children.end()) { - void *user = getUser(it->second.get(), label + 1, labels, numLabels); - if (user) { - return user; - } - } - - /* Try and match by wildcard */ - it = root->children.find("*"); - if (it == root->children.end()) { - /* Matching has failed for both label and wildcard */ - return nullptr; - } - - /* We matched by wildcard */ - return getUser(it->second.get(), label + 1, labels, numLabels); -} - -extern "C" { - - void *sni_new() { - return new sni_node; - } - - void sni_free(void *sni, void (*cb)(void *)) { - /* We want to run this callback for every remaining name */ - sni_free_cb = cb; - - delete (sni_node *) sni; - } - - /* Returns non-null if this name already exists */ - int sni_add(void *sni, const char *hostname, void *user) { - struct sni_node *root = (struct sni_node *) sni; - - /* Traverse all labels in hostname */ - for (std::string_view view(hostname, strlen(hostname)), label; - view.length(); view.remove_prefix(std::min(view.length(), label.length() + 1))) { - /* Label is the token separated by dot */ - label = view.substr(0, view.find('.', 0)); - - auto it = root->children.find(label); - if (it == root->children.end()) { - /* Duplicate this label for our kept string_view of it */ - void *labelString = malloc(label.length()); - memcpy(labelString, label.data(), label.length()); - - it = root->children.emplace(std::string_view((char *) labelString, label.length()), - std::make_unique()).first; // NOLINT(clang-analyzer-unix.Malloc) - } - - root = it->second.get(); - } - - /* We must never add multiple contexts for the same name, as that would overwrite and leak */ - if (root->user) { - return 1; - } - - root->user = user; - - return 0; - } - - /* Removes the exact match. Wildcards are treated as the verbatim asterisk char, not as an actual wildcard */ - void *sni_remove(void *sni, const char *hostname) { - struct sni_node *root = (struct sni_node *) sni; - - /* I guess 10 labels is an okay limit */ - std::string_view labels[10]; - unsigned int numLabels = 0; - - /* We traverse all labels first of all */ - for (std::string_view view(hostname, strlen(hostname)), label; - view.length(); view.remove_prefix(std::min(view.length(), label.length() + 1))) { - /* Label is the token separated by dot */ - label = view.substr(0, view.find('.', 0)); - - /* Anything longer than 10 labels is forbidden */ - if (numLabels == 10) { - return nullptr; - } - - labels[numLabels++] = label; - } - - return removeUser(root, 0, labels, numLabels); - } - - void *sni_find(void *sni, const char *hostname) { - struct sni_node *root = (struct sni_node *) sni; - - /* I guess 10 labels is an okay limit */ - std::string_view labels[10]; - unsigned int numLabels = 0; - - /* We traverse all labels first of all */ - for (std::string_view view(hostname, strlen(hostname)), label; - view.length(); view.remove_prefix(std::min(view.length(), label.length() + 1))) { - /* Label is the token separated by dot */ - label = view.substr(0, view.find('.', 0)); - - /* Anything longer than 10 labels is forbidden */ - if (numLabels == 10) { - return nullptr; - } - - labels[numLabels++] = label; - } - - return getUser(root, 0, labels, numLabels); - } - -} - -#endif - -#endif \ No newline at end of file diff --git a/packages/bun-usockets/src/eventing/epoll_kqueue.c b/packages/bun-usockets/src/eventing/epoll_kqueue.c deleted file mode 100644 index 1f29cadbac8a..000000000000 --- a/packages/bun-usockets/src/eventing/epoll_kqueue.c +++ /dev/null @@ -1,872 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "libusockets.h" -#include "internal/internal.h" -#include -#include -#if defined(LIBUS_USE_EPOLL) || defined(LIBUS_USE_KQUEUE) - -void Bun__internal_dispatch_ready_poll(void* loop, void* poll); -// void Bun__internal_dispatch_ready_poll(void* loop, void* poll) {} - -#ifndef WIN32 -/* Cannot include this one on Windows */ -#include -#include -#include -#include // memset -#endif - -void us_loop_run_bun_tick(struct us_loop_t *loop, const struct timespec* timeout); - -/* Pointer tags are used to indicate a Bun pointer versus a uSockets pointer */ -#define UNSET_BITS_49_UNTIL_64 0x0000FFFFFFFFFFFF -#define CLEAR_POINTER_TAG(p) ((void *) ((uintptr_t) (p) & UNSET_BITS_49_UNTIL_64)) -#define LIKELY(cond) __builtin_expect((_Bool)(cond), 1) -#define UNLIKELY(cond) __builtin_expect((_Bool)(cond), 0) - -#ifdef LIBUS_USE_EPOLL -#define GET_READY_POLL(loop, index) (struct us_poll_t *) loop->ready_polls[index].data.ptr -#define SET_READY_POLL(loop, index, poll) loop->ready_polls[index].data.ptr = (void*)poll -#else -#define GET_READY_POLL(loop, index) (struct us_poll_t *) loop->ready_polls[index].udata -#if defined(__FreeBSD__) -#define SET_READY_POLL(loop, index, poll) loop->ready_polls[index].udata = (void*)poll -#else -#define SET_READY_POLL(loop, index, poll) loop->ready_polls[index].udata = (uint64_t)poll -#endif -#endif - -/* Loop */ -void us_loop_free(struct us_loop_t *loop) { - us_internal_loop_data_free(loop); - close(loop->fd); - us_free(loop); -} - -/* Poll */ -struct us_poll_t *us_create_poll(struct us_loop_t *loop, int fallthrough, unsigned int ext_size) { - if (!fallthrough) { - loop->num_polls++; - } - return CLEAR_POINTER_TAG(us_malloc(sizeof(struct us_poll_t) + ext_size)); -} - -/* Todo: this one should be us_internal_poll_free */ -void us_poll_free(struct us_poll_t *p, struct us_loop_t *loop) { - loop->num_polls--; - us_free(p); -} - -__attribute__((always_inline)) void *us_poll_ext(struct us_poll_t *p) { - return p + 1; -} - -/* Todo: why have us_poll_create AND us_poll_init!? libuv legacy! */ -void us_poll_init(struct us_poll_t *p, LIBUS_SOCKET_DESCRIPTOR fd, int poll_type) { - p->state.fd = fd; - p->state.poll_type = poll_type; -} - -__attribute__((always_inline)) int us_poll_events(struct us_poll_t *p) { - return ((p->state.poll_type & POLL_TYPE_POLLING_IN) ? LIBUS_SOCKET_READABLE : 0) | ((p->state.poll_type & POLL_TYPE_POLLING_OUT) ? LIBUS_SOCKET_WRITABLE : 0); -} - -__attribute__((always_inline)) LIBUS_SOCKET_DESCRIPTOR us_poll_fd(struct us_poll_t *p) { - return p->state.fd; -} - -/* Returns any of listen socket, socket, shut down socket or callback */ -int us_internal_poll_type(struct us_poll_t *p) { - return p->state.poll_type & POLL_TYPE_KIND_MASK; -} - -/* Bug: doesn't really SET, rather read and change, so needs to be inited first! */ -void us_internal_poll_set_type(struct us_poll_t *p, int poll_type) { - p->state.poll_type = poll_type | (p->state.poll_type & POLL_TYPE_POLLING_MASK); -} - -#if defined(LIBUS_USE_EPOLL) - -#include -#include -#include - -static int has_epoll_pwait2 = -1; - -#ifndef SYS_epoll_pwait2 -// It's consistent on multiple architectures -// https://github.com/torvalds/linux/blob/9d1ddab261f3e2af7c384dc02238784ce0cf9f98/include/uapi/asm-generic/unistd.h#L795 -// https://github.com/google/gvisor/blob/master/test/syscalls/linux/epoll.cc#L48C1-L50C7 -#define SYS_epoll_pwait2 441 -#endif - -extern ssize_t sys_epoll_pwait2(int epfd, struct epoll_event* events, int maxevents, - const struct timespec* timeout, const sigset_t* sigmask); - - -static int bun_epoll_pwait2(int epfd, struct epoll_event *events, int maxevents, const struct timespec *timeout) { - int ret; - sigset_t mask; - sigemptyset(&mask); - - if (has_epoll_pwait2 != 0) { - do { - ret = sys_epoll_pwait2(epfd, events, maxevents, timeout, &mask); - } while (ret == -EINTR); - - if (LIKELY(ret != -ENOSYS && ret != -EPERM && ret != -EOPNOTSUPP && ret != -EACCES && ret != -EFAULT)) { - return ret; - } - - has_epoll_pwait2 = 0; - } - - int timeoutMs = -1; - if (timeout) { - timeoutMs = timeout->tv_sec * 1000 + timeout->tv_nsec / 1000000; - } - - do { - ret = epoll_pwait(epfd, events, maxevents, timeoutMs, &mask); - } while (IS_EINTR(ret)); - - return ret; -} - -extern int Bun__isEpollPwait2SupportedOnLinuxKernel(); - -#endif - -/* Loop */ -struct us_loop_t *us_create_loop(void *hint, void (*wakeup_cb)(struct us_loop_t *loop), void (*pre_cb)(struct us_loop_t *loop), void (*post_cb)(struct us_loop_t *loop), unsigned int ext_size) { - struct us_loop_t *loop = (struct us_loop_t *) us_calloc(1, sizeof(struct us_loop_t) + ext_size); - loop->num_polls = 0; - /* These could be accessed if we close a poll before starting the loop */ - loop->num_ready_polls = 0; - loop->current_ready_poll = 0; - - loop->bun_polls = 0; - -#ifdef LIBUS_USE_EPOLL - loop->fd = epoll_create1(EPOLL_CLOEXEC); - - if (has_epoll_pwait2 == -1) { - if (Bun__isEpollPwait2SupportedOnLinuxKernel() == 0) { - has_epoll_pwait2 = 0; - } - } - -#else - loop->fd = kqueue(); -#endif - - us_internal_loop_data_init(loop, wakeup_cb, pre_cb, post_cb); - return loop; -} - -/* Shared dispatch loop for both us_loop_run and us_loop_run_bun_tick */ -static void us_internal_dispatch_ready_polls(struct us_loop_t *loop) { -#ifdef LIBUS_USE_EPOLL - for (loop->current_ready_poll = 0; loop->current_ready_poll < loop->num_ready_polls; loop->current_ready_poll++) { - struct us_poll_t *poll = GET_READY_POLL(loop, loop->current_ready_poll); - if (LIKELY(poll)) { - if (CLEAR_POINTER_TAG(poll) != poll) { - Bun__internal_dispatch_ready_poll(loop, poll); - continue; - } - int events = loop->ready_polls[loop->current_ready_poll].events; - /* Normalize to 0/1 like the kqueue path's EV_ERROR: the value is - * forwarded as a libus close code, and a raw EPOLLERR (8) would - * read as errno 8 (ENOEXEC) in the JS error path. */ - const int error = !!(events & EPOLLERR); - const int eof = events & EPOLLHUP; - events &= us_poll_events(poll); - if (events || error || eof) { - us_internal_dispatch_ready_poll(poll, error, eof, events); - } - } - } -#else - /* Kqueue delivers each filter (READ, WRITE, TIMER, etc.) as a separate kevent, - * so the same fd/poll can appear twice in ready_polls. We coalesce them into a - * single set of flags per poll before dispatching, matching epoll's behavior - * where each fd appears once with a combined bitmask. */ - struct kevent_flags { - uint8_t readable : 1; - uint8_t writable : 1; - uint8_t error : 1; - uint8_t eof : 1; - uint8_t skip : 1; - uint8_t _pad : 3; - }; - - _Static_assert(sizeof(struct kevent_flags) == 1, "kevent_flags must be 1 byte"); - struct kevent_flags coalesced[LIBUS_MAX_READY_POLLS]; /* no zeroing needed — every index is written in the first pass */ - - /* First pass: decode kevents and coalesce same-poll entries */ - for (int i = 0; i < loop->num_ready_polls; i++) { - struct us_poll_t *poll = GET_READY_POLL(loop, i); - if (!poll || CLEAR_POINTER_TAG(poll) != poll) { - coalesced[i] = (struct kevent_flags){ .skip = 1 }; - continue; - } - - const int16_t filter = loop->ready_polls[i].filter; - const uint16_t flags = loop->ready_polls[i].flags; - struct kevent_flags bits = { -#if defined(__APPLE__) - .readable = (filter == EVFILT_READ || filter == EVFILT_MACHPORT), -#else - .readable = (filter == EVFILT_READ || filter == EVFILT_USER), -#endif - .writable = (filter == EVFILT_WRITE), - .error = !!(flags & EV_ERROR), - .eof = !!(flags & EV_EOF), - }; - - /* Look backward for a prior entry with the same poll to coalesce into. - * Kqueue returns at most 2 kevents per fd (READ + WRITE). */ - int merged = 0; - for (int j = i - 1; j >= 0; j--) { - if (!coalesced[j].skip && GET_READY_POLL(loop, j) == poll) { - coalesced[j].readable |= bits.readable; - coalesced[j].writable |= bits.writable; - coalesced[j].error |= bits.error; - coalesced[j].eof |= bits.eof; - coalesced[i] = (struct kevent_flags){ .skip = 1 }; - merged = 1; - break; - } - } - if (!merged) { - coalesced[i] = bits; - } - } - - /* Second pass: dispatch everything in order — tagged pointers and coalesced events */ - for (loop->current_ready_poll = 0; loop->current_ready_poll < loop->num_ready_polls; loop->current_ready_poll++) { - struct us_poll_t *poll = GET_READY_POLL(loop, loop->current_ready_poll); - if (!poll) continue; - - /* Tagged pointers (FilePoll) go through Bun's own dispatch */ - if (CLEAR_POINTER_TAG(poll) != poll) { - Bun__internal_dispatch_ready_poll(loop, poll); - continue; - } - - struct kevent_flags bits = coalesced[loop->current_ready_poll]; - if (bits.skip) continue; - - int events = (bits.readable ? LIBUS_SOCKET_READABLE : 0) - | (bits.writable ? LIBUS_SOCKET_WRITABLE : 0); - - events &= us_poll_events(poll); - if (events || bits.error || bits.eof) { - us_internal_dispatch_ready_poll(poll, bits.error, bits.eof, events); - } - } -#endif -} - -/* If the kernel filled our entire buffer, more events are likely already queued. - * Re-poll non-blocking and dispatch again before running pre/post callbacks, so a - * single tick covers all pending I/O instead of one 1024-event slice per roundtrip. - * Conditioned on saturation and capped at 48 iterations — matches libuv's uv__io_poll - * (vendor/libuv/src/unix/linux.c:1387,1590 and kqueue.c:253,451). */ -static void us_internal_drain_ready_polls(struct us_loop_t *loop) { - int drain_count = 48; - while (UNLIKELY(loop->num_ready_polls == LIBUS_MAX_READY_POLLS) && --drain_count != 0 && loop->num_polls > 0) { -#ifdef LIBUS_USE_EPOLL - static const struct timespec zero = {0, 0}; - loop->num_ready_polls = bun_epoll_pwait2(loop->fd, loop->ready_polls, LIBUS_MAX_READY_POLLS, &zero); -#else - do { - loop->num_ready_polls = kevent64(loop->fd, NULL, 0, loop->ready_polls, LIBUS_MAX_READY_POLLS, KEVENT_FLAG_IMMEDIATE, NULL); - } while (IS_EINTR(loop->num_ready_polls)); -#endif - if (loop->num_ready_polls <= 0) { - loop->num_ready_polls = 0; - break; - } - us_internal_dispatch_ready_polls(loop); - } -} - -/* Bound `timeout` by the socket-timeout sweep deadline (NULL == forever). */ -static const struct timespec *us_internal_clamp_to_sweep(struct us_loop_t *loop, const struct timespec *timeout, struct timespec *storage) { - long long ns = us_internal_sweep_timeout_ns(loop); - if (ns < 0) { - return timeout; - } - long long sweep_sec = ns / 1000000000LL; - long long sweep_nsec = ns % 1000000000LL; - if (timeout && (timeout->tv_sec < sweep_sec || - (timeout->tv_sec == sweep_sec && timeout->tv_nsec <= sweep_nsec))) { - return timeout; - } - storage->tv_sec = (time_t) sweep_sec; - storage->tv_nsec = (long) sweep_nsec; - return storage; -} - -void us_loop_run(struct us_loop_t *loop) { - /* While we have non-fallthrough polls we shouldn't fall through */ - while (loop->num_polls) { - loop->data.tick_depth++; - /* Emit pre callback */ - us_internal_loop_pre(loop); - - struct timespec sweep_ts; - const struct timespec *timeout = us_internal_clamp_to_sweep(loop, NULL, &sweep_ts); - - /* Fetch ready polls */ -#ifdef LIBUS_USE_EPOLL - loop->num_ready_polls = bun_epoll_pwait2(loop->fd, loop->ready_polls, LIBUS_MAX_READY_POLLS, timeout); -#else - do { - loop->num_ready_polls = kevent64(loop->fd, NULL, 0, loop->ready_polls, LIBUS_MAX_READY_POLLS, 0, timeout); - } while (IS_EINTR(loop->num_ready_polls)); -#endif - - us_internal_dispatch_ready_polls(loop); - us_internal_drain_ready_polls(loop); - us_internal_sweep_if_due(loop); - - /* Emit post callback */ - us_internal_loop_post(loop); - loop->data.tick_depth--; - } -} - -extern void Bun__JSC_onBeforeWait(void * _Nonnull jsc_vm); - -void us_loop_run_bun_tick(struct us_loop_t *loop, const struct timespec* timeout) { - if (loop->num_polls == 0) - return; - - loop->data.tick_depth++; - - /* Emit pre callback */ - us_internal_loop_pre(loop); - - /* loop_pre runs lsquic_engine_process_conns and stores the soonest - * earliest_adv_tick. The JS event loop folds this in via src/runtime/timer/mod.rs; other - * callers of us_loop_run_bun_tick (HTTP thread) pass NULL, so fold it - * here so QUIC retransmit/idle timers fire without other I/O waking us. */ - struct timespec quic_ts; - if (loop->data.quic_head && loop->data.quic_next_tick_us >= 0) { - long long us = loop->data.quic_next_tick_us; - if (!timeout || - (long long) timeout->tv_sec * 1000000 + timeout->tv_nsec / 1000 > us) { - quic_ts.tv_sec = (time_t)(us / 1000000); - quic_ts.tv_nsec = (long)((us % 1000000) * 1000); - timeout = &quic_ts; - } - } - - struct timespec sweep_ts; - timeout = us_internal_clamp_to_sweep(loop, timeout, &sweep_ts); - - const unsigned int had_wakeups = __atomic_exchange_n(&loop->pending_wakeups, 0, __ATOMIC_ACQUIRE); - const int will_idle_inside_event_loop = had_wakeups == 0 && (!timeout || (timeout->tv_nsec != 0 || timeout->tv_sec != 0)); - if (will_idle_inside_event_loop && loop->data.jsc_vm) - Bun__JSC_onBeforeWait(loop->data.jsc_vm); - - /* Fetch ready polls */ -#ifdef LIBUS_USE_EPOLL - /* A zero timespec already has a fast path in ep_poll (fs/eventpoll.c): - * it sets timed_out=1 (line 1952) and returns before any scheduler - * interaction (line 1975). No equivalent of KEVENT_FLAG_IMMEDIATE needed. */ - loop->num_ready_polls = bun_epoll_pwait2(loop->fd, loop->ready_polls, LIBUS_MAX_READY_POLLS, timeout); -#else - do { - loop->num_ready_polls = kevent64(loop->fd, NULL, 0, loop->ready_polls, LIBUS_MAX_READY_POLLS, - /* When we won't idle (pending wakeups or zero timeout), use KEVENT_FLAG_IMMEDIATE. - * In XNU's kqueue_scan (bsd/kern/kern_event.c): - * - KEVENT_FLAG_IMMEDIATE: returns immediately after kqueue_process() (line 8031) - * - Zero timespec without the flag: falls through to assert_wait_deadline (line 8039) - * and thread_block (line 8048), doing a full context switch cycle (~14us) even - * though the deadline is already in the past. */ - will_idle_inside_event_loop ? 0 : KEVENT_FLAG_IMMEDIATE, - timeout); - } while (IS_EINTR(loop->num_ready_polls)); -#endif - - us_internal_dispatch_ready_polls(loop); - us_internal_drain_ready_polls(loop); - us_internal_sweep_if_due(loop); - - /* Emit post callback */ - us_internal_loop_post(loop); - loop->data.tick_depth--; -} - -void us_internal_loop_update_pending_ready_polls(struct us_loop_t *loop, struct us_poll_t *old_poll, struct us_poll_t *new_poll, int old_events, int new_events) { -#ifdef LIBUS_USE_EPOLL - /* Epoll only has one ready poll per poll */ - int num_entries_possibly_remaining = 1; -#else - /* Ready polls may contain same poll twice under kqueue, as one poll may hold two filters */ - int num_entries_possibly_remaining = 2; -#endif - - /* Todo: for kqueue if we track things in us_change_poll it is possible to have a fast path with no seeking in cases of: - * current poll being us AND we only poll for one thing */ - - for (int i = loop->current_ready_poll; i < loop->num_ready_polls && num_entries_possibly_remaining; i++) { - if (GET_READY_POLL(loop, i) == old_poll) { - - // if new events does not contain the ready events of this poll then remove (no we filter that out later on) - SET_READY_POLL(loop, i, new_poll); - - num_entries_possibly_remaining--; - } - } -} - -/* Poll */ - -#ifdef LIBUS_USE_KQUEUE -/* Helper function for setting or updating EVFILT_READ and EVFILT_WRITE */ -int kqueue_change(int kqfd, int fd, int old_events, int new_events, void *user_data) { - struct kevent64_s change_list[2]; - int change_length = 0; - - /* Do they differ in readable? */ - int is_readable = (new_events & LIBUS_SOCKET_READABLE); - int is_writable = (new_events & LIBUS_SOCKET_WRITABLE); - if ((new_events & LIBUS_SOCKET_READABLE) != (old_events & LIBUS_SOCKET_READABLE)) { - EV_SET64(&change_list[change_length++], fd, EVFILT_READ, is_readable ? EV_ADD : EV_DELETE, 0, 0, (uint64_t)(void*)user_data, 0, 0); - } - - if(!is_readable && !is_writable) { - if(!(old_events & LIBUS_SOCKET_WRITABLE)) { - // if we are not reading or writing, we need to add writable to receive FIN - EV_SET64(&change_list[change_length++], fd, EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, (uint64_t)(void*)user_data, 0, 0); - } - } else if ((new_events & LIBUS_SOCKET_WRITABLE) != (old_events & LIBUS_SOCKET_WRITABLE)) { - /* Do they differ in writable? */ - EV_SET64(&change_list[change_length++], fd, EVFILT_WRITE, (new_events & LIBUS_SOCKET_WRITABLE) ? EV_ADD | EV_ONESHOT : EV_DELETE, 0, 0, (uint64_t)(void*)user_data, 0, 0); - } - int ret; - do { - ret = kevent64(kqfd, change_list, change_length, change_list, change_length, KEVENT_FLAG_ERROR_EVENTS, NULL); - } while (IS_EINTR(ret)); - - // ret should be 0 in most cases (not guaranteed when removing async) - - /* KEVENT_FLAG_ERROR_EVENTS reports per-filter failures as EV_ERROR entries - * with the errno in .data; kevent64 itself returns the count and does not - * set errno. Mirror epoll's contract so us_poll_start_rc callers can read it. */ - if (ret > 0) { - errno = (int) change_list[0].data; - } - - return ret; -} -#endif - -struct us_poll_t *us_poll_resize(struct us_poll_t *p, struct us_loop_t *loop, unsigned int old_ext_size, unsigned int ext_size) { - - unsigned int old_size = sizeof(struct us_poll_t) + old_ext_size; - unsigned int new_size = sizeof(struct us_poll_t) + ext_size; - if(new_size <= old_size) return p; - - struct us_poll_t *new_p = us_calloc(1, new_size); - memcpy(new_p, p, old_size); - - /* Increment poll count for the new poll - the old poll will be freed separately - * which decrements the count, keeping the total correct */ - loop->num_polls++; - - int events = us_poll_events(p); -#ifdef LIBUS_USE_EPOLL - /* Hack: forcefully update poll by stripping away already set events */ - new_p->state.poll_type = us_internal_poll_type(new_p); - us_poll_change(new_p, loop, events); -#else - /* Forcefully update poll by resetting them with new_p as user data */ - kqueue_change(loop->fd, new_p->state.fd, 0, LIBUS_SOCKET_WRITABLE | LIBUS_SOCKET_READABLE, new_p); -#endif - /* This is needed for epoll also (us_change_poll doesn't update the old poll) */ - us_internal_loop_update_pending_ready_polls(loop, p, new_p, events, events); - - return new_p; -} - -int us_poll_start_rc(struct us_poll_t *p, struct us_loop_t *loop, int events) { - p->state.poll_type = us_internal_poll_type(p) | ((events & LIBUS_SOCKET_READABLE) ? POLL_TYPE_POLLING_IN : 0) | ((events & LIBUS_SOCKET_WRITABLE) ? POLL_TYPE_POLLING_OUT : 0); - -#ifdef LIBUS_USE_EPOLL - struct epoll_event event; - if(!(events & LIBUS_SOCKET_READABLE) && !(events & LIBUS_SOCKET_WRITABLE)) { - /* Polling neither direction (a half-open socket after the peer's FIN): - * EPOLLHUP and EPOLLERR are always reported even when not requested, - * which is exactly what the dispatcher's eof/error handling needs to - * close the socket once both directions are down. Never add - * EPOLLRDHUP here - the peer's FIN has typically ALREADY arrived, so - * a level-triggered EPOLLRDHUP would fire on every epoll_wait while - * the dispatcher (which derives eof from EPOLLHUP only) ignores it, - * spinning the loop at 100% CPU until the JS side closes the fd. */ - events |= EPOLLHUP | EPOLLERR; - } - event.events = events; - event.data.ptr = p; - int ret; - do { - ret = epoll_ctl(loop->fd, EPOLL_CTL_ADD, p->state.fd, &event); - } while (IS_EINTR(ret)); - return ret; -#else - return kqueue_change(loop->fd, p->state.fd, 0, events, p); -#endif -} - -void us_poll_start(struct us_poll_t *p, struct us_loop_t *loop, int events) { - us_poll_start_rc(p, loop, events); -} - -void us_poll_change(struct us_poll_t *p, struct us_loop_t *loop, int events) { - int old_events = us_poll_events(p); - if (old_events != events) { - - p->state.poll_type = us_internal_poll_type(p) | ((events & LIBUS_SOCKET_READABLE) ? POLL_TYPE_POLLING_IN : 0) | ((events & LIBUS_SOCKET_WRITABLE) ? POLL_TYPE_POLLING_OUT : 0); - -#ifdef LIBUS_USE_EPOLL - struct epoll_event event; - if(!(events & LIBUS_SOCKET_READABLE) && !(events & LIBUS_SOCKET_WRITABLE)) { - /* See us_poll_start_rc: EPOLLHUP/EPOLLERR are implicit; never add - * EPOLLRDHUP for an already-half-closed socket or the loop spins. */ - events |= EPOLLHUP | EPOLLERR; - } - event.events = events; - event.data.ptr = p; - int rc; - do { - rc = epoll_ctl(loop->fd, EPOLL_CTL_MOD, p->state.fd, &event); - } while (IS_EINTR(rc)); -#else - kqueue_change(loop->fd, p->state.fd, old_events, events, p); -#endif - /* Set all removed events to null-polls in pending ready poll list */ - us_internal_loop_update_pending_ready_polls(loop, p, p, old_events, events); - } -} - -void us_poll_stop(struct us_poll_t *p, struct us_loop_t *loop) { - int old_events = us_poll_events(p); - int new_events = 0; -#ifdef LIBUS_USE_EPOLL - struct epoll_event event; - int rc; - do { - rc = epoll_ctl(loop->fd, EPOLL_CTL_DEL, p->state.fd, &event); - } while (IS_EINTR(rc)); -#else - if (old_events) { - kqueue_change(loop->fd, p->state.fd, old_events, new_events, NULL); - } -#endif - - /* Disable any instance of us in the pending ready poll list */ - us_internal_loop_update_pending_ready_polls(loop, p, 0, old_events, new_events); -} - -size_t us_internal_accept_poll_event(struct us_poll_t *p) { -#ifdef LIBUS_USE_EPOLL - int fd = us_poll_fd(p); - uint64_t buf; - ssize_t read_length = 0; - do { - read_length = read(fd, &buf, 8); - } while (IS_EINTR(read_length)); - return buf; -#else - /* Kqueue has no underlying FD for user events */ - return 0; -#endif -} - -/* Async (internal helper for loop's wakeup feature) */ -#ifdef LIBUS_USE_EPOLL -struct us_internal_async *us_internal_create_async(struct us_loop_t *loop, int fallthrough, unsigned int ext_size) { - struct us_poll_t *p = us_create_poll(loop, fallthrough, sizeof(struct us_internal_callback_t) + ext_size); - memset(p, 0, sizeof(struct us_internal_callback_t) + ext_size); - - int efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); - if (efd == -1) { - // eventfd only fails on EMFILE/ENFILE — the loop is unusable without - // wakeup_async, and the sole caller doesn't NULL-check. Crash loudly - // rather than NULL-deref or store -1 as a poll fd. - BUN_PANIC("eventfd() failed during loop init (out of file descriptors?)"); - } - us_poll_init(p, efd, POLL_TYPE_CALLBACK); - - struct us_internal_callback_t *cb = (struct us_internal_callback_t *) p; - cb->loop = loop; - cb->cb_expects_the_loop = 1; - cb->leave_poll_ready = 1; /* Edge-triggered: skip reading eventfd on wakeup */ - - return (struct us_internal_async *) cb; -} - -// identical code as for timer, make it shared for "callback types" -void us_internal_async_close(struct us_internal_async *a) { - struct us_internal_callback_t *cb = (struct us_internal_callback_t *) a; - - us_poll_stop(&cb->p, cb->loop); - close(us_poll_fd(&cb->p)); - - /* (regular) sockets are the only polls which are not freed immediately */ - us_poll_free((struct us_poll_t *) a, cb->loop); -} - -void us_internal_async_set(struct us_internal_async *a, void (*cb)(struct us_internal_async *)) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - - internal_cb->cb = (void (*)(struct us_internal_callback_t *)) cb; - - us_poll_start((struct us_poll_t *) a, internal_cb->loop, LIBUS_SOCKET_READABLE); -#ifdef LIBUS_USE_EPOLL - /* Upgrade to edge-triggered to avoid reading the eventfd on each wakeup */ - struct epoll_event event; - event.events = EPOLLIN | EPOLLET; - event.data.ptr = (struct us_poll_t *) a; - epoll_ctl(internal_cb->loop->fd, EPOLL_CTL_MOD, - us_poll_fd((struct us_poll_t *) a), &event); -#endif -} - -void us_internal_async_wakeup(struct us_internal_async *a) { - int fd = us_poll_fd((struct us_poll_t *) a); - uint64_t val; - for (val = 1; ; val = 1) { - if (write(fd, &val, 8) >= 0) return; - if (errno == EINTR) continue; - if (errno == EAGAIN) { - /* Counter overflow — drain and retry */ - if (read(fd, &val, 8) > 0 || errno == EAGAIN || errno == EINTR) continue; - } - break; - } -} -#elif defined(__APPLE__) - -#define MACHPORT_BUF_LEN 1024 - -struct us_internal_async *us_internal_create_async(struct us_loop_t *loop, int fallthrough, unsigned int ext_size) { - struct us_internal_callback_t *cb = us_calloc(1, sizeof(struct us_internal_callback_t) + ext_size); - cb->loop = loop; - cb->cb_expects_the_loop = 1; - cb->leave_poll_ready = 0; - - /* Bug: us_internal_poll_set_type does not SET the type, it only CHANGES it */ - cb->p.state.poll_type = POLL_TYPE_POLLING_IN; - us_internal_poll_set_type((struct us_poll_t *) cb, POLL_TYPE_CALLBACK); - - if (!fallthrough) { - loop->num_polls++; - } - - cb->machport_buf = us_malloc(MACHPORT_BUF_LEN); - mach_port_t self = mach_task_self(); - kern_return_t kr = mach_port_allocate(self, MACH_PORT_RIGHT_RECEIVE, &cb->port); - - if (UNLIKELY(kr != KERN_SUCCESS)) { - return NULL; - } - - // Insert a send right into the port since we also use this to send - kr = mach_port_insert_right(self, cb->port, cb->port, MACH_MSG_TYPE_MAKE_SEND); - if (UNLIKELY(kr != KERN_SUCCESS)) { - return NULL; - } - - // Modify the port queue size to be 1 because we are only - // using it for notifications and not for any other purpose. - mach_port_limits_t limits = { .mpl_qlimit = 1 }; - kr = mach_port_set_attributes(self, cb->port, MACH_PORT_LIMITS_INFO, (mach_port_info_t)&limits, MACH_PORT_LIMITS_INFO_COUNT); - - if (UNLIKELY(kr != KERN_SUCCESS)) { - return NULL; - } - - return (struct us_internal_async *) cb; -} - -// identical code as for timer, make it shared for "callback types" -void us_internal_async_close(struct us_internal_async *a) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - - struct kevent64_s event; - uint64_t ptr = (uint64_t)(void*)internal_cb; - EV_SET64(&event, ptr, EVFILT_MACHPORT, EV_DELETE, 0, 0, (uint64_t)(void*)internal_cb, 0,0); - - int ret; - do { - ret = kevent64(internal_cb->loop->fd, &event, 1, &event, 1, KEVENT_FLAG_ERROR_EVENTS, NULL); - } while (IS_EINTR(ret)); - - mach_port_deallocate(mach_task_self(), internal_cb->port); - us_free(internal_cb->machport_buf); - - /* (regular) sockets are the only polls which are not freed immediately */ - us_poll_free((struct us_poll_t *) a, internal_cb->loop); -} - -void us_internal_async_set(struct us_internal_async *a, void (*cb)(struct us_internal_async *)) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - - internal_cb->cb = (void (*)(struct us_internal_callback_t *)) cb; - - // EVFILT_MACHPORT benchmarks faster than EVFILT_USER when using multiple threads - // Very old versions of macOS required them to be portsets instead of ports - // but that is no longer the case - // There are not many examples on the internet of using machports this way - // you can find one in Chromium's codebase. - struct kevent64_s event; - event.ident = internal_cb->port; - event.filter = EVFILT_MACHPORT; - event.flags = EV_ADD | EV_ENABLE; - event.fflags = MACH_RCV_MSG | MACH_RCV_OVERWRITE; - event.ext[0] = (uint64_t)(void*)internal_cb->machport_buf; - event.ext[1] = MACHPORT_BUF_LEN; - event.udata = (uint64_t)(void*)internal_cb; - - int ret; - do { - ret = kevent64(internal_cb->loop->fd, &event, 1, &event, 1, KEVENT_FLAG_ERROR_EVENTS, NULL); - } while (IS_EINTR(ret)); - - if (UNLIKELY(ret == -1)) { - abort(); - } -} - -void us_internal_async_wakeup(struct us_internal_async *a) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - mach_msg_header_t msg = { - .msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0), - .msgh_size = sizeof(mach_msg_header_t), - .msgh_remote_port = internal_cb->port, - .msgh_local_port = MACH_PORT_NULL, - .msgh_voucher_port = 0, - .msgh_id = 0, - }; - - mach_msg_return_t kr = mach_msg( - &msg, - MACH_SEND_MSG | MACH_SEND_TIMEOUT, - msg.msgh_size, - 0, - MACH_PORT_NULL, - 0, // Fail instantly if the port is full - MACH_PORT_NULL - ); - - switch (kr) { - case KERN_SUCCESS: { - break; - } - - // This means that the send would've blocked because the - // queue is full. We assume success because the port is full. - case MACH_SEND_TIMED_OUT: { - break; - } - - // No space means it will wake up. - case MACH_SEND_NO_BUFFER: { - break; - } - - default: { - break; - } - } -} -#else -/* FreeBSD: kqueue async wakeup via EVFILT_USER + NOTE_TRIGGER. */ -struct us_internal_async *us_internal_create_async(struct us_loop_t *loop, int fallthrough, unsigned int ext_size) { - struct us_internal_callback_t *cb = us_calloc(1, sizeof(struct us_internal_callback_t) + ext_size); - cb->loop = loop; - cb->cb_expects_the_loop = 1; - cb->leave_poll_ready = 0; - - cb->p.state.poll_type = POLL_TYPE_POLLING_IN; - us_internal_poll_set_type((struct us_poll_t *) cb, POLL_TYPE_CALLBACK); - - if (!fallthrough) { - loop->num_polls++; - } - - return (struct us_internal_async *) cb; -} - -void us_internal_async_close(struct us_internal_async *a) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - struct kevent64_s event; - EV_SET64(&event, (uintptr_t)internal_cb, EVFILT_USER, EV_DELETE, 0, 0, (uint64_t)(void*)internal_cb, 0, 0); - int ret; - do { - ret = kevent64(internal_cb->loop->fd, &event, 1, &event, 1, KEVENT_FLAG_ERROR_EVENTS, NULL); - } while (IS_EINTR(ret)); - - us_poll_free((struct us_poll_t *) a, internal_cb->loop); -} - -void us_internal_async_set(struct us_internal_async *a, void (*cb)(struct us_internal_async *)) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - internal_cb->cb = (void (*)(struct us_internal_callback_t *)) cb; - - struct kevent64_s event; - EV_SET64(&event, (uintptr_t)internal_cb, EVFILT_USER, EV_ADD | EV_ENABLE | EV_CLEAR, 0, 0, (uint64_t)(void*)internal_cb, 0, 0); - int ret; - do { - ret = kevent64(internal_cb->loop->fd, &event, 1, &event, 1, KEVENT_FLAG_ERROR_EVENTS, NULL); - } while (IS_EINTR(ret)); - - if (UNLIKELY(ret == -1)) { - abort(); - } -} - -void us_internal_async_wakeup(struct us_internal_async *a) { - struct us_internal_callback_t *internal_cb = (struct us_internal_callback_t *) a; - struct kevent64_s event; - EV_SET64(&event, (uintptr_t)internal_cb, EVFILT_USER, 0, NOTE_TRIGGER, 0, (uint64_t)(void*)internal_cb, 0, 0); - int ret; - do { - /* Submit NOTE_TRIGGER only — no eventlist, otherwise this thread can - * consume the wakeup it just posted instead of waking the loop thread. */ - ret = kevent64(internal_cb->loop->fd, &event, 1, NULL, 0, KEVENT_FLAG_ERROR_EVENTS, NULL); - } while (IS_EINTR(ret)); -} -#endif - -int us_socket_get_error(struct us_socket_t *s) { - int error = 0; - socklen_t len = sizeof(error); - if (getsockopt(us_poll_fd((struct us_poll_t *) s), SOL_SOCKET, SO_ERROR, (char *) &error, &len) == -1) { - return errno; - } - return error; -} - -#endif diff --git a/packages/bun-usockets/src/eventing/libuv.c b/packages/bun-usockets/src/eventing/libuv.c deleted file mode 100644 index 6d5cbf5fcf26..000000000000 --- a/packages/bun-usockets/src/eventing/libuv.c +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2021. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "internal/internal.h" -#include "libusockets.h" -#include - -#ifdef LIBUS_USE_LIBUV - -/* uv_poll_t->data always (except for most times after calling us_poll_stop) - * points to the us_poll_t */ -static void poll_cb(uv_poll_t *p, int status, int events) { - us_internal_dispatch_ready_poll((struct us_poll_t *)p->data, status < 0 && status != UV_EOF, status == UV_EOF, - events); -} - -static void prepare_cb(uv_prepare_t *p) { - struct us_loop_t *loop = p->data; - us_internal_loop_pre(loop); -} - -/* Note: libuv timers execute AFTER the post callback */ -static void check_cb(uv_check_t *p) { - struct us_loop_t *loop = p->data; - us_internal_loop_post(loop); -} - -/* Not used for polls, since polls need two frees */ -static void close_cb_free(uv_handle_t *h) { free(h->data); } - -/* This one is different for polls, since we need two frees here */ -static void close_cb_free_poll(uv_handle_t *h) { - /* It is only in case we called us_poll_stop then quickly us_poll_free that we - * enter this. Most of the time, actual freeing is done by us_poll_free. */ - if (h->data) { - free(h->data); - free(h); - } -} - -static void timer_cb(uv_timer_t *t) { - struct us_internal_callback_t *cb = t->data; - cb->cb(cb); -} - -static void async_cb(uv_async_t *a) { - struct us_internal_callback_t *cb = a->data; - // internal asyncs give their loop, not themselves - cb->cb((struct us_internal_callback_t *)cb->loop); -} - -// poll -void us_poll_init(struct us_poll_t *p, LIBUS_SOCKET_DESCRIPTOR fd, - int poll_type) { - p->poll_type = poll_type; - p->fd = fd; -} - -void us_poll_free(struct us_poll_t *p, struct us_loop_t *loop) { - // poll was resized and dont own uv_poll_t anymore - if(!p->uv_p) { - free(p); - return; - } - /* The idea here is like so; in us_poll_stop we call uv_close after setting - * data of uv-poll to 0. This means that in close_cb_free we call free on 0 - * with does nothing, since us_poll_stop should not really free the poll. - * HOWEVER, if we then call us_poll_free while still closing the uv-poll, we - * simply change back the data to point to our structure so that we actually - * do free it like we should. */ - if (uv_is_closing((uv_handle_t *)p->uv_p)) { - p->uv_p->data = p; - } else { - free(p->uv_p); - free(p); - } -} - -void us_poll_start(struct us_poll_t *p, struct us_loop_t *loop, int events) { - if(!p->uv_p) return; - p->poll_type = us_internal_poll_type(p) | - ((events & LIBUS_SOCKET_READABLE) ? POLL_TYPE_POLLING_IN : 0) | - ((events & LIBUS_SOCKET_WRITABLE) ? POLL_TYPE_POLLING_OUT : 0); - - uv_poll_init_socket(loop->uv_loop, p->uv_p, p->fd); - // This unref is okay in the context of Bun's event loop, because sockets have - // a `Async.KeepAlive` associated with them, which is used instead of the - // usockets internals. usockets doesnt have a notion of ref-counted handles. - uv_unref((uv_handle_t *)p->uv_p); - uv_poll_start(p->uv_p, events, poll_cb); -} - -int us_poll_start_rc(struct us_poll_t *p, struct us_loop_t *loop, int events) { - us_poll_start(p, loop, events); - return 0; -} - -void us_poll_change(struct us_poll_t *p, struct us_loop_t *loop, int events) { - if(!p->uv_p) return; - if (us_poll_events(p) != events) { - p->poll_type = - us_internal_poll_type(p) | - ((events & LIBUS_SOCKET_READABLE) ? POLL_TYPE_POLLING_IN : 0) | - ((events & LIBUS_SOCKET_WRITABLE) ? POLL_TYPE_POLLING_OUT : 0); - uv_poll_start(p->uv_p, events, poll_cb); - } -} - -void us_poll_stop(struct us_poll_t *p, struct us_loop_t *loop) { - if(!p->uv_p) return; - uv_poll_stop(p->uv_p); - - /* We normally only want to close the poll here, not free it. But if we stop - * it, then quickly "free" it with us_poll_free, we postpone the actual - * freeing to close_cb_free_poll whenever it triggers. That's why we set data - * to null here, so that us_poll_free can reset it if needed */ - p->uv_p->data = 0; - uv_close((uv_handle_t *)p->uv_p, close_cb_free_poll); -} - -int us_poll_events(struct us_poll_t *p) { - return ((p->poll_type & POLL_TYPE_POLLING_IN) ? LIBUS_SOCKET_READABLE : 0) | - ((p->poll_type & POLL_TYPE_POLLING_OUT) ? LIBUS_SOCKET_WRITABLE : 0); -} - -size_t us_internal_accept_poll_event(struct us_poll_t *p) { return 0; } - -int us_internal_poll_type(struct us_poll_t *p) { return p->poll_type & POLL_TYPE_KIND_MASK; } - -void us_internal_poll_set_type(struct us_poll_t *p, int poll_type) { - p->poll_type = poll_type | (p->poll_type & POLL_TYPE_POLLING_MASK); -} - -LIBUS_SOCKET_DESCRIPTOR us_poll_fd(struct us_poll_t *p) { return p->fd; } - -void us_loop_pump(struct us_loop_t *loop) { - uv_run(loop->uv_loop, UV_RUN_NOWAIT); -} - -struct us_loop_t *us_create_loop(void *hint, - void (*wakeup_cb)(struct us_loop_t *loop), - void (*pre_cb)(struct us_loop_t *loop), - void (*post_cb)(struct us_loop_t *loop), - unsigned int ext_size) { - struct us_loop_t *loop = - (struct us_loop_t *)calloc(1, sizeof(struct us_loop_t) + ext_size); - - loop->uv_loop = hint ? hint : uv_loop_new(); - loop->is_default = hint != 0; - - loop->uv_pre = malloc(sizeof(uv_prepare_t)); - uv_prepare_init(loop->uv_loop, loop->uv_pre); - uv_prepare_start(loop->uv_pre, prepare_cb); - uv_unref((uv_handle_t *)loop->uv_pre); - loop->uv_pre->data = loop; - - loop->uv_check = malloc(sizeof(uv_check_t)); - uv_check_init(loop->uv_loop, loop->uv_check); - uv_unref((uv_handle_t *)loop->uv_check); - uv_check_start(loop->uv_check, check_cb); - loop->uv_check->data = loop; - - // here we create two unreffed handles - timer and async - us_internal_loop_data_init(loop, wakeup_cb, pre_cb, post_cb); - - // if we do not own this loop, we need to integrate and set up timer - if (hint) { - us_loop_integrate(loop); - } - - return loop; -} - -// based on if this was default loop or not -void us_loop_free(struct us_loop_t *loop) { - // ref and close down prepare and check - uv_ref((uv_handle_t *)loop->uv_pre); - uv_prepare_stop(loop->uv_pre); - loop->uv_pre->data = loop->uv_pre; - uv_close((uv_handle_t *)loop->uv_pre, close_cb_free); - - uv_ref((uv_handle_t *)loop->uv_check); - uv_check_stop(loop->uv_check); - loop->uv_check->data = loop->uv_check; - uv_close((uv_handle_t *)loop->uv_check, close_cb_free); - - us_internal_loop_data_free(loop); - - // we need to run the loop one last round to call all close callbacks - // we cannot do this if we do not own the loop, default - if (!loop->is_default) { - uv_run(loop->uv_loop, UV_RUN_NOWAIT); - uv_loop_delete(loop->uv_loop); - } - - // now we can free our part - free(loop); -} - -void us_loop_run(struct us_loop_t *loop) { - us_loop_integrate(loop); - uv_update_time(loop->uv_loop); - - uv_run(loop->uv_loop, UV_RUN_ONCE); -} - -struct us_poll_t *us_create_poll(struct us_loop_t *loop, int fallthrough, - unsigned int ext_size) { - struct us_poll_t *p = - (struct us_poll_t *)malloc(sizeof(struct us_poll_t) + ext_size); - p->uv_p = malloc(sizeof(uv_poll_t)); - p->uv_p->data = p; - return p; -} - -/* If we update our block position we have to update the uv_poll data to point - * to us */ -struct us_poll_t *us_poll_resize(struct us_poll_t *p, struct us_loop_t *loop, - unsigned int old_ext_size, unsigned int ext_size) { - - // cannot resize if we dont own uv_poll_t - if(!p->uv_p) return p; - - unsigned int old_size = sizeof(struct us_poll_t) + old_ext_size; - unsigned int new_size = sizeof(struct us_poll_t) + ext_size; - if(new_size <= old_size) return p; - - struct us_poll_t *new_p = calloc(1, new_size); - memcpy(new_p, p, old_size); - - new_p->uv_p->data = new_p; - p->uv_p = NULL; - - return new_p; -} - -// timer -struct us_timer_t *us_create_timer(struct us_loop_t *loop, int fallthrough, - unsigned int ext_size) { - struct us_internal_callback_t *cb = us_calloc( - 1, sizeof(struct us_internal_callback_t) + sizeof(uv_timer_t) + ext_size); - - cb->loop = loop; - cb->cb_expects_the_loop = 0; // never read? - cb->leave_poll_ready = 0; // never read? - - uv_timer_t *uv_timer = (uv_timer_t *)(cb + 1); - uv_timer_init(loop->uv_loop, uv_timer); - uv_timer->data = cb; - - if (fallthrough) { - uv_unref((uv_handle_t *)uv_timer); - } - - return (struct us_timer_t *)cb; -} - -void *us_timer_ext(struct us_timer_t *timer) { - return ((char *)timer) + sizeof(struct us_internal_callback_t) + - sizeof(uv_timer_t); -} - -void us_timer_close(struct us_timer_t *t, int fallthrough) { - struct us_internal_callback_t *cb = (struct us_internal_callback_t *)t; - - uv_timer_t *uv_timer = (uv_timer_t *)(cb + 1); - - // always ref the timer before closing it - uv_ref((uv_handle_t *)uv_timer); - - uv_timer_stop(uv_timer); - - uv_timer->data = cb; - uv_close((uv_handle_t *)uv_timer, close_cb_free); -} - -void us_timer_set(struct us_timer_t *t, void (*cb)(struct us_timer_t *t), - int ms, int repeat_ms) { - struct us_internal_callback_t *internal_cb = - (struct us_internal_callback_t *)t; - - // Match the epoll_kqueue backend: re-arming is allowed (uv_timer_start - // restarts an already-running timer). The one-shot guard only applies to - // the sweep timer, which is set with the same args from every new socket - // context — restarting it would skew the 4s tick. - if (internal_cb->loop->data.sweep_timer == t) { - if (internal_cb->has_added_timer_to_event_loop) { - return; - } - internal_cb->has_added_timer_to_event_loop = 1; - } - - internal_cb->cb = (void (*)(struct us_internal_callback_t *))cb; - - uv_timer_t *uv_timer = (uv_timer_t *)(internal_cb + 1); - if (!ms) { - uv_timer_stop(uv_timer); - } else { - uv_timer_start(uv_timer, timer_cb, ms, repeat_ms); - } -} - -struct us_loop_t *us_timer_loop(struct us_timer_t *t) { - struct us_internal_callback_t *internal_cb = - (struct us_internal_callback_t *)t; - - return internal_cb->loop; -} - -// async (internal only) -struct us_internal_async *us_internal_create_async(struct us_loop_t *loop, - int fallthrough, - unsigned int ext_size) { - struct us_internal_callback_t *cb = us_calloc( - 1, sizeof(struct us_internal_callback_t) + sizeof(uv_async_t) + ext_size); - - cb->loop = loop; - return (struct us_internal_async *)cb; -} - -void us_internal_async_close(struct us_internal_async *a) { - struct us_internal_callback_t *cb = (struct us_internal_callback_t *)a; - - uv_async_t *uv_async = (uv_async_t *)(cb + 1); - - // always ref the async before closing it - uv_ref((uv_handle_t *)uv_async); - - uv_async->data = cb; - uv_close((uv_handle_t *)uv_async, close_cb_free); -} - -void us_internal_async_set(struct us_internal_async *a, - void (*cb)(struct us_internal_async *)) { - struct us_internal_callback_t *internal_cb = - (struct us_internal_callback_t *)a; - - internal_cb->cb = (void (*)(struct us_internal_callback_t *))cb; - - uv_async_t *uv_async = (uv_async_t *)(internal_cb + 1); - uv_async_init(internal_cb->loop->uv_loop, uv_async, async_cb); - uv_unref((uv_handle_t *)uv_async); - uv_async->data = internal_cb; -} - -void us_internal_async_wakeup(struct us_internal_async *a) { - struct us_internal_callback_t *internal_cb = - (struct us_internal_callback_t *)a; - - uv_async_t *uv_async = (uv_async_t *)(internal_cb + 1); - uv_async_send(uv_async); -} - -int us_socket_get_error(struct us_socket_t *s) { - int error = 0; - socklen_t len = sizeof(error); - if (getsockopt(us_poll_fd((struct us_poll_t *)s), SOL_SOCKET, SO_ERROR, - (char *)&error, &len) == -1) { - return errno; - } - return error; -} - -#endif \ No newline at end of file diff --git a/packages/bun-usockets/src/fault_inject.c b/packages/bun-usockets/src/fault_inject.c deleted file mode 100644 index 4361c47ce2fa..000000000000 --- a/packages/bun-usockets/src/fault_inject.c +++ /dev/null @@ -1,115 +0,0 @@ -#include "internal/internal.h" -#include "internal/fault_inject.h" - -#if defined(LIBUS_SOCKET_FAULT_INJECTION) && LIBUS_SOCKET_FAULT_INJECTION - -#include -#include - -int us_fault_armed = 0; - -struct us_fault_slot { - struct us_fault_rule rule; - int calls_seen; - int fired; -}; - -/* Process-global so rules armed on the JS thread also affect the HTTP-client - * thread (fetch) and any worker threads. Per-socket isolation is provided by - * rule.target_fd instead. */ -static struct us_fault_slot us_fault_state[US_FAULT_COUNT]; - -/* Guards every access to us_fault_state so a re-arm on the JS thread cannot - * tear the rule (or its counters) out from under a faulting I/O thread. Only - * taken once the lock-free us_fault_armed fast path in US_FAULT_CHECK has - * passed, so the disarmed hot path never touches it. */ -static zig_mutex_t us_fault_lock; - -/* Caller must hold us_fault_lock. The release store pairs with the acquire - * load in US_FAULT_CHECK; a reader that observes armed==1 then re-reads the - * rule under the lock in us_fault_hit(), so it never sees a torn rule. */ -static void us_fault_recompute_armed(void) { - int any = 0; - for (int i = 0; i < US_FAULT_COUNT; i++) { - if (us_fault_state[i].rule.action != US_FAULT_NONE) { - any = 1; - break; - } - } - __atomic_store_n(&us_fault_armed, any, __ATOMIC_RELEASE); -} - -void us_fault_set(int sc, const struct us_fault_rule *rule) { - if ((unsigned)sc >= US_FAULT_COUNT) return; - Bun__lock(&us_fault_lock); - us_fault_state[sc].rule = *rule; - us_fault_state[sc].calls_seen = 0; - us_fault_state[sc].fired = 0; - us_fault_recompute_armed(); - Bun__unlock(&us_fault_lock); -} - -void us_fault_clear(int sc) { - if ((unsigned)sc >= US_FAULT_COUNT) return; - Bun__lock(&us_fault_lock); - us_fault_state[sc].rule.action = US_FAULT_NONE; - us_fault_state[sc].calls_seen = 0; - us_fault_state[sc].fired = 0; - us_fault_recompute_armed(); - Bun__unlock(&us_fault_lock); -} - -void us_fault_clear_all(void) { - Bun__lock(&us_fault_lock); - for (int i = 0; i < US_FAULT_COUNT; i++) { - us_fault_state[i].rule.action = US_FAULT_NONE; - } - __atomic_store_n(&us_fault_armed, 0, __ATOMIC_RELEASE); - Bun__unlock(&us_fault_lock); -} - -int us_fault_hit(int sc, int fd, ssize_t *out, int *clamp) { - if ((unsigned)sc >= US_FAULT_COUNT) return 0; - Bun__lock(&us_fault_lock); - struct us_fault_slot *slot = &us_fault_state[sc]; - /* Snapshot under the lock so the post-release switch below acts on one - * coherent rule even if another thread swaps it right after we unlock. - * Single lock/unlock pair: every exit funnels through the one release. */ - struct us_fault_rule rule = slot->rule; - int fire = 0; - if (rule.action != US_FAULT_NONE && (rule.target_fd < 0 || rule.target_fd == fd)) { - int seen = slot->calls_seen++; - if (seen >= rule.after_n_calls) { - int f = slot->fired++; - if (rule.repeat >= 0 && f >= rule.repeat) { - slot->rule.action = US_FAULT_NONE; - us_fault_recompute_armed(); - } else { - fire = 1; - } - } - } - Bun__unlock(&us_fault_lock); - if (!fire) return 0; - switch (rule.action) { - case US_FAULT_ERRNO: -#ifdef _WIN32 - WSASetLastError(rule.errno_value); -#endif - errno = rule.errno_value; - *out = -1; - return 1; - case US_FAULT_ZERO: - *out = 0; - return 1; - case US_FAULT_SHORT: - if (rule.clamp_bytes >= 0 && *clamp > rule.clamp_bytes) { - *clamp = rule.clamp_bytes; - } - return 0; - default: - return 0; - } -} - -#endif /* LIBUS_SOCKET_FAULT_INJECTION */ diff --git a/packages/bun-usockets/src/internal/eventing/epoll_kqueue.h b/packages/bun-usockets/src/internal/eventing/epoll_kqueue.h deleted file mode 100644 index daad8a330e96..000000000000 --- a/packages/bun-usockets/src/internal/eventing/epoll_kqueue.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef EPOLL_KQUEUE_H -#define EPOLL_KQUEUE_H - -#include "internal/loop_data.h" - -#ifdef LIBUS_USE_EPOLL -#include -#include -#define LIBUS_SOCKET_READABLE EPOLLIN -#define LIBUS_SOCKET_WRITABLE EPOLLOUT -#else -#include -/* Kqueue's EVFILT_ is NOT a bitfield, you cannot OR together them. - * We therefore have our own bitfield we then translate in every call */ -#define LIBUS_SOCKET_READABLE 1 -#define LIBUS_SOCKET_WRITABLE 2 - -#if defined(__APPLE__) -#include -#elif defined(__FreeBSD__) -/* FreeBSD has plain kevent(2) only — no kevent64. Shim the Darwin names so - * the kqueue path in epoll_kqueue.c stays a single body. udata is void* on - * FreeBSD (vs uint64_t on Darwin), and ext[2] doesn't exist (the trailing - * macro args are dropped). */ -#include -#include -#define kevent64_s kevent -#define EV_SET64(kevp, a, b, c, d, e, f, g, h) \ - EV_SET((kevp), (a), (b), (c), (d), (e), ((void *)(uintptr_t)(f))) -/* Darwin-only kevent64 flags. Kept as bits so callers OR them as before; - * the inline shim below translates each. */ -#ifndef KEVENT_FLAG_ERROR_EVENTS -#define KEVENT_FLAG_ERROR_EVENTS 0x1u -#endif -#ifndef KEVENT_FLAG_IMMEDIATE -#define KEVENT_FLAG_IMMEDIATE 0x2u -#endif -static inline int kevent64(int kq, const struct kevent64_s *changelist, int nchanges, - struct kevent64_s *eventlist, int nevents, unsigned int flags, - const struct timespec *timeout) { - /* KEVENT_FLAG_ERROR_EVENTS: Darwin restricts the eventlist to per-change - * errors. FreeBSD's kevent has no equivalent and would otherwise pop and - * lose unrelated ready events here. Registration paths only need syscall - * success, so suppress eventlist harvesting entirely. */ - if (flags & KEVENT_FLAG_ERROR_EVENTS) { - eventlist = NULL; - nevents = 0; - } - /* KEVENT_FLAG_IMMEDIATE: Darwin's non-blocking poll. On FreeBSD that's - * a zero timespec. Some callers pass the flag with timeout=NULL (which - * would block forever here). */ - static const struct timespec zero_ts = {0, 0}; - if ((flags & KEVENT_FLAG_IMMEDIATE) && timeout == NULL) { - timeout = &zero_ts; - } - return kevent(kq, (const struct kevent *)changelist, nchanges, - (struct kevent *)eventlist, nevents, timeout); -} -#endif -#endif - -struct us_loop_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_internal_loop_data_t data; - - /* Number of non-fallthrough polls in the loop */ - int num_polls; - - /* Number of ready polls this iteration */ - int num_ready_polls; - - /* Current index in list of ready polls */ - int current_ready_poll; - - /* Loop's own file descriptor */ - int fd; - - /* Number of polls owned by bun */ - unsigned int bun_polls; - - /* Incremented atomically by wakeup(), swapped to 0 before epoll/kqueue. - * If non-zero, the event loop will return immediately so we can skip the GC safepoint. */ - unsigned int pending_wakeups; - - /* The list of ready polls */ -#ifdef LIBUS_USE_EPOLL - alignas(LIBUS_EXT_ALIGNMENT) struct epoll_event ready_polls[1024]; -#else - alignas(LIBUS_EXT_ALIGNMENT) struct kevent64_s ready_polls[1024]; -#endif -}; - -struct us_poll_t { - alignas(LIBUS_EXT_ALIGNMENT) struct { - signed int fd : 27; // we could have this unsigned if we wanted to, -1 should never be used - unsigned int poll_type : 5; - } state; -}; - -#undef FD_BITS - -#endif // EPOLL_KQUEUE_H diff --git a/packages/bun-usockets/src/internal/eventing/libuv.h b/packages/bun-usockets/src/internal/eventing/libuv.h deleted file mode 100644 index 80001a58b0a0..000000000000 --- a/packages/bun-usockets/src/internal/eventing/libuv.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef LIBUV_H -#define LIBUV_H - -#include "internal/loop_data.h" - -#include -#define LIBUS_SOCKET_READABLE UV_READABLE -#define LIBUS_SOCKET_WRITABLE UV_WRITABLE - -struct us_loop_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_internal_loop_data_t data; - - uv_loop_t *uv_loop; - int is_default; - - uv_prepare_t *uv_pre; - uv_check_t *uv_check; -}; - -// it is no longer valid to cast a pointer to us_poll_t to a pointer of -// uv_poll_t -struct us_poll_t { - /* We need to hold a pointer to this uv_poll_t since we need to be able to - * resize our block */ - uv_poll_t *uv_p; - LIBUS_SOCKET_DESCRIPTOR fd; - unsigned char poll_type; -}; - -#endif // LIBUV_H \ No newline at end of file diff --git a/packages/bun-usockets/src/internal/fault_inject.h b/packages/bun-usockets/src/internal/fault_inject.h deleted file mode 100644 index 8d03db529f73..000000000000 --- a/packages/bun-usockets/src/internal/fault_inject.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Fault injection for the bsd_* syscall wrappers, plus the one allocation - * whose failure path is otherwise unreachable on an overcommitting kernel - * (US_FAULT_SSL_LOOP_BUFFER). - * - * Compiled in only when LIBUS_SOCKET_FAULT_INJECTION is defined (controlled - * by the `socketFaultInjection` Config field). When compiled out, - * US_FAULT_CHECK() expands to a constant 0 and the optimizer drops every - * reference. When compiled in but no rule is armed, the hot path is a single - * acquire atomic load + predicted-not-taken branch. - * - * Rules are process-global so a rule armed from the JS thread also affects - * the HTTP-client thread (fetch) and worker threads. Use rule.target_fd for - * per-socket isolation. - */ -// clang-format off -#pragma once -#ifndef LIBUS_FAULT_INJECT_H -#define LIBUS_FAULT_INJECT_H - -#if defined(LIBUS_SOCKET_FAULT_INJECTION) && LIBUS_SOCKET_FAULT_INJECTION - -#ifdef _WIN32 -#include -typedef SSIZE_T ssize_t; -#else -#include -#endif - -enum us_fault_syscall { - US_FAULT_RECV, - US_FAULT_SEND, - US_FAULT_WRITEV, - US_FAULT_SENDMSG, - US_FAULT_RECVMSG, - US_FAULT_CONNECT, - US_FAULT_ACCEPT, - /* Reserved: no bsd.c hooks yet, so the JS setter does not accept them. */ - US_FAULT_SOCKET, - US_FAULT_CLOSE, - US_FAULT_SHUTDOWN, - /* Not a syscall: the per-loop TLS plaintext buffer allocated once by - * us_internal_init_loop_ssl_data. Only US_FAULT_ERRNO applies — there is - * no byte count to clamp and no zero return to fake. */ - US_FAULT_SSL_LOOP_BUFFER, - US_FAULT_COUNT -}; - -enum us_fault_action { - US_FAULT_NONE, - /* return -1 and set errno = errno_value */ - US_FAULT_ERRNO, - /* recv/send: clamp the length to clamp_bytes, then run the real syscall. - * Other syscalls have no length to clamp; the JS setter rejects them. */ - US_FAULT_SHORT, - /* recv/recvmsg: return 0 (peer closed); send/sendmsg/writev: return 0 - * (treated as backpressure). The JS setter rejects other syscalls. */ - US_FAULT_ZERO, -}; - -struct us_fault_rule { - int action; - int errno_value; - int clamp_bytes; - /* skip the first N matching calls before triggering */ - int after_n_calls; - /* fire this many times then disarm; -1 = forever */ - int repeat; - /* match only this fd; -1 = any */ - int target_fd; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -extern int us_fault_armed; - -void us_fault_set(int syscall, const struct us_fault_rule *rule); -void us_fault_clear(int syscall); -void us_fault_clear_all(void); -int us_fault_hit(int syscall, int fd, ssize_t *out, int *clamp); - -#ifdef __cplusplus -} -#endif - -/* Hot-path macro. `out_lvalue` and `clamp_lvalue` must be lvalues. Returns 1 - * when the call should short-circuit with *out_lvalue. clamp_lvalue may be - * shrunk in-place when the rule wants a partial read/write. */ -#define US_FAULT_CHECK(sc, fd, out_lvalue, clamp_lvalue) \ - (__builtin_expect(__atomic_load_n(&us_fault_armed, __ATOMIC_ACQUIRE), 0) \ - && us_fault_hit((sc), (int)(fd), &(out_lvalue), &(clamp_lvalue))) - -#else /* !LIBUS_SOCKET_FAULT_INJECTION */ - -#define US_FAULT_CHECK(sc, fd, out_lvalue, clamp_lvalue) 0 - -#endif -#endif /* LIBUS_FAULT_INJECT_H */ diff --git a/packages/bun-usockets/src/internal/internal.h b/packages/bun-usockets/src/internal/internal.h deleted file mode 100644 index ad52a99f6f37..000000000000 --- a/packages/bun-usockets/src/internal/internal.h +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// clang-format off -#pragma once -#ifndef INTERNAL_H -#define INTERNAL_H - -#if defined(_MSC_VER) -#ifndef __cplusplus -#define alignas(x) __declspec(align(x)) -#endif - -#include -typedef SSIZE_T ssize_t; - -#else -#include -#endif - -#if defined(LIBUS_USE_KQUEUE) && defined(__APPLE__) -#include -#endif - -#if defined(__FreeBSD__) -/* arm64 FreeBSD's casts to u_long but - * (via ) reaches it without including first. */ -#include -#endif - -#if defined(LIBUS_USE_EPOLL) || defined(LIBUS_USE_KQUEUE) -#define LIBUS_MAX_READY_POLLS 1024 - -void us_internal_loop_update_pending_ready_polls(struct us_loop_t *loop, - struct us_poll_t *old_poll, - struct us_poll_t *new_poll, - int old_events, - int new_events); -#endif - -/* We only have one networking implementation so far */ -#include "internal/networking/bsd.h" - -/* We have many different eventing implementations */ -#if defined(LIBUS_USE_EPOLL) || defined(LIBUS_USE_KQUEUE) -#include "internal/eventing/epoll_kqueue.h" -#endif - -#ifdef LIBUS_USE_LIBUV -#include "internal/eventing/libuv.h" -#endif - -#ifndef LIKELY -#define LIKELY(cond) __builtin_expect((_Bool)(cond), 1) -#define UNLIKELY(cond) __builtin_expect((_Bool)(cond), 0) -#endif - -extern void __attribute__((__noreturn__)) Bun__panic(const char *message, size_t length); -#define BUN_PANIC(message) Bun__panic(message, sizeof(message) - 1) - -/* Reports "Bun ran out of memory" through the crash handler and aborts. For - * allocations this library has no way to fail gracefully from. */ -extern void __attribute__((__noreturn__)) Bun__outOfMemory(void); - -#ifdef _WIN32 -#define IS_EINTR(rc) (rc == SOCKET_ERROR && WSAGetLastError() == WSAEINTR) -#define LIBUS_ERR WSAGetLastError() -#else -#include -#define IS_EINTR(rc) (rc == -1 && errno == EINTR) -#define LIBUS_ERR errno -#endif -#include -/* Poll type and what it polls for */ -enum { - /* Three first bits */ - POLL_TYPE_SOCKET = 0, - POLL_TYPE_SOCKET_SHUT_DOWN = 1, - POLL_TYPE_SEMI_SOCKET = 2, - POLL_TYPE_CALLBACK = 3, - POLL_TYPE_UDP = 4, - - /* Two last bits */ - POLL_TYPE_POLLING_OUT = 8, - POLL_TYPE_POLLING_IN = 16, -}; - -#define POLL_TYPE_BITSIZE 5 // make sure to update epoll_kqueue.h if you change this -#define POLL_TYPE_KIND_MASK 0b111 -#define POLL_TYPE_POLLING_MASK 0b11000 -#define POLL_TYPE_MASK (POLL_TYPE_KIND_MASK | POLL_TYPE_POLLING_MASK) - -/* Bun APIs implemented in Zig */ -void Bun__lock(zig_mutex_t *lock); -void Bun__unlock(zig_mutex_t *lock); - -struct addrinfo_request; -struct addrinfo_result_entry { - struct addrinfo info; - struct sockaddr_storage _storage; -}; -struct addrinfo_result { - struct addrinfo_result_entry* entries; - int error; -}; - -/* Dispatch — defined out-of-library (src/runtime/socket/uws_dispatch.rs). loop.c - * never reads s->group->vtable directly; it calls these and the closed-world - * switch on s->kind decides whether to direct-call into Rust/C++ or fall back - * to the vtable. Signatures track the vtable entries (us_dispatch_handshake - * drops the trailing custom_data — dispatch always passes NULL). */ -extern struct us_socket_t *us_dispatch_open(us_socket_r s, int is_client, char *ip, int ip_length); -extern struct us_socket_t *us_dispatch_data(us_socket_r s, char *data, int length); -extern struct us_socket_t *us_dispatch_fd(us_socket_r s, int fd); -extern struct us_socket_t *us_dispatch_writable(us_socket_r s); -extern struct us_socket_t *us_dispatch_close(us_socket_r s, int code, void *reason); -extern struct us_socket_t *us_dispatch_timeout(us_socket_r s); -extern struct us_socket_t *us_dispatch_long_timeout(us_socket_r s); -extern struct us_socket_t *us_dispatch_end(us_socket_r s); -extern struct us_socket_t *us_dispatch_connect_error(us_socket_r s, int code); -extern struct us_connecting_socket_t *us_dispatch_connecting_error(struct us_connecting_socket_t *c, int code); -extern void us_dispatch_handshake(us_socket_r s, int success, struct us_bun_verify_error_t err); -extern void us_dispatch_session(us_socket_r s, const unsigned char *data, int length); -extern void us_dispatch_keylog(us_socket_r s, const unsigned char *data, int length); -extern struct us_socket_t *us_dispatch_ssl_raw_tap(us_socket_r s, char *data, int length); - -extern int Bun__addrinfo_get(struct us_loop_t* loop, const char* host, uint16_t port, struct addrinfo_request** ptr); -extern int Bun__addrinfo_set(struct addrinfo_request* ptr, struct us_connecting_socket_t* socket); -extern int Bun__addrinfo_cancel(struct addrinfo_request* ptr, struct us_connecting_socket_t* socket); -extern void Bun__addrinfo_freeRequest(struct addrinfo_request* addrinfo_req, int error); -extern struct addrinfo_result *Bun__addrinfo_getRequestResult(struct addrinfo_request* addrinfo_req); - - -/* Loop related */ -void us_internal_dispatch_ready_poll(struct us_poll_t *p, int error, int eof, int events); -void us_internal_timer_sweep(us_loop_r loop); -void us_internal_enable_sweep_timer(struct us_loop_t *loop); -void us_internal_disable_sweep_timer(struct us_loop_t *loop); -#ifndef LIBUS_USE_LIBUV -long long us_internal_sweep_timeout_ns(struct us_loop_t *loop); -void us_internal_sweep_if_due(struct us_loop_t *loop); -#endif -void us_internal_free_closed_sockets(us_loop_r loop); -void us_internal_loop_link_group(struct us_loop_t *loop, struct us_socket_group_t *group); -void us_internal_loop_unlink_group(struct us_loop_t *loop, struct us_socket_group_t *group); -/* Unlink the group from the loop iff every list/count is now zero. */ -void us_internal_group_maybe_unlink(struct us_socket_group_t *group); - -/* Public us_socket_close routes through us_internal_ssl_close (graceful - * close_notify, may defer) when s->ssl. These are the underlying halves: the - * SSL path calls _raw once it's actually time to drop the fd. */ -struct us_socket_t *us_internal_socket_close_raw(us_socket_r s, int code, void *reason); -struct us_socket_t *us_internal_ssl_close(us_socket_r s, int code, void *reason); -void us_internal_loop_data_init(struct us_loop_t *loop, - void (*wakeup_cb)(us_loop_r loop), - void (*pre_cb)(us_loop_r loop), - void (*post_cb)(us_loop_r loop)); -void us_internal_loop_data_free(us_loop_r loop); -void us_internal_loop_pre(us_loop_r loop); -void us_internal_loop_post(us_loop_r loop); - -/* Asyncs (old) */ -struct us_internal_async *us_internal_create_async(struct us_loop_t *loop, - int fallthrough, - unsigned int ext_size); -void us_internal_async_close(struct us_internal_async *a); -void us_internal_async_set(struct us_internal_async *a, - void (*cb)(struct us_internal_async *)); -void us_internal_async_wakeup(struct us_internal_async *a); - -/* Eventing related */ -size_t us_internal_accept_poll_event(struct us_poll_t *p); -int us_internal_poll_type(struct us_poll_t *p); -void us_internal_poll_set_type(struct us_poll_t *p, int poll_type); - -/* SSL loop data */ -void us_internal_init_loop_ssl_data(us_loop_r loop); -void us_internal_free_loop_ssl_data(us_loop_r loop); - -/* Socket context related */ -void us_internal_socket_group_link_socket(us_socket_group_r group, us_socket_r s); -void us_internal_socket_group_unlink_socket(us_socket_group_r group, us_socket_r s); - -void us_internal_socket_after_resolve(struct us_connecting_socket_t *s); -void us_internal_socket_after_open(us_socket_r s, int error); -/* SSL_new() + BIO setup + connect/accept state; sets s->ssl and the ssl_* - * bitfields on us_socket_t. No separate per-socket allocation — `s->ssl` is a - * direct SSL*, and the 6 state bits live in us_socket_t's pad-to-pointer gap. - * `listener` is the accepting us_listen_socket_t (server) or NULL (client/ - * adopt) — stashed per-SSL so sni_cb can resolve the right tree without - * relying on a shared SSL_CTX servername_arg. */ -void us_internal_ssl_attach(us_socket_r s, struct ssl_ctx_st *ssl_ctx, int is_client, const char *sni, struct us_listen_socket_t *listener); -/* SSL_free(s->ssl); s->ssl = NULL. Idempotent. */ -void us_internal_ssl_detach(us_socket_r s); -void us_internal_ssl_socket_relocated(us_loop_r loop, us_socket_r old_s, us_socket_r new_s); - -/* TLS-layer event hooks. loop.c calls these instead of us_dispatch_* when - * s->ssl != NULL; they decrypt/encrypt and re-dispatch the plaintext. */ -struct us_socket_t *us_internal_ssl_on_open(us_socket_r s, int is_client, char *ip, int ip_length); -struct us_socket_t *us_internal_ssl_on_data(us_socket_r s, char *data, int length); -struct us_socket_t *us_internal_ssl_on_writable(us_socket_r s); -struct us_socket_t *us_internal_ssl_on_close(us_socket_r s, int code, void *reason); -struct us_socket_t *us_internal_ssl_on_end(us_socket_r s); -int us_internal_ssl_is_low_prio(us_socket_r s); - -int us_internal_ssl_is_handshake_finished(us_socket_r s); -int us_internal_ssl_handshake_callback_has_fired(us_socket_r s); -int us_internal_ssl_is_shut_down(us_socket_r s); -void us_internal_ssl_shutdown(us_socket_r s); -int us_internal_ssl_write(us_socket_r s, const char *data, int length); -void *us_internal_ssl_get_native_handle(us_socket_r s); -struct us_bun_verify_error_t us_internal_ssl_verify_error(us_socket_r s); -void *us_internal_ssl_sni_userdata(us_socket_r s); -void us_internal_ssl_handshake_abort(us_socket_r s); -/* SSL_CTX_free(ls->ssl_ctx) + sni_free(ls->sni). Called from us_listen_socket_close. */ -void us_internal_listen_socket_ssl_free(struct us_listen_socket_t *ls); -/* Opaque SSL_CTX_up_ref/SSL_CTX_free so context.c needn't include OpenSSL. */ -void us_internal_ssl_ctx_up_ref(struct ssl_ctx_st *ssl_ctx); -void us_internal_ssl_ctx_unref(struct ssl_ctx_st *ssl_ctx); -/* TCP-level FIN, bypassing the SSL layer (used by ssl_on_end). */ -void us_internal_socket_raw_shutdown(us_socket_r s); - -int us_internal_handle_dns_results(us_loop_r loop); - -/* Sockets are polls */ - -struct us_socket_flags { - /* If true, the readable side is paused */ - bool is_paused: 1; - /* Allow to stay alive after FIN/EOF */ - bool allow_half_open: 1; - /* 0 = not in low-prio queue, 1 = is in low-prio queue, 2 = was in low-prio queue in this iteration */ - unsigned char low_prio_state: 2; - /* If true, the socket should be read using readmsg to support receiving file descriptors */ - bool is_ipc: 1; - /* If true, the socket has been closed */ - bool is_closed: 1; - /* If true, the socket was reallocated during adoption */ - bool adopted: 1; - /* If true, the last write to this socket failed (would block) */ - bool last_write_failed: 1; - -} __attribute__((packed)); - -struct us_socket_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_poll_t p; - unsigned char timeout; - unsigned char long_timeout; - struct us_socket_flags flags; - /* enum SocketKind. Selects the static dispatch arm in us_dispatch_*. */ - unsigned char kind; - /* SSL state. These 6 bits live in the pad-to-pointer gap before `group`, so - * they cost nothing on epoll/kqueue (poll=4 + 4×u8 + 1 byte bits = 9, padded - * to 16 anyway for the pointer). Per-socket reneg counters and SNI userdata - * hang off SSL ex_data, allocated on first use only. */ - unsigned char ssl_handshake_state : 2; - unsigned char ssl_write_wants_read : 1; - unsigned char ssl_read_wants_write : 1; - unsigned char ssl_fatal_error : 1; - unsigned char ssl_is_server : 1; - /* If set, us_internal_ssl_on_data() first dispatches the still-encrypted - * bytes via us_dispatch_ssl_raw_tap() before feeding them to SSL_read. - * Used by Bun's `socket.upgradeTLS()` so the returned [raw, tls] pair's - * `raw` half can observe ciphertext (node:net Duplex.ondata semantics). */ - unsigned char ssl_raw_tap : 1; - /* A graceful TLS shutdown arrived while batched ciphertext was still - * spilled (see ssl_flush_write_batch); the shutdown re-runs once the - * spill drains so those records are not cut off by our FIN/close_notify. */ - unsigned char ssl_shutdown_after_spill : 1; - /* Same as ssl_shutdown_after_spill but for us_internal_ssl_close: the - * close re-runs from the writable event once the spill drains. */ - unsigned char ssl_close_after_spill : 1; - /* Set while SSL_do_handshake/SSL_read is on the stack: JS run from inside - * those calls (ALPN/SNI/keylog callbacks) may destroy the socket, and the - * SSL must not be freed under BoringSSL's feet - the detach is deferred to - * the driver's epilogue via ssl_pending_detach. */ - unsigned char ssl_in_use : 1; - unsigned char ssl_pending_detach : 1; - /* The close code passed to the deferred close (e.g. a reset requested from - * inside a handshake callback must still RST, not FIN, when it is finally - * performed). */ - unsigned char ssl_pending_close_code; - - struct us_socket_group_t *group; - /* NULL for plain TCP. Direct BoringSSL `SSL*`; set by us_internal_ssl_attach - * in adopt_tls / connect-with-ssl_ctx / accept-with-ssl_ctx. */ - struct ssl_st *ssl; - struct us_socket_t *prev, *next; - struct us_socket_t *connect_next; - struct us_connecting_socket_t *connect_state; -}; - -#if defined(LIBUS_USE_EPOLL) || defined(LIBUS_USE_KQUEUE) -_Static_assert(sizeof(struct us_socket_flags) == 1, "us_socket_flags grew"); -#endif - -struct us_connecting_socket_t { - alignas(LIBUS_EXT_ALIGNMENT) struct addrinfo_request *addrinfo_req; - struct us_socket_group_t *group; - /* Captured at create — stays valid after `group` is detached so the late - * after_resolve / dns_callback / free path never derefs into freed owner - * storage to find the loop. */ - struct us_loop_t *loop; - /* SSL_CTX to apply on open (borrowed; up_ref'd while in flight). */ - struct ssl_ctx_st *ssl_ctx; - // this is used to track all dns resolutions in this connection - struct us_connecting_socket_t *next; - struct us_socket_t *connecting_head; - int options; - int socket_ext_size; - /* error_is_dns: `error` holds the raw getaddrinfo(3) return code for a - * failed name lookup rather than an errno. The two constant sets are - * different namespaces that overlap numerically, so consumers of `error` - * must check this bit first. */ - unsigned int closed : 1, shutdown : 1, shutdown_read : 1, pending_resolve_callback : 1, error_is_dns : 1; - unsigned char timeout; - unsigned char long_timeout; - unsigned char kind; - uint16_t port; - int error; - struct addrinfo *addrinfo_head; - // this is used to track pending connecting sockets in the context - struct us_connecting_socket_t* next_pending; - struct us_connecting_socket_t* prev_pending; -}; - -struct us_udp_socket_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_poll_t p; - void (*on_data)(struct us_udp_socket_t *, void *, int); - void (*on_drain)(struct us_udp_socket_t *); - void (*on_close)(struct us_udp_socket_t *); - /* Called when recvmmsg returns an error (other than EAGAIN). The socket - * is NOT closed — caller decides whether to close. Used to surface ICMP - * errors delivered via IP_RECVERR on Linux (ECONNREFUSED, etc.). */ - void (*on_recv_error)(struct us_udp_socket_t *, int err); - void *user; - struct us_loop_t *loop; - /* An UDP socket can only ever be bound to one single port regardless of how - * many interfaces it may listen to. Therefore we cache the port after creation - * and use it to build a proper and full sockaddr_in or sockaddr_in6 for every received packet */ - uint16_t port; - uint16_t closed : 1; - uint16_t connected : 1; - struct us_udp_socket_t *next; -}; - -#if defined(LIBUS_USE_KQUEUE) && defined(__APPLE__) -/* Internal callback types are polls just like sockets */ -struct us_internal_callback_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_poll_t p; - struct us_loop_t *loop; - int cb_expects_the_loop; - int leave_poll_ready; - void (*cb)(struct us_internal_callback_t *cb); - mach_port_t port; - void *machport_buf; -}; - -#else - -struct us_internal_callback_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_poll_t p; - struct us_loop_t *loop; - int cb_expects_the_loop; - int leave_poll_ready; - void (*cb)(struct us_internal_callback_t *cb); -#ifdef LIBUS_USE_LIBUV - unsigned has_added_timer_to_event_loop; -#endif -}; - -#endif - -#if __cplusplus -extern "C" { -#endif -int us_internal_raw_root_certs(struct us_cert_string_t **out); - -#if __cplusplus -} -#endif - -/* Listen sockets are sockets, with their own embedded group for the listener - * itself (for the accept-readable poll) plus the accepted-socket parameters - * stamped on every accept(). The accepted sockets are linked into whatever - * group was passed to us_socket_group_listen() — typically the embedding - * server's group, NOT this struct. */ -struct us_listen_socket_t { - alignas(LIBUS_EXT_ALIGNMENT) struct us_socket_t s; - /* Group accepted sockets are linked into. Distinct from s.group (which is - * the listener's own poll group). Usually the same pointer in practice. */ - struct us_socket_group_t *accept_group; - /* Intrusive link into accept_group->head_listen_sockets so close_all() and - * the test-isolation sweep can find listeners again (the old per-context - * head_listen_sockets list is gone). */ - struct us_listen_socket_t *next; - /* SSL_CTX for accepted sockets. Borrowed; up_ref'd on listen, freed on - * close. NULL → plain TCP. */ - struct ssl_ctx_st *ssl_ctx; - /* SNI hostname → {SSL_CTX*, user*} tree. Owned. */ - void *sni; - /* Dynamic SNI resolver: returns the SSL_CTX to serve for `hostname` on the - * in-flight handshake only (the caller does not cache it), or NULL to fall - * through to the default context. */ - struct ssl_ctx_st *(*on_server_name)(struct us_listen_socket_t *, const char *hostname, int *abort_handshake, struct us_socket_t *socket); - unsigned int socket_ext_size; - /* kind to stamp on accepted sockets. */ - unsigned char accept_kind; - /* Set when TCP_DEFER_ACCEPT/SO_ACCEPTFILTER was successfully applied. */ - unsigned char deferred_accept; -}; - -void us_internal_socket_group_link_connecting_socket(us_socket_group_r group, struct us_connecting_socket_t *c); -void us_internal_socket_group_unlink_connecting_socket(us_socket_group_r group, struct us_connecting_socket_t *c); - -int us_raw_root_certs(struct us_cert_string_t **out); - -/* Save/restore the per-loop BIO routing state around in-handshake JS - * callbacks (SNI / ALPN). Defined in crypto/openssl.c. */ -void us_internal_ssl_loop_state_save(void *ssl, void **out5); -void us_internal_ssl_loop_state_restore(void **saved5); - -#endif // INTERNAL_H diff --git a/packages/bun-usockets/src/internal/loop_data.h b/packages/bun-usockets/src/internal/loop_data.h deleted file mode 100644 index 8e369f11df0b..000000000000 --- a/packages/bun-usockets/src/internal/loop_data.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef LOOP_DATA_H -#define LOOP_DATA_H - -#include - -#if defined(__APPLE__) -#include -typedef os_unfair_lock zig_mutex_t; -#elif defined(__linux__) || defined(__FreeBSD__) -typedef uint32_t zig_mutex_t; -#elif defined(_WIN32) -// SRWLOCK -typedef void* zig_mutex_t; -#else -#error "Unsupported platform" -#endif - -// IMPORTANT: When changing this, don't forget to update the Rust mirror in src/uws_sys/InternalLoopData.rs as well! -struct us_quic_socket_context_s; - -struct us_internal_loop_data_t { -#ifdef LIBUS_USE_LIBUV - struct us_timer_t *sweep_timer; -#else - /* Absolute monotonic ns of the next sweep, or -1. Folded into the poll - * timeout — no timerfd, no EVFILT_TIMER. */ - long long sweep_next_tick_ns; -#endif - int sweep_timer_count; - struct us_internal_async *wakeup_async; - struct us_socket_group_t *head; - /* QUIC engines on this loop. us_quic_loop_process walks the list from - * loop_post / drainMicrotasks; the lazy fallthrough timer only wakes the - * loop for lsquic's time-driven state (RTO, ACK delay) — its callback - * just calls us_quic_loop_process. */ - struct us_quic_socket_context_s *quic_head; - /* µs until lsquic next wants process_conns (min earliest_adv_tick - * across engines), or -1 for "no deadline". Written by - * us_quic_loop_process from loop_post; read by Bun's getTimeout() to - * bound the epoll_pwait2 timeout. No timerfd, no scheduling syscall — - * the gap between loop_post and getTimeout is sub-µs so storing the - * relative diff is precise enough. */ - long long quic_next_tick_us; -#ifdef LIBUS_USE_LIBUV - /* A fallthrough us_timer_t armed to quic_next_tick_us so the uv loop wakes - * for lsquic's time-driven state. POSIX folds the deadline into the - * epoll_pwait2 timeout via getTimeout() instead. */ - struct us_timer_t *quic_timer; -#endif - struct us_socket_group_t *iterator; - char *recv_buf; - char *send_buf; - void *ssl_data; - void (*pre_cb)(struct us_loop_t *); - void (*post_cb)(struct us_loop_t *); - struct us_udp_socket_t *closed_udp_head; - struct us_socket_t *closed_head; - struct us_socket_t *low_prio_head; - int low_prio_budget; - struct us_connecting_socket_t *dns_ready_head; - struct us_connecting_socket_t *closed_connecting_head; - zig_mutex_t mutex; - void *parent_ptr; - char parent_tag; - /* We do not care if this flips or not, it doesn't matter */ - size_t iteration_nr; - void* jsc_vm; - /* Reentrancy depth of us_loop_run_bun_tick. When >1, we are inside a - * nested tick (e.g. waitForPromise from a poll callback). Freeing closed - * sockets must be deferred to the outermost tick so the outer dispatch - * doesn't read a freed poll. */ - int tick_depth; -}; - -#endif // LOOP_DATA_H diff --git a/packages/bun-usockets/src/internal/networking/bsd.h b/packages/bun-usockets/src/internal/networking/bsd.h deleted file mode 100644 index 476d3c74573c..000000000000 --- a/packages/bun-usockets/src/internal/networking/bsd.h +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2019. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef BSD_H -#define BSD_H -#pragma once - -// top-most wrapper of bsd-like syscalls - -// holds everything you need from the bsd/winsock interfaces, only included by internal libusockets.h -// here everything about the syscalls are inline-wrapped and included - -#include "libusockets.h" - -#ifdef _WIN32 -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include -#include -#pragma comment(lib, "ws2_32.lib") -#define SETSOCKOPT_PTR_TYPE const char * -#define LIBUS_SOCKET_ERROR INVALID_SOCKET -#else /* POSIX */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -/* For socklen_t */ -#include -#include -#define SETSOCKOPT_PTR_TYPE int * -#define LIBUS_SOCKET_ERROR -1 -#endif - -#define LIBUS_UDP_MAX_SIZE (64 * 1024) - -struct bsd_addr_t { - struct sockaddr_storage mem; - socklen_t len; - char *ip; - int ip_length; - int port; -}; - -#ifdef _WIN32 -// on windows we can only receive one packet at a time -#define LIBUS_UDP_RECV_COUNT 1 -#else -// on unix we can receive at most as many packets as fit into the receive buffer -#define LIBUS_UDP_RECV_COUNT (LIBUS_RECV_BUFFER_LENGTH / LIBUS_UDP_MAX_SIZE) -#endif - -#ifdef __APPLE__ -/* - * Extended version for sendmsg_x() and recvmsg_x() calls - */ -struct mmsghdr { - struct msghdr msg_hdr; - size_t msg_len; /* byte length of buffer in msg_iov */ -}; -/* - * recvmsg_x() is a system call similar to recvmsg(2) to receive - * several datagrams at once in the array of message headers "msgp". - * - * recvmsg_x() can be used only with protocols handlers that have been specially - * modified to support sending and receiving several datagrams at once. - * - * The size of the array "msgp" is given by the argument "cnt". - * - * The "flags" arguments supports only the value MSG_DONTWAIT. - * - * Each member of "msgp" array is of type "struct msghdr_x". - * - * The "msg_iov" and "msg_iovlen" are input parameters that describe where to - * store a datagram in a scatter gather locations of buffers -- see recvmsg(2). - * On output the field "msg_datalen" gives the length of the received datagram. - * - * The field "msg_flags" must be set to zero on input. On output, "msg_flags" - * may have MSG_TRUNC set to indicate the trailing portion of the datagram was - * discarded because the datagram was larger than the buffer supplied. - * recvmsg_x() returns as soon as a datagram is truncated. - * - * recvmsg_x() may return with less than "cnt" datagrams received based on - * the low water mark and the amount of data pending in the socket buffer. - * - * recvmsg_x() returns the number of datagrams that have been received, - * or -1 if an error occurred. - * - * NOTE: This a private system call, the API is subject to change. - */ -ssize_t recvmsg_x(int s, const struct mmsghdr *msgp, u_int cnt, int flags); - -/* - * sendmsg_x() is a system call similar to send(2) to send - * several datagrams at once in the array of message headers "msgp". - * - * sendmsg_x() can be used only with protocols handlers that have been specially - * modified to support sending and receiving several datagrams at once. - * - * The size of the array "msgp" is given by the argument "cnt". - * - * The "flags" arguments supports only the value MSG_DONTWAIT. - * - * Each member of "msgp" array is of type "struct msghdr_x". - * - * The "msg_iov" and "msg_iovlen" are input parameters that specify the - * data to be sent in a scatter gather locations of buffers -- see sendmsg(2). - * - * sendmsg_x() fails with EMSGSIZE if the sum of the length of the datagrams - * is greater than the high water mark. - * - * Address and ancillary data are not supported so the following fields - * must be set to zero on input: - * "msg_name", "msg_namelen", "msg_control" and "msg_controllen". - * - * The field "msg_flags" and "msg_datalen" must be set to zero on input. - * - * sendmsg_x() returns the number of datagrams that have been sent, - * or -1 if an error occurred. - * - * NOTE: This a private system call, the API is subject to change. - */ -ssize_t sendmsg_x(int s, const struct mmsghdr *msgp, u_int cnt, int flags); -#endif - -struct udp_recvbuf { -#if defined(_WIN32) - char *buf; - size_t buflen; - size_t recvlen; - struct sockaddr_storage addr; -#else - struct mmsghdr msgvec[LIBUS_UDP_RECV_COUNT]; - struct iovec iov[LIBUS_UDP_RECV_COUNT]; - struct sockaddr_storage addr[LIBUS_UDP_RECV_COUNT]; - char control[LIBUS_UDP_RECV_COUNT][256]; -#endif -}; - -struct udp_sendbuf { -#ifdef _WIN32 - void **payloads; - size_t *lengths; - void **addresses; - int num; -#else - unsigned int has_empty : 1; - unsigned int has_addresses : 1; - unsigned int num; - struct mmsghdr msgvec[]; -#endif -}; - -int bsd_sendmmsg(LIBUS_SOCKET_DESCRIPTOR fd, struct udp_sendbuf* sendbuf, int flags); -int bsd_recvmmsg(LIBUS_SOCKET_DESCRIPTOR fd, struct udp_recvbuf *recvbuf, int flags); -void bsd_udp_setup_recvbuf(struct udp_recvbuf *recvbuf, void *databuf, size_t databuflen); -int bsd_udp_setup_sendbuf(struct udp_sendbuf *buf, size_t bufsize, void** payloads, size_t* lengths, void** addresses, int num); -int bsd_udp_packet_buffer_payload_length(struct udp_recvbuf *msgvec, int index); -char *bsd_udp_packet_buffer_payload(struct udp_recvbuf *msgvec, int index); -char *bsd_udp_packet_buffer_peer(struct udp_recvbuf *msgvec, int index); -int bsd_udp_packet_buffer_local_ip(struct udp_recvbuf *msgvec, int index, char *ip); -int bsd_udp_packet_buffer_truncated(struct udp_recvbuf *msgvec, int index); -// int bsd_udp_packet_buffer_ecn(struct udp_recvbuf *msgvec, int index); - -LIBUS_SOCKET_DESCRIPTOR apple_no_sigpipe(LIBUS_SOCKET_DESCRIPTOR fd); -LIBUS_SOCKET_DESCRIPTOR bsd_set_nonblocking(LIBUS_SOCKET_DESCRIPTOR fd); -void bsd_socket_nodelay(LIBUS_SOCKET_DESCRIPTOR fd, int enabled); -int bsd_set_defer_accept(LIBUS_SOCKET_DESCRIPTOR listenFd); -int bsd_socket_broadcast(LIBUS_SOCKET_DESCRIPTOR fd, int enabled); -int bsd_socket_ttl_unicast(LIBUS_SOCKET_DESCRIPTOR fd, int ttl); -int bsd_socket_ttl_multicast(LIBUS_SOCKET_DESCRIPTOR fd, int ttl); -int bsd_socket_multicast_loopback(LIBUS_SOCKET_DESCRIPTOR fd, int enabled); -int bsd_socket_multicast_interface(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_storage *addr); -int bsd_socket_set_membership(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_storage *addr, const struct sockaddr_storage *iface, int drop); -int bsd_socket_set_source_specific_membership(LIBUS_SOCKET_DESCRIPTOR fd, const struct sockaddr_storage *source, const struct sockaddr_storage *group, const struct sockaddr_storage *iface, int drop); -int bsd_socket_keepalive(LIBUS_SOCKET_DESCRIPTOR fd, int on, unsigned int delay); -/* IP type-of-service (IPv4 IP_TOS / IPv6 IPV6_TCLASS). set returns 0 or a - * negative platform errno; get returns the value (>= 0) or a negative errno. */ -int bsd_socket_set_tos(LIBUS_SOCKET_DESCRIPTOR fd, int tos); -int bsd_socket_get_tos(LIBUS_SOCKET_DESCRIPTOR fd); -void bsd_socket_flush(LIBUS_SOCKET_DESCRIPTOR fd); -LIBUS_SOCKET_DESCRIPTOR bsd_create_socket(int domain, int type, int protocol, int *err); - -void bsd_close_socket(LIBUS_SOCKET_DESCRIPTOR fd); -void bsd_shutdown_socket(LIBUS_SOCKET_DESCRIPTOR fd); -void bsd_shutdown_socket_read(LIBUS_SOCKET_DESCRIPTOR fd); - -void internal_finalize_bsd_addr(struct bsd_addr_t *addr); - -int bsd_local_addr(LIBUS_SOCKET_DESCRIPTOR fd, struct bsd_addr_t *addr); -int bsd_remote_addr(LIBUS_SOCKET_DESCRIPTOR fd, struct bsd_addr_t *addr); - -char *bsd_addr_get_ip(struct bsd_addr_t *addr); -int bsd_addr_get_ip_length(struct bsd_addr_t *addr); - -int bsd_addr_get_port(struct bsd_addr_t *addr); - -// called by dispatch_ready_poll -LIBUS_SOCKET_DESCRIPTOR bsd_accept_socket(LIBUS_SOCKET_DESCRIPTOR fd, struct bsd_addr_t *addr); - -ssize_t bsd_recv(LIBUS_SOCKET_DESCRIPTOR fd, void *buf, int length, int flags); -#if !defined(_WIN32) -ssize_t bsd_recvmsg(LIBUS_SOCKET_DESCRIPTOR fd, struct msghdr *msg, int flags); -#endif -ssize_t bsd_send(LIBUS_SOCKET_DESCRIPTOR fd, const char *buf, int length); -#if !defined(_WIN32) -ssize_t bsd_sendmsg(LIBUS_SOCKET_DESCRIPTOR fd, const struct msghdr *msg, int flags); -#endif -struct us_iovec_t; -ssize_t bsd_writev(LIBUS_SOCKET_DESCRIPTOR fd, const struct us_iovec_t *iov, int count); -ssize_t bsd_write2(LIBUS_SOCKET_DESCRIPTOR fd, const char *header, int header_length, const char *payload, int payload_length); -int bsd_would_block(); -int bsd_send_is_transient_error(); - -// return LIBUS_SOCKET_ERROR or the fd that represents listen socket -// listen both on ipv6 and ipv4 -LIBUS_SOCKET_DESCRIPTOR bsd_create_listen_socket(const char *host, int port, int options, int* error); - -LIBUS_SOCKET_DESCRIPTOR bsd_create_listen_socket_unix(const char *path, size_t pathlen, int options, int* error); - -/* Creates an UDP socket bound to the hostname and port */ -LIBUS_SOCKET_DESCRIPTOR bsd_create_udp_socket(const char *host, int port, int options, int *err); -int bsd_connect_udp_socket(LIBUS_SOCKET_DESCRIPTOR fd, const char *host, int port); -int bsd_disconnect_udp_socket(LIBUS_SOCKET_DESCRIPTOR fd); - -LIBUS_SOCKET_DESCRIPTOR bsd_create_connect_socket(struct sockaddr_storage *addr, struct sockaddr_storage *local_addr, int options); - -LIBUS_SOCKET_DESCRIPTOR bsd_create_connect_socket_unix(const char *server_path, size_t pathlen, int options); - -#ifndef MSG_DONTWAIT -#define MSG_DONTWAIT 0 -#endif - -#endif // BSD_H diff --git a/packages/bun-usockets/src/libusockets.h b/packages/bun-usockets/src/libusockets.h index 89c208b7f747..197979e39158 100644 --- a/packages/bun-usockets/src/libusockets.h +++ b/packages/bun-usockets/src/libusockets.h @@ -611,7 +611,6 @@ LIBUS_SOCKET_DESCRIPTOR us_socket_get_fd(us_socket_r s) nonnull_fn_decl; struct us_socket_t *us_socket_pair(us_socket_group_r group, unsigned char kind, int socket_ext_size, LIBUS_SOCKET_DESCRIPTOR *fds) nonnull_fn_decl; struct us_socket_t *us_socket_from_fd(us_socket_group_r group, unsigned char kind, struct ssl_ctx_st *ssl_ctx, int socket_ext_size, LIBUS_SOCKET_DESCRIPTOR fd, int ipc) __attribute__((nonnull(1))); /* ssl_ctx nullable */ -struct us_socket_t *us_socket_open(struct us_socket_t *s, int is_client, char *ip, int ip_length); int us_raw_root_certs(struct us_cert_string_t **out); unsigned int us_get_remote_address_info(char *buf, us_socket_r s, const char **dest, int *port, int *is_ipv6); unsigned int us_get_local_address_info(char *buf, us_socket_r s, const char **dest, int *port, int *is_ipv6); diff --git a/packages/bun-usockets/src/libusockets_cabi.h b/packages/bun-usockets/src/libusockets_cabi.h new file mode 100644 index 000000000000..a82e4dd93aa8 --- /dev/null +++ b/packages/bun-usockets/src/libusockets_cabi.h @@ -0,0 +1,100 @@ +/* + * Accessor seam for surviving C/C++ consumers of the Rust bun_usockets crate + * (uWS App.h/HttpContext.h, quic.c). Implemented in src/usockets/cabi.rs; + * keeps us_socket_t / us_listen_socket_t / us_loop_t fully opaque here. + */ +#pragma once +#ifndef LIBUSOCKETS_CABI_H +#define LIBUSOCKETS_CABI_H + +#include "libusockets.h" + +#ifdef _WIN32 +#include +#else +#include +#include +#endif + +/* Poll-event flags handed to us_poll_change (quic.c backpressure). ABI: the + * values are per-backend (src/usockets/docs/cabi.md §9.3.7) — mirror the eventing + * headers exactly; never hardcode. */ +#ifndef LIBUS_SOCKET_READABLE +#if defined(LIBUS_USE_LIBUV) +#include +#define LIBUS_SOCKET_READABLE UV_READABLE +#define LIBUS_SOCKET_WRITABLE UV_WRITABLE +#elif defined(LIBUS_USE_EPOLL) +#include +#define LIBUS_SOCKET_READABLE EPOLLIN +#define LIBUS_SOCKET_WRITABLE EPOLLOUT +#else /* kqueue: private bitfield, translated per-call by the backend */ +#define LIBUS_SOCKET_READABLE 1 +#define LIBUS_SOCKET_WRITABLE 2 +#endif +#endif + +#ifndef LIBUS_SOCKET_ERROR +#ifdef _WIN32 +#define LIBUS_SOCKET_ERROR INVALID_SOCKET +#else +#define LIBUS_SOCKET_ERROR -1 +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Group socket-list walk (App.h::closeIdle). Close-safe only if the caller + * caches us_socket_next(s) before closing s. */ +struct us_socket_t *us_socket_group_head_socket(us_socket_group_r group); +struct us_socket_t *us_socket_next(us_socket_r s); + +/* Drops the listen socket's loop keep-alive (HttpContext.h::listen{,_unix}). */ +void us_listen_socket_unref(struct us_listen_socket_t *ls); + +/* quic.c loop-field accessors. quic_head is the us_quic_socket_context_s + * list; quic_next_tick_us is the relative-µs engine deadline folded into the + * poll wait (-1 = none). poll_count_add keeps the loop alive per live conn. */ +#ifndef LIBUS_USE_LIBUV +void us_loop_poll_count_add(us_loop_r loop, int delta); +#endif +void *us_internal_loop_quic_head(us_loop_r loop); +void us_internal_loop_quic_head_set(us_loop_r loop, void *head); +void us_internal_loop_quic_next_tick_set(us_loop_r loop, long long relative_us); +#ifdef LIBUS_USE_LIBUV +struct us_timer_t; +struct us_timer_t *us_internal_loop_quic_timer(us_loop_r loop); +void us_internal_loop_quic_timer_set(us_loop_r loop, struct us_timer_t *timer); +#endif + +/* The poll embedded first in us_udp_socket_t (replaces quic.c's raw cast). */ +struct us_poll_t *us_udp_socket_poll(struct us_udp_socket_t *s); + +/* Raw-socket probe helpers (quic.c route probing; formerly networking/bsd.h). */ +LIBUS_SOCKET_DESCRIPTOR bsd_create_socket(int domain, int type, int protocol, int *err); +void bsd_close_socket(LIBUS_SOCKET_DESCRIPTOR fd); + +/* Bun DNS glue used by quic.c (Rust exports; formerly internal/internal.h). */ +struct addrinfo_request; +#ifndef LIBUS_ADDRINFO_RESULT_DEFINED +#define LIBUS_ADDRINFO_RESULT_DEFINED +struct addrinfo_result_entry { + struct addrinfo info; + struct sockaddr_storage _storage; +}; +struct addrinfo_result { + struct addrinfo_result_entry *entries; + int error; +}; +#endif +extern int Bun__addrinfo_get(struct us_loop_t *loop, const char *host, uint16_t port, struct addrinfo_request **ptr); +extern void Bun__addrinfo_freeRequest(struct addrinfo_request *addrinfo_req, int error); +extern struct addrinfo_result *Bun__addrinfo_getRequestResult(struct addrinfo_request *addrinfo_req); + +#ifdef __cplusplus +} +#endif + +#endif /* LIBUSOCKETS_CABI_H */ diff --git a/packages/bun-usockets/src/loop.c b/packages/bun-usockets/src/loop.c deleted file mode 100644 index b216a5633578..000000000000 --- a/packages/bun-usockets/src/loop.c +++ /dev/null @@ -1,928 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2021. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// clang-format off -#include "libusockets.h" -#include "internal/internal.h" -#include "quic.h" -#include -#include -#include -#include -#ifndef WIN32 -#include -#endif -#ifdef __linux__ -#include -#include -#endif - -#if __has_include("wtf/Platform.h") -#include "wtf/Platform.h" -#elif !defined(ASSERT_ENABLED) -#if defined(BUN_DEBUG) || defined(__has_feature) && __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) -#define ASSERT_ENABLED 1 -#else -#define ASSERT_ENABLED 0 -#endif -#endif - -#if ASSERT_ENABLED -extern const size_t Bun__lock__size; -#endif - -extern void Bun__internal_ensureDateHeaderTimerIsEnabled(struct us_loop_t *loop); - -#ifdef LIBUS_USE_LIBUV - -void sweep_timer_cb(struct us_internal_callback_t *cb); - -// when the sweep timer is disabled, we don't need to do anything -void sweep_timer_noop(struct us_timer_t *timer) {} - -void us_internal_enable_sweep_timer(struct us_loop_t *loop) { - loop->data.sweep_timer_count++; - if (loop->data.sweep_timer_count == 1) { - us_timer_set(loop->data.sweep_timer, (void (*)(struct us_timer_t *)) sweep_timer_cb, LIBUS_TIMEOUT_GRANULARITY * 1000, LIBUS_TIMEOUT_GRANULARITY * 1000); - Bun__internal_ensureDateHeaderTimerIsEnabled(loop); - } -} - -void us_internal_disable_sweep_timer(struct us_loop_t *loop) { - loop->data.sweep_timer_count--; - if (loop->data.sweep_timer_count == 0) { - us_timer_set(loop->data.sweep_timer, (void (*)(struct us_timer_t *)) sweep_timer_noop, 0, 0); - } -} - -#else - -#define LIBUS_TIMEOUT_GRANULARITY_NS ((long long) LIBUS_TIMEOUT_GRANULARITY * 1000000000LL) - -static long long us_internal_monotonic_ns(void) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (long long) ts.tv_sec * 1000000000LL + (long long) ts.tv_nsec; -} - -void us_internal_enable_sweep_timer(struct us_loop_t *loop) { - loop->data.sweep_timer_count++; - if (loop->data.sweep_timer_count == 1) { - loop->data.sweep_next_tick_ns = us_internal_monotonic_ns() + LIBUS_TIMEOUT_GRANULARITY_NS; - Bun__internal_ensureDateHeaderTimerIsEnabled(loop); - } -} - -void us_internal_disable_sweep_timer(struct us_loop_t *loop) { - loop->data.sweep_timer_count--; - if (loop->data.sweep_timer_count == 0) { - loop->data.sweep_next_tick_ns = -1; - } -} - -long long us_internal_sweep_timeout_ns(struct us_loop_t *loop) { - if (loop->data.sweep_next_tick_ns < 0) { - return -1; - } - long long diff = loop->data.sweep_next_tick_ns - us_internal_monotonic_ns(); - return diff > 0 ? diff : 0; -} - -void us_internal_sweep_if_due(struct us_loop_t *loop) { - if (loop->data.sweep_next_tick_ns < 0) { - return; - } - long long now = us_internal_monotonic_ns(); - if (now < loop->data.sweep_next_tick_ns) { - return; - } - /* Re-arm first: a timeout handler may unlink the last socket and disarm. */ - loop->data.sweep_next_tick_ns = now + LIBUS_TIMEOUT_GRANULARITY_NS; - us_internal_timer_sweep(loop); -} - -#endif - - -void us_internal_loop_data_init(struct us_loop_t *loop, void (*wakeup_cb)(struct us_loop_t *loop), - void (*pre_cb)(struct us_loop_t *loop), void (*post_cb)(struct us_loop_t *loop)) { - // We allocate with calloc, so we only need to initialize the specific fields in use. -#ifdef LIBUS_USE_LIBUV - loop->data.sweep_timer = us_create_timer(loop, 1, 0); -#else - loop->data.sweep_next_tick_ns = -1; -#endif - loop->data.sweep_timer_count = 0; - loop->data.recv_buf = malloc(LIBUS_RECV_BUFFER_LENGTH + LIBUS_RECV_BUFFER_PADDING * 2); - loop->data.send_buf = malloc(LIBUS_SEND_BUFFER_LENGTH); - /* Every read on this loop writes into recv_buf; a NULL here makes each one - * fail with EFAULT for the life of the process. */ - if (!loop->data.recv_buf || !loop->data.send_buf) Bun__outOfMemory(); - loop->data.pre_cb = pre_cb; - loop->data.post_cb = post_cb; - loop->data.wakeup_async = us_internal_create_async(loop, 1, 0); - us_internal_async_set(loop->data.wakeup_async, (void (*)(struct us_internal_async *)) wakeup_cb); -#if ASSERT_ENABLED - if (Bun__lock__size != sizeof(loop->data.mutex)) { - BUN_PANIC("The size of the mutex must match the size of the lock"); - } -#endif -} - -void us_internal_loop_data_free(struct us_loop_t *loop) { -#ifndef LIBUS_NO_SSL - us_internal_free_loop_ssl_data(loop); -#endif - - free(loop->data.recv_buf); - free(loop->data.send_buf); - -#ifdef LIBUS_USE_LIBUV - us_timer_close(loop->data.sweep_timer, 0); - if (loop->data.quic_timer) us_timer_close(loop->data.quic_timer, 0); -#endif - us_internal_async_close(loop->data.wakeup_async); -} - -__attribute__((always_inline)) void us_wakeup_loop(struct us_loop_t *loop) { -#ifndef LIBUS_USE_LIBUV - __atomic_fetch_add(&loop->pending_wakeups, 1, __ATOMIC_RELEASE); -#endif - us_internal_async_wakeup(loop->data.wakeup_async); -} - -void us_internal_loop_link_group(struct us_loop_t *loop, struct us_socket_group_t *group) { - /* Insert this group as the head of loop */ - group->next = loop->data.head; - group->prev = 0; - if (loop->data.head) { - loop->data.head->prev = group; - } - loop->data.head = group; -} - -/* Unlink is called before the embedding owner frees its storage */ -void us_internal_loop_unlink_group(struct us_loop_t *loop, struct us_socket_group_t *group) { - /* If a timeout callback in us_internal_timer_sweep deinits the current group, - * advance the sweep iterator before group->next is cleared — otherwise the sweep - * walks into freed storage and skips active groups. */ - if (group == loop->data.iterator) { - loop->data.iterator = group->next; - } - if (loop->data.head == group) { - loop->data.head = group->next; - if (loop->data.head) { - loop->data.head->prev = 0; - } - } else { - group->prev->next = group->next; - if (group->next) { - group->next->prev = group->prev; - } - } -} - -/* Teardown helper: close every socket in every group currently linked to this - * loop. Covers Listener/uWS-App-owned groups that the Zig RareData group list - * doesn't know about — without this, an accepted us_socket_t whose group is - * embedded in a still-live Listener leaks at process.exit() (LSAN: 88-byte - * us_create_poll from loop.c:375). closeAll may unlink the group it's called - * on, so cache `next` before each call. Returns 1 if anything was linked. */ -int us_loop_close_all_groups(struct us_loop_t *loop) { - struct us_socket_group_t *g = loop->data.head; - int any = 0; - while (g) { - struct us_socket_group_t *next = g->next; - /* Only connecting/connected sockets are stranded — listen sockets are - * 1:1 owned by a Zig Listener / uWS App that holds a raw pointer and - * closes them in finalize(). Closing them here turns that into a UAF - * after drainClosedSockets(). */ - if (g->head_sockets || g->head_connecting_sockets || g->low_prio_count) { - us_socket_group_close_all_ex(g, /* also_listeners */ 0); - any = 1; - } - /* close_all → unlink may have spliced our cached `next` out too (an - * on_close handler closing a different group's last socket); re-read - * from the loop head if `next` is no longer linked. */ - if (next && !next->linked) next = loop->data.head; - g = next; - } - return any; -} - -/* This functions should never run recursively */ -void us_internal_timer_sweep(struct us_loop_t *loop) { - struct us_internal_loop_data_t *loop_data = &loop->data; - /* For all socket groups in this loop */ - loop_data->iterator = loop_data->head; - while (loop_data->iterator) { - - struct us_socket_group_t *group = loop_data->iterator; - - /* Update this group's timestamps (this could be moved to loop and done once) */ - group->global_tick++; - unsigned char short_ticks = group->timestamp = group->global_tick % 240; - unsigned char long_ticks = group->long_timestamp = (group->global_tick / 15) % 240; - - /* Begin at head */ - struct us_socket_t *s = group->head_sockets; - while (s) { - /* Seek until end or timeout found (tightest loop) */ - while (1) { - /* We only read from 1 random cache line here */ - if (short_ticks == s->timeout || long_ticks == s->long_timeout) { - break; - } - - /* Did we reach the end without a find? */ - if ((s = s->next) == 0) { - goto next_group; - } - } - - /* Here we have a timeout to emit (slow path) */ - group->iterator = s; - - if (short_ticks == s->timeout) { - s->timeout = 255; - us_dispatch_timeout(s); - } - /* A timeout handler may have closed every socket and the owner may - * have deinit'd the embedding group in response (release builds — - * deinit() asserts iterator==NULL in debug). loop_data->iterator - * would have been advanced past `group` by unlink_group(); if so, - * `group` is freed storage and we must not touch it again. */ - if (loop_data->iterator != group) goto outer_continue; - - if (group->iterator == s && long_ticks == s->long_timeout) { - s->long_timeout = 255; - us_dispatch_long_timeout(s); - } - if (loop_data->iterator != group) goto outer_continue; - - /* Check for unlink / link (if the event handler did not modify the chain, we step 1) */ - if (s == group->iterator) { - s = s->next; - } else { - /* The iterator was changed by event handler */ - s = group->iterator; - } - } - next_group: - /* Only safe to write back / step ->next if the group survived dispatch. */ - group->iterator = 0; - loop_data->iterator = group->next; - outer_continue:; - } -} - -/* We do not want to block the loop with tons and tons of CPU-intensive work for SSL handshakes. - * Spread it out during many loop iterations, prioritizing already open connections, they are far - * easier on CPU */ -static const int MAX_LOW_PRIO_SOCKETS_PER_LOOP_ITERATION = 5; - -void us_internal_handle_low_priority_sockets(struct us_loop_t *loop) { - struct us_internal_loop_data_t *loop_data = &loop->data; - struct us_socket_t *s; - - loop_data->low_prio_budget = MAX_LOW_PRIO_SOCKETS_PER_LOOP_ITERATION; - - for (s = loop_data->low_prio_head; s && loop_data->low_prio_budget > 0; s = loop_data->low_prio_head, loop_data->low_prio_budget--) { - /* Unlink this socket from the low-priority queue */ - loop_data->low_prio_head = s->next; - if (s->next) s->next->prev = 0; - s->next = 0; - s->group->low_prio_count--; - - if(us_socket_is_closed(s)) { - s->flags.low_prio_state = 2; - continue; - } - - us_internal_socket_group_link_socket(s->group, s); - us_poll_change(&s->p, s->group->loop, us_poll_events(&s->p) | LIBUS_SOCKET_READABLE); - - s->flags.low_prio_state = 2; - } -} - -// Called when DNS resolution completes -// Does not wake up the loop. -void us_internal_dns_callback(struct us_connecting_socket_t *c, void* addrinfo_req) { - (void)addrinfo_req; /* already stored on c by us_socket_group_connect */ - struct us_loop_t *loop = c->loop; - Bun__lock(&loop->data.mutex); - c->next = loop->data.dns_ready_head; - loop->data.dns_ready_head = c; - Bun__unlock(&loop->data.mutex); -} - -// Called when DNS resolution completes -// Wakes up the loop. -// Can be caleld from any thread. -void us_internal_dns_callback_threadsafe(struct us_connecting_socket_t *c, void* addrinfo_req) { - struct us_loop_t *loop = c->loop; - us_internal_dns_callback(c, addrinfo_req); - us_wakeup_loop(loop); -} - -void us_internal_drain_pending_dns_resolve(struct us_loop_t *loop, struct us_connecting_socket_t *s) { - while (s) { - struct us_connecting_socket_t *next = s->next; - us_internal_socket_after_resolve(s); - s = next; - } -} - -int us_internal_handle_dns_results(struct us_loop_t *loop) { - Bun__lock(&loop->data.mutex); - struct us_connecting_socket_t *s = loop->data.dns_ready_head; - loop->data.dns_ready_head = NULL; - Bun__unlock(&loop->data.mutex); - us_internal_drain_pending_dns_resolve(loop, s); - return s != NULL; -} - -/* Note: Properly takes the linked list and timeout sweep into account */ -void us_internal_free_closed_sockets(struct us_loop_t *loop) { - /* Free all closed sockets (maybe it is better to reverse order?) */ - for (struct us_socket_t *s = loop->data.closed_head; s; ) { - struct us_socket_t *next = s->next; - s->prev = s->next = 0; - us_poll_free((struct us_poll_t *) s, loop); - s = next; - } - loop->data.closed_head = NULL; - - for (struct us_udp_socket_t *s = loop->data.closed_udp_head; s; ) { - struct us_udp_socket_t *next = s->next; - us_poll_free((struct us_poll_t *) s, loop); - s = next; - } - loop->data.closed_udp_head = NULL; - - for (struct us_connecting_socket_t *s = loop->data.closed_connecting_head; s; ) { - struct us_connecting_socket_t *next = s->next; - us_free(s); - s = next; - } - loop->data.closed_connecting_head = NULL; -} - -#ifdef LIBUS_USE_LIBUV -void sweep_timer_cb(struct us_internal_callback_t *cb) { - us_internal_timer_sweep(cb->loop); -} -#endif - -__attribute__((always_inline)) long long us_loop_iteration_number(struct us_loop_t *loop) { - return loop->data.iteration_nr; -} - -/* These may have somewhat different meaning depending on the underlying event library */ -void us_internal_loop_pre(struct us_loop_t *loop) { - loop->data.iteration_nr++; - us_internal_handle_dns_results(loop); - us_internal_handle_low_priority_sockets(loop); - loop->data.pre_cb(loop); -#ifdef LIBUS_USE_QUIC - /* Flush stream writes that JS tasks made before this tick (timers, - * immediates, promise resolutions outside on_read) so they go out - * before epoll blocks. loop_post handles what this iteration receives. */ - if (loop->data.quic_head) us_quic_loop_process(loop); -#endif -} - -void us_internal_loop_post(struct us_loop_t *loop) { - us_internal_handle_dns_results(loop); -#ifdef LIBUS_USE_QUIC - if (loop->data.quic_head) us_quic_loop_process(loop); -#endif - /* A poll callback may re-enter the loop (e.g. expect().toThrow() → - * waitForPromise → us_loop_run_bun_tick). The inner tick must not free - * closed sockets: the outer tick's dispatch is mid-iteration and may still - * hold a pointer to one (it reads s->flags right after on_data returns). - * Defer to the outermost tick's loop_post. */ - if (loop->data.tick_depth <= 1) { - us_internal_free_closed_sockets(loop); - } - loop->data.post_cb(loop); -} - -#ifdef WIN32 -#define us_ioctl ioctlsocket -#else -#define us_ioctl ioctl -#endif - -void us_internal_dispatch_ready_poll(struct us_poll_t *p, int error, int eof, int events) { - switch (us_internal_poll_type(p)) { - case POLL_TYPE_CALLBACK: { - struct us_internal_callback_t *cb = (struct us_internal_callback_t *) p; - /* Timers, asyncs should accept (read), while UDP sockets should obviously not */ - if (!cb->leave_poll_ready) { - /* Let's just have this macro to silence the CodeQL alert regarding empty function when using libuv */ - #ifndef LIBUS_USE_LIBUV - us_internal_accept_poll_event(p); - #endif - } - cb->cb(cb->cb_expects_the_loop ? (struct us_internal_callback_t *) cb->loop : (struct us_internal_callback_t *) &cb->p); - break; - } - case POLL_TYPE_SEMI_SOCKET: { - /* Both connect and listen sockets are semi-sockets - * but they poll for different events. A connecting socket starts - * out polling WRITABLE only, but a write issued before the connect - * completes (the kernel buffers it) can partial-write and call - * us_poll_change(R|W) from us_socket_write*. Test the WRITABLE bit - * rather than exact equality so the connect-complete is still - * recognized; listen sockets only ever poll READABLE. */ - if (us_poll_events(p) & LIBUS_SOCKET_WRITABLE) { - /* The connecting fd became writable with an error/HUP flag also - * set: the handshake may have completed and then been reset - * before we collected the event. Report the kernel's actual - * SO_ERROR (ECONNRESET for that race) instead of the literal - * boolean, which downstream would misreport as ECONNREFUSED. - * libuv does the same getsockopt in uv__stream_connect. */ - int connect_error = 0; - if (error || eof) { - connect_error = us_socket_get_error((struct us_socket_t *) p); - if (connect_error == 0) { - connect_error = ECONNRESET; - } - } - us_internal_socket_after_open((struct us_socket_t *) p, connect_error); - } else { - struct us_listen_socket_t *listen_socket = (struct us_listen_socket_t *) p; - struct us_socket_group_t *accept_group = listen_socket->accept_group; - struct us_loop_t *loop = accept_group->loop; - struct bsd_addr_t addr; - - LIBUS_SOCKET_DESCRIPTOR client_fd = bsd_accept_socket(us_poll_fd(p), &addr); - if (client_fd == LIBUS_SOCKET_ERROR) { - /* Todo: start timer here */ - - } else { - - /* Todo: stop timer if any */ - - do { - struct us_poll_t *accepted_p = us_create_poll(loop, 0, sizeof(struct us_socket_t) - sizeof(struct us_poll_t) + listen_socket->socket_ext_size); - us_poll_init(accepted_p, client_fd, POLL_TYPE_SOCKET); - if (us_poll_start_rc(accepted_p, loop, LIBUS_SOCKET_READABLE) != 0) { - /* EPOLL_CTL_ADD failed (e.g. ENOSPC). Close the fd so the - * peer sees a RST instead of a connection that silently - * never answers. */ - bsd_close_socket(client_fd); - us_poll_free(accepted_p, loop); - continue; - } - - struct us_socket_t *s = (struct us_socket_t *) accepted_p; - - s->group = accept_group; - s->kind = listen_socket->accept_kind; - s->ssl = NULL; - s->connect_state = NULL; - s->timeout = 255; - s->long_timeout = 255; - s->flags.low_prio_state = 0; - s->flags.allow_half_open = listen_socket->s.flags.allow_half_open; - s->flags.is_paused = 0; - s->flags.is_ipc = 0; - s->flags.is_closed = 0; - s->flags.adopted = 0; - - /* We always use nodelay */ - bsd_socket_nodelay(client_fd, 1); - - us_internal_socket_group_link_socket(accept_group, s); - - if (listen_socket->ssl_ctx) { - us_internal_ssl_attach(s, listen_socket->ssl_ctx, /*is_client*/ 0, NULL, listen_socket); - us_internal_ssl_on_open(s, 0, bsd_addr_get_ip(&addr), bsd_addr_get_ip_length(&addr)); - } else { - us_dispatch_open(s, 0, bsd_addr_get_ip(&addr), bsd_addr_get_ip_length(&addr)); - } - /* After socket adoption, track the new socket; the old one becomes invalid */ - if(s && s->flags.adopted && s->prev) { - s = s->prev; - } - - /* When the kernel deferred the accept until data arrived (TCP_DEFER_ACCEPT - * on Linux, SO_ACCEPTFILTER on FreeBSD), the request/ClientHello is already - * in the buffer. Dispatch readable now instead of returning to epoll just to - * learn what we already know. The POLL_TYPE_SOCKET handler tolerates - * EWOULDBLOCK for the rare case where the defer timed out with no data. */ - if (listen_socket->deferred_accept && s && !us_socket_is_closed(s)) { - us_internal_dispatch_ready_poll((struct us_poll_t *) s, 0, 0, LIBUS_SOCKET_READABLE); - } - - /* Exit accept loop if listen socket was closed in on_open or the request handler */ - if (us_socket_is_closed(&listen_socket->s)) { - break; - } - - } while ((client_fd = bsd_accept_socket(us_poll_fd(p), &addr)) != LIBUS_SOCKET_ERROR); - } - } - break; - } - case POLL_TYPE_SOCKET_SHUT_DOWN: - case POLL_TYPE_SOCKET: { - /* We should only use s, no p after this point */ - struct us_socket_t *s = (struct us_socket_t *) p; - /* After socket adoption, track the new socket; the old one becomes invalid */ - if(s && s->flags.adopted && s->prev) { - s = s->prev; - } - /* The group can change after calling a callback but the loop is always the same */ - struct us_loop_t* loop = s->group->loop; - if (events & LIBUS_SOCKET_WRITABLE && !error) { - s->flags.last_write_failed = 0; - #ifdef LIBUS_USE_KQUEUE - /* Kqueue EVFILT_WRITE is one-shot so the filter is removed after delivery. - * Clear POLLING_OUT to reflect this. - * Keep POLLING_IN from the poll's own state, NOT from `events`: kqueue delivers - * each filter as a separate kevent, so a pure EVFILT_WRITE event won't have - * LIBUS_SOCKET_READABLE set even though the socket is still registered for reads. */ - p->state.poll_type = us_internal_poll_type(p) | (p->state.poll_type & POLL_TYPE_POLLING_IN); - #endif - - s = s->ssl ? us_internal_ssl_on_writable(s) : us_dispatch_writable(s); - /* After socket adoption, track the new socket; the old one becomes invalid */ - if(s && s->flags.adopted && s->prev) { - s = s->prev; - } - - if (!s || us_socket_is_closed(s)) { - return; - } - - /* If we have no failed write or if we shut down, then stop polling for more writable */ - if (!s->flags.last_write_failed || us_socket_is_shut_down(s)) { - us_poll_change(&s->p, loop, us_poll_events(&s->p) & LIBUS_SOCKET_READABLE); - } else { - #ifdef LIBUS_USE_KQUEUE - /* Kqueue one-shot writable needs to be re-registered */ - us_poll_change(&s->p, loop, us_poll_events(&s->p) | LIBUS_SOCKET_WRITABLE); - #endif - } - } - - if (events & LIBUS_SOCKET_READABLE) { - /* Contexts may prioritize down sockets that are currently readable, e.g. when SSL handshake has to be done. - * SSL handshakes are CPU intensive, so we limit the number of handshakes per loop iteration, and move the rest - * to the low-priority queue */ - struct us_socket_flags* flags = &s->flags; - /* Only the SSL handshake gate ever returns low-prio. The - * non-SSL arm dispatched a full vtable lookup just to read - * NULL — no Zig handler defines isLowPrio and every C++ vtable - * sets is_low_prio = nullptr — so it's been dropped. */ - if (s->ssl && us_internal_ssl_is_low_prio(s)) { - if (flags->low_prio_state == 2) { - flags->low_prio_state = 0; /* Socket has been delayed and now it's time to process incoming data for one iteration */ - } else if (loop->data.low_prio_budget > 0) { - loop->data.low_prio_budget--; /* Still having budget for this iteration - do normal processing */ - } else { - struct us_poll_t* poll = &s->p; - us_poll_change(poll, loop, us_poll_events(poll) & LIBUS_SOCKET_WRITABLE); - /* Already parked: a writable dispatch re-enabled READABLE on - * this socket (us_socket_raw_write / us_socket_resume issue - * us_poll_change(R|W) without knowing about the queue). It - * sits in loop->data.low_prio_head, NOT in g->head_sockets, - * so the group unlink below would cross-wire the two lists - * (they share prev/next) and the counter bump would leak. - * Readable is disabled again above; leave it where it is. */ - if (flags->low_prio_state == 1) { - break; - } - struct us_socket_group_t *g = s->group; - /* Queued sockets aren't in head_sockets while parked, so - * the group's emptiness check needs this counter to know - * the owner can't deinit yet. Bump BEFORE unlinking so - * maybe_unlink() inside it still sees the group as - * non-empty. */ - g->low_prio_count++; - us_internal_socket_group_unlink_socket(g, s); - - /* Link this socket to the low-priority queue - we use a LIFO queue, to prioritize newer clients that are - * maybe not already timeouted - sounds unfair, but works better in real-life with smaller client-timeouts - * under high load */ - s->prev = 0; - s->next = loop->data.low_prio_head; - if (s->next) s->next->prev = s; - loop->data.low_prio_head = s; - - flags->low_prio_state = 1; - - break; - } - } - - size_t repeat_recv_count = 0; - - do { - #ifdef _WIN32 - const int recv_flags = MSG_PUSH_IMMEDIATE; - #else - const int recv_flags = MSG_DONTWAIT; - #endif - - int length; - #if !defined(_WIN32) - if(s->flags.is_ipc) { - struct msghdr msg = {0}; - struct iovec iov = {0}; - char cmsg_buf[CMSG_SPACE(sizeof(int))]; - - iov.iov_base = loop->data.recv_buf + LIBUS_RECV_BUFFER_PADDING; - iov.iov_len = LIBUS_RECV_BUFFER_LENGTH; - - msg.msg_flags = 0; - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_name = NULL; - msg.msg_namelen = 0; - msg.msg_controllen = CMSG_LEN(sizeof(int)); - msg.msg_control = cmsg_buf; - - length = bsd_recvmsg(us_poll_fd(&s->p), &msg, recv_flags); - - // Extract file descriptor if present - if (length > 0 && msg.msg_controllen > 0) { - struct cmsghdr *cmsg_ptr = CMSG_FIRSTHDR(&msg); - if (cmsg_ptr && cmsg_ptr->cmsg_level == SOL_SOCKET && cmsg_ptr->cmsg_type == SCM_RIGHTS) { - int fd = *(int *)CMSG_DATA(cmsg_ptr); - s = us_dispatch_fd(s, fd); - if (!s || us_socket_is_closed(s)) { - break; - } - } - } - }else{ - #endif - length = bsd_recv(us_poll_fd(&s->p), loop->data.recv_buf + LIBUS_RECV_BUFFER_PADDING, LIBUS_RECV_BUFFER_LENGTH, recv_flags); - #if !defined(_WIN32) - } - #endif - - if (length > 0) { - s = s->ssl ? us_internal_ssl_on_data(s, loop->data.recv_buf + LIBUS_RECV_BUFFER_PADDING, length) - : us_dispatch_data(s, loop->data.recv_buf + LIBUS_RECV_BUFFER_PADDING, length); - /* After socket adoption, track the new socket; the old one becomes invalid */ - if(s && s->flags.adopted && s->prev) { - s = s->prev; - } - // loop->num_ready_polls isn't accessible on Windows. - #ifndef WIN32 - // rare case: we're reading a lot of data, there's more to be read, and either: - // - the socket has hung up, so we will never get more data from it (only applies to macOS, as macOS will send the event the same tick but Linux will not.) - // - the event loop isn't very busy, so we can read multiple times in a row - #define LOOP_ISNT_VERY_BUSY_THRESHOLD 25 - /* Stop if on_data paused us (us_socket_pause from the data - * handler, e.g. fetch() receive backpressure or - * net.Socket#pause) — keep honoring the pause instead of - * pulling bytes the caller asked to defer. */ - if ( - s && length >= (LIBUS_RECV_BUFFER_LENGTH - 24 * 1024) && length <= LIBUS_RECV_BUFFER_LENGTH && - (error || loop->num_ready_polls < LOOP_ISNT_VERY_BUSY_THRESHOLD) && - !us_socket_is_closed(s) && !s->flags.is_paused - ) { - repeat_recv_count += error == 0; - - // When not hung up, read a maximum of 10 times to avoid starving other sockets - // We don't bother with ioctl(FIONREAD) because we've set MSG_DONTWAIT - if (!(repeat_recv_count > 10 && loop->num_ready_polls > 2)) { - continue; - } - } - #undef LOOP_ISNT_VERY_BUSY_THRESHOLD - #else - /* Windows AFD_POLL_ABORT is not level-triggered the way - * epoll's EPOLLHUP|EPOLLERR are: a peer RST that lands - * while this poll_cb is on the stack — typically when an - * on_data JS handler drainMicrotasks() into a same-process - * fetch().abort() so the http-client thread RSTs over - * loopback before we return — falls between the completed - * AFD ioctl and its re-submission, and the next AFD poll - * never reports it. recv() does: the socket is already in - * a reset state, so a single non-blocking probe yields - * WSAECONNRESET (→ close below) or 0 (→ eof) instead of - * relying on the re-armed poll. The common case is - * WSAEWOULDBLOCK → break, costing one extra syscall per - * readable event. Skip if on_data paused/closed us so we - * don't pull bytes the caller asked to defer. */ - if (s && !us_socket_is_closed(s) && !s->flags.is_paused && repeat_recv_count++ == 0) { - continue; - } - #endif - } else if (!length) { - eof = 1; // lets handle EOF in the same place - break; - } else if (length == LIBUS_SOCKET_ERROR && !bsd_would_block()) { - /* Peer-initiated TCP error (RST etc.) — go straight to - * raw-close. us_socket_close() would route through - * us_internal_ssl_close() now that s->ssl is the - * discriminator, and that path fires - * on_handshake(ECONNRESET) for HANDSHAKE_PENDING — fine - * for app-initiated close, wrong here: a Happy-Eyeballs - * loser leg RSTing a server's accepted socket would - * surface as `tlsClientError` → uncaught in node:http2. - * main called us_socket_close(ssl=0, …) at every loop - * close site for exactly this reason. */ - s = us_internal_socket_close_raw(s, LIBUS_ERR, NULL); - return; - } - - break; - } while (s); - } - - if(eof && s) { - if (UNLIKELY(us_socket_is_closed(s))) { - // Do not call on_end after the socket has been closed - return; - } - if (us_socket_is_shut_down(s)) { - /* We got FIN back after sending it */ - s = us_internal_socket_close_raw(s, LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN, NULL); - return; - } - if(s->flags.allow_half_open) { - /* EOF with half-open allowed: stop polling readable but KEEP - * polling writable. Masking with the current events dropped - * writable when the EOF landed before the poll had been - * switched to writable for a just-queued write (an end() - * issued in the same tick as connect): the queued bytes - * never flushed, their drain callback never fired, and the - * stream's 'finish' never happened - the FIN-terminated - * http response tests hung on every Linux target. The - * writable dispatch disables writable polling again once - * the buffer is drained, so this does not busy-poll. */ - us_poll_change(&s->p, loop, LIBUS_SOCKET_WRITABLE); - s = s->ssl ? us_internal_ssl_on_end(s) : us_dispatch_end(s); - } else { - /* We dont allow half open just emit end and close the socket */ - s = s->ssl ? us_internal_ssl_on_end(s) : us_dispatch_end(s); - s = us_internal_socket_close_raw(s, LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN, NULL); - return; - } - } - /* Such as epollerr or EV_ERROR */ - if (error && s) { - /* Peer-initiated error event — same rationale as the recv-error - * branch above: bypass us_internal_ssl_close so on_handshake - * isn't fired for a passive close. The poll flag only says THAT - * the socket failed; fetch the real errno (like the connect-error - * path) so the close code is ECONNRESET and not a poll bit that - * callers would either misread as an errno or drop entirely. - * Values 0..2 collide with the libus CloseCode enum that JS - * filters out as self-initiated; SO_ERROR can't be EPERM/ENOENT - * for an established TCP socket, so clamp them defensively. */ - int socket_error = us_socket_get_error(s); - s = us_internal_socket_close_raw(s, socket_error > 2 ? socket_error : ECONNRESET, NULL); - return; - } - break; - } - case POLL_TYPE_UDP: { - struct us_udp_socket_t *u = (struct us_udp_socket_t *) p; - if (u->closed) { - break; - } - -#if defined(__linux__) - /* On Linux with IP_RECVERR, EPOLLERR fires when an ICMP error - * (port unreachable, host unreachable, TTL exceeded, ...) is - * queued on the socket's error queue. For an *unconnected* UDP - * socket regular recvmmsg does NOT dequeue these — only - * recvmsg(MSG_ERRQUEUE) does — so EPOLLERR stays level-triggered - * until we drain it explicitly. Do that here, surfacing each - * errno via on_recv_error; the socket stays open. On other - * platforms (kqueue EV_ERROR, Windows) an error event is fatal — - * preserve close-on-error there. */ - int recv_error_surfaced = 0; - int recv_would_block_only = 0; - if (error) { - struct msghdr eh; char ectrl[512]; char ebuf[1]; - struct iovec eiov = { ebuf, sizeof(ebuf) }; - while (!u->closed) { - memset(&eh, 0, sizeof(eh)); - eh.msg_iov = &eiov; eh.msg_iovlen = 1; - eh.msg_control = ectrl; eh.msg_controllen = sizeof(ectrl); - if (recvmsg(us_poll_fd(p), &eh, MSG_ERRQUEUE) < 0) break; - recv_error_surfaced = 1; - if (u->on_recv_error) { - /* The queued ICMP error is in sock_extended_err, - * not errno. */ - int ee = 0; - for (struct cmsghdr *cm = CMSG_FIRSTHDR(&eh); cm; cm = CMSG_NXTHDR(&eh, cm)) { - if ((cm->cmsg_level == IPPROTO_IP && cm->cmsg_type == IP_RECVERR) || - (cm->cmsg_level == IPPROTO_IPV6 && cm->cmsg_type == IPV6_RECVERR)) { - ee = ((struct sock_extended_err *) CMSG_DATA(cm))->ee_errno; - break; - } - } - u->on_recv_error(u, ee ? ee : ECONNREFUSED); - } - } - } -#endif - - if ((events & LIBUS_SOCKET_READABLE) && !u->closed) { - - do { - struct udp_recvbuf recvbuf; - bsd_udp_setup_recvbuf(&recvbuf, u->loop->data.recv_buf, LIBUS_RECV_BUFFER_LENGTH); - int npackets = bsd_recvmmsg(us_poll_fd(p), &recvbuf, MSG_DONTWAIT); - if (npackets > 0) { - u->on_data(u, &recvbuf, npackets); - } else { - if (npackets == LIBUS_SOCKET_ERROR) { - if (!bsd_would_block()) { -#if defined(__linux__) - int recv_err = errno; - recv_error_surfaced = 1; - if (u->on_recv_error) { - u->on_recv_error(u, recv_err); - } -#else - /* non-Linux: fall through and close below */ - error = 1; -#endif - } -#if defined(__linux__) - else { - recv_would_block_only = 1; - } -#endif - } else { - // 0 messages received, we are done - // this case can happen if either: - // - the total number of messages pending was not divisible by 8 - // - recvmsg() was used instead of recvmmsg() and there was no message to read. - } - - break; - } - } while (!u->closed); - } - - if (events & LIBUS_SOCKET_WRITABLE && !u->closed) { - /* Clear WRITABLE before on_drain so a callback that re-arms it - * (e.g. QUIC packets_out hitting EAGAIN) keeps the re-arm. We - * still default to one-shot drain semantics for callers that - * don't touch the poll mask. Not gated on !error: a queued - * ICMP error must not leave WRITABLE armed (level-triggered - * EPOLLOUT + EPOLLERR would spin the loop). */ - us_poll_change(&u->p, u->loop, us_poll_events(&u->p) & LIBUS_SOCKET_READABLE); - u->on_drain(u); - if (u->closed) { - break; - } - } - -#if defined(__linux__) - /* Only close on EPOLLERR if we didn't surface the real errno - * via recvmmsg + on_recv_error above AND recv wasn't just - * EAGAIN (which means the error queue is already drained, - * leaving a residual EPOLLERR). Otherwise the socket stays - * open so the user can keep sending/receiving after a - * transient ICMP error. */ - if (error && !recv_error_surfaced && !recv_would_block_only && !u->closed) { - us_udp_socket_close(u); - } -#else - if (error && !u->closed) { - us_udp_socket_close(u); - } -#endif - break; - } - } -} - -/* Integration only requires the timer to be set up, but not automatically enabled */ -void us_loop_integrate(struct us_loop_t *loop) { - /* Timer is now controlled dynamically by socket count, not enabled automatically */ -} - -__attribute__((always_inline)) void *us_loop_ext(struct us_loop_t *loop) { - return loop + 1; -} - -#undef us_ioctl diff --git a/packages/bun-usockets/src/quic.c b/packages/bun-usockets/src/quic.c index 1fac56a72dc1..ee16b8d9827f 100644 --- a/packages/bun-usockets/src/quic.c +++ b/packages/bun-usockets/src/quic.c @@ -1,6 +1,6 @@ #include "quic.h" -#include "internal/internal.h" +#include "libusockets_cabi.h" #if defined(_WIN32) && !defined(WIN32) /* lsquic.h gates on WIN32 (not _WIN32) to pick over . */ #define WIN32 1 @@ -149,7 +149,7 @@ static void us_quic_on_timer(struct us_timer_t *t) { void us_quic_loop_process(struct us_loop_t *loop) { int min_diff = 0, have_tick = 0; - for (us_quic_socket_context_t *ctx = loop->data.quic_head; ctx; ctx = ctx->next) { + for (us_quic_socket_context_t *ctx = us_internal_loop_quic_head(loop); ctx; ctx = ctx->next) { if (ctx->processing || !ctx->engine) continue; ctx->processing = 1; ctx->pending_write_bytes = 0; @@ -165,13 +165,16 @@ void us_quic_loop_process(struct us_loop_t *loop) { * getTimeout() in src/runtime/timer/mod.rs folds this into the epoll_pwait2 timeout — * no timerfd. On libuv there's no equivalent hook into the poll * timeout, so arm a fallthrough uv_timer instead. */ - loop->data.quic_next_tick_us = have_tick ? (min_diff < 0 ? 0 : min_diff) : -1; + us_internal_loop_quic_next_tick_set(loop, have_tick ? (min_diff < 0 ? 0 : min_diff) : -1); #ifdef LIBUS_USE_LIBUV if (have_tick) { - if (!loop->data.quic_timer) - loop->data.quic_timer = us_create_timer(loop, 1, 0); + struct us_timer_t *timer = us_internal_loop_quic_timer(loop); + if (!timer) { + timer = us_create_timer(loop, 1, 0); + us_internal_loop_quic_timer_set(loop, timer); + } int ms = min_diff <= 0 ? 1 : (min_diff + 999) / 1000; - us_timer_set(loop->data.quic_timer, us_quic_on_timer, ms, 0); + us_timer_set(timer, us_quic_on_timer, ms, 0); } #endif } @@ -180,7 +183,7 @@ void us_quic_loop_process(struct us_loop_t *loop) { * stream wrote since the last process_conns; the common case is one * pointer walk and return. */ void us_quic_loop_flush_if_pending(struct us_loop_t *loop) { - for (us_quic_socket_context_t *ctx = loop->data.quic_head; ctx; ctx = ctx->next) { + for (us_quic_socket_context_t *ctx = us_internal_loop_quic_head(loop); ctx; ctx = ctx->next) { if (ctx->pending_write_bytes && !ctx->processing) { us_quic_loop_process(loop); return; @@ -257,7 +260,7 @@ static int us_quic_packets_out(void *out_ctx, const struct lsquic_out_spec *spec while (sent < n) { us_quic_listen_socket_t *ls = (us_quic_listen_socket_t *) specs[sent].peer_ctx; if (!ls->udp) { errno = EBADF; break; } - int fd = us_poll_fd((struct us_poll_t *) ls->udp); + int fd = us_poll_fd(us_udp_socket_poll(ls->udp)); unsigned k = 0; while (k < BATCH && sent + k < n && specs[sent + k].peer_ctx == (void *) ls) { const struct lsquic_out_spec *sp = &specs[sent + k]; @@ -285,7 +288,7 @@ static int us_quic_packets_out(void *out_ctx, const struct lsquic_out_spec *spec for (; sent < n; sent++) { us_quic_listen_socket_t *ls = (us_quic_listen_socket_t *) specs[sent].peer_ctx; if (!ls->udp) { errno = EBADF; break; } - if (us_quic_send_one(us_poll_fd((struct us_poll_t *) ls->udp), &specs[sent]) < 0) break; + if (us_quic_send_one(us_poll_fd(us_udp_socket_poll(ls->udp)), &specs[sent]) < 0) break; } #endif @@ -301,7 +304,7 @@ static int us_quic_packets_out(void *out_ctx, const struct lsquic_out_spec *spec if (errno != EAGAIN && errno != EWOULDBLOCK) errno = EAGAIN; us_quic_listen_socket_t *ls = (us_quic_listen_socket_t *) specs[sent].peer_ctx; if (ls->udp) { - us_poll_change((struct us_poll_t *) ls->udp, ls->ctx->loop, + us_poll_change(us_udp_socket_poll(ls->udp), ls->ctx->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); } } @@ -492,7 +495,7 @@ static lsquic_conn_ctx_t *us_quic_on_new_conn(void *if_ctx, lsquic_conn_t *conn) * the listen socket's uv_poll_t already keeps the loop alive until * conn_count drops to 0 and we close it. */ #ifndef LIBUS_USE_LIBUV - ctx->loop->num_polls++; + us_loop_poll_count_add(ctx->loop, 1); #endif ctx->conn_count++; qs->next = ctx->conns; @@ -513,7 +516,7 @@ static void us_quic_on_conn_closed(lsquic_conn_t *conn) { free(qs->hostname); free(qs); #ifndef LIBUS_USE_LIBUV - ctx->loop->num_polls--; + us_loop_poll_count_add(ctx->loop, -1); #endif ctx->conn_count--; /* During graceful drain the UDP fd is the only thing left holding the @@ -719,8 +722,8 @@ us_quic_socket_context_t *us_create_quic_socket_context( return NULL; } - ctx->next = loop->data.quic_head; - loop->data.quic_head = ctx; + ctx->next = us_internal_loop_quic_head(loop); + us_internal_loop_quic_head_set(loop, ctx); return ctx; } @@ -764,10 +767,15 @@ void us_quic_socket_context_free(us_quic_socket_context_t *ctx) { if (!ctx) return; ctx->closing = 1; struct us_loop_t *loop = ctx->loop; - for (us_quic_socket_context_t **pp = &loop->data.quic_head; *pp; pp = &(*pp)->next) { - if (*pp == ctx) { *pp = ctx->next; break; } + us_quic_socket_context_t *head = us_internal_loop_quic_head(loop); + if (head == ctx) { + us_internal_loop_quic_head_set(loop, ctx->next); + } else { + for (us_quic_socket_context_t *prev = head; prev; prev = prev->next) { + if (prev->next == ctx) { prev->next = ctx->next; break; } + } } - if (!loop->data.quic_head) loop->data.quic_next_tick_us = -1; + if (!us_internal_loop_quic_head(loop)) us_internal_loop_quic_next_tick_set(loop, -1); /* Close any UDP fds the caller never closed (graceful drain leaves them * open); on_close moves each into closed_listeners for the loop below. */ while (ctx->listeners) us_udp_socket_close(ctx->listeners->udp); @@ -795,7 +803,7 @@ struct us_loop_t *us_quic_socket_context_loop(us_quic_socket_context_t *ctx) { r * v6 since the dual-stack client socket carries v4-mapped traffic. Mirrors * lsquic's reference setup in bin/test_common.c. */ static void us_quic_set_dontfrag(struct us_udp_socket_t *udp) { - LIBUS_SOCKET_DESCRIPTOR fd = us_poll_fd((struct us_poll_t *) udp); + LIBUS_SOCKET_DESCRIPTOR fd = us_poll_fd(us_udp_socket_poll(udp)); int on; /* Test _WIN32 first: ws2ipdef.h defines IP_MTU_DISCOVER/IP_PMTUDISC_PROBE * so the Linux arm would otherwise be selected, but on Windows that option @@ -842,7 +850,7 @@ us_quic_listen_socket_t *us_quic_socket_context_listen( /* Record actual bound address — packet_in needs sa_local. */ socklen_t sl = sizeof(ls->local); - getsockname(us_poll_fd((struct us_poll_t *) ls->udp), (struct sockaddr *) &ls->local, &sl); + getsockname(us_poll_fd(us_udp_socket_poll(ls->udp)), (struct sockaddr *) &ls->local, &sl); ls->next = ctx->listeners; ctx->listeners = ls; @@ -1167,8 +1175,8 @@ us_quic_socket_context_t *us_create_quic_client_context( return NULL; } - ctx->next = loop->data.quic_head; - loop->data.quic_head = ctx; + ctx->next = us_internal_loop_quic_head(loop); + us_internal_loop_quic_head_set(loop, ctx); return ctx; } @@ -1214,7 +1222,7 @@ static us_quic_listen_socket_t *us_quic_client_endpoint(us_quic_socket_context_t if (!ls->udp) { free(ls); return NULL; } us_quic_set_dontfrag(ls->udp); socklen_t sl = sizeof(ls->local); - getsockname(us_poll_fd((struct us_poll_t *) ls->udp), (struct sockaddr *) &ls->local, &sl); + getsockname(us_poll_fd(us_udp_socket_poll(ls->udp)), (struct sockaddr *) &ls->local, &sl); ls->next = ctx->listeners; ctx->listeners = ls; ctx->client_udp = ls; diff --git a/packages/bun-usockets/src/socket.c b/packages/bun-usockets/src/socket.c deleted file mode 100644 index 4cea04d92611..000000000000 --- a/packages/bun-usockets/src/socket.c +++ /dev/null @@ -1,769 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2021. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// clang-format off - -#include "libusockets.h" -#include "internal/internal.h" -#include -#include -#include -#include -#ifndef WIN32 -#include -#endif - -int us_socket_local_port(struct us_socket_t *s) { - struct bsd_addr_t addr; - if (bsd_local_addr(us_poll_fd(&s->p), &addr)) { - return -1; - } else { - return bsd_addr_get_port(&addr); - } -} - -int us_socket_remote_port(struct us_socket_t *s) { - struct bsd_addr_t addr; - if (bsd_remote_addr(us_poll_fd(&s->p), &addr)) { - return -1; - } else { - return bsd_addr_get_port(&addr); - } -} - -void us_socket_shutdown_read(struct us_socket_t *s) { - /* This syscall is idempotent so no extra check is needed */ - bsd_shutdown_socket_read(us_poll_fd((struct us_poll_t *) s)); -} - -void us_connecting_socket_shutdown_read(struct us_connecting_socket_t *c) { - c->shutdown_read = 1; -} - -void us_socket_remote_address(struct us_socket_t *s, char *buf, int *length) { - struct bsd_addr_t addr; - if (bsd_remote_addr(us_poll_fd(&s->p), &addr) || *length < bsd_addr_get_ip_length(&addr)) { - *length = 0; - } else { - *length = bsd_addr_get_ip_length(&addr); - memcpy(buf, bsd_addr_get_ip(&addr), *length); - } -} - -void us_socket_local_address(struct us_socket_t *s, char *buf, int *length) { - struct bsd_addr_t addr; - if (bsd_local_addr(us_poll_fd(&s->p), &addr) || *length < bsd_addr_get_ip_length(&addr)) { - *length = 0; - } else { - *length = bsd_addr_get_ip_length(&addr); - memcpy(buf, bsd_addr_get_ip(&addr), *length); - } -} - -__attribute__((always_inline)) struct us_socket_group_t *us_socket_group(struct us_socket_t *s) { - return s->group; -} - -__attribute__((always_inline)) unsigned char us_socket_kind(struct us_socket_t *s) { - return s->kind; -} - -void us_socket_set_kind(struct us_socket_t *s, unsigned char kind) { - s->kind = kind; -} - -void us_socket_set_ssl_raw_tap(struct us_socket_t *s, int enabled) { - s->ssl_raw_tap = !!enabled; -} - -__attribute__((always_inline)) int us_socket_is_tls(struct us_socket_t *s) { - return s->ssl != NULL; -} - -struct us_socket_group_t *us_connecting_socket_group(struct us_connecting_socket_t *c) { - return c->group; -} - -unsigned char us_connecting_socket_kind(struct us_connecting_socket_t *c) { - return c->kind; -} - -__attribute__((always_inline)) void us_socket_timeout(struct us_socket_t *s, unsigned int seconds) { - if (seconds) { - s->timeout = ((unsigned int)s->group->timestamp + ((seconds + 3) >> 2)) % 240; - } else { - s->timeout = 255; - } -} - -void us_connecting_socket_timeout(struct us_connecting_socket_t *c, unsigned int seconds) { - if (seconds) { - c->timeout = ((unsigned int)c->group->timestamp + ((seconds + 3) >> 2)) % 240; - } else { - c->timeout = 255; - } -} - -__attribute__((always_inline)) void us_socket_long_timeout(struct us_socket_t *s, unsigned int minutes) { - if (minutes) { - s->long_timeout = ((unsigned int)s->group->long_timestamp + minutes) % 240; - } else { - s->long_timeout = 255; - } -} - -void us_connecting_socket_long_timeout(struct us_connecting_socket_t *c, unsigned int minutes) { - if (minutes) { - c->long_timeout = ((unsigned int)c->group->long_timestamp + minutes) % 240; - } else { - c->long_timeout = 255; - } -} - -__attribute__((always_inline)) void us_socket_flush(struct us_socket_t *s) { - if (!us_socket_is_shut_down(s)) { - bsd_socket_flush(us_poll_fd((struct us_poll_t *) s)); - } -} - -__attribute__((always_inline)) int us_socket_is_closed(struct us_socket_t *s) { - return s->flags.is_closed; -} - -int us_socket_is_ssl_handshake_finished(struct us_socket_t *s) { - if (s->ssl) { - return us_internal_ssl_is_handshake_finished(s); - } - return 1; -} - -int us_socket_ssl_handshake_callback_has_fired(struct us_socket_t *s) { - if (s->ssl) { - return us_internal_ssl_handshake_callback_has_fired(s); - } - return 1; -} - -int us_connecting_socket_is_closed(struct us_connecting_socket_t *c) { - return c->closed; -} - -__attribute__((always_inline)) int us_socket_is_established(struct us_socket_t *s) { - /* Everything that is not POLL_TYPE_SEMI_SOCKET is established */ - return us_internal_poll_type((struct us_poll_t *) s) != POLL_TYPE_SEMI_SOCKET; -} - -/* Detach c from its group + drop the borrowed SSL_CTX ref, but leave c - * allocated. After this, c->group is NULL and the embedding owner may safely - * deinit; the only remaining link is into a loop-owned list. */ -static void us_internal_connecting_socket_detach(struct us_connecting_socket_t *c, struct us_loop_t *loop) { - if (c->group) { - us_internal_socket_group_unlink_connecting_socket(c->group, c); - c->group = NULL; - } - if (c->ssl_ctx) { - us_internal_ssl_ctx_unref(c->ssl_ctx); - c->ssl_ctx = NULL; - } - (void)loop; -} - -void us_connecting_socket_free(struct us_connecting_socket_t *c) { - // we can't just free c immediately, as it may be enqueued in the dns_ready_head list - // instead, we move it to a close list and free it after the iteration - us_internal_connecting_socket_detach(c, c->loop); - c->next = c->loop->data.closed_connecting_head; - c->loop->data.closed_connecting_head = c; -} - -void us_connecting_socket_close(struct us_connecting_socket_t *c) { - if (c->closed) return; - c->closed = 1; - for (struct us_socket_t *s = c->connecting_head; s; s = s->connect_next) { - us_internal_socket_group_unlink_socket(s->group, s); - - us_poll_stop((struct us_poll_t *) s, s->group->loop); - bsd_close_socket(us_poll_fd((struct us_poll_t *) s)); - - /* Link this socket to the close-list and let it be deleted after this iteration */ - s->next = s->group->loop->data.closed_head; - s->group->loop->data.closed_head = s; - - /* Mark the socket as closed */ - s->flags.is_closed = 1; - } - if (!c->error) { - // if we have no error, we have to set that we were aborted aka we called close - c->error = ECONNABORTED; - } - struct us_socket_group_t *group = c->group; - - if (c->pending_resolve_callback) { - // The DNS callback has not been drained. Try to remove c from the - // request's notify list so it never fires. Returns 0 if the result is - // already set (the callback has fired or is about to), in which case - // after_resolve will see c->closed and finish teardown. - if (c->addrinfo_req && Bun__addrinfo_cancel(c->addrinfo_req, c)) { -#ifdef _WIN32 - group->loop->uv_loop->active_handles--; -#else - group->loop->num_polls--; -#endif - c->pending_resolve_callback = 0; - Bun__addrinfo_freeRequest(c->addrinfo_req, 0); - c->addrinfo_req = 0; - us_dispatch_connecting_error(c, c->error); - us_connecting_socket_free(c); - } else { - /* Can't cancel — the resolve callback is already queued. Detach - * from the group NOW so the owner can deinit; after_resolve will - * see c->closed and only push c to the loop's closed list without - * touching the (possibly freed) group. Balance the keep-alive here - * for the same reason. */ -#ifdef _WIN32 - group->loop->uv_loop->active_handles--; -#else - group->loop->num_polls--; -#endif - us_dispatch_connecting_error(c, c->error); - us_internal_connecting_socket_detach(c, group->loop); - } - return; - } - - if (c->addrinfo_req) { - /* Invalidate the cache entry for a refused connect (addresses may be - * stale) and for a resolver failure (never cache a negative result). */ - Bun__addrinfo_freeRequest(c->addrinfo_req, c->error == ECONNREFUSED || c->error_is_dns); - c->addrinfo_req = 0; - } - us_dispatch_connecting_error(c, c->error); - us_connecting_socket_free(c); -} - -/* Tear the fd down + dispatch on_close. Bypasses the SSL layer entirely — - * the public us_socket_close() routes through us_internal_ssl_close() first - * so a client-initiated close sends close_notify and (with code==0) waits for - * the peer's, instead of slamming the fd shut and racing the peer's - * handshake/secureConnection event. openssl.c re-enters here once that - * graceful path is done. */ -struct us_socket_t *us_internal_socket_close_raw(struct us_socket_t *s, int code, void *reason) { - if (s->ssl && s->ssl_in_use) { - /* A JS callback running from inside SSL_do_handshake/SSL_read (ALPN, SNI, - * keylog, ...) destroyed this socket. Closing now frees the SSL and - * releases context state BoringSSL is still reading on the stack; defer - * the close to the SSL driver's epilogue instead, preserving the close - * code so a requested reset still resets. */ - s->ssl_pending_detach = 1; - s->ssl_pending_close_code = (unsigned char) code; - return s; - } - if (!us_socket_is_closed(s)) { - struct us_loop_t *loop = s->group->loop; - - if (s->flags.low_prio_state == 1) { - /* Unlink this socket from the low-priority queue */ - if (!s->prev) loop->data.low_prio_head = s->next; - else s->prev->next = s->next; - - if (s->next) s->next->prev = s->prev; - - s->prev = 0; - s->next = 0; - s->flags.low_prio_state = 0; - s->group->low_prio_count--; - /* Mirror the else branch: if this was the last thing keeping the - * group linked, drop it from the loop now rather than waiting for - * the next link/unlink to notice. */ - us_internal_group_maybe_unlink(s->group); - } else { - us_internal_socket_group_unlink_socket(s->group, s); - } - #ifdef LIBUS_USE_KQUEUE - // kqueue automatically removes the fd from the set on close - // we can skip the system call for that case - us_internal_loop_update_pending_ready_polls(loop, (struct us_poll_t *)s, 0, us_poll_events((struct us_poll_t*)s), 0); - #else - /* Disable any instance of us in the pending ready poll list */ - us_poll_stop((struct us_poll_t *) s, loop); - #endif - - if (code == LIBUS_SOCKET_CLOSE_CODE_CONNECTION_RESET) { - // Prevent entering TIME_WAIT state when forcefully closing - struct linger l = { 1, 0 }; - setsockopt(us_poll_fd((struct us_poll_t *)s), SOL_SOCKET, SO_LINGER, (const char*)&l, sizeof(l)); - } - - bsd_close_socket(us_poll_fd((struct us_poll_t *) s)); - - /* Mark the socket as closed */ - s->flags.is_closed = 1; - - /* call the callback */ - struct us_socket_t *res = s; - if (!(us_internal_poll_type(&s->p) & POLL_TYPE_SEMI_SOCKET)) { - res = s->ssl ? us_internal_ssl_on_close(s, code, reason) - : us_dispatch_close(s, code, reason); - } - /* SEMI_SOCKET: never-opened connect — owner is notified via - * on_connect_error from the connect path (after_open / close_all), - * not here. Dispatching here would double-fire on the natural path - * (after_open → handler.close → close_raw). */ - - us_internal_ssl_detach(s); - - /* Link this socket to the close-list and let it be deleted after this iteration */ - s->next = loop->data.closed_head; - loop->data.closed_head = s; - - /* preserve the return value from on_close if its called */ - return res; - } - - return s; -} - -__attribute__((always_inline)) struct us_socket_t *us_socket_close(struct us_socket_t *s, int code, void *reason) { - if (s->ssl && !us_socket_is_closed(s)) { - return us_internal_ssl_close(s, code, reason); - } - return us_internal_socket_close_raw(s, code, reason); -} - -// This function is the same as us_socket_close but: -// - does not emit on_close event -// - does not close -struct us_socket_t *us_socket_detach(struct us_socket_t *s) { - if (!us_socket_is_closed(s)) { - struct us_loop_t *loop = s->group->loop; - - if (s->flags.low_prio_state == 1) { - /* Unlink this socket from the low-priority queue */ - if (!s->prev) loop->data.low_prio_head = s->next; - else s->prev->next = s->next; - - if (s->next) s->next->prev = s->prev; - - s->prev = 0; - s->next = 0; - s->flags.low_prio_state = 0; - s->group->low_prio_count--; - /* Mirror the else branch: if this was the last thing keeping the - * group linked, drop it from the loop now rather than waiting for - * the next link/unlink to notice. */ - us_internal_group_maybe_unlink(s->group); - } else { - us_internal_socket_group_unlink_socket(s->group, s); - } - us_poll_stop((struct us_poll_t *) s, loop); - - us_internal_ssl_detach(s); - - /* Link this socket to the close-list and let it be deleted after this iteration */ - s->next = loop->data.closed_head; - loop->data.closed_head = s; - - /* Mark the socket as closed */ - s->flags.is_closed = 1; - - return s; - } - return s; -} - -struct us_socket_t *us_socket_pair(struct us_socket_group_t *group, unsigned char kind, int socket_ext_size, LIBUS_SOCKET_DESCRIPTOR *fds) { -#if defined(LIBUS_USE_LIBUV) || defined(WIN32) - return 0; -#else - if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0) { - return 0; - } - - return us_socket_from_fd(group, kind, NULL, socket_ext_size, fds[0], 0); -#endif -} - -int us_socket_write2(struct us_socket_t *s, const char *header, int header_length, const char *payload, int payload_length) { - if (us_socket_is_closed(s) || us_socket_is_shut_down(s)) { - return 0; - } - - int written = bsd_write2(us_poll_fd(&s->p), header, header_length, payload, payload_length); - if (written != header_length + payload_length) { - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - - return written < 0 ? 0 : written; -} - -struct us_socket_t *us_socket_from_fd(struct us_socket_group_t *group, unsigned char kind, struct ssl_ctx_st *ssl_ctx, int socket_ext_size, LIBUS_SOCKET_DESCRIPTOR fd, int ipc) { -#if defined(LIBUS_USE_LIBUV) || defined(WIN32) - return 0; -#else - struct us_poll_t *p1 = us_create_poll(group->loop, 0, sizeof(struct us_socket_t) + socket_ext_size); - us_poll_init(p1, fd, POLL_TYPE_SOCKET); - int rc = us_poll_start_rc(p1, group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - if (rc != 0) { - us_poll_free(p1, group->loop); - return 0; - } - - struct us_socket_t *s = (struct us_socket_t *) p1; - s->group = group; - s->kind = kind; - s->ssl = NULL; - s->timeout = 255; - s->long_timeout = 255; - s->flags.low_prio_state = 0; - s->flags.allow_half_open = 0; - s->flags.is_paused = 0; - s->flags.is_ipc = ipc; - s->flags.is_closed = 0; - s->flags.adopted = 0; - s->connect_state = NULL; - - /* We always use nodelay */ - bsd_socket_nodelay(fd, 1); - apple_no_sigpipe(fd); - bsd_set_nonblocking(fd); - us_internal_socket_group_link_socket(group, s); - - /* Bun.connect({fd, tls}) hands us an already-connected fd that should - * speak TLS from the first byte (no STARTTLS). Mirror connect_resolved_dns - * — attach SSL here so the caller's onOpen()/startTLSHandshake() see - * s->ssl set. The IPC path passes ssl_ctx == NULL. */ - if (ssl_ctx) { - us_internal_ssl_attach(s, ssl_ctx, 1, NULL, NULL); - } - - return s; -#endif -} - -void *us_socket_get_native_handle(struct us_socket_t *s) { - if (s->ssl) { - return us_internal_ssl_get_native_handle(s); - } - return (void *) (uintptr_t) us_poll_fd((struct us_poll_t *) s); -} - -void *us_connecting_socket_get_native_handle(struct us_connecting_socket_t *c) { - return (void *) (uintptr_t) -1; -} - -int us_socket_write(struct us_socket_t *s, const char *data, int length) { - if (s->ssl) { - return us_internal_ssl_write(s, data, length); - } - if (us_socket_is_closed(s) || us_socket_is_shut_down(s)) { - return 0; - } - - int written = bsd_send(us_poll_fd(&s->p), data, length); - if (written != length) { - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - - return written < 0 ? 0 : written; -} - -int us_socket_write_check_error(struct us_socket_t *s, const char *data, int length, int *fatal_write_error) { - if (fatal_write_error) *fatal_write_error = 0; - if (us_socket_is_closed(s) || us_socket_is_shut_down(s)) { - return 0; - } - if (s->ssl) { - /* TLS writes have their own error propagation; keep the existing path. */ - return us_socket_write(s, data, length); - } - - int written = bsd_send(us_poll_fd(&s->p), data, length); - if (written < 0) { - /* bsd_send already retries EINTR; bsd_would_block() reads errno on - * POSIX and WSAGetLastError() on Windows. ENOBUFS/ENOMEM are - * transient kernel resource exhaustion on a healthy connection - - * classifying them as fatal made the node:net drain path drop the - * buffered bytes on a socket that kept flowing. */ - if (bsd_would_block() || bsd_send_is_transient_error()) { - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - return 0; - } - /* Fatal send error (EPIPE/ECONNRESET after the peer vanished): report - * it to callers that opt in instead of masking it as would-block, and - * do not keep polling writable - retrying can never succeed. */ - if (fatal_write_error) *fatal_write_error = 1; - return 0; - } - if (written != length) { - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - return written; -} - -int us_socket_raw_writev(struct us_socket_t *s, const struct us_iovec_t *iov, int count) { - if (us_socket_is_closed(s) || - us_internal_poll_type(&s->p) == POLL_TYPE_SOCKET_SHUT_DOWN) { - return 0; - } - - size_t total = 0; - for (int i = 0; i < count; i++) total += iov[i].iov_len; - - ssize_t written = bsd_writev(us_poll_fd(&s->p), iov, count); - if (written != (ssize_t)total) { - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - - return written < 0 ? 0 : (int)written; -} - -int us_socket_raw_write(struct us_socket_t *s, const char *data, int length) { - /* Bypass-TLS path: openssl.c uses this to flush close_notify *after* - * SSL_shutdown() has marked the SSL layer shut down, so checking - * us_socket_is_shut_down() here would deadlock the alert in userspace. - * Gate only on fd close and TCP-level FIN. */ - if (us_socket_is_closed(s) || - us_internal_poll_type(&s->p) == POLL_TYPE_SOCKET_SHUT_DOWN) { - return 0; - } - - int written = bsd_send(us_poll_fd(&s->p), data, length); - if (written != length) { - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - - return written < 0 ? 0 : written; -} - -#if !defined(_WIN32) -/* Send a message with data and an attached file descriptor, for use in IPC. Returns the number of bytes written. If that - number is less than the length, the file descriptor was not sent. */ -int us_socket_ipc_write_fd(struct us_socket_t *s, const char *data, int length, int fd) { - if (us_socket_is_closed(s) || us_socket_is_shut_down(s)) { - return 0; - } - - struct msghdr msg = {0}; - struct iovec iov = {0}; - char cmsgbuf[CMSG_SPACE(sizeof(int))]; - - iov.iov_base = (void *) data; - iov.iov_len = length; - - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = cmsgbuf; - msg.msg_controllen = CMSG_SPACE(sizeof(int)); - - struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - cmsg->cmsg_len = CMSG_LEN(sizeof(int)); - - *(int *) CMSG_DATA(cmsg) = fd; - - int sent = bsd_sendmsg(us_poll_fd(&s->p), &msg, 0); - - if (sent != length) { - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - - return sent < 0 ? 0 : sent; -} -#endif - -__attribute__((always_inline)) void *us_socket_ext(struct us_socket_t *s) { - return s + 1; -} - -__attribute__((always_inline)) void *us_connecting_socket_ext(struct us_connecting_socket_t *c) { - return c + 1; -} - -__attribute__((always_inline)) int us_socket_is_shut_down(struct us_socket_t *s) { - if (s->ssl) { - return us_internal_ssl_is_shut_down(s); - } - return us_internal_poll_type(&s->p) == POLL_TYPE_SOCKET_SHUT_DOWN; -} - -int us_connecting_socket_is_shut_down(struct us_connecting_socket_t *c) { - return c->shutdown; -} - -void us_internal_socket_raw_shutdown(struct us_socket_t *s) { - /* Todo: should we emit on_close if calling shutdown on an already half-closed socket? - * We need more states in that case, we need to track RECEIVED_FIN - * so far, the app has to track this and call close as needed */ - if (!us_socket_is_closed(s) && us_internal_poll_type(&s->p) != POLL_TYPE_SOCKET_SHUT_DOWN) { - us_internal_poll_set_type(&s->p, POLL_TYPE_SOCKET_SHUT_DOWN); - us_poll_change(&s->p, s->group->loop, us_poll_events(&s->p) & LIBUS_SOCKET_READABLE); - bsd_shutdown_socket(us_poll_fd((struct us_poll_t *) s)); - } -} - -__attribute__((always_inline)) void us_socket_shutdown(struct us_socket_t *s) { - if (s->ssl) { - us_internal_ssl_shutdown(s); - return; - } - us_internal_socket_raw_shutdown(s); -} - -void us_connecting_socket_shutdown(struct us_connecting_socket_t *c) { - c->shutdown = 1; -} - -int us_connecting_socket_get_error(struct us_connecting_socket_t *c) { - return c->error; -} - -int us_connecting_socket_get_dns_error(struct us_connecting_socket_t *c) { - return c->error_is_dns ? c->error : 0; -} - -struct us_socket_t *us_socket_open(struct us_socket_t *s, int is_client, char *ip, int ip_length) { - if (s->ssl) { - return us_internal_ssl_on_open(s, is_client, ip, ip_length); - } - return us_dispatch_open(s, is_client, ip, ip_length); -} - -unsigned int us_get_remote_address_info(char *buf, struct us_socket_t *s, const char **dest, int *port, int *is_ipv6) -{ - // This function is manual inlining + modification of - // us_socket_remote_address - // AsyncSocket::getRemoteAddress - // To get { ip, port, is_ipv6 } for Bun.serve().requestIP() - struct bsd_addr_t addr; - if (bsd_remote_addr(us_poll_fd(&s->p), &addr)) { - return 0; - } - - int length = bsd_addr_get_ip_length(&addr); - if (!length) { - return 0; - } - - memcpy(buf, bsd_addr_get_ip(&addr), length); - *port = bsd_addr_get_port(&addr); - - return length; -} - -unsigned int us_get_local_address_info(char *buf, struct us_socket_t *s, const char **dest, int *port, int *is_ipv6) -{ - struct bsd_addr_t addr; - if (bsd_local_addr(us_poll_fd(&s->p), &addr)) { - return 0; - } - - int length = bsd_addr_get_ip_length(&addr); - if (!length) { - return 0; - } - - memcpy(buf, bsd_addr_get_ip(&addr), length); - *port = bsd_addr_get_port(&addr); - - return length; -} - -void us_socket_ref(struct us_socket_t *s) { -#ifdef LIBUS_USE_LIBUV - uv_ref((uv_handle_t *) s->p.uv_p); -#endif - // do nothing if not using libuv -} - -void us_socket_nodelay(struct us_socket_t *s, int enabled) { - if (!us_socket_is_shut_down(s)) { - bsd_socket_nodelay(us_poll_fd((struct us_poll_t *) s), enabled); - } -} - -#ifndef EBADF -#define EBADF 9 -#endif - -/* Returns 0 on success or a negative platform errno. */ -int us_socket_set_tos(struct us_socket_t *s, int tos) { - if (us_socket_is_closed(s)) { - return -EBADF; - } - return bsd_socket_set_tos(us_poll_fd((struct us_poll_t *) s), tos); -} - -/* Returns the current TOS / traffic class (>= 0) or a negative platform errno. */ -int us_socket_get_tos(struct us_socket_t *s) { - if (us_socket_is_closed(s)) { - return -EBADF; - } - return bsd_socket_get_tos(us_poll_fd((struct us_poll_t *) s)); -} - -/// Returns 0 on success. Returned error values depend on the platform. -/// - on posix, returns `errno` -/// - on windows, when libuv is used, returns a UV err code -/// - on windows, LIBUS_USE_LIBUV is set, returns `WSAGetLastError()` -/// - on windows, otherwise returns result of `WSAGetLastError` -int us_socket_keepalive(us_socket_r s, int enabled, unsigned int delay) { - if (!us_socket_is_shut_down(s)) { - return bsd_socket_keepalive(us_poll_fd((struct us_poll_t *) s), enabled, delay); - } - return 0; -} - -void us_socket_unref(struct us_socket_t *s) { -#ifdef LIBUS_USE_LIBUV - uv_unref((uv_handle_t *) s->p.uv_p); -#endif - // do nothing if not using libuv -} - -struct us_loop_t *us_connecting_socket_get_loop(struct us_connecting_socket_t *c) { - return c->loop; -} - -void us_socket_pause(struct us_socket_t *s) { - if (s->flags.is_paused) return; - // closed cannot be paused because it is already closed - if (us_socket_is_closed(s)) return; - // we are readable and writable so we can just pause readable side - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_WRITABLE); - s->flags.is_paused = 1; -} - -void us_socket_resume(struct us_socket_t *s) { - if (!s->flags.is_paused) return; - s->flags.is_paused = 0; - // closed cannot be resumed - if (us_socket_is_closed(s)) return; - - if (us_socket_is_shut_down(s)) { - // we already sent FIN so we resume only readable side we are read-only - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE); - return; - } - // we are readable and writable so we resume everything - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); -} diff --git a/packages/bun-usockets/src/udp.c b/packages/bun-usockets/src/udp.c deleted file mode 100644 index fb12b7a52f5c..000000000000 --- a/packages/bun-usockets/src/udp.c +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Authored by Alex Hultman, 2018-2021. - * Intellectual property of third-party. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "libusockets.h" -#include "internal/internal.h" - -#include - -// int us_udp_packet_buffer_ecn(struct us_udp_packet_buffer_t *buf, int index) { -// return bsd_udp_packet_buffer_ecn((struct udp_recvbuf *)buf, index); -// } - -int us_udp_packet_buffer_local_ip(struct us_udp_packet_buffer_t *buf, int index, char *ip) { - return bsd_udp_packet_buffer_local_ip((struct udp_recvbuf *)buf, index, ip); -} - -char *us_udp_packet_buffer_peer(struct us_udp_packet_buffer_t *buf, int index) { - return bsd_udp_packet_buffer_peer((struct udp_recvbuf *)buf, index); -} - -char *us_udp_packet_buffer_payload(struct us_udp_packet_buffer_t *buf, int index) { - return bsd_udp_packet_buffer_payload((struct udp_recvbuf *)buf, index); -} - -int us_udp_packet_buffer_payload_length(struct us_udp_packet_buffer_t *buf, int index) { - return bsd_udp_packet_buffer_payload_length((struct udp_recvbuf *)buf, index); -} - -int us_udp_packet_buffer_truncated(struct us_udp_packet_buffer_t *buf, int index) { - return bsd_udp_packet_buffer_truncated((struct udp_recvbuf *)buf, index); -} - -int us_udp_socket_send(struct us_udp_socket_t *s, void** payloads, size_t* lengths, void** addresses, int num) { - if (num == 0) return 0; - int fd = us_poll_fd((struct us_poll_t *) s); - - struct udp_sendbuf *buf = (struct udp_sendbuf *)s->loop->data.send_buf; - - int total_sent = 0; - while (total_sent < num) { - int count = bsd_udp_setup_sendbuf(buf, LIBUS_SEND_BUFFER_LENGTH, payloads, lengths, addresses, num); - payloads += count; - lengths += count; - addresses += count; - num -= count; - // TODO nohang flag? - int sent = bsd_sendmmsg(fd, buf, MSG_DONTWAIT); - if (sent < 0) { - return sent; - } - total_sent += sent; - if (0 <= sent && sent < num) { - // if we couldn't send all packets, register a writable event so we can call the drain callback - us_poll_change((struct us_poll_t *) s, s->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - } - return total_sent; -} - -int us_udp_socket_bound_port(struct us_udp_socket_t *s) { - return ((struct us_udp_socket_t *) s)->port; -} - -void us_udp_socket_bound_ip(struct us_udp_socket_t *s, char *buf, int *length) { - struct bsd_addr_t addr; - if (bsd_local_addr(us_poll_fd((struct us_poll_t *)s), &addr) || *length < bsd_addr_get_ip_length(&addr)) { - *length = 0; - } else { - *length = bsd_addr_get_ip_length(&addr); - memcpy(buf, bsd_addr_get_ip(&addr), *length); - } -} - -void us_udp_socket_remote_ip(struct us_udp_socket_t *s, char *buf, int *length) { - struct bsd_addr_t addr; - if (bsd_remote_addr(us_poll_fd((struct us_poll_t *)s), &addr) || *length < bsd_addr_get_ip_length(&addr)) { - *length = 0; - } else { - *length = bsd_addr_get_ip_length(&addr); - memcpy(buf, bsd_addr_get_ip(&addr), *length); - } -} - -__attribute__((always_inline)) void *us_udp_socket_user(struct us_udp_socket_t *udp) { - return udp->user; -} - -void us_udp_socket_close(struct us_udp_socket_t *s) { - struct us_loop_t *loop = s->loop; - struct us_poll_t *p = (struct us_poll_t *) s; - us_poll_stop(p, loop); - bsd_close_socket(us_poll_fd(p)); - s->closed = 1; - s->next = loop->data.closed_udp_head; - loop->data.closed_udp_head = s; - s->on_close(s); -} - -int us_udp_socket_set_broadcast(struct us_udp_socket_t *s, int enabled) { - return bsd_socket_broadcast(us_poll_fd(&s->p), enabled); -} - -int us_udp_socket_set_ttl_unicast(struct us_udp_socket_t *s, int ttl) { - return bsd_socket_ttl_unicast(us_poll_fd(&s->p), ttl); -} - -int us_udp_socket_set_ttl_multicast(struct us_udp_socket_t *s, int ttl) { - return bsd_socket_ttl_multicast(us_poll_fd(&s->p), ttl); -} - -int us_udp_socket_connect(struct us_udp_socket_t *s, const char* host, unsigned short port) { - return bsd_connect_udp_socket(us_poll_fd((struct us_poll_t *)s), host, port); -} - -int us_udp_socket_disconnect(struct us_udp_socket_t *s) { - return bsd_disconnect_udp_socket(us_poll_fd((struct us_poll_t *)s)); -} - -int us_udp_socket_set_multicast_loopback(struct us_udp_socket_t *s, int enabled) { - return bsd_socket_multicast_loopback(us_poll_fd(&s->p), enabled); -} - -int us_udp_socket_set_multicast_interface(struct us_udp_socket_t *s, const struct sockaddr_storage *addr) { - return bsd_socket_multicast_interface(us_poll_fd(&s->p), addr); -} - -int us_udp_socket_set_membership(struct us_udp_socket_t *s, const struct sockaddr_storage *addr, const struct sockaddr_storage *iface, int drop) { - return bsd_socket_set_membership(us_poll_fd(&s->p), addr, iface, drop); -} - -int us_udp_socket_set_source_specific_membership(struct us_udp_socket_t *s, const struct sockaddr_storage *source, const struct sockaddr_storage *group, const struct sockaddr_storage *iface, int drop) { - return bsd_socket_set_source_specific_membership(us_poll_fd(&s->p), source, group, iface, drop); -} - -struct us_udp_socket_t *us_create_udp_socket( - struct us_loop_t *loop, - void (*data_cb)(struct us_udp_socket_t *, void *, int), - void (*drain_cb)(struct us_udp_socket_t *), - void (*close_cb)(struct us_udp_socket_t *), - void (*recv_error_cb)(struct us_udp_socket_t *, int), - const char *host, - unsigned short port, - int flags, - int *err, - void *user -) { - - LIBUS_SOCKET_DESCRIPTOR fd = bsd_create_udp_socket(host, port, flags, err); - if (fd == LIBUS_SOCKET_ERROR) { - return 0; - } - - int ext_size = 0; - int fallthrough = 0; - - struct us_poll_t *p = us_create_poll(loop, fallthrough, sizeof(struct us_udp_socket_t) + ext_size); - us_poll_init(p, fd, POLL_TYPE_UDP); - if (us_poll_start_rc(p, loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE) != 0) { - int saved_errno = errno; - bsd_close_socket(fd); - us_poll_free(p, loop); - if (err) *err = saved_errno; - errno = saved_errno; - return 0; - } - - struct us_udp_socket_t *udp = (struct us_udp_socket_t *)p; - - /* Get and store the port once */ - struct bsd_addr_t tmp = {0}; - bsd_local_addr(fd, &tmp); - udp->port = bsd_addr_get_port(&tmp); - udp->loop = loop; - - /* There is no udp socket context, only user data */ - /* This should really be ext like everything else */ - udp->user = user; - - udp->closed = 0; - udp->connected = 0; - udp->on_data = data_cb; - udp->on_drain = drain_cb; - udp->on_close = close_cb; - udp->on_recv_error = recv_error_cb; - udp->next = NULL; - - return (struct us_udp_socket_t *) udp; -} \ No newline at end of file diff --git a/packages/bun-uws/src/App.h b/packages/bun-uws/src/App.h index cccd7263ccd9..c9ba6a558119 100644 --- a/packages/bun-uws/src/App.h +++ b/packages/bun-uws/src/App.h @@ -22,6 +22,8 @@ #include #include +#include + namespace uWS { /* Safari 15.0 - 15.3 has a completely broken compression implementation (client_no_context_takeover not * properly implemented) - so we fully disable compression for this browser :-( @@ -388,11 +390,11 @@ struct TemplatedApp { /** Closes all connections connected to this server which are not sending a request or waiting for a response. Does not close the listen socket. */ TemplatedApp &&closeIdle() { auto *group = httpContext->getSocketGroup(); - struct us_socket_t *s = group->head_sockets; + struct us_socket_t *s = us_socket_group_head_socket(group); while (s) { // no matter the type of socket will always contain the AsyncSocketData auto *data = ((AsyncSocket *) s)->getAsyncSocketData(); - struct us_socket_t *next = s->next; + struct us_socket_t *next = us_socket_next(s); if (data->isIdle) { us_socket_close(s, LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN, 0); } diff --git a/packages/bun-uws/src/AsyncSocket.h b/packages/bun-uws/src/AsyncSocket.h index ffc6d3c77312..eeeabba26362 100644 --- a/packages/bun-uws/src/AsyncSocket.h +++ b/packages/bun-uws/src/AsyncSocket.h @@ -30,9 +30,6 @@ #include #include "libusockets.h" -#include "bun-usockets/src/internal/internal.h" - - #include "LoopData.h" #include "AsyncSocketData.h" diff --git a/packages/bun-uws/src/HttpContext.h b/packages/bun-uws/src/HttpContext.h index 75248bed3f5f..c8f8d05f27bd 100644 --- a/packages/bun-uws/src/HttpContext.h +++ b/packages/bun-uws/src/HttpContext.h @@ -26,6 +26,7 @@ #include "AsyncSocket.h" #include "WebSocketData.h" #include "SocketKinds.h" +#include #include #include @@ -676,15 +677,24 @@ struct HttpContext { }, priority); } + /* Accepted sockets may later be adopted as WebSockets, which reuse the slot's + * inline ext area — register the adoption family's max ext size at creation. + * Bun only instantiates ws; upgrade() static_asserts UserData fits. */ + static constexpr size_t maxExtSize() { + size_t http = sizeof(HttpResponseData); + size_t ws = sizeof(WebSocketData) + sizeof(void *); + return http > ws ? http : ws; + } + /* Listen to port using this HttpContext. ssl_ctx may be nullptr for plain HTTP. */ us_listen_socket_t *listen(struct ssl_ctx_st *sslCtx, const char *host, int port, int options) { int error = 0; /* HTTP clients always send first (the request, or ClientHello for TLS), so defer * accept() until data arrives and dispatch the read immediately after accept. */ - auto socket = us_socket_group_listen(&group, socketKind(), sslCtx, host, port, options | LIBUS_LISTEN_DEFER_ACCEPT, sizeof(HttpResponseData), &error); + auto socket = us_socket_group_listen(&group, socketKind(), sslCtx, host, port, options | LIBUS_LISTEN_DEFER_ACCEPT, maxExtSize(), &error); // we dont depend on libuv ref for keeping it alive if (socket) { - us_socket_unref(&socket->s); + us_listen_socket_unref(socket); } return socket; } @@ -692,10 +702,10 @@ struct HttpContext { /* Listen to unix domain socket using this HttpContext */ us_listen_socket_t *listen_unix(struct ssl_ctx_st *sslCtx, const char *path, size_t pathlen, int options) { int error = 0; - auto* socket = us_socket_group_listen_unix(&group, socketKind(), sslCtx, path, pathlen, options, sizeof(HttpResponseData), &error); + auto* socket = us_socket_group_listen_unix(&group, socketKind(), sslCtx, path, pathlen, options, maxExtSize(), &error); // we dont depend on libuv ref for keeping it alive if (socket) { - us_socket_unref(&socket->s); + us_listen_socket_unref(socket); } return socket; diff --git a/packages/bun-uws/src/HttpResponse.h b/packages/bun-uws/src/HttpResponse.h index 2d6b725b3ae7..1206cda73d39 100644 --- a/packages/bun-uws/src/HttpResponse.h +++ b/packages/bun-uws/src/HttpResponse.h @@ -348,6 +348,11 @@ struct HttpResponse : public AsyncSocket { LoopData *loopData = Super::getLoopData(); int corkedSlot = loopData->findCorkSlot(this); + /* The listen site registered the family max assuming UserData is pointer-sized + * (HttpContext::maxExtSize) — a larger UserData would overflow the inline ext. */ + static_assert(sizeof(UserData) <= sizeof(void *), + "register a larger family-max ext size in HttpContext::maxExtSize"); + /* Adopting a socket invalidates it, do not rely on it directly to carry any data */ us_socket_t *usSocket = us_socket_adopt((us_socket_t *) this, webSocketContext->getSocketGroup(), WebSocketContext::socketKind(), diff --git a/patches/boringssl/bssl-sys-prebuilt-bindings.patch b/patches/boringssl/bssl-sys-prebuilt-bindings.patch new file mode 100644 index 000000000000..95e91a185029 --- /dev/null +++ b/patches/boringssl/bssl-sys-prebuilt-bindings.patch @@ -0,0 +1,222 @@ +--- a/rust/bssl-sys/build.rs ++++ b/rust/bssl-sys/build.rs +@@ -1,133 +1,98 @@ +-// Copyright 2021 The BoringSSL Authors ++// Bun: replaced by patches/boringssl/bssl-sys-prebuilt-bindings.patch. + // +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// https://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. ++// Upstream build.rs copies CMake-generated bindings from $BORINGSSL_BUILD_DIR ++// and emits link directives for a second BoringSSL build. Bun instead commits ++// pre-generated per-target bindings (src/bssl/bindings/, see ++// regenerate.sh there) and consumes them through the crate's BINDGEN_RS_FILE ++// escape hatch; BoringSSL objects (and the --wrap-static-fns wrapper.c shims) ++// are compiled by scripts/build/deps/boringssl.ts and resolve at final-binary ++// link, so no cargo link directives are emitted here. No bindgen or libclang ++// runs at build time. + + use std::env; +-use std::path::Path; +-use std::path::PathBuf; +- +-// Keep in sync with the list in include/openssl/opensslconf.h +-const OSSL_CONF_DEFINES: &[&str] = &[ +- "OPENSSL_NO_ASYNC", +- "OPENSSL_NO_BF", +- "OPENSSL_NO_BLAKE2", +- "OPENSSL_NO_BUF_FREELISTS", +- "OPENSSL_NO_CAMELLIA", +- "OPENSSL_NO_CAPIENG", +- "OPENSSL_NO_CAST", +- "OPENSSL_NO_CMS", +- "OPENSSL_NO_COMP", +- "OPENSSL_NO_CT", +- "OPENSSL_NO_DANE", +- "OPENSSL_NO_DEPRECATED", +- "OPENSSL_NO_DGRAM", +- "OPENSSL_NO_DYNAMIC_ENGINE", +- "OPENSSL_NO_EC_NISTP_64_GCC_128", +- "OPENSSL_NO_EC2M", +- "OPENSSL_NO_EGD", +- "OPENSSL_NO_ENGINE", +- "OPENSSL_NO_GMP", +- "OPENSSL_NO_GOST", +- "OPENSSL_NO_HEARTBEATS", +- "OPENSSL_NO_HW", +- "OPENSSL_NO_IDEA", +- "OPENSSL_NO_JPAKE", +- "OPENSSL_NO_KRB5", +- "OPENSSL_NO_MD2", +- "OPENSSL_NO_MDC2", +- "OPENSSL_NO_OCB", +- "OPENSSL_NO_OCSP", +- "OPENSSL_NO_RC2", +- "OPENSSL_NO_RC5", +- "OPENSSL_NO_RFC3779", +- "OPENSSL_NO_RIPEMD", +- "OPENSSL_NO_RMD160", +- "OPENSSL_NO_SCTP", +- "OPENSSL_NO_SEED", +- "OPENSSL_NO_SM2", +- "OPENSSL_NO_SM3", +- "OPENSSL_NO_SM4", +- "OPENSSL_NO_SRP", +- "OPENSSL_NO_SSL_TRACE", +- "OPENSSL_NO_SSL2", +- "OPENSSL_NO_SSL3", +- "OPENSSL_NO_SSL3_METHOD", +- "OPENSSL_NO_STATIC_ENGINE", +- "OPENSSL_NO_STORE", +- "OPENSSL_NO_WHIRLPOOL", +-]; +- +-fn get_bssl_build_dir() -> PathBuf { +- println!("cargo:rerun-if-env-changed=BORINGSSL_BUILD_DIR"); +- if let Some(build_dir) = env::var_os("BORINGSSL_BUILD_DIR") { +- return PathBuf::from(build_dir); +- } +- +- let crate_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap(); +- return Path::new(&crate_dir).join("../../build"); +-} +- +-fn get_cpp_runtime_lib() -> Option { +- println!("cargo:rerun-if-env-changed=BORINGSSL_RUST_CPPLIB"); +- +- if let Ok(cpp_lib) = env::var("BORINGSSL_RUST_CPPLIB") { +- return Some(cpp_lib); +- } +- +- if env::var_os("CARGO_CFG_UNIX").is_some() { +- match env::var("CARGO_CFG_TARGET_OS").unwrap().as_ref() { +- "macos" => Some("c++".into()), +- _ => Some("stdc++".into()), ++use std::fs; ++use std::io::{BufRead, BufReader}; ++use std::path::{Component, Path, PathBuf}; ++ ++const BINDINGS_REPO_DIR: &str = "src/bssl/bindings"; ++const BORINGSSL_TS_REPO_PATH: &str = "scripts/build/deps/boringssl.ts"; ++ ++// Fold `.`/`..` lexically. The OS resolves symlinks BEFORE `..`, so a checkout ++// whose vendor/ is a symlink would otherwise escape to the symlink target's ++// parent; the bindings live relative to the checkout root as spelled. ++fn lexical_normalize(path: &Path) -> PathBuf { ++ let mut parts: Vec = Vec::new(); ++ for component in path.components() { ++ match component { ++ Component::CurDir => {} ++ Component::ParentDir if matches!(parts.last(), Some(Component::Normal(_))) => { ++ parts.pop(); ++ } ++ other => parts.push(other), + } +- } else { +- None + } ++ parts.iter().collect() + } + +-fn main() { +- let bssl_build_dir = get_bssl_build_dir(); +- let bssl_sys_build_dir = bssl_build_dir.join("rust/bssl-sys"); +- let target = env::var("TARGET").unwrap(); +- let out_dir = env::var("OUT_DIR").unwrap(); +- let bindgen_out_file = Path::new(&out_dir).join("bindgen.rs"); +- +- // Find the bindgen generated target platform bindings file and put it into +- // OUT_DIR/bindgen.rs. +- let bindgen_source_file = bssl_sys_build_dir.join(format!("wrapper_{}.rs", target)); +- std::fs::copy(&bindgen_source_file, &bindgen_out_file).expect(&format!( +- "Could not copy bindings from '{}' to '{}'", +- bindgen_source_file.display(), +- bindgen_out_file.display() +- )); +- println!("cargo:rerun-if-changed={}", bindgen_source_file.display()); +- +- // Statically link libraries. +- println!( +- "cargo:rustc-link-search=native={}", +- bssl_build_dir.display() ++fn pinned_boringssl_commit(repo_root: &Path) -> String { ++ let ts_path = repo_root.join(BORINGSSL_TS_REPO_PATH); ++ println!("cargo:rerun-if-changed={}", ts_path.display()); ++ let src = fs::read_to_string(&ts_path) ++ .unwrap_or_else(|err| panic!("bssl-sys: cannot read {}: {err}", ts_path.display())); ++ const NEEDLE: &str = "const BORINGSSL_COMMIT = \""; ++ let start = src ++ .find(NEEDLE) ++ .unwrap_or_else(|| panic!("bssl-sys: BORINGSSL_COMMIT not found in {}", ts_path.display())) ++ + NEEDLE.len(); ++ let commit = &src[start..start + 40]; ++ assert!( ++ commit.chars().all(|c| c.is_ascii_hexdigit()), ++ "bssl-sys: malformed BORINGSSL_COMMIT in {}", ++ ts_path.display() + ); +- println!("cargo:rustc-link-lib=static=crypto"); +- println!("cargo:rustc-link-lib=static=ssl"); ++ commit.to_string() ++} + +- println!( +- "cargo:rustc-link-search=native={}", +- bssl_sys_build_dir.display() ++// Every committed binding file's first line is a stamp written by ++// regenerate.sh; refuse to compile bindings generated from other headers. ++fn verify_stamp(bindings: &Path, repo_root: &Path, target: &str) { ++ let file = fs::File::open(bindings).unwrap_or_else(|err| { ++ panic!( ++ "bssl-sys: no committed bindings for target {target} ({}): {err}\n\ ++ note: run {}/regenerate.sh to generate wrapper_{target}.rs", ++ bindings.display(), ++ BINDINGS_REPO_DIR ++ ) ++ }); ++ let mut first_line = String::new(); ++ BufReader::new(file) ++ .read_line(&mut first_line) ++ .unwrap_or_else(|err| panic!("bssl-sys: cannot read {}: {err}", bindings.display())); ++ let stamped = first_line ++ .strip_prefix("// BoringSSL commit: ") ++ .and_then(|rest| rest.get(..40)) ++ .unwrap_or(""); ++ let pinned = pinned_boringssl_commit(repo_root); ++ assert!( ++ stamped == pinned, ++ "bssl-sys: {} was generated for BoringSSL commit {stamped} but {} pins {pinned}.\n\ ++ note: re-run {}/regenerate.sh after bumping BORINGSSL_COMMIT", ++ bindings.display(), ++ BORINGSSL_TS_REPO_PATH, ++ BINDINGS_REPO_DIR + ); +- println!("cargo:rustc-link-lib=static=rust_wrapper"); +- +- if let Some(cpp_lib) = get_cpp_runtime_lib() { +- println!("cargo:rustc-link-lib={}", cpp_lib); +- } ++} + +- println!("cargo:conf={}", OSSL_CONF_DEFINES.join(",")); ++fn main() { ++ let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); ++ let target = env::var("TARGET").unwrap(); ++ // manifest is /vendor/boringssl/rust/bssl-sys ++ let repo_root = lexical_normalize(&Path::new(&manifest_dir).join("../../../..")); ++ let bindings = repo_root ++ .join(BINDINGS_REPO_DIR) ++ .join(format!("wrapper_{}.rs", target)); ++ println!("cargo:rerun-if-changed={}", bindings.display()); ++ verify_stamp(&bindings, &repo_root, &target); ++ println!("cargo:rustc-cfg=bindgen_rs_file"); ++ println!("cargo:rustc-env=BINDGEN_RS_FILE={}", bindings.display()); + } diff --git a/rustfmt.toml b/rustfmt.toml index a22715915985..eca64efb3420 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -13,4 +13,6 @@ # Patterns use gitignore semantics: a bare name like `test` matches at *any* # depth (it would also exclude `src/runtime/cli/test/`). Anchor with a leading # `/` to scope each entry to the workspace root only. -ignore = ["/vendor", "/test", "/build"] +# `/src/bssl/bindings` holds committed bindgen outputs +# (wrapper_.rs, regenerated by regenerate.sh) — never hand-formatted. +ignore = ["/vendor", "/test", "/build", "/src/bssl/bindings"] diff --git a/scripts/build.ts b/scripts/build.ts index b5ecf135184b..ec4d4874b830 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -140,12 +140,11 @@ async function main(): Promise { // Trace and relink when we are a release, when a commit asked for it, or when // there was nothing to inherit. A failed trace is not fatal: the order file is // an optimization, and a flaky workload must not kill a release 40 minutes in. - if (mustGenerateOrderFile(result.cfg, orderCtx, inherited)) { - if (!inherited && !shouldGenerateOrderFile(result.cfg, orderCtx)) reportOrderFileBootstrap(result.cfg); + const traceAndRelink = async (reason?: string) => { let traced = true; await startGroup("Generate symbol order file", () => { try { - regenerateOrderFile(result.cfg, orderCtx); + regenerateOrderFile(result.cfg, orderCtx, reason); } catch (error) { traced = false; reportOrderFileFailure(error as Error); @@ -156,9 +155,18 @@ async function main(): Promise { // We traced this exact binary: nearly every symbol must resolve. Hard-fail. if (result.output.exe) verifyOrderFileApplied(result.cfg, orderCtx, result.output.exe); } + }; + if (mustGenerateOrderFile(result.cfg, orderCtx, inherited)) { + if (!inherited && !shouldGenerateOrderFile(result.cfg, orderCtx)) reportOrderFileBootstrap(result.cfg); + await traceAndRelink(); } else if (orderFileEligible(result.cfg, orderCtx) && result.output.exe) { - // Inherited: a stale file is a slower binary, not a broken one. - verifyOrderFileApplied(result.cfg, orderCtx, result.output.exe, { strict: false }); + // Inherited: a mildly aged file is a slower binary, not a broken one. But + // one that lost most of its symbols (a rename wave) would be republished + // and inherited forever — treat a stale verdict as if nothing was inherited. + const verdict = verifyOrderFileApplied(result.cfg, orderCtx, result.output.exe, { strict: false }); + if (verdict === "stale" && mustGenerateOrderFile(result.cfg, orderCtx, false)) { + await traceAndRelink("inherited order file no longer matches this binary's symbols"); + } } // cpp-only/rust-only: upload build outputs for downstream link-only. diff --git a/scripts/build/bun.ts b/scripts/build/bun.ts index 7efdbe5cc166..57bbb5055122 100644 --- a/scripts/build/bun.ts +++ b/scripts/build/bun.ts @@ -29,6 +29,7 @@ import { emitCodegen, type CodegenOutputs } from "./codegen.ts"; import { ar, cc, cxx, link, pch } from "./compile.ts"; import { bunExeName, shouldStrip, type Config } from "./config.ts"; import { generateDepVersionsHeader } from "./depVersionsHeader.ts"; +import { boringssl } from "./deps/boringssl.ts"; import { allDeps } from "./deps/index.ts"; import { lolhtml } from "./deps/lolhtml.ts"; import { assert } from "./error.ts"; @@ -38,7 +39,7 @@ import type { BuildNode, Ninja } from "./ninja.ts"; import { emitRust, linkerMapPath, rustLibPath, rustLtoLinkInputs } from "./rust.ts"; import { quote, slash } from "./shell.ts"; import { emitShims, machoPostlinkCommand, machoPostlinkImplicitInputs } from "./shims.ts"; -import { computeDepLibs, resolveDep, type ResolvedDep } from "./source.ts"; +import { collectCrossDepSources, computeDepLibs, resolveDep, type ResolvedDep } from "./source.ts"; import { streamPath } from "./stream.ts"; import { generateUnifiedSources } from "./unified.ts"; @@ -175,8 +176,9 @@ export function emitBun(n: Ninja, cfg: Config, sources: Sources): BunOutput { n.blank(); const deps: ResolvedDep[] = []; const depsByName = new Map(); + const crossDepSources = collectCrossDepSources(cfg, allDeps); for (const dep of allDeps) { - const resolved = resolveDep(n, cfg, dep, depsByName); + const resolved = resolveDep(n, cfg, dep, depsByName, crossDepSources); if (resolved !== null) { deps.push(resolved); depsByName.set(dep.name, resolved); @@ -228,7 +230,9 @@ export function emitBun(n: Ninja, cfg: Config, sources: Sources): BunOutput { // not built into a separate archive — cargo needs `vendor/lolhtml/` on // disk before it resolves the manifest. The `.ref` stamp's content is // the pinned commit, so a bump re-invokes cargo. - vendorStamps: depsByName.get("lolhtml")?.outputs ?? [], + // boringssl: same — bssl-sys (vendor/boringssl/rust/bssl-sys) is a path + // dep of bun_bssl; cargo needs the fetched (patched) tree on disk. + vendorStamps: [...(depsByName.get("lolhtml")?.outputs ?? []), ...(depsByName.get("boringssl")?.outputs ?? [])], }); } @@ -551,10 +555,15 @@ function emitRustOnly(n: Ninja, cfg: Config, sources: Sources): BunOutput { n.comment("════════════════════════════════════════════════════════════════"); n.blank(); - // Only dep: lolhtml, fetched as a cargo path dependency. resolveDep - // emits its fetch; emitRust depends on the fetch stamp via vendorStamps. + // Deps fetched as cargo path dependencies: lolhtml (bun_runtime/bun_bundler) + // and boringssl (bssl-sys, path dep of bun_bssl — only the fetched, + // patched source tree is needed; its compile edges go unpulled here). + // resolveDep emits the fetches; emitRust depends on the fetch stamps via + // vendorStamps. const lolhtmlDep = resolveDep(n, cfg, lolhtml, new Map()); assert(lolhtmlDep !== null, "lolhtml resolveDep returned null — should never be skipped"); + const boringsslDep = resolveDep(n, cfg, boringssl, new Map()); + assert(boringsslDep !== null, "boringssl resolveDep returned null — should never be skipped"); // Codegen: emitted fully, but only the embed-input subset is pulled. // The cpp-related outputs (cppSources, bindgenV2Cpp) have no consumer @@ -565,13 +574,13 @@ function emitRustOnly(n: Ninja, cfg: Config, sources: Sources): BunOutput { codegenInputs: codegen.rustInputs, codegenOrderOnly: codegen.rustOrderOnly, rustSources: sources.rust, - vendorStamps: lolhtmlDep.outputs, + vendorStamps: [...lolhtmlDep.outputs, ...boringsslDep.outputs], }); n.phony("bun", rustObjects); n.default(["bun"]); - return { deps: [lolhtmlDep], codegen, rustObjects, objects: [] }; + return { deps: [lolhtmlDep, boringsslDep], codegen, rustObjects, objects: [] }; } /** diff --git a/scripts/build/ci.ts b/scripts/build/ci.ts index 935aeb7ff352..562ba1a9e7c5 100644 --- a/scripts/build/ci.ts +++ b/scripts/build/ci.ts @@ -783,14 +783,16 @@ export async function inheritOrderFile(cfg: Config, ctx: OrderFileContext): Prom * ninja, which relinks and nothing else: `linkDepends()` lists the order file, * so it is the only edge whose input changed. */ -export function regenerateOrderFile(cfg: Config, ctx: OrderFileContext): void { +export function regenerateOrderFile(cfg: Config, ctx: OrderFileContext, reason?: string): void { const start = Date.now(); const exeName = bunExeName(cfg); // bun-profile, or bun-assertions on an assertions build - const why = !cfg.canary - ? "release build" - : shouldGenerateOrderFile(cfg, ctx) - ? "[generate symbol order] in the commit message" - : "nothing to inherit"; + const why = + reason ?? + (!cfg.canary + ? "release build" + : shouldGenerateOrderFile(cfg, ctx) + ? "[generate symbol order] in the commit message" + : "nothing to inherit"); console.log(`Tracing ${exeName} to build a fresh order file (${why})`); console.log("Each workload runs under an LD_PRELOAD page-fault tracer, so it is slower than a normal run.\n"); @@ -848,27 +850,40 @@ export function reportOrderFileFailure(error: Error): void { }); } +/** What verifying the order file against the linked binary concluded. */ +export type OrderFileVerdict = "applied" | "stale" | "ineffective" | "skipped"; + /** * Prove the relink honoured the order file: one lld silently ignores produces a * binary indistinguishable from an unordered one. Scale-free — compare where the - * hot functions landed against where a typical function landed. + * hot functions landed against where a typical function landed. Returns "stale" + * when the symbol set has churned out from under an inherited file, so the + * caller can retrace instead of republishing it for every later build. */ -export function verifyOrderFileApplied(cfg: Config, ctx: OrderFileContext, exe: string, { strict = true } = {}): void { +export function verifyOrderFileApplied( + cfg: Config, + ctx: OrderFileContext, + exe: string, + { strict = true } = {}, +): OrderFileVerdict { const SAMPLE = 1000; /** Ordered, the hot set sits near the front; unordered, at ~100% of the control. */ const MAX_FRACTION_OF_CONTROL = 0.4; /** Strict mode traced this exact binary, so nearly every name must resolve. */ const MIN_STRICT_MATCH_RATE = 0.75; + /** Build-to-build churn on a branch loses a few percent; losing half the hot + * set means a symbol rename wave, and the file is stale, not merely aged. */ + const MIN_INHERITED_MATCH_RATE = 0.5; const start = Date.now(); - if (!orderFileEligible(cfg, ctx)) return; + if (!orderFileEligible(cfg, ctx)) return "skipped"; const wanted = readFileSync(orderFilePath(cfg), "utf8") .split("\n") .filter((line: string) => line && !line.startsWith("#")) .slice(0, SAMPLE); if (wanted.length < SAMPLE) { console.log(`~ symbol order: only ${wanted.length} functions in the order file — nothing to verify`); - return; + return "skipped"; } // Same resolution as generate.ts: honor NM, else llvm-nm, else nm. @@ -879,7 +894,7 @@ export function verifyOrderFileApplied(cfg: Config, ctx: OrderFileContext, exe: } if (nm.status !== 0) { console.log("~ symbol order: no working nm — skipping verification"); - return; + return "skipped"; } const addresses = new Map(); @@ -917,14 +932,21 @@ export function verifyOrderFileApplied(cfg: Config, ctx: OrderFileContext, exe: "not one of the order file's symbols is in the linked binary", "the symbol spellings do not match this link — see scripts/orderfile/generate.ts", ); - return; + return "stale"; } if (strict && rate < MIN_STRICT_MATCH_RATE) { fail( `only ${offsets.length}/${wanted.length} of the order file's symbols are in the binary we traced`, "the order file and the link disagree on symbol names — most of the win is being silently lost", ); - return; + return "stale"; + } + if (!strict && rate < MIN_INHERITED_MATCH_RATE) { + fail( + `only ${offsets.length}/${wanted.length} of the inherited order file's symbols are in this binary`, + "the symbol set has churned since the file was traced — most of the win is silently lost", + ); + return "stale"; } const hot = median(offsets); @@ -933,10 +955,11 @@ export function verifyOrderFileApplied(cfg: Config, ctx: OrderFileContext, exe: `the order file had no effect: hot functions sit at ${mb(hot)}, a typical one at ${mb(control)}`, "lld ignored it — check --symbol-ordering-file and that -ffunction-sections survived", ); - return; + return "ineffective"; } console.log( `+ symbol order: applied — ${offsets.length}/${wanted.length} (${(rate * 100).toFixed(0)}%) of the hottest ` + `functions resolved; median ${mb(hot)} into .text vs ${mb(control)} for a typical one (${since(start)})`, ); + return "applied"; } diff --git a/scripts/build/deps/boringssl.ts b/scripts/build/deps/boringssl.ts index 4b15380e257e..773eca077acd 100644 --- a/scripts/build/deps/boringssl.ts +++ b/scripts/build/deps/boringssl.ts @@ -20,12 +20,37 @@ * console.log("nasm\n",f([...j.bcm.nasm,...j.crypto.nasm]))' */ +import { readFileSync, readdirSync } from "node:fs"; +import { resolve } from "node:path"; + import { quote } from "../shell.ts"; import type { Dependency, DirectBuild } from "../source.ts"; import { depSourceDir } from "../source.ts"; const BORINGSSL_COMMIT = "1a41b9025c2c0a37edd07ff10f6944f03e028522"; +/** + * The pre-generated bssl-sys bindings under src/bssl/bindings/ + * are vendored bindgen output pinned to BORINGSSL_COMMIT (see regenerate.sh + * there). Stale bindings against bumped headers are silent ABI drift, so every + * configure verifies the stamp regenerate.sh writes into each generated file. + */ +function checkBsslBindingsStamp(repoRoot: string): void { + const dir = resolve(repoRoot, "src/bssl/bindings"); + const generated = [...readdirSync(dir).filter(f => /^wrapper_.*\.rs$/.test(f)), "wrapper.c"]; + for (const file of generated) { + const firstLine = readFileSync(resolve(dir, file), "utf8").split("\n", 1)[0] ?? ""; + const stamped = firstLine.match(/^\/\/ BoringSSL commit: ([0-9a-f]{40}) /)?.[1]; + if (stamped !== BORINGSSL_COMMIT) { + throw new Error( + `src/bssl/bindings/${file} was generated for BoringSSL commit ` + + `${stamped ?? ""} but scripts/build/deps/boringssl.ts pins ${BORINGSSL_COMMIT}.\n` + + `note: re-run src/bssl/bindings/regenerate.sh after bumping BORINGSSL_COMMIT.`, + ); + } + } +} + export const boringssl: Dependency = { name: "boringssl", versionMacro: "BORINGSSL", @@ -36,7 +61,15 @@ export const boringssl: Dependency = { commit: BORINGSSL_COMMIT, }), + // bssl-sys (vendor/boringssl/rust) is a cargo path dep of bun_bssl. Its + // upstream build.rs expects CMake-generated bindings + a second BoringSSL + // build; the patch points it at the pre-generated bindings committed under + // src/bssl/bindings/ instead and emits no link directives. + patches: ["patches/boringssl/bssl-sys-prebuilt-bindings.patch"], + build: cfg => { + checkBsslBindingsStamp(cfg.cwd); + // win-x64 uses NASM-syntax .asm; everything else (including win-aarch64) // uses gas .S that clang assembles. const asm = cfg.windows && cfg.x64 ? NASM : ASM; @@ -44,7 +77,17 @@ export const boringssl: Dependency = { const spec: DirectBuild = { kind: "direct", lang: "cxx", - sources: [...BCM_SRCS, ...CRYPTO_SRCS, ...SSL_SRCS, ...DECREPIT_SRCS, ...asm], + // The last entry is the bssl-sys static-inline shim (bindgen + // --wrap-static-fns), committed in-tree next to the pre-generated + // bindings (target-independent; see regenerate.sh there). + sources: [ + ...BCM_SRCS, + ...CRYPTO_SRCS, + ...SSL_SRCS, + ...DECREPIT_SRCS, + ...asm, + "../../src/bssl/bindings/wrapper.c", + ], includes: ["include"], defines: { BORINGSSL_IMPLEMENTATION: true, diff --git a/scripts/build/flags.ts b/scripts/build/flags.ts index 0be304eab7cf..5c31752fc9ac 100644 --- a/scripts/build/flags.ts +++ b/scripts/build/flags.ts @@ -771,11 +771,6 @@ export const defines: Flag[] = [ when: c => c.debug, desc: "Enable debug-only code paths", }, - { - flag: "LIBUS_SOCKET_FAULT_INJECTION=1", - when: c => c.socketFaultInjection, - desc: "Compile usockets bsd_* syscall fault-injection hooks (runtime-armed via bun:internal-for-testing)", - }, { // slash(): path becomes a C string literal — `\U` would be a unicode escape. flag: c => `BUN_DYNAMIC_JS_LOAD_PATH=\\"${slash(join(c.buildDir, "js"))}\\"`, diff --git a/scripts/build/rust.ts b/scripts/build/rust.ts index 73ef19932385..a989af064e64 100644 --- a/scripts/build/rust.ts +++ b/scripts/build/rust.ts @@ -501,14 +501,11 @@ export function emitRust(n: Ninja, cfg: Config, inputs: RustBuildInputs): string if (!cfg.debug) { rustflags.push("--cfg=bun_codegen_embed"); } - // `socket_fault_injection`: usockets bsd_* fault-injection hooks compiled - // in (LIBUS_SOCKET_FAULT_INJECTION=1 on the C side). The Rust FFI for - // us_fault_set/us_fault_clear_all and the JS control surface gate on this - // so the C symbol and the Rust extern are either both present or both - // absent regardless of profile. - rustflags.push("--check-cfg=cfg(socket_fault_injection)"); + // Socket syscall fault injection: the hooks in `bun_usockets::fault` and + // the JS control surface in socket_body.rs, gated together by one cargo + // feature (`bun_runtime/socket_fault_injection` forwards to bun_usockets). if (cfg.socketFaultInjection) { - rustflags.push("--cfg=socket_fault_injection"); + args.push("--features", "bun_runtime/socket_fault_injection"); } // Drop `#[track_caller]` source-location capture in release. Every // `Option::unwrap`/`slice[i]`/`RefCell::borrow` etc. otherwise emits a diff --git a/scripts/build/source.ts b/scripts/build/source.ts index 92fc48cfac75..a33d0659b04f 100644 --- a/scripts/build/source.ts +++ b/scripts/build/source.ts @@ -694,6 +694,46 @@ export function depBuildDir(cfg: Config, name: string): string { return resolve(cfg.buildDir, "deps", name); } +/** Source directory for a non-prebuilt dep. */ +function resolveSrcDir(cfg: Config, name: string, source: Exclude): string { + return source.kind === "in-tree" + ? resolve(cfg.cwd, source.path) + : source.kind === "local" && source.path + ? source.path + : depSourceDir(cfg, name); +} + +/** + * Direct-build sources living under ANOTHER dep's fetched tree (lsquic + * compiles lsqpack's lsqpack.c) are implicit outputs of the OWNING dep's + * fetch — precompute the attribution so its fetch edge declares them. + */ +export function collectCrossDepSources(cfg: Config, deps: readonly Dependency[]): Map { + const enabled = deps.filter(d => !d.enabled || d.enabled(cfg)); + // Only github-archive deps have a fetch edge to attribute outputs to. + const owners = enabled + .filter(d => d.source(cfg).kind === "github-archive") + .map(d => ({ name: d.name, prefix: join(depSourceDir(cfg, d.name), "/") })); + const byOwner = new Map(); + for (const dep of enabled) { + const source = dep.source(cfg); + if (source.kind === "prebuilt") continue; + const buildSpec = dep.build(cfg); + if (buildSpec.kind !== "direct") continue; + const srcDir = resolveSrcDir(cfg, dep.name, source); + for (const s of buildSpec.sources) { + const abs = resolve(srcDir, typeof s === "string" ? s : s.path); + if (abs.startsWith(join(srcDir, "/"))) continue; // own fetch declares it + const owner = owners.find(o => o.name !== dep.name && abs.startsWith(o.prefix)); + if (owner === undefined) continue; // in-tree/local file — exists on disk, no fetch produces it + const list = byOwner.get(owner.name) ?? []; + if (!list.includes(abs)) list.push(abs); + byOwner.set(owner.name, list); + } + } + return byOwner; +} + /** * Resolve a dependency: emit ninja rules for fetch → configure → build, * return absolute paths for linking. @@ -706,6 +746,7 @@ export function resolveDep( cfg: Config, dep: Dependency, resolved: ReadonlyMap, + crossDepSources?: ReadonlyMap, ): ResolvedDep | null { if (dep.enabled && !dep.enabled(cfg)) { return null; @@ -727,12 +768,7 @@ export function resolveDep( // Source directory. For in-tree deps (sqlite), this points into the bun // repo instead of vendor/. Local deps can override via `path` to point // outside the worktree. Everything else is vendor//. - const srcDir = - source.kind === "in-tree" - ? resolve(cfg.cwd, source.path) - : source.kind === "local" && source.path - ? source.path - : depSourceDir(cfg, dep.name); + const srcDir = resolveSrcDir(cfg, dep.name, source); // Resolve conditional patches. Same list for the whole configure run — // we don't want patches changing between emitFetch and the hash check. @@ -750,7 +786,11 @@ export function resolveDep( const directSources: string[] = []; if (buildSpec.kind === "direct") { for (const s of buildSpec.sources) { - directSources.push(resolve(srcDir, typeof s === "string" ? s : s.path)); + const abs = resolve(srcDir, typeof s === "string" ? s : s.path); + // Only sources this dep's OWN fetch extracts are its implicit outputs. + // In-tree sources (boringssl's wrapper.c) have no fetch; cross-dep + // sources (lsqpack.c) belong to the owning dep's fetch — see crossDepSources. + if (abs.startsWith(join(srcDir, "/"))) directSources.push(abs); } for (const h of Object.values(buildSpec.headers ?? {})) { if (typeof h !== "string") directSources.push(resolve(srcDir, h.from)); @@ -770,7 +810,11 @@ export function resolveDep( // (CMakeLists.txt) as the stamp. Editing it → reconfigure. let sourceStamp: string; if (source.kind === "github-archive") { - sourceStamp = emitFetch(n, cfg, dep.name, source, patches, [...resolvedSources, ...directSources]); + sourceStamp = emitFetch(n, cfg, dep.name, source, patches, [ + ...resolvedSources, + ...directSources, + ...(crossDepSources?.get(dep.name) ?? []), + ]); } else { // Local/in-tree: no .ref to write. Use the build system's manifest file // as the stamp — touching it triggers reconfigure/rebuild. diff --git a/scripts/glob-sources.ts b/scripts/glob-sources.ts index 9848a8c000f8..56534e951cac 100644 --- a/scripts/glob-sources.ts +++ b/scripts/glob-sources.ts @@ -104,16 +104,15 @@ const patterns = { "src/uws_sys/*.cpp", "src/simdutf_sys/*.cpp", "src/jsc/bindings/vm/*.cpp", - "packages/bun-usockets/src/crypto/*.cpp", + // usockets C core is Rust (src/usockets); only the root-cert data TUs survive + "packages/bun-usockets/src/crypto/root_certs*.cpp", ], }, - /** all `*.c` compiled into bun (usockets, llhttp, uv polyfills) */ + /** all `*.c` compiled into bun (quic, llhttp, uv polyfills) */ c: { paths: [ - "packages/bun-usockets/src/*.c", - "packages/bun-usockets/src/eventing/*.c", - "packages/bun-usockets/src/internal/*.c", - "packages/bun-usockets/src/crypto/*.c", + // usockets C core is Rust (src/usockets); quic.c survives on top of it + "packages/bun-usockets/src/quic.c", "src/jsc/bindings/uv-posix-polyfills.c", "src/jsc/bindings/uv-posix-stubs.c", "src/*.c", diff --git a/scripts/rust-miri.ts b/scripts/rust-miri.ts index 6d690e4a82cf..18b83b720918 100644 --- a/scripts/rust-miri.ts +++ b/scripts/rust-miri.ts @@ -44,6 +44,9 @@ const MIRI_CRATES = [ "bun_ptr", "bun_resolve_builtins", "bun_shell_parser", + // Slab/generation/decommit unit tests are pure Rust (mmap is Miri-shimmed); + // the FFI-heavy rest of the crate has no unit tests, so the run stays clean. + "bun_usockets", "bun_wyhash", ]; diff --git a/src/bssl/Cargo.toml b/src/bssl/Cargo.toml new file mode 100644 index 000000000000..1843070e2dee --- /dev/null +++ b/src/bssl/Cargo.toml @@ -0,0 +1,21 @@ +# The tree's BoringSSL binding surface: re-exports the vendored bssl-sys +# crate (vendor/boringssl/rust/bssl-sys), whose bindings are pre-generated +# per target and committed under bindings/ (see bindings/README.md). +[package] +name = "bun_bssl" +version.workspace = true +edition.workspace = true + +[lib] +path = "lib.rs" + +[lints] +workspace = true + +[dependencies] +# Raw BoringSSL bindings, consumed through the crate's BINDGEN_RS_FILE escape +# hatch: pre-generated per-target bindings are committed in bindings/ and +# build.rs is replaced by patches/boringssl/bssl-sys-prebuilt-bindings.patch +# (no link directives — Bun compiles/links its own BoringSSL objects via +# scripts/build/deps/boringssl.ts). +bssl-sys = { path = "../../vendor/boringssl/rust/bssl-sys" } diff --git a/src/bssl/bindings/README.md b/src/bssl/bindings/README.md new file mode 100644 index 000000000000..24e0af2b62c6 --- /dev/null +++ b/src/bssl/bindings/README.md @@ -0,0 +1,49 @@ +# Pre-generated bssl-sys bindings + +`bun_bssl` (`src/bssl`, the tree's BoringSSL binding surface — consumed by +`bun_usockets`) re-exports the vendored `bssl-sys` crate +(`vendor/boringssl/rust/bssl-sys`) as the raw BoringSSL layer +(.rewrite-specs/tls-semantics.md Part 2d; api.md CHANGES 1). Upstream generates +its bindings with bindgen at CMake time and links its own BoringSSL build — +neither exists in Bun's build. Instead: + +- **`wrapper_.rs`** — bindgen output per Rust target triple, committed + here and consumed through the crate's `BINDGEN_RS_FILE` escape hatch + (`bssl-sys/src/lib.rs`, `--cfg bindgen_rs_file`). The escape-hatch plumbing + lives in `patches/boringssl/bssl-sys-prebuilt-bindings.patch`, which replaces + the crate's `build.rs` with one that sets the cfg + env var and emits **no + link directives** — BoringSSL objects are compiled by + `scripts/build/deps/boringssl.ts` and resolve at final-binary link, exactly + like the hand-written `bun_boringssl_sys` externs (both binding crates + coexist against the same objects; signatures agree because headers and + `rust/` tree come from the same pinned commit). +- **`wrapper.c`** — the bindgen `--wrap-static-fns` shims (`*__extern` symbols + for BoringSSL's static-inline functions). Byte-identical across targets + (`regenerate.sh` enforces this); compiled once as part of the boringssl dep + in `scripts/build/deps/boringssl.ts`. The header list from + `bssl-sys/wrapper.h` is inlined so it builds with only + `-I vendor/boringssl/include`; `extern "C"` guards keep the symbol names + unmangled under the dep's `lang: "cxx"` compile. +- **`regenerate.sh`** — regenerates everything above. **Must be re-run on + every BoringSSL commit bump** (`BORINGSSL_COMMIT` in + `scripts/build/deps/boringssl.ts`); fold into the upgrade-boringssl flow. + Staleness is enforced mechanically twice: the script stamps + `BORINGSSL_COMMIT` into the first line of every generated file; + `boringssl.ts` verifies all stamps at configure time, and the patched + `build.rs` re-verifies the selected file's stamp at cargo time (covers bare + `cargo check`/`cargo test` runs that never go through configure) — a bump + that skips regeneration fails with a re-run instruction instead of silently + compiling bindings from the old headers. + Requires `bindgen` (cargo install bindgen-cli; generated with 0.72.1) and + hermetic libc headers: vendor/zig's bundled set (linux gnu/musl), a macOS + SDK, and an MSVC/UCRT splat (see the script header for env overrides). + +Decision (tls-semantics.md OQ-4/OQ-5): bindings are vendored outputs rather +than a build-time bindgen step — no bindgen/libclang toolchain dependency in +the build, and the committed diff makes fork drift reviewable on bumps. + +Several triples produce identical or near-identical output (android == musl +per arch, both windows triples match). They are still committed one file per +triple: deduping would push a target→file mapping into `build.rs` that must +track whatever the current headers happen to produce, breaking the invariant +that `regenerate.sh`'s output is committed verbatim. diff --git a/src/bssl/bindings/regenerate.sh b/src/bssl/bindings/regenerate.sh new file mode 100755 index 000000000000..d5d1d0ab224e --- /dev/null +++ b/src/bssl/bindings/regenerate.sh @@ -0,0 +1,148 @@ +#!/usr/bin/env bash +# Regenerates the committed per-target bssl-sys bindings (wrapper_.rs) +# and the --wrap-static-fns shim (wrapper.c) from vendor/boringssl. Re-run on +# every BoringSSL commit bump (scripts/build/deps/boringssl.ts) — see README.md. +# +# Requires: bindgen-cli (`cargo install bindgen-cli`), a fetched +# vendor/boringssl + vendor/zig (`bun run build --target=clone-boringssl` etc.), +# and for the darwin/windows triples a macOS SDK / MSVC splat: +# MACOS_SDK (default: $HOME/.bun/build-cache/MacOSX*.sdk, newest) +# WINSYSROOT (default: /opt/winsysroot) +set -euo pipefail + +OUT_DIR="$(cd "$(dirname "$0")" && pwd)" +BUN_ROOT="$(cd "$OUT_DIR/../../.." && pwd)" +BORINGSSL="$BUN_ROOT/vendor/boringssl" +ZIG_LIBC="$BUN_ROOT/vendor/zig/lib/libc/include" +RESOURCE_DIR="$(clang -print-resource-dir)/include" + +# Stamp every output with the pinned commit; boringssl.ts fails the configure +# if the stamp and BORINGSSL_COMMIT disagree (stale bindings after a bump). +BORINGSSL_COMMIT="$(sed -n 's/^const BORINGSSL_COMMIT = "\([0-9a-f]\{40\}\)";$/\1/p' \ + "$BUN_ROOT/scripts/build/deps/boringssl.ts")" +[[ -n "$BORINGSSL_COMMIT" ]] || { + echo "error: could not read BORINGSSL_COMMIT from scripts/build/deps/boringssl.ts" >&2 + exit 1 +} +STAMP="// BoringSSL commit: $BORINGSSL_COMMIT (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts)" + +if [[ -z "${MACOS_SDK:-}" ]]; then + MACOS_SDK="$(ls -d "$HOME"/.bun/build-cache/MacOSX*.sdk 2>/dev/null | sort -V | tail -1 || true)" +fi +WINSYSROOT="${WINSYSROOT:-/opt/winsysroot}" + +# Mirrors vendor/boringssl/rust/bssl-sys/CMakeLists.txt bindgen invocation +# (the BINDGEN_RS_FILE escape hatch consumes these outputs verbatim). +BINDGEN_ARGS=( + --no-derive-default + --enable-function-attribute-detection + --use-core + --default-macro-constant-type=signed + --rustified-enum=point_conversion_form_t + --allowlist-file '.*[[:punct:]]include[[:punct:]]openssl[[:punct:]].*\.h' + --experimental + --wrap-static-fns +) + +gen() { + local triple="$1" + shift + echo "── $triple" + local wrap_c + wrap_c="$(mktemp --suffix=.c)" + (cd "$BORINGSSL" && bindgen rust/bssl-sys/wrapper.h \ + -o "$OUT_DIR/wrapper_$triple.rs" \ + "${BINDGEN_ARGS[@]}" \ + --wrap-static-fns-path "$wrap_c" \ + -- -I "$BORINGSSL/include" --target="$triple" "$@") + sed -i "1i $STAMP" "$OUT_DIR/wrapper_$triple.rs" + # Post-process: inline wrapper.h (so the file compiles with only + # -I vendor/boringssl/include) and add C linkage guards — boringssl.ts + # compiles the dep with lang:"cxx" (-x c++ for .c files) and the bindings + # reference the unmangled *__extern symbol names. + { + printf '%s\n' "$STAMP" + printf '// Generated by src/bssl/bindings/regenerate.sh — do not edit.\n' + printf '// bindgen --wrap-static-fns shims; header list inlined from\n' + printf '// vendor/boringssl/rust/bssl-sys/wrapper.h.\n' + grep -v '^//' "$BORINGSSL/rust/bssl-sys/wrapper.h" + printf '\n#if defined(__cplusplus)\nextern "C" {\n#endif\n' + tail -n +2 "$wrap_c" + printf '\n#if defined(__cplusplus)\n} // extern "C"\n#endif\n' + } >"$wrap_c.guarded" + # wrapper.c must be byte-identical across targets — it is compiled once, + # for every target, by scripts/build/deps/boringssl.ts. + if [[ -f "$OUT_DIR/wrapper.c" ]]; then + diff -u "$OUT_DIR/wrapper.c" "$wrap_c.guarded" || { + echo "error: wrapper.c differs for $triple — boringssl.ts must go per-target" >&2 + exit 1 + } + else + cp "$wrap_c.guarded" "$OUT_DIR/wrapper.c" + fi + rm -f "$wrap_c" "$wrap_c.guarded" +} + +# Hermetic libc headers: zig's bundled set for linux (gnu + musl), the macOS +# SDK for darwin, the MSVC/UCRT splat for windows. +linux_gnu() { + local triple="$1" arch="$2" + gen "$triple" -nostdinc \ + -isystem "$RESOURCE_DIR" \ + -isystem "$ZIG_LIBC/$arch-linux-gnu" \ + -isystem "$ZIG_LIBC/generic-glibc" \ + -isystem "$ZIG_LIBC/$arch-linux-any" \ + -isystem "$ZIG_LIBC/any-linux-any" +} +linux_musl() { + local triple="$1" arch="$2" + gen "$triple" -nostdinc \ + -isystem "$RESOURCE_DIR" \ + -isystem "$ZIG_LIBC/$arch-linux-musl" \ + -isystem "$ZIG_LIBC/generic-musl" \ + -isystem "$ZIG_LIBC/$arch-linux-any" \ + -isystem "$ZIG_LIBC/any-linux-any" +} +freebsd() { + local triple="$1" arch="$2" + gen "$triple" -nostdinc \ + -isystem "$RESOURCE_DIR" \ + -isystem "$ZIG_LIBC/$arch-freebsd-none" \ + -isystem "$ZIG_LIBC/generic-freebsd" +} +# zig bundles no bionic headers; musl's are the closest available. The only +# libc types that leak into the OpenSSL API surface (FILE*, struct tm, +# struct timeval, time_t) have identical shapes in bionic and musl. +android() { + local triple="$1" arch="$2" + gen "$triple" -nostdinc \ + -isystem "$RESOURCE_DIR" \ + -isystem "$ZIG_LIBC/$arch-linux-musl" \ + -isystem "$ZIG_LIBC/generic-musl" \ + -isystem "$ZIG_LIBC/$arch-linux-any" \ + -isystem "$ZIG_LIBC/any-linux-any" +} +darwin() { + gen "$1" -isysroot "$MACOS_SDK" +} +windows() { + gen "$1" -nostdinc \ + -isystem "$RESOURCE_DIR" \ + -isystem "$WINSYSROOT/VC/Tools/MSVC"/*/include \ + -isystem "$WINSYSROOT/Windows Kits/10/Include"/*/ucrt +} + +rm -f "$OUT_DIR/wrapper.c" +linux_gnu x86_64-unknown-linux-gnu x86 +linux_gnu aarch64-unknown-linux-gnu aarch64 +linux_musl x86_64-unknown-linux-musl x86_64 +linux_musl aarch64-unknown-linux-musl aarch64 +freebsd x86_64-unknown-freebsd x86_64 +freebsd aarch64-unknown-freebsd aarch64 +android aarch64-linux-android aarch64 +android x86_64-linux-android x86_64 +darwin x86_64-apple-darwin +darwin aarch64-apple-darwin +windows x86_64-pc-windows-msvc +windows aarch64-pc-windows-msvc +echo "done: $(ls "$OUT_DIR"/wrapper_*.rs | wc -l) binding files + wrapper.c" diff --git a/src/bssl/bindings/wrapper.c b/src/bssl/bindings/wrapper.c new file mode 100644 index 000000000000..e16c88f28a85 --- /dev/null +++ b/src/bssl/bindings/wrapper.c @@ -0,0 +1,885 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +// Generated by src/bssl/bindings/regenerate.sh — do not edit. +// bindgen --wrap-static-fns shims; header list inlined from +// vendor/boringssl/rust/bssl-sys/wrapper.h. +#define BORINGSSL_ALWAYS_USE_STATIC_INLINE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +// Static wrappers + +int ERR_GET_LIB__extern(uint32_t packed_error) { return ERR_GET_LIB(packed_error); } +int ERR_GET_REASON__extern(uint32_t packed_error) { return ERR_GET_REASON(packed_error); } +int ERR_equals__extern(uint32_t packed_error, int lib, int reason) { return ERR_equals(packed_error, lib, reason); } +int ERR_GET_FUNC__extern(uint32_t packed_error) { return ERR_GET_FUNC(packed_error); } +void sk_void_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_void_call_free_func(free_func, ptr); } +void * sk_void_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_void_call_copy_func(copy_func, ptr); } +int sk_void_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_void_call_cmp_func(cmp_func, a, b); } +int sk_void_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_void_call_delete_if_func(func, obj, data); } +struct stack_st_void * sk_void_new__extern(sk_void_cmp_func comp) { return sk_void_new(comp); } +struct stack_st_void * sk_void_new_null__extern(void) { return sk_void_new_null(); } +size_t sk_void_num__extern(const struct stack_st_void *sk) { return sk_void_num(sk); } +void sk_void_zero__extern(struct stack_st_void *sk) { sk_void_zero(sk); } +void * sk_void_value__extern(const struct stack_st_void *sk, size_t i) { return sk_void_value(sk, i); } +void * sk_void_set__extern(struct stack_st_void *sk, size_t i, void *p) { return sk_void_set(sk, i, p); } +void sk_void_free__extern(struct stack_st_void *sk) { sk_void_free(sk); } +void sk_void_pop_free__extern(struct stack_st_void *sk, sk_void_free_func free_func) { sk_void_pop_free(sk, free_func); } +size_t sk_void_insert__extern(struct stack_st_void *sk, void *p, size_t where) { return sk_void_insert(sk, p, where); } +void * sk_void_delete__extern(struct stack_st_void *sk, size_t where) { return sk_void_delete(sk, where); } +void * sk_void_delete_ptr__extern(struct stack_st_void *sk, const void *p) { return sk_void_delete_ptr(sk, p); } +void sk_void_delete_if__extern(struct stack_st_void *sk, sk_void_delete_if_func func, void *data) { sk_void_delete_if(sk, func, data); } +int sk_void_find__extern(const struct stack_st_void *sk, size_t *out_index, const void *p) { return sk_void_find(sk, out_index, p); } +void * sk_void_shift__extern(struct stack_st_void *sk) { return sk_void_shift(sk); } +size_t sk_void_push__extern(struct stack_st_void *sk, void *p) { return sk_void_push(sk, p); } +void * sk_void_pop__extern(struct stack_st_void *sk) { return sk_void_pop(sk); } +struct stack_st_void * sk_void_dup__extern(const struct stack_st_void *sk) { return sk_void_dup(sk); } +void sk_void_sort__extern(struct stack_st_void *sk) { sk_void_sort(sk); } +void sk_void_sort_and_dedup__extern(struct stack_st_void *sk, sk_void_free_func free_func) { sk_void_sort_and_dedup(sk, free_func); } +int sk_void_is_sorted__extern(const struct stack_st_void *sk) { return sk_void_is_sorted(sk); } +sk_void_cmp_func sk_void_set_cmp_func__extern(struct stack_st_void *sk, sk_void_cmp_func comp) { return sk_void_set_cmp_func(sk, comp); } +struct stack_st_void * sk_void_deep_copy__extern(const struct stack_st_void *sk, sk_void_copy_func copy_func, sk_void_free_func free_func) { return sk_void_deep_copy(sk, copy_func, free_func); } +void sk_OPENSSL_STRING_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_OPENSSL_STRING_call_free_func(free_func, ptr); } +void * sk_OPENSSL_STRING_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_OPENSSL_STRING_call_copy_func(copy_func, ptr); } +int sk_OPENSSL_STRING_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_OPENSSL_STRING_call_cmp_func(cmp_func, a, b); } +int sk_OPENSSL_STRING_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_OPENSSL_STRING_call_delete_if_func(func, obj, data); } +struct stack_st_OPENSSL_STRING * sk_OPENSSL_STRING_new__extern(sk_OPENSSL_STRING_cmp_func comp) { return sk_OPENSSL_STRING_new(comp); } +struct stack_st_OPENSSL_STRING * sk_OPENSSL_STRING_new_null__extern(void) { return sk_OPENSSL_STRING_new_null(); } +size_t sk_OPENSSL_STRING_num__extern(const struct stack_st_OPENSSL_STRING *sk) { return sk_OPENSSL_STRING_num(sk); } +void sk_OPENSSL_STRING_zero__extern(struct stack_st_OPENSSL_STRING *sk) { sk_OPENSSL_STRING_zero(sk); } +char * sk_OPENSSL_STRING_value__extern(const struct stack_st_OPENSSL_STRING *sk, size_t i) { return sk_OPENSSL_STRING_value(sk, i); } +char * sk_OPENSSL_STRING_set__extern(struct stack_st_OPENSSL_STRING *sk, size_t i, char *p) { return sk_OPENSSL_STRING_set(sk, i, p); } +void sk_OPENSSL_STRING_free__extern(struct stack_st_OPENSSL_STRING *sk) { sk_OPENSSL_STRING_free(sk); } +void sk_OPENSSL_STRING_pop_free__extern(struct stack_st_OPENSSL_STRING *sk, sk_OPENSSL_STRING_free_func free_func) { sk_OPENSSL_STRING_pop_free(sk, free_func); } +size_t sk_OPENSSL_STRING_insert__extern(struct stack_st_OPENSSL_STRING *sk, char *p, size_t where) { return sk_OPENSSL_STRING_insert(sk, p, where); } +char * sk_OPENSSL_STRING_delete__extern(struct stack_st_OPENSSL_STRING *sk, size_t where) { return sk_OPENSSL_STRING_delete(sk, where); } +char * sk_OPENSSL_STRING_delete_ptr__extern(struct stack_st_OPENSSL_STRING *sk, const char *p) { return sk_OPENSSL_STRING_delete_ptr(sk, p); } +void sk_OPENSSL_STRING_delete_if__extern(struct stack_st_OPENSSL_STRING *sk, sk_OPENSSL_STRING_delete_if_func func, void *data) { sk_OPENSSL_STRING_delete_if(sk, func, data); } +int sk_OPENSSL_STRING_find__extern(const struct stack_st_OPENSSL_STRING *sk, size_t *out_index, const char *p) { return sk_OPENSSL_STRING_find(sk, out_index, p); } +char * sk_OPENSSL_STRING_shift__extern(struct stack_st_OPENSSL_STRING *sk) { return sk_OPENSSL_STRING_shift(sk); } +size_t sk_OPENSSL_STRING_push__extern(struct stack_st_OPENSSL_STRING *sk, char *p) { return sk_OPENSSL_STRING_push(sk, p); } +char * sk_OPENSSL_STRING_pop__extern(struct stack_st_OPENSSL_STRING *sk) { return sk_OPENSSL_STRING_pop(sk); } +struct stack_st_OPENSSL_STRING * sk_OPENSSL_STRING_dup__extern(const struct stack_st_OPENSSL_STRING *sk) { return sk_OPENSSL_STRING_dup(sk); } +void sk_OPENSSL_STRING_sort__extern(struct stack_st_OPENSSL_STRING *sk) { sk_OPENSSL_STRING_sort(sk); } +void sk_OPENSSL_STRING_sort_and_dedup__extern(struct stack_st_OPENSSL_STRING *sk, sk_OPENSSL_STRING_free_func free_func) { sk_OPENSSL_STRING_sort_and_dedup(sk, free_func); } +int sk_OPENSSL_STRING_is_sorted__extern(const struct stack_st_OPENSSL_STRING *sk) { return sk_OPENSSL_STRING_is_sorted(sk); } +sk_OPENSSL_STRING_cmp_func sk_OPENSSL_STRING_set_cmp_func__extern(struct stack_st_OPENSSL_STRING *sk, sk_OPENSSL_STRING_cmp_func comp) { return sk_OPENSSL_STRING_set_cmp_func(sk, comp); } +struct stack_st_OPENSSL_STRING * sk_OPENSSL_STRING_deep_copy__extern(const struct stack_st_OPENSSL_STRING *sk, sk_OPENSSL_STRING_copy_func copy_func, sk_OPENSSL_STRING_free_func free_func) { return sk_OPENSSL_STRING_deep_copy(sk, copy_func, free_func); } +void sk_BIO_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_BIO_call_free_func(free_func, ptr); } +void * sk_BIO_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_BIO_call_copy_func(copy_func, ptr); } +int sk_BIO_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_BIO_call_cmp_func(cmp_func, a, b); } +int sk_BIO_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_BIO_call_delete_if_func(func, obj, data); } +struct stack_st_BIO * sk_BIO_new__extern(sk_BIO_cmp_func comp) { return sk_BIO_new(comp); } +struct stack_st_BIO * sk_BIO_new_null__extern(void) { return sk_BIO_new_null(); } +size_t sk_BIO_num__extern(const struct stack_st_BIO *sk) { return sk_BIO_num(sk); } +void sk_BIO_zero__extern(struct stack_st_BIO *sk) { sk_BIO_zero(sk); } +BIO * sk_BIO_value__extern(const struct stack_st_BIO *sk, size_t i) { return sk_BIO_value(sk, i); } +BIO * sk_BIO_set__extern(struct stack_st_BIO *sk, size_t i, BIO *p) { return sk_BIO_set(sk, i, p); } +void sk_BIO_free__extern(struct stack_st_BIO *sk) { sk_BIO_free(sk); } +void sk_BIO_pop_free__extern(struct stack_st_BIO *sk, sk_BIO_free_func free_func) { sk_BIO_pop_free(sk, free_func); } +size_t sk_BIO_insert__extern(struct stack_st_BIO *sk, BIO *p, size_t where) { return sk_BIO_insert(sk, p, where); } +BIO * sk_BIO_delete__extern(struct stack_st_BIO *sk, size_t where) { return sk_BIO_delete(sk, where); } +BIO * sk_BIO_delete_ptr__extern(struct stack_st_BIO *sk, const BIO *p) { return sk_BIO_delete_ptr(sk, p); } +void sk_BIO_delete_if__extern(struct stack_st_BIO *sk, sk_BIO_delete_if_func func, void *data) { sk_BIO_delete_if(sk, func, data); } +int sk_BIO_find__extern(const struct stack_st_BIO *sk, size_t *out_index, const BIO *p) { return sk_BIO_find(sk, out_index, p); } +BIO * sk_BIO_shift__extern(struct stack_st_BIO *sk) { return sk_BIO_shift(sk); } +size_t sk_BIO_push__extern(struct stack_st_BIO *sk, BIO *p) { return sk_BIO_push(sk, p); } +BIO * sk_BIO_pop__extern(struct stack_st_BIO *sk) { return sk_BIO_pop(sk); } +struct stack_st_BIO * sk_BIO_dup__extern(const struct stack_st_BIO *sk) { return sk_BIO_dup(sk); } +void sk_BIO_sort__extern(struct stack_st_BIO *sk) { sk_BIO_sort(sk); } +void sk_BIO_sort_and_dedup__extern(struct stack_st_BIO *sk, sk_BIO_free_func free_func) { sk_BIO_sort_and_dedup(sk, free_func); } +int sk_BIO_is_sorted__extern(const struct stack_st_BIO *sk) { return sk_BIO_is_sorted(sk); } +sk_BIO_cmp_func sk_BIO_set_cmp_func__extern(struct stack_st_BIO *sk, sk_BIO_cmp_func comp) { return sk_BIO_set_cmp_func(sk, comp); } +struct stack_st_BIO * sk_BIO_deep_copy__extern(const struct stack_st_BIO *sk, sk_BIO_copy_func copy_func, sk_BIO_free_func free_func) { return sk_BIO_deep_copy(sk, copy_func, free_func); } +void sk_ASN1_INTEGER_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_ASN1_INTEGER_call_free_func(free_func, ptr); } +void * sk_ASN1_INTEGER_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_ASN1_INTEGER_call_copy_func(copy_func, ptr); } +int sk_ASN1_INTEGER_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_ASN1_INTEGER_call_cmp_func(cmp_func, a, b); } +int sk_ASN1_INTEGER_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_ASN1_INTEGER_call_delete_if_func(func, obj, data); } +struct stack_st_ASN1_INTEGER * sk_ASN1_INTEGER_new__extern(sk_ASN1_INTEGER_cmp_func comp) { return sk_ASN1_INTEGER_new(comp); } +struct stack_st_ASN1_INTEGER * sk_ASN1_INTEGER_new_null__extern(void) { return sk_ASN1_INTEGER_new_null(); } +size_t sk_ASN1_INTEGER_num__extern(const struct stack_st_ASN1_INTEGER *sk) { return sk_ASN1_INTEGER_num(sk); } +void sk_ASN1_INTEGER_zero__extern(struct stack_st_ASN1_INTEGER *sk) { sk_ASN1_INTEGER_zero(sk); } +ASN1_INTEGER * sk_ASN1_INTEGER_value__extern(const struct stack_st_ASN1_INTEGER *sk, size_t i) { return sk_ASN1_INTEGER_value(sk, i); } +ASN1_INTEGER * sk_ASN1_INTEGER_set__extern(struct stack_st_ASN1_INTEGER *sk, size_t i, ASN1_INTEGER *p) { return sk_ASN1_INTEGER_set(sk, i, p); } +void sk_ASN1_INTEGER_free__extern(struct stack_st_ASN1_INTEGER *sk) { sk_ASN1_INTEGER_free(sk); } +void sk_ASN1_INTEGER_pop_free__extern(struct stack_st_ASN1_INTEGER *sk, sk_ASN1_INTEGER_free_func free_func) { sk_ASN1_INTEGER_pop_free(sk, free_func); } +size_t sk_ASN1_INTEGER_insert__extern(struct stack_st_ASN1_INTEGER *sk, ASN1_INTEGER *p, size_t where) { return sk_ASN1_INTEGER_insert(sk, p, where); } +ASN1_INTEGER * sk_ASN1_INTEGER_delete__extern(struct stack_st_ASN1_INTEGER *sk, size_t where) { return sk_ASN1_INTEGER_delete(sk, where); } +ASN1_INTEGER * sk_ASN1_INTEGER_delete_ptr__extern(struct stack_st_ASN1_INTEGER *sk, const ASN1_INTEGER *p) { return sk_ASN1_INTEGER_delete_ptr(sk, p); } +void sk_ASN1_INTEGER_delete_if__extern(struct stack_st_ASN1_INTEGER *sk, sk_ASN1_INTEGER_delete_if_func func, void *data) { sk_ASN1_INTEGER_delete_if(sk, func, data); } +int sk_ASN1_INTEGER_find__extern(const struct stack_st_ASN1_INTEGER *sk, size_t *out_index, const ASN1_INTEGER *p) { return sk_ASN1_INTEGER_find(sk, out_index, p); } +ASN1_INTEGER * sk_ASN1_INTEGER_shift__extern(struct stack_st_ASN1_INTEGER *sk) { return sk_ASN1_INTEGER_shift(sk); } +size_t sk_ASN1_INTEGER_push__extern(struct stack_st_ASN1_INTEGER *sk, ASN1_INTEGER *p) { return sk_ASN1_INTEGER_push(sk, p); } +ASN1_INTEGER * sk_ASN1_INTEGER_pop__extern(struct stack_st_ASN1_INTEGER *sk) { return sk_ASN1_INTEGER_pop(sk); } +struct stack_st_ASN1_INTEGER * sk_ASN1_INTEGER_dup__extern(const struct stack_st_ASN1_INTEGER *sk) { return sk_ASN1_INTEGER_dup(sk); } +void sk_ASN1_INTEGER_sort__extern(struct stack_st_ASN1_INTEGER *sk) { sk_ASN1_INTEGER_sort(sk); } +void sk_ASN1_INTEGER_sort_and_dedup__extern(struct stack_st_ASN1_INTEGER *sk, sk_ASN1_INTEGER_free_func free_func) { sk_ASN1_INTEGER_sort_and_dedup(sk, free_func); } +int sk_ASN1_INTEGER_is_sorted__extern(const struct stack_st_ASN1_INTEGER *sk) { return sk_ASN1_INTEGER_is_sorted(sk); } +sk_ASN1_INTEGER_cmp_func sk_ASN1_INTEGER_set_cmp_func__extern(struct stack_st_ASN1_INTEGER *sk, sk_ASN1_INTEGER_cmp_func comp) { return sk_ASN1_INTEGER_set_cmp_func(sk, comp); } +struct stack_st_ASN1_INTEGER * sk_ASN1_INTEGER_deep_copy__extern(const struct stack_st_ASN1_INTEGER *sk, sk_ASN1_INTEGER_copy_func copy_func, sk_ASN1_INTEGER_free_func free_func) { return sk_ASN1_INTEGER_deep_copy(sk, copy_func, free_func); } +void sk_ASN1_OBJECT_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_ASN1_OBJECT_call_free_func(free_func, ptr); } +void * sk_ASN1_OBJECT_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_ASN1_OBJECT_call_copy_func(copy_func, ptr); } +int sk_ASN1_OBJECT_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_ASN1_OBJECT_call_cmp_func(cmp_func, a, b); } +int sk_ASN1_OBJECT_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_ASN1_OBJECT_call_delete_if_func(func, obj, data); } +struct stack_st_ASN1_OBJECT * sk_ASN1_OBJECT_new__extern(sk_ASN1_OBJECT_cmp_func comp) { return sk_ASN1_OBJECT_new(comp); } +struct stack_st_ASN1_OBJECT * sk_ASN1_OBJECT_new_null__extern(void) { return sk_ASN1_OBJECT_new_null(); } +size_t sk_ASN1_OBJECT_num__extern(const struct stack_st_ASN1_OBJECT *sk) { return sk_ASN1_OBJECT_num(sk); } +void sk_ASN1_OBJECT_zero__extern(struct stack_st_ASN1_OBJECT *sk) { sk_ASN1_OBJECT_zero(sk); } +ASN1_OBJECT * sk_ASN1_OBJECT_value__extern(const struct stack_st_ASN1_OBJECT *sk, size_t i) { return sk_ASN1_OBJECT_value(sk, i); } +ASN1_OBJECT * sk_ASN1_OBJECT_set__extern(struct stack_st_ASN1_OBJECT *sk, size_t i, ASN1_OBJECT *p) { return sk_ASN1_OBJECT_set(sk, i, p); } +void sk_ASN1_OBJECT_free__extern(struct stack_st_ASN1_OBJECT *sk) { sk_ASN1_OBJECT_free(sk); } +void sk_ASN1_OBJECT_pop_free__extern(struct stack_st_ASN1_OBJECT *sk, sk_ASN1_OBJECT_free_func free_func) { sk_ASN1_OBJECT_pop_free(sk, free_func); } +size_t sk_ASN1_OBJECT_insert__extern(struct stack_st_ASN1_OBJECT *sk, ASN1_OBJECT *p, size_t where) { return sk_ASN1_OBJECT_insert(sk, p, where); } +ASN1_OBJECT * sk_ASN1_OBJECT_delete__extern(struct stack_st_ASN1_OBJECT *sk, size_t where) { return sk_ASN1_OBJECT_delete(sk, where); } +ASN1_OBJECT * sk_ASN1_OBJECT_delete_ptr__extern(struct stack_st_ASN1_OBJECT *sk, const ASN1_OBJECT *p) { return sk_ASN1_OBJECT_delete_ptr(sk, p); } +void sk_ASN1_OBJECT_delete_if__extern(struct stack_st_ASN1_OBJECT *sk, sk_ASN1_OBJECT_delete_if_func func, void *data) { sk_ASN1_OBJECT_delete_if(sk, func, data); } +int sk_ASN1_OBJECT_find__extern(const struct stack_st_ASN1_OBJECT *sk, size_t *out_index, const ASN1_OBJECT *p) { return sk_ASN1_OBJECT_find(sk, out_index, p); } +ASN1_OBJECT * sk_ASN1_OBJECT_shift__extern(struct stack_st_ASN1_OBJECT *sk) { return sk_ASN1_OBJECT_shift(sk); } +size_t sk_ASN1_OBJECT_push__extern(struct stack_st_ASN1_OBJECT *sk, ASN1_OBJECT *p) { return sk_ASN1_OBJECT_push(sk, p); } +ASN1_OBJECT * sk_ASN1_OBJECT_pop__extern(struct stack_st_ASN1_OBJECT *sk) { return sk_ASN1_OBJECT_pop(sk); } +struct stack_st_ASN1_OBJECT * sk_ASN1_OBJECT_dup__extern(const struct stack_st_ASN1_OBJECT *sk) { return sk_ASN1_OBJECT_dup(sk); } +void sk_ASN1_OBJECT_sort__extern(struct stack_st_ASN1_OBJECT *sk) { sk_ASN1_OBJECT_sort(sk); } +void sk_ASN1_OBJECT_sort_and_dedup__extern(struct stack_st_ASN1_OBJECT *sk, sk_ASN1_OBJECT_free_func free_func) { sk_ASN1_OBJECT_sort_and_dedup(sk, free_func); } +int sk_ASN1_OBJECT_is_sorted__extern(const struct stack_st_ASN1_OBJECT *sk) { return sk_ASN1_OBJECT_is_sorted(sk); } +sk_ASN1_OBJECT_cmp_func sk_ASN1_OBJECT_set_cmp_func__extern(struct stack_st_ASN1_OBJECT *sk, sk_ASN1_OBJECT_cmp_func comp) { return sk_ASN1_OBJECT_set_cmp_func(sk, comp); } +struct stack_st_ASN1_OBJECT * sk_ASN1_OBJECT_deep_copy__extern(const struct stack_st_ASN1_OBJECT *sk, sk_ASN1_OBJECT_copy_func copy_func, sk_ASN1_OBJECT_free_func free_func) { return sk_ASN1_OBJECT_deep_copy(sk, copy_func, free_func); } +void sk_ASN1_TYPE_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_ASN1_TYPE_call_free_func(free_func, ptr); } +void * sk_ASN1_TYPE_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_ASN1_TYPE_call_copy_func(copy_func, ptr); } +int sk_ASN1_TYPE_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_ASN1_TYPE_call_cmp_func(cmp_func, a, b); } +int sk_ASN1_TYPE_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_ASN1_TYPE_call_delete_if_func(func, obj, data); } +struct stack_st_ASN1_TYPE * sk_ASN1_TYPE_new__extern(sk_ASN1_TYPE_cmp_func comp) { return sk_ASN1_TYPE_new(comp); } +struct stack_st_ASN1_TYPE * sk_ASN1_TYPE_new_null__extern(void) { return sk_ASN1_TYPE_new_null(); } +size_t sk_ASN1_TYPE_num__extern(const struct stack_st_ASN1_TYPE *sk) { return sk_ASN1_TYPE_num(sk); } +void sk_ASN1_TYPE_zero__extern(struct stack_st_ASN1_TYPE *sk) { sk_ASN1_TYPE_zero(sk); } +ASN1_TYPE * sk_ASN1_TYPE_value__extern(const struct stack_st_ASN1_TYPE *sk, size_t i) { return sk_ASN1_TYPE_value(sk, i); } +ASN1_TYPE * sk_ASN1_TYPE_set__extern(struct stack_st_ASN1_TYPE *sk, size_t i, ASN1_TYPE *p) { return sk_ASN1_TYPE_set(sk, i, p); } +void sk_ASN1_TYPE_free__extern(struct stack_st_ASN1_TYPE *sk) { sk_ASN1_TYPE_free(sk); } +void sk_ASN1_TYPE_pop_free__extern(struct stack_st_ASN1_TYPE *sk, sk_ASN1_TYPE_free_func free_func) { sk_ASN1_TYPE_pop_free(sk, free_func); } +size_t sk_ASN1_TYPE_insert__extern(struct stack_st_ASN1_TYPE *sk, ASN1_TYPE *p, size_t where) { return sk_ASN1_TYPE_insert(sk, p, where); } +ASN1_TYPE * sk_ASN1_TYPE_delete__extern(struct stack_st_ASN1_TYPE *sk, size_t where) { return sk_ASN1_TYPE_delete(sk, where); } +ASN1_TYPE * sk_ASN1_TYPE_delete_ptr__extern(struct stack_st_ASN1_TYPE *sk, const ASN1_TYPE *p) { return sk_ASN1_TYPE_delete_ptr(sk, p); } +void sk_ASN1_TYPE_delete_if__extern(struct stack_st_ASN1_TYPE *sk, sk_ASN1_TYPE_delete_if_func func, void *data) { sk_ASN1_TYPE_delete_if(sk, func, data); } +int sk_ASN1_TYPE_find__extern(const struct stack_st_ASN1_TYPE *sk, size_t *out_index, const ASN1_TYPE *p) { return sk_ASN1_TYPE_find(sk, out_index, p); } +ASN1_TYPE * sk_ASN1_TYPE_shift__extern(struct stack_st_ASN1_TYPE *sk) { return sk_ASN1_TYPE_shift(sk); } +size_t sk_ASN1_TYPE_push__extern(struct stack_st_ASN1_TYPE *sk, ASN1_TYPE *p) { return sk_ASN1_TYPE_push(sk, p); } +ASN1_TYPE * sk_ASN1_TYPE_pop__extern(struct stack_st_ASN1_TYPE *sk) { return sk_ASN1_TYPE_pop(sk); } +struct stack_st_ASN1_TYPE * sk_ASN1_TYPE_dup__extern(const struct stack_st_ASN1_TYPE *sk) { return sk_ASN1_TYPE_dup(sk); } +void sk_ASN1_TYPE_sort__extern(struct stack_st_ASN1_TYPE *sk) { sk_ASN1_TYPE_sort(sk); } +void sk_ASN1_TYPE_sort_and_dedup__extern(struct stack_st_ASN1_TYPE *sk, sk_ASN1_TYPE_free_func free_func) { sk_ASN1_TYPE_sort_and_dedup(sk, free_func); } +int sk_ASN1_TYPE_is_sorted__extern(const struct stack_st_ASN1_TYPE *sk) { return sk_ASN1_TYPE_is_sorted(sk); } +sk_ASN1_TYPE_cmp_func sk_ASN1_TYPE_set_cmp_func__extern(struct stack_st_ASN1_TYPE *sk, sk_ASN1_TYPE_cmp_func comp) { return sk_ASN1_TYPE_set_cmp_func(sk, comp); } +struct stack_st_ASN1_TYPE * sk_ASN1_TYPE_deep_copy__extern(const struct stack_st_ASN1_TYPE *sk, sk_ASN1_TYPE_copy_func copy_func, sk_ASN1_TYPE_free_func free_func) { return sk_ASN1_TYPE_deep_copy(sk, copy_func, free_func); } +void sk_ASN1_VALUE_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_ASN1_VALUE_call_free_func(free_func, ptr); } +void * sk_ASN1_VALUE_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_ASN1_VALUE_call_copy_func(copy_func, ptr); } +int sk_ASN1_VALUE_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_ASN1_VALUE_call_cmp_func(cmp_func, a, b); } +int sk_ASN1_VALUE_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_ASN1_VALUE_call_delete_if_func(func, obj, data); } +struct stack_st_ASN1_VALUE * sk_ASN1_VALUE_new__extern(sk_ASN1_VALUE_cmp_func comp) { return sk_ASN1_VALUE_new(comp); } +struct stack_st_ASN1_VALUE * sk_ASN1_VALUE_new_null__extern(void) { return sk_ASN1_VALUE_new_null(); } +size_t sk_ASN1_VALUE_num__extern(const struct stack_st_ASN1_VALUE *sk) { return sk_ASN1_VALUE_num(sk); } +void sk_ASN1_VALUE_zero__extern(struct stack_st_ASN1_VALUE *sk) { sk_ASN1_VALUE_zero(sk); } +ASN1_VALUE * sk_ASN1_VALUE_value__extern(const struct stack_st_ASN1_VALUE *sk, size_t i) { return sk_ASN1_VALUE_value(sk, i); } +ASN1_VALUE * sk_ASN1_VALUE_set__extern(struct stack_st_ASN1_VALUE *sk, size_t i, ASN1_VALUE *p) { return sk_ASN1_VALUE_set(sk, i, p); } +void sk_ASN1_VALUE_free__extern(struct stack_st_ASN1_VALUE *sk) { sk_ASN1_VALUE_free(sk); } +void sk_ASN1_VALUE_pop_free__extern(struct stack_st_ASN1_VALUE *sk, sk_ASN1_VALUE_free_func free_func) { sk_ASN1_VALUE_pop_free(sk, free_func); } +size_t sk_ASN1_VALUE_insert__extern(struct stack_st_ASN1_VALUE *sk, ASN1_VALUE *p, size_t where) { return sk_ASN1_VALUE_insert(sk, p, where); } +ASN1_VALUE * sk_ASN1_VALUE_delete__extern(struct stack_st_ASN1_VALUE *sk, size_t where) { return sk_ASN1_VALUE_delete(sk, where); } +ASN1_VALUE * sk_ASN1_VALUE_delete_ptr__extern(struct stack_st_ASN1_VALUE *sk, const ASN1_VALUE *p) { return sk_ASN1_VALUE_delete_ptr(sk, p); } +void sk_ASN1_VALUE_delete_if__extern(struct stack_st_ASN1_VALUE *sk, sk_ASN1_VALUE_delete_if_func func, void *data) { sk_ASN1_VALUE_delete_if(sk, func, data); } +int sk_ASN1_VALUE_find__extern(const struct stack_st_ASN1_VALUE *sk, size_t *out_index, const ASN1_VALUE *p) { return sk_ASN1_VALUE_find(sk, out_index, p); } +ASN1_VALUE * sk_ASN1_VALUE_shift__extern(struct stack_st_ASN1_VALUE *sk) { return sk_ASN1_VALUE_shift(sk); } +size_t sk_ASN1_VALUE_push__extern(struct stack_st_ASN1_VALUE *sk, ASN1_VALUE *p) { return sk_ASN1_VALUE_push(sk, p); } +ASN1_VALUE * sk_ASN1_VALUE_pop__extern(struct stack_st_ASN1_VALUE *sk) { return sk_ASN1_VALUE_pop(sk); } +struct stack_st_ASN1_VALUE * sk_ASN1_VALUE_dup__extern(const struct stack_st_ASN1_VALUE *sk) { return sk_ASN1_VALUE_dup(sk); } +void sk_ASN1_VALUE_sort__extern(struct stack_st_ASN1_VALUE *sk) { sk_ASN1_VALUE_sort(sk); } +void sk_ASN1_VALUE_sort_and_dedup__extern(struct stack_st_ASN1_VALUE *sk, sk_ASN1_VALUE_free_func free_func) { sk_ASN1_VALUE_sort_and_dedup(sk, free_func); } +int sk_ASN1_VALUE_is_sorted__extern(const struct stack_st_ASN1_VALUE *sk) { return sk_ASN1_VALUE_is_sorted(sk); } +sk_ASN1_VALUE_cmp_func sk_ASN1_VALUE_set_cmp_func__extern(struct stack_st_ASN1_VALUE *sk, sk_ASN1_VALUE_cmp_func comp) { return sk_ASN1_VALUE_set_cmp_func(sk, comp); } +struct stack_st_ASN1_VALUE * sk_ASN1_VALUE_deep_copy__extern(const struct stack_st_ASN1_VALUE *sk, sk_ASN1_VALUE_copy_func copy_func, sk_ASN1_VALUE_free_func free_func) { return sk_ASN1_VALUE_deep_copy(sk, copy_func, free_func); } +void CBS_init__extern(CBS *cbs, const uint8_t *data, size_t len) { CBS_init(cbs, data, len); } +const uint8_t * CBS_data__extern(const CBS *cbs) { return CBS_data(cbs); } +size_t CBS_len__extern(const CBS *cbs) { return CBS_len(cbs); } +void sk_CONF_VALUE_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_CONF_VALUE_call_free_func(free_func, ptr); } +void * sk_CONF_VALUE_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_CONF_VALUE_call_copy_func(copy_func, ptr); } +int sk_CONF_VALUE_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_CONF_VALUE_call_cmp_func(cmp_func, a, b); } +int sk_CONF_VALUE_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_CONF_VALUE_call_delete_if_func(func, obj, data); } +struct stack_st_CONF_VALUE * sk_CONF_VALUE_new__extern(sk_CONF_VALUE_cmp_func comp) { return sk_CONF_VALUE_new(comp); } +struct stack_st_CONF_VALUE * sk_CONF_VALUE_new_null__extern(void) { return sk_CONF_VALUE_new_null(); } +size_t sk_CONF_VALUE_num__extern(const struct stack_st_CONF_VALUE *sk) { return sk_CONF_VALUE_num(sk); } +void sk_CONF_VALUE_zero__extern(struct stack_st_CONF_VALUE *sk) { sk_CONF_VALUE_zero(sk); } +CONF_VALUE * sk_CONF_VALUE_value__extern(const struct stack_st_CONF_VALUE *sk, size_t i) { return sk_CONF_VALUE_value(sk, i); } +CONF_VALUE * sk_CONF_VALUE_set__extern(struct stack_st_CONF_VALUE *sk, size_t i, CONF_VALUE *p) { return sk_CONF_VALUE_set(sk, i, p); } +void sk_CONF_VALUE_free__extern(struct stack_st_CONF_VALUE *sk) { sk_CONF_VALUE_free(sk); } +void sk_CONF_VALUE_pop_free__extern(struct stack_st_CONF_VALUE *sk, sk_CONF_VALUE_free_func free_func) { sk_CONF_VALUE_pop_free(sk, free_func); } +size_t sk_CONF_VALUE_insert__extern(struct stack_st_CONF_VALUE *sk, CONF_VALUE *p, size_t where) { return sk_CONF_VALUE_insert(sk, p, where); } +CONF_VALUE * sk_CONF_VALUE_delete__extern(struct stack_st_CONF_VALUE *sk, size_t where) { return sk_CONF_VALUE_delete(sk, where); } +CONF_VALUE * sk_CONF_VALUE_delete_ptr__extern(struct stack_st_CONF_VALUE *sk, const CONF_VALUE *p) { return sk_CONF_VALUE_delete_ptr(sk, p); } +void sk_CONF_VALUE_delete_if__extern(struct stack_st_CONF_VALUE *sk, sk_CONF_VALUE_delete_if_func func, void *data) { sk_CONF_VALUE_delete_if(sk, func, data); } +int sk_CONF_VALUE_find__extern(const struct stack_st_CONF_VALUE *sk, size_t *out_index, const CONF_VALUE *p) { return sk_CONF_VALUE_find(sk, out_index, p); } +CONF_VALUE * sk_CONF_VALUE_shift__extern(struct stack_st_CONF_VALUE *sk) { return sk_CONF_VALUE_shift(sk); } +size_t sk_CONF_VALUE_push__extern(struct stack_st_CONF_VALUE *sk, CONF_VALUE *p) { return sk_CONF_VALUE_push(sk, p); } +CONF_VALUE * sk_CONF_VALUE_pop__extern(struct stack_st_CONF_VALUE *sk) { return sk_CONF_VALUE_pop(sk); } +struct stack_st_CONF_VALUE * sk_CONF_VALUE_dup__extern(const struct stack_st_CONF_VALUE *sk) { return sk_CONF_VALUE_dup(sk); } +void sk_CONF_VALUE_sort__extern(struct stack_st_CONF_VALUE *sk) { sk_CONF_VALUE_sort(sk); } +void sk_CONF_VALUE_sort_and_dedup__extern(struct stack_st_CONF_VALUE *sk, sk_CONF_VALUE_free_func free_func) { sk_CONF_VALUE_sort_and_dedup(sk, free_func); } +int sk_CONF_VALUE_is_sorted__extern(const struct stack_st_CONF_VALUE *sk) { return sk_CONF_VALUE_is_sorted(sk); } +sk_CONF_VALUE_cmp_func sk_CONF_VALUE_set_cmp_func__extern(struct stack_st_CONF_VALUE *sk, sk_CONF_VALUE_cmp_func comp) { return sk_CONF_VALUE_set_cmp_func(sk, comp); } +struct stack_st_CONF_VALUE * sk_CONF_VALUE_deep_copy__extern(const struct stack_st_CONF_VALUE *sk, sk_CONF_VALUE_copy_func copy_func, sk_CONF_VALUE_free_func free_func) { return sk_CONF_VALUE_deep_copy(sk, copy_func, free_func); } +void sk_CRYPTO_BUFFER_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_CRYPTO_BUFFER_call_free_func(free_func, ptr); } +void * sk_CRYPTO_BUFFER_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_CRYPTO_BUFFER_call_copy_func(copy_func, ptr); } +int sk_CRYPTO_BUFFER_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_CRYPTO_BUFFER_call_cmp_func(cmp_func, a, b); } +int sk_CRYPTO_BUFFER_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_CRYPTO_BUFFER_call_delete_if_func(func, obj, data); } +struct stack_st_CRYPTO_BUFFER * sk_CRYPTO_BUFFER_new__extern(sk_CRYPTO_BUFFER_cmp_func comp) { return sk_CRYPTO_BUFFER_new(comp); } +struct stack_st_CRYPTO_BUFFER * sk_CRYPTO_BUFFER_new_null__extern(void) { return sk_CRYPTO_BUFFER_new_null(); } +size_t sk_CRYPTO_BUFFER_num__extern(const struct stack_st_CRYPTO_BUFFER *sk) { return sk_CRYPTO_BUFFER_num(sk); } +void sk_CRYPTO_BUFFER_zero__extern(struct stack_st_CRYPTO_BUFFER *sk) { sk_CRYPTO_BUFFER_zero(sk); } +CRYPTO_BUFFER * sk_CRYPTO_BUFFER_value__extern(const struct stack_st_CRYPTO_BUFFER *sk, size_t i) { return sk_CRYPTO_BUFFER_value(sk, i); } +CRYPTO_BUFFER * sk_CRYPTO_BUFFER_set__extern(struct stack_st_CRYPTO_BUFFER *sk, size_t i, CRYPTO_BUFFER *p) { return sk_CRYPTO_BUFFER_set(sk, i, p); } +void sk_CRYPTO_BUFFER_free__extern(struct stack_st_CRYPTO_BUFFER *sk) { sk_CRYPTO_BUFFER_free(sk); } +void sk_CRYPTO_BUFFER_pop_free__extern(struct stack_st_CRYPTO_BUFFER *sk, sk_CRYPTO_BUFFER_free_func free_func) { sk_CRYPTO_BUFFER_pop_free(sk, free_func); } +size_t sk_CRYPTO_BUFFER_insert__extern(struct stack_st_CRYPTO_BUFFER *sk, CRYPTO_BUFFER *p, size_t where) { return sk_CRYPTO_BUFFER_insert(sk, p, where); } +CRYPTO_BUFFER * sk_CRYPTO_BUFFER_delete__extern(struct stack_st_CRYPTO_BUFFER *sk, size_t where) { return sk_CRYPTO_BUFFER_delete(sk, where); } +CRYPTO_BUFFER * sk_CRYPTO_BUFFER_delete_ptr__extern(struct stack_st_CRYPTO_BUFFER *sk, const CRYPTO_BUFFER *p) { return sk_CRYPTO_BUFFER_delete_ptr(sk, p); } +void sk_CRYPTO_BUFFER_delete_if__extern(struct stack_st_CRYPTO_BUFFER *sk, sk_CRYPTO_BUFFER_delete_if_func func, void *data) { sk_CRYPTO_BUFFER_delete_if(sk, func, data); } +int sk_CRYPTO_BUFFER_find__extern(const struct stack_st_CRYPTO_BUFFER *sk, size_t *out_index, const CRYPTO_BUFFER *p) { return sk_CRYPTO_BUFFER_find(sk, out_index, p); } +CRYPTO_BUFFER * sk_CRYPTO_BUFFER_shift__extern(struct stack_st_CRYPTO_BUFFER *sk) { return sk_CRYPTO_BUFFER_shift(sk); } +size_t sk_CRYPTO_BUFFER_push__extern(struct stack_st_CRYPTO_BUFFER *sk, CRYPTO_BUFFER *p) { return sk_CRYPTO_BUFFER_push(sk, p); } +CRYPTO_BUFFER * sk_CRYPTO_BUFFER_pop__extern(struct stack_st_CRYPTO_BUFFER *sk) { return sk_CRYPTO_BUFFER_pop(sk); } +struct stack_st_CRYPTO_BUFFER * sk_CRYPTO_BUFFER_dup__extern(const struct stack_st_CRYPTO_BUFFER *sk) { return sk_CRYPTO_BUFFER_dup(sk); } +void sk_CRYPTO_BUFFER_sort__extern(struct stack_st_CRYPTO_BUFFER *sk) { sk_CRYPTO_BUFFER_sort(sk); } +void sk_CRYPTO_BUFFER_sort_and_dedup__extern(struct stack_st_CRYPTO_BUFFER *sk, sk_CRYPTO_BUFFER_free_func free_func) { sk_CRYPTO_BUFFER_sort_and_dedup(sk, free_func); } +int sk_CRYPTO_BUFFER_is_sorted__extern(const struct stack_st_CRYPTO_BUFFER *sk) { return sk_CRYPTO_BUFFER_is_sorted(sk); } +sk_CRYPTO_BUFFER_cmp_func sk_CRYPTO_BUFFER_set_cmp_func__extern(struct stack_st_CRYPTO_BUFFER *sk, sk_CRYPTO_BUFFER_cmp_func comp) { return sk_CRYPTO_BUFFER_set_cmp_func(sk, comp); } +struct stack_st_CRYPTO_BUFFER * sk_CRYPTO_BUFFER_deep_copy__extern(const struct stack_st_CRYPTO_BUFFER *sk, sk_CRYPTO_BUFFER_copy_func copy_func, sk_CRYPTO_BUFFER_free_func free_func) { return sk_CRYPTO_BUFFER_deep_copy(sk, copy_func, free_func); } +void sk_X509_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_call_free_func(free_func, ptr); } +void * sk_X509_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_call_copy_func(copy_func, ptr); } +int sk_X509_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_call_cmp_func(cmp_func, a, b); } +int sk_X509_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_call_delete_if_func(func, obj, data); } +struct stack_st_X509 * sk_X509_new__extern(sk_X509_cmp_func comp) { return sk_X509_new(comp); } +struct stack_st_X509 * sk_X509_new_null__extern(void) { return sk_X509_new_null(); } +size_t sk_X509_num__extern(const struct stack_st_X509 *sk) { return sk_X509_num(sk); } +void sk_X509_zero__extern(struct stack_st_X509 *sk) { sk_X509_zero(sk); } +X509 * sk_X509_value__extern(const struct stack_st_X509 *sk, size_t i) { return sk_X509_value(sk, i); } +X509 * sk_X509_set__extern(struct stack_st_X509 *sk, size_t i, X509 *p) { return sk_X509_set(sk, i, p); } +void sk_X509_free__extern(struct stack_st_X509 *sk) { sk_X509_free(sk); } +void sk_X509_pop_free__extern(struct stack_st_X509 *sk, sk_X509_free_func free_func) { sk_X509_pop_free(sk, free_func); } +size_t sk_X509_insert__extern(struct stack_st_X509 *sk, X509 *p, size_t where) { return sk_X509_insert(sk, p, where); } +X509 * sk_X509_delete__extern(struct stack_st_X509 *sk, size_t where) { return sk_X509_delete(sk, where); } +X509 * sk_X509_delete_ptr__extern(struct stack_st_X509 *sk, const X509 *p) { return sk_X509_delete_ptr(sk, p); } +void sk_X509_delete_if__extern(struct stack_st_X509 *sk, sk_X509_delete_if_func func, void *data) { sk_X509_delete_if(sk, func, data); } +int sk_X509_find__extern(const struct stack_st_X509 *sk, size_t *out_index, const X509 *p) { return sk_X509_find(sk, out_index, p); } +X509 * sk_X509_shift__extern(struct stack_st_X509 *sk) { return sk_X509_shift(sk); } +size_t sk_X509_push__extern(struct stack_st_X509 *sk, X509 *p) { return sk_X509_push(sk, p); } +X509 * sk_X509_pop__extern(struct stack_st_X509 *sk) { return sk_X509_pop(sk); } +struct stack_st_X509 * sk_X509_dup__extern(const struct stack_st_X509 *sk) { return sk_X509_dup(sk); } +void sk_X509_sort__extern(struct stack_st_X509 *sk) { sk_X509_sort(sk); } +void sk_X509_sort_and_dedup__extern(struct stack_st_X509 *sk, sk_X509_free_func free_func) { sk_X509_sort_and_dedup(sk, free_func); } +int sk_X509_is_sorted__extern(const struct stack_st_X509 *sk) { return sk_X509_is_sorted(sk); } +sk_X509_cmp_func sk_X509_set_cmp_func__extern(struct stack_st_X509 *sk, sk_X509_cmp_func comp) { return sk_X509_set_cmp_func(sk, comp); } +struct stack_st_X509 * sk_X509_deep_copy__extern(const struct stack_st_X509 *sk, sk_X509_copy_func copy_func, sk_X509_free_func free_func) { return sk_X509_deep_copy(sk, copy_func, free_func); } +void sk_GENERAL_NAME_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_GENERAL_NAME_call_free_func(free_func, ptr); } +void * sk_GENERAL_NAME_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_GENERAL_NAME_call_copy_func(copy_func, ptr); } +int sk_GENERAL_NAME_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_GENERAL_NAME_call_cmp_func(cmp_func, a, b); } +int sk_GENERAL_NAME_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_GENERAL_NAME_call_delete_if_func(func, obj, data); } +struct stack_st_GENERAL_NAME * sk_GENERAL_NAME_new__extern(sk_GENERAL_NAME_cmp_func comp) { return sk_GENERAL_NAME_new(comp); } +struct stack_st_GENERAL_NAME * sk_GENERAL_NAME_new_null__extern(void) { return sk_GENERAL_NAME_new_null(); } +size_t sk_GENERAL_NAME_num__extern(const struct stack_st_GENERAL_NAME *sk) { return sk_GENERAL_NAME_num(sk); } +void sk_GENERAL_NAME_zero__extern(struct stack_st_GENERAL_NAME *sk) { sk_GENERAL_NAME_zero(sk); } +GENERAL_NAME * sk_GENERAL_NAME_value__extern(const struct stack_st_GENERAL_NAME *sk, size_t i) { return sk_GENERAL_NAME_value(sk, i); } +GENERAL_NAME * sk_GENERAL_NAME_set__extern(struct stack_st_GENERAL_NAME *sk, size_t i, GENERAL_NAME *p) { return sk_GENERAL_NAME_set(sk, i, p); } +void sk_GENERAL_NAME_free__extern(struct stack_st_GENERAL_NAME *sk) { sk_GENERAL_NAME_free(sk); } +void sk_GENERAL_NAME_pop_free__extern(struct stack_st_GENERAL_NAME *sk, sk_GENERAL_NAME_free_func free_func) { sk_GENERAL_NAME_pop_free(sk, free_func); } +size_t sk_GENERAL_NAME_insert__extern(struct stack_st_GENERAL_NAME *sk, GENERAL_NAME *p, size_t where) { return sk_GENERAL_NAME_insert(sk, p, where); } +GENERAL_NAME * sk_GENERAL_NAME_delete__extern(struct stack_st_GENERAL_NAME *sk, size_t where) { return sk_GENERAL_NAME_delete(sk, where); } +GENERAL_NAME * sk_GENERAL_NAME_delete_ptr__extern(struct stack_st_GENERAL_NAME *sk, const GENERAL_NAME *p) { return sk_GENERAL_NAME_delete_ptr(sk, p); } +void sk_GENERAL_NAME_delete_if__extern(struct stack_st_GENERAL_NAME *sk, sk_GENERAL_NAME_delete_if_func func, void *data) { sk_GENERAL_NAME_delete_if(sk, func, data); } +int sk_GENERAL_NAME_find__extern(const struct stack_st_GENERAL_NAME *sk, size_t *out_index, const GENERAL_NAME *p) { return sk_GENERAL_NAME_find(sk, out_index, p); } +GENERAL_NAME * sk_GENERAL_NAME_shift__extern(struct stack_st_GENERAL_NAME *sk) { return sk_GENERAL_NAME_shift(sk); } +size_t sk_GENERAL_NAME_push__extern(struct stack_st_GENERAL_NAME *sk, GENERAL_NAME *p) { return sk_GENERAL_NAME_push(sk, p); } +GENERAL_NAME * sk_GENERAL_NAME_pop__extern(struct stack_st_GENERAL_NAME *sk) { return sk_GENERAL_NAME_pop(sk); } +struct stack_st_GENERAL_NAME * sk_GENERAL_NAME_dup__extern(const struct stack_st_GENERAL_NAME *sk) { return sk_GENERAL_NAME_dup(sk); } +void sk_GENERAL_NAME_sort__extern(struct stack_st_GENERAL_NAME *sk) { sk_GENERAL_NAME_sort(sk); } +void sk_GENERAL_NAME_sort_and_dedup__extern(struct stack_st_GENERAL_NAME *sk, sk_GENERAL_NAME_free_func free_func) { sk_GENERAL_NAME_sort_and_dedup(sk, free_func); } +int sk_GENERAL_NAME_is_sorted__extern(const struct stack_st_GENERAL_NAME *sk) { return sk_GENERAL_NAME_is_sorted(sk); } +sk_GENERAL_NAME_cmp_func sk_GENERAL_NAME_set_cmp_func__extern(struct stack_st_GENERAL_NAME *sk, sk_GENERAL_NAME_cmp_func comp) { return sk_GENERAL_NAME_set_cmp_func(sk, comp); } +struct stack_st_GENERAL_NAME * sk_GENERAL_NAME_deep_copy__extern(const struct stack_st_GENERAL_NAME *sk, sk_GENERAL_NAME_copy_func copy_func, sk_GENERAL_NAME_free_func free_func) { return sk_GENERAL_NAME_deep_copy(sk, copy_func, free_func); } +void sk_X509_CRL_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_CRL_call_free_func(free_func, ptr); } +void * sk_X509_CRL_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_CRL_call_copy_func(copy_func, ptr); } +int sk_X509_CRL_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_CRL_call_cmp_func(cmp_func, a, b); } +int sk_X509_CRL_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_CRL_call_delete_if_func(func, obj, data); } +struct stack_st_X509_CRL * sk_X509_CRL_new__extern(sk_X509_CRL_cmp_func comp) { return sk_X509_CRL_new(comp); } +struct stack_st_X509_CRL * sk_X509_CRL_new_null__extern(void) { return sk_X509_CRL_new_null(); } +size_t sk_X509_CRL_num__extern(const struct stack_st_X509_CRL *sk) { return sk_X509_CRL_num(sk); } +void sk_X509_CRL_zero__extern(struct stack_st_X509_CRL *sk) { sk_X509_CRL_zero(sk); } +X509_CRL * sk_X509_CRL_value__extern(const struct stack_st_X509_CRL *sk, size_t i) { return sk_X509_CRL_value(sk, i); } +X509_CRL * sk_X509_CRL_set__extern(struct stack_st_X509_CRL *sk, size_t i, X509_CRL *p) { return sk_X509_CRL_set(sk, i, p); } +void sk_X509_CRL_free__extern(struct stack_st_X509_CRL *sk) { sk_X509_CRL_free(sk); } +void sk_X509_CRL_pop_free__extern(struct stack_st_X509_CRL *sk, sk_X509_CRL_free_func free_func) { sk_X509_CRL_pop_free(sk, free_func); } +size_t sk_X509_CRL_insert__extern(struct stack_st_X509_CRL *sk, X509_CRL *p, size_t where) { return sk_X509_CRL_insert(sk, p, where); } +X509_CRL * sk_X509_CRL_delete__extern(struct stack_st_X509_CRL *sk, size_t where) { return sk_X509_CRL_delete(sk, where); } +X509_CRL * sk_X509_CRL_delete_ptr__extern(struct stack_st_X509_CRL *sk, const X509_CRL *p) { return sk_X509_CRL_delete_ptr(sk, p); } +void sk_X509_CRL_delete_if__extern(struct stack_st_X509_CRL *sk, sk_X509_CRL_delete_if_func func, void *data) { sk_X509_CRL_delete_if(sk, func, data); } +int sk_X509_CRL_find__extern(const struct stack_st_X509_CRL *sk, size_t *out_index, const X509_CRL *p) { return sk_X509_CRL_find(sk, out_index, p); } +X509_CRL * sk_X509_CRL_shift__extern(struct stack_st_X509_CRL *sk) { return sk_X509_CRL_shift(sk); } +size_t sk_X509_CRL_push__extern(struct stack_st_X509_CRL *sk, X509_CRL *p) { return sk_X509_CRL_push(sk, p); } +X509_CRL * sk_X509_CRL_pop__extern(struct stack_st_X509_CRL *sk) { return sk_X509_CRL_pop(sk); } +struct stack_st_X509_CRL * sk_X509_CRL_dup__extern(const struct stack_st_X509_CRL *sk) { return sk_X509_CRL_dup(sk); } +void sk_X509_CRL_sort__extern(struct stack_st_X509_CRL *sk) { sk_X509_CRL_sort(sk); } +void sk_X509_CRL_sort_and_dedup__extern(struct stack_st_X509_CRL *sk, sk_X509_CRL_free_func free_func) { sk_X509_CRL_sort_and_dedup(sk, free_func); } +int sk_X509_CRL_is_sorted__extern(const struct stack_st_X509_CRL *sk) { return sk_X509_CRL_is_sorted(sk); } +sk_X509_CRL_cmp_func sk_X509_CRL_set_cmp_func__extern(struct stack_st_X509_CRL *sk, sk_X509_CRL_cmp_func comp) { return sk_X509_CRL_set_cmp_func(sk, comp); } +struct stack_st_X509_CRL * sk_X509_CRL_deep_copy__extern(const struct stack_st_X509_CRL *sk, sk_X509_CRL_copy_func copy_func, sk_X509_CRL_free_func free_func) { return sk_X509_CRL_deep_copy(sk, copy_func, free_func); } +void sk_X509_REVOKED_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_REVOKED_call_free_func(free_func, ptr); } +void * sk_X509_REVOKED_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_REVOKED_call_copy_func(copy_func, ptr); } +int sk_X509_REVOKED_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_REVOKED_call_cmp_func(cmp_func, a, b); } +int sk_X509_REVOKED_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_REVOKED_call_delete_if_func(func, obj, data); } +struct stack_st_X509_REVOKED * sk_X509_REVOKED_new__extern(sk_X509_REVOKED_cmp_func comp) { return sk_X509_REVOKED_new(comp); } +struct stack_st_X509_REVOKED * sk_X509_REVOKED_new_null__extern(void) { return sk_X509_REVOKED_new_null(); } +size_t sk_X509_REVOKED_num__extern(const struct stack_st_X509_REVOKED *sk) { return sk_X509_REVOKED_num(sk); } +void sk_X509_REVOKED_zero__extern(struct stack_st_X509_REVOKED *sk) { sk_X509_REVOKED_zero(sk); } +X509_REVOKED * sk_X509_REVOKED_value__extern(const struct stack_st_X509_REVOKED *sk, size_t i) { return sk_X509_REVOKED_value(sk, i); } +X509_REVOKED * sk_X509_REVOKED_set__extern(struct stack_st_X509_REVOKED *sk, size_t i, X509_REVOKED *p) { return sk_X509_REVOKED_set(sk, i, p); } +void sk_X509_REVOKED_free__extern(struct stack_st_X509_REVOKED *sk) { sk_X509_REVOKED_free(sk); } +void sk_X509_REVOKED_pop_free__extern(struct stack_st_X509_REVOKED *sk, sk_X509_REVOKED_free_func free_func) { sk_X509_REVOKED_pop_free(sk, free_func); } +size_t sk_X509_REVOKED_insert__extern(struct stack_st_X509_REVOKED *sk, X509_REVOKED *p, size_t where) { return sk_X509_REVOKED_insert(sk, p, where); } +X509_REVOKED * sk_X509_REVOKED_delete__extern(struct stack_st_X509_REVOKED *sk, size_t where) { return sk_X509_REVOKED_delete(sk, where); } +X509_REVOKED * sk_X509_REVOKED_delete_ptr__extern(struct stack_st_X509_REVOKED *sk, const X509_REVOKED *p) { return sk_X509_REVOKED_delete_ptr(sk, p); } +void sk_X509_REVOKED_delete_if__extern(struct stack_st_X509_REVOKED *sk, sk_X509_REVOKED_delete_if_func func, void *data) { sk_X509_REVOKED_delete_if(sk, func, data); } +int sk_X509_REVOKED_find__extern(const struct stack_st_X509_REVOKED *sk, size_t *out_index, const X509_REVOKED *p) { return sk_X509_REVOKED_find(sk, out_index, p); } +X509_REVOKED * sk_X509_REVOKED_shift__extern(struct stack_st_X509_REVOKED *sk) { return sk_X509_REVOKED_shift(sk); } +size_t sk_X509_REVOKED_push__extern(struct stack_st_X509_REVOKED *sk, X509_REVOKED *p) { return sk_X509_REVOKED_push(sk, p); } +X509_REVOKED * sk_X509_REVOKED_pop__extern(struct stack_st_X509_REVOKED *sk) { return sk_X509_REVOKED_pop(sk); } +struct stack_st_X509_REVOKED * sk_X509_REVOKED_dup__extern(const struct stack_st_X509_REVOKED *sk) { return sk_X509_REVOKED_dup(sk); } +void sk_X509_REVOKED_sort__extern(struct stack_st_X509_REVOKED *sk) { sk_X509_REVOKED_sort(sk); } +void sk_X509_REVOKED_sort_and_dedup__extern(struct stack_st_X509_REVOKED *sk, sk_X509_REVOKED_free_func free_func) { sk_X509_REVOKED_sort_and_dedup(sk, free_func); } +int sk_X509_REVOKED_is_sorted__extern(const struct stack_st_X509_REVOKED *sk) { return sk_X509_REVOKED_is_sorted(sk); } +sk_X509_REVOKED_cmp_func sk_X509_REVOKED_set_cmp_func__extern(struct stack_st_X509_REVOKED *sk, sk_X509_REVOKED_cmp_func comp) { return sk_X509_REVOKED_set_cmp_func(sk, comp); } +struct stack_st_X509_REVOKED * sk_X509_REVOKED_deep_copy__extern(const struct stack_st_X509_REVOKED *sk, sk_X509_REVOKED_copy_func copy_func, sk_X509_REVOKED_free_func free_func) { return sk_X509_REVOKED_deep_copy(sk, copy_func, free_func); } +void sk_X509_NAME_ENTRY_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_NAME_ENTRY_call_free_func(free_func, ptr); } +void * sk_X509_NAME_ENTRY_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_NAME_ENTRY_call_copy_func(copy_func, ptr); } +int sk_X509_NAME_ENTRY_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_NAME_ENTRY_call_cmp_func(cmp_func, a, b); } +int sk_X509_NAME_ENTRY_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_NAME_ENTRY_call_delete_if_func(func, obj, data); } +struct stack_st_X509_NAME_ENTRY * sk_X509_NAME_ENTRY_new__extern(sk_X509_NAME_ENTRY_cmp_func comp) { return sk_X509_NAME_ENTRY_new(comp); } +struct stack_st_X509_NAME_ENTRY * sk_X509_NAME_ENTRY_new_null__extern(void) { return sk_X509_NAME_ENTRY_new_null(); } +size_t sk_X509_NAME_ENTRY_num__extern(const struct stack_st_X509_NAME_ENTRY *sk) { return sk_X509_NAME_ENTRY_num(sk); } +void sk_X509_NAME_ENTRY_zero__extern(struct stack_st_X509_NAME_ENTRY *sk) { sk_X509_NAME_ENTRY_zero(sk); } +X509_NAME_ENTRY * sk_X509_NAME_ENTRY_value__extern(const struct stack_st_X509_NAME_ENTRY *sk, size_t i) { return sk_X509_NAME_ENTRY_value(sk, i); } +X509_NAME_ENTRY * sk_X509_NAME_ENTRY_set__extern(struct stack_st_X509_NAME_ENTRY *sk, size_t i, X509_NAME_ENTRY *p) { return sk_X509_NAME_ENTRY_set(sk, i, p); } +void sk_X509_NAME_ENTRY_free__extern(struct stack_st_X509_NAME_ENTRY *sk) { sk_X509_NAME_ENTRY_free(sk); } +void sk_X509_NAME_ENTRY_pop_free__extern(struct stack_st_X509_NAME_ENTRY *sk, sk_X509_NAME_ENTRY_free_func free_func) { sk_X509_NAME_ENTRY_pop_free(sk, free_func); } +size_t sk_X509_NAME_ENTRY_insert__extern(struct stack_st_X509_NAME_ENTRY *sk, X509_NAME_ENTRY *p, size_t where) { return sk_X509_NAME_ENTRY_insert(sk, p, where); } +X509_NAME_ENTRY * sk_X509_NAME_ENTRY_delete__extern(struct stack_st_X509_NAME_ENTRY *sk, size_t where) { return sk_X509_NAME_ENTRY_delete(sk, where); } +X509_NAME_ENTRY * sk_X509_NAME_ENTRY_delete_ptr__extern(struct stack_st_X509_NAME_ENTRY *sk, const X509_NAME_ENTRY *p) { return sk_X509_NAME_ENTRY_delete_ptr(sk, p); } +void sk_X509_NAME_ENTRY_delete_if__extern(struct stack_st_X509_NAME_ENTRY *sk, sk_X509_NAME_ENTRY_delete_if_func func, void *data) { sk_X509_NAME_ENTRY_delete_if(sk, func, data); } +int sk_X509_NAME_ENTRY_find__extern(const struct stack_st_X509_NAME_ENTRY *sk, size_t *out_index, const X509_NAME_ENTRY *p) { return sk_X509_NAME_ENTRY_find(sk, out_index, p); } +X509_NAME_ENTRY * sk_X509_NAME_ENTRY_shift__extern(struct stack_st_X509_NAME_ENTRY *sk) { return sk_X509_NAME_ENTRY_shift(sk); } +size_t sk_X509_NAME_ENTRY_push__extern(struct stack_st_X509_NAME_ENTRY *sk, X509_NAME_ENTRY *p) { return sk_X509_NAME_ENTRY_push(sk, p); } +X509_NAME_ENTRY * sk_X509_NAME_ENTRY_pop__extern(struct stack_st_X509_NAME_ENTRY *sk) { return sk_X509_NAME_ENTRY_pop(sk); } +struct stack_st_X509_NAME_ENTRY * sk_X509_NAME_ENTRY_dup__extern(const struct stack_st_X509_NAME_ENTRY *sk) { return sk_X509_NAME_ENTRY_dup(sk); } +void sk_X509_NAME_ENTRY_sort__extern(struct stack_st_X509_NAME_ENTRY *sk) { sk_X509_NAME_ENTRY_sort(sk); } +void sk_X509_NAME_ENTRY_sort_and_dedup__extern(struct stack_st_X509_NAME_ENTRY *sk, sk_X509_NAME_ENTRY_free_func free_func) { sk_X509_NAME_ENTRY_sort_and_dedup(sk, free_func); } +int sk_X509_NAME_ENTRY_is_sorted__extern(const struct stack_st_X509_NAME_ENTRY *sk) { return sk_X509_NAME_ENTRY_is_sorted(sk); } +sk_X509_NAME_ENTRY_cmp_func sk_X509_NAME_ENTRY_set_cmp_func__extern(struct stack_st_X509_NAME_ENTRY *sk, sk_X509_NAME_ENTRY_cmp_func comp) { return sk_X509_NAME_ENTRY_set_cmp_func(sk, comp); } +struct stack_st_X509_NAME_ENTRY * sk_X509_NAME_ENTRY_deep_copy__extern(const struct stack_st_X509_NAME_ENTRY *sk, sk_X509_NAME_ENTRY_copy_func copy_func, sk_X509_NAME_ENTRY_free_func free_func) { return sk_X509_NAME_ENTRY_deep_copy(sk, copy_func, free_func); } +void sk_X509_NAME_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_NAME_call_free_func(free_func, ptr); } +void * sk_X509_NAME_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_NAME_call_copy_func(copy_func, ptr); } +int sk_X509_NAME_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_NAME_call_cmp_func(cmp_func, a, b); } +int sk_X509_NAME_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_NAME_call_delete_if_func(func, obj, data); } +struct stack_st_X509_NAME * sk_X509_NAME_new__extern(sk_X509_NAME_cmp_func comp) { return sk_X509_NAME_new(comp); } +struct stack_st_X509_NAME * sk_X509_NAME_new_null__extern(void) { return sk_X509_NAME_new_null(); } +size_t sk_X509_NAME_num__extern(const struct stack_st_X509_NAME *sk) { return sk_X509_NAME_num(sk); } +void sk_X509_NAME_zero__extern(struct stack_st_X509_NAME *sk) { sk_X509_NAME_zero(sk); } +X509_NAME * sk_X509_NAME_value__extern(const struct stack_st_X509_NAME *sk, size_t i) { return sk_X509_NAME_value(sk, i); } +X509_NAME * sk_X509_NAME_set__extern(struct stack_st_X509_NAME *sk, size_t i, X509_NAME *p) { return sk_X509_NAME_set(sk, i, p); } +void sk_X509_NAME_free__extern(struct stack_st_X509_NAME *sk) { sk_X509_NAME_free(sk); } +void sk_X509_NAME_pop_free__extern(struct stack_st_X509_NAME *sk, sk_X509_NAME_free_func free_func) { sk_X509_NAME_pop_free(sk, free_func); } +size_t sk_X509_NAME_insert__extern(struct stack_st_X509_NAME *sk, X509_NAME *p, size_t where) { return sk_X509_NAME_insert(sk, p, where); } +X509_NAME * sk_X509_NAME_delete__extern(struct stack_st_X509_NAME *sk, size_t where) { return sk_X509_NAME_delete(sk, where); } +X509_NAME * sk_X509_NAME_delete_ptr__extern(struct stack_st_X509_NAME *sk, const X509_NAME *p) { return sk_X509_NAME_delete_ptr(sk, p); } +void sk_X509_NAME_delete_if__extern(struct stack_st_X509_NAME *sk, sk_X509_NAME_delete_if_func func, void *data) { sk_X509_NAME_delete_if(sk, func, data); } +int sk_X509_NAME_find__extern(const struct stack_st_X509_NAME *sk, size_t *out_index, const X509_NAME *p) { return sk_X509_NAME_find(sk, out_index, p); } +X509_NAME * sk_X509_NAME_shift__extern(struct stack_st_X509_NAME *sk) { return sk_X509_NAME_shift(sk); } +size_t sk_X509_NAME_push__extern(struct stack_st_X509_NAME *sk, X509_NAME *p) { return sk_X509_NAME_push(sk, p); } +X509_NAME * sk_X509_NAME_pop__extern(struct stack_st_X509_NAME *sk) { return sk_X509_NAME_pop(sk); } +struct stack_st_X509_NAME * sk_X509_NAME_dup__extern(const struct stack_st_X509_NAME *sk) { return sk_X509_NAME_dup(sk); } +void sk_X509_NAME_sort__extern(struct stack_st_X509_NAME *sk) { sk_X509_NAME_sort(sk); } +void sk_X509_NAME_sort_and_dedup__extern(struct stack_st_X509_NAME *sk, sk_X509_NAME_free_func free_func) { sk_X509_NAME_sort_and_dedup(sk, free_func); } +int sk_X509_NAME_is_sorted__extern(const struct stack_st_X509_NAME *sk) { return sk_X509_NAME_is_sorted(sk); } +sk_X509_NAME_cmp_func sk_X509_NAME_set_cmp_func__extern(struct stack_st_X509_NAME *sk, sk_X509_NAME_cmp_func comp) { return sk_X509_NAME_set_cmp_func(sk, comp); } +struct stack_st_X509_NAME * sk_X509_NAME_deep_copy__extern(const struct stack_st_X509_NAME *sk, sk_X509_NAME_copy_func copy_func, sk_X509_NAME_free_func free_func) { return sk_X509_NAME_deep_copy(sk, copy_func, free_func); } +void sk_X509_EXTENSION_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_EXTENSION_call_free_func(free_func, ptr); } +void * sk_X509_EXTENSION_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_EXTENSION_call_copy_func(copy_func, ptr); } +int sk_X509_EXTENSION_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_EXTENSION_call_cmp_func(cmp_func, a, b); } +int sk_X509_EXTENSION_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_EXTENSION_call_delete_if_func(func, obj, data); } +struct stack_st_X509_EXTENSION * sk_X509_EXTENSION_new__extern(sk_X509_EXTENSION_cmp_func comp) { return sk_X509_EXTENSION_new(comp); } +struct stack_st_X509_EXTENSION * sk_X509_EXTENSION_new_null__extern(void) { return sk_X509_EXTENSION_new_null(); } +size_t sk_X509_EXTENSION_num__extern(const struct stack_st_X509_EXTENSION *sk) { return sk_X509_EXTENSION_num(sk); } +void sk_X509_EXTENSION_zero__extern(struct stack_st_X509_EXTENSION *sk) { sk_X509_EXTENSION_zero(sk); } +X509_EXTENSION * sk_X509_EXTENSION_value__extern(const struct stack_st_X509_EXTENSION *sk, size_t i) { return sk_X509_EXTENSION_value(sk, i); } +X509_EXTENSION * sk_X509_EXTENSION_set__extern(struct stack_st_X509_EXTENSION *sk, size_t i, X509_EXTENSION *p) { return sk_X509_EXTENSION_set(sk, i, p); } +void sk_X509_EXTENSION_free__extern(struct stack_st_X509_EXTENSION *sk) { sk_X509_EXTENSION_free(sk); } +void sk_X509_EXTENSION_pop_free__extern(struct stack_st_X509_EXTENSION *sk, sk_X509_EXTENSION_free_func free_func) { sk_X509_EXTENSION_pop_free(sk, free_func); } +size_t sk_X509_EXTENSION_insert__extern(struct stack_st_X509_EXTENSION *sk, X509_EXTENSION *p, size_t where) { return sk_X509_EXTENSION_insert(sk, p, where); } +X509_EXTENSION * sk_X509_EXTENSION_delete__extern(struct stack_st_X509_EXTENSION *sk, size_t where) { return sk_X509_EXTENSION_delete(sk, where); } +X509_EXTENSION * sk_X509_EXTENSION_delete_ptr__extern(struct stack_st_X509_EXTENSION *sk, const X509_EXTENSION *p) { return sk_X509_EXTENSION_delete_ptr(sk, p); } +void sk_X509_EXTENSION_delete_if__extern(struct stack_st_X509_EXTENSION *sk, sk_X509_EXTENSION_delete_if_func func, void *data) { sk_X509_EXTENSION_delete_if(sk, func, data); } +int sk_X509_EXTENSION_find__extern(const struct stack_st_X509_EXTENSION *sk, size_t *out_index, const X509_EXTENSION *p) { return sk_X509_EXTENSION_find(sk, out_index, p); } +X509_EXTENSION * sk_X509_EXTENSION_shift__extern(struct stack_st_X509_EXTENSION *sk) { return sk_X509_EXTENSION_shift(sk); } +size_t sk_X509_EXTENSION_push__extern(struct stack_st_X509_EXTENSION *sk, X509_EXTENSION *p) { return sk_X509_EXTENSION_push(sk, p); } +X509_EXTENSION * sk_X509_EXTENSION_pop__extern(struct stack_st_X509_EXTENSION *sk) { return sk_X509_EXTENSION_pop(sk); } +struct stack_st_X509_EXTENSION * sk_X509_EXTENSION_dup__extern(const struct stack_st_X509_EXTENSION *sk) { return sk_X509_EXTENSION_dup(sk); } +void sk_X509_EXTENSION_sort__extern(struct stack_st_X509_EXTENSION *sk) { sk_X509_EXTENSION_sort(sk); } +void sk_X509_EXTENSION_sort_and_dedup__extern(struct stack_st_X509_EXTENSION *sk, sk_X509_EXTENSION_free_func free_func) { sk_X509_EXTENSION_sort_and_dedup(sk, free_func); } +int sk_X509_EXTENSION_is_sorted__extern(const struct stack_st_X509_EXTENSION *sk) { return sk_X509_EXTENSION_is_sorted(sk); } +sk_X509_EXTENSION_cmp_func sk_X509_EXTENSION_set_cmp_func__extern(struct stack_st_X509_EXTENSION *sk, sk_X509_EXTENSION_cmp_func comp) { return sk_X509_EXTENSION_set_cmp_func(sk, comp); } +struct stack_st_X509_EXTENSION * sk_X509_EXTENSION_deep_copy__extern(const struct stack_st_X509_EXTENSION *sk, sk_X509_EXTENSION_copy_func copy_func, sk_X509_EXTENSION_free_func free_func) { return sk_X509_EXTENSION_deep_copy(sk, copy_func, free_func); } +void sk_GENERAL_SUBTREE_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_GENERAL_SUBTREE_call_free_func(free_func, ptr); } +void * sk_GENERAL_SUBTREE_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_GENERAL_SUBTREE_call_copy_func(copy_func, ptr); } +int sk_GENERAL_SUBTREE_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_GENERAL_SUBTREE_call_cmp_func(cmp_func, a, b); } +int sk_GENERAL_SUBTREE_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_GENERAL_SUBTREE_call_delete_if_func(func, obj, data); } +struct stack_st_GENERAL_SUBTREE * sk_GENERAL_SUBTREE_new__extern(sk_GENERAL_SUBTREE_cmp_func comp) { return sk_GENERAL_SUBTREE_new(comp); } +struct stack_st_GENERAL_SUBTREE * sk_GENERAL_SUBTREE_new_null__extern(void) { return sk_GENERAL_SUBTREE_new_null(); } +size_t sk_GENERAL_SUBTREE_num__extern(const struct stack_st_GENERAL_SUBTREE *sk) { return sk_GENERAL_SUBTREE_num(sk); } +void sk_GENERAL_SUBTREE_zero__extern(struct stack_st_GENERAL_SUBTREE *sk) { sk_GENERAL_SUBTREE_zero(sk); } +GENERAL_SUBTREE * sk_GENERAL_SUBTREE_value__extern(const struct stack_st_GENERAL_SUBTREE *sk, size_t i) { return sk_GENERAL_SUBTREE_value(sk, i); } +GENERAL_SUBTREE * sk_GENERAL_SUBTREE_set__extern(struct stack_st_GENERAL_SUBTREE *sk, size_t i, GENERAL_SUBTREE *p) { return sk_GENERAL_SUBTREE_set(sk, i, p); } +void sk_GENERAL_SUBTREE_free__extern(struct stack_st_GENERAL_SUBTREE *sk) { sk_GENERAL_SUBTREE_free(sk); } +void sk_GENERAL_SUBTREE_pop_free__extern(struct stack_st_GENERAL_SUBTREE *sk, sk_GENERAL_SUBTREE_free_func free_func) { sk_GENERAL_SUBTREE_pop_free(sk, free_func); } +size_t sk_GENERAL_SUBTREE_insert__extern(struct stack_st_GENERAL_SUBTREE *sk, GENERAL_SUBTREE *p, size_t where) { return sk_GENERAL_SUBTREE_insert(sk, p, where); } +GENERAL_SUBTREE * sk_GENERAL_SUBTREE_delete__extern(struct stack_st_GENERAL_SUBTREE *sk, size_t where) { return sk_GENERAL_SUBTREE_delete(sk, where); } +GENERAL_SUBTREE * sk_GENERAL_SUBTREE_delete_ptr__extern(struct stack_st_GENERAL_SUBTREE *sk, const GENERAL_SUBTREE *p) { return sk_GENERAL_SUBTREE_delete_ptr(sk, p); } +void sk_GENERAL_SUBTREE_delete_if__extern(struct stack_st_GENERAL_SUBTREE *sk, sk_GENERAL_SUBTREE_delete_if_func func, void *data) { sk_GENERAL_SUBTREE_delete_if(sk, func, data); } +int sk_GENERAL_SUBTREE_find__extern(const struct stack_st_GENERAL_SUBTREE *sk, size_t *out_index, const GENERAL_SUBTREE *p) { return sk_GENERAL_SUBTREE_find(sk, out_index, p); } +GENERAL_SUBTREE * sk_GENERAL_SUBTREE_shift__extern(struct stack_st_GENERAL_SUBTREE *sk) { return sk_GENERAL_SUBTREE_shift(sk); } +size_t sk_GENERAL_SUBTREE_push__extern(struct stack_st_GENERAL_SUBTREE *sk, GENERAL_SUBTREE *p) { return sk_GENERAL_SUBTREE_push(sk, p); } +GENERAL_SUBTREE * sk_GENERAL_SUBTREE_pop__extern(struct stack_st_GENERAL_SUBTREE *sk) { return sk_GENERAL_SUBTREE_pop(sk); } +struct stack_st_GENERAL_SUBTREE * sk_GENERAL_SUBTREE_dup__extern(const struct stack_st_GENERAL_SUBTREE *sk) { return sk_GENERAL_SUBTREE_dup(sk); } +void sk_GENERAL_SUBTREE_sort__extern(struct stack_st_GENERAL_SUBTREE *sk) { sk_GENERAL_SUBTREE_sort(sk); } +void sk_GENERAL_SUBTREE_sort_and_dedup__extern(struct stack_st_GENERAL_SUBTREE *sk, sk_GENERAL_SUBTREE_free_func free_func) { sk_GENERAL_SUBTREE_sort_and_dedup(sk, free_func); } +int sk_GENERAL_SUBTREE_is_sorted__extern(const struct stack_st_GENERAL_SUBTREE *sk) { return sk_GENERAL_SUBTREE_is_sorted(sk); } +sk_GENERAL_SUBTREE_cmp_func sk_GENERAL_SUBTREE_set_cmp_func__extern(struct stack_st_GENERAL_SUBTREE *sk, sk_GENERAL_SUBTREE_cmp_func comp) { return sk_GENERAL_SUBTREE_set_cmp_func(sk, comp); } +struct stack_st_GENERAL_SUBTREE * sk_GENERAL_SUBTREE_deep_copy__extern(const struct stack_st_GENERAL_SUBTREE *sk, sk_GENERAL_SUBTREE_copy_func copy_func, sk_GENERAL_SUBTREE_free_func free_func) { return sk_GENERAL_SUBTREE_deep_copy(sk, copy_func, free_func); } +void sk_ACCESS_DESCRIPTION_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_ACCESS_DESCRIPTION_call_free_func(free_func, ptr); } +void * sk_ACCESS_DESCRIPTION_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_ACCESS_DESCRIPTION_call_copy_func(copy_func, ptr); } +int sk_ACCESS_DESCRIPTION_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_ACCESS_DESCRIPTION_call_cmp_func(cmp_func, a, b); } +int sk_ACCESS_DESCRIPTION_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_ACCESS_DESCRIPTION_call_delete_if_func(func, obj, data); } +struct stack_st_ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_new__extern(sk_ACCESS_DESCRIPTION_cmp_func comp) { return sk_ACCESS_DESCRIPTION_new(comp); } +struct stack_st_ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_new_null__extern(void) { return sk_ACCESS_DESCRIPTION_new_null(); } +size_t sk_ACCESS_DESCRIPTION_num__extern(const struct stack_st_ACCESS_DESCRIPTION *sk) { return sk_ACCESS_DESCRIPTION_num(sk); } +void sk_ACCESS_DESCRIPTION_zero__extern(struct stack_st_ACCESS_DESCRIPTION *sk) { sk_ACCESS_DESCRIPTION_zero(sk); } +ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_value__extern(const struct stack_st_ACCESS_DESCRIPTION *sk, size_t i) { return sk_ACCESS_DESCRIPTION_value(sk, i); } +ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_set__extern(struct stack_st_ACCESS_DESCRIPTION *sk, size_t i, ACCESS_DESCRIPTION *p) { return sk_ACCESS_DESCRIPTION_set(sk, i, p); } +void sk_ACCESS_DESCRIPTION_free__extern(struct stack_st_ACCESS_DESCRIPTION *sk) { sk_ACCESS_DESCRIPTION_free(sk); } +void sk_ACCESS_DESCRIPTION_pop_free__extern(struct stack_st_ACCESS_DESCRIPTION *sk, sk_ACCESS_DESCRIPTION_free_func free_func) { sk_ACCESS_DESCRIPTION_pop_free(sk, free_func); } +size_t sk_ACCESS_DESCRIPTION_insert__extern(struct stack_st_ACCESS_DESCRIPTION *sk, ACCESS_DESCRIPTION *p, size_t where) { return sk_ACCESS_DESCRIPTION_insert(sk, p, where); } +ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_delete__extern(struct stack_st_ACCESS_DESCRIPTION *sk, size_t where) { return sk_ACCESS_DESCRIPTION_delete(sk, where); } +ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_delete_ptr__extern(struct stack_st_ACCESS_DESCRIPTION *sk, const ACCESS_DESCRIPTION *p) { return sk_ACCESS_DESCRIPTION_delete_ptr(sk, p); } +void sk_ACCESS_DESCRIPTION_delete_if__extern(struct stack_st_ACCESS_DESCRIPTION *sk, sk_ACCESS_DESCRIPTION_delete_if_func func, void *data) { sk_ACCESS_DESCRIPTION_delete_if(sk, func, data); } +int sk_ACCESS_DESCRIPTION_find__extern(const struct stack_st_ACCESS_DESCRIPTION *sk, size_t *out_index, const ACCESS_DESCRIPTION *p) { return sk_ACCESS_DESCRIPTION_find(sk, out_index, p); } +ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_shift__extern(struct stack_st_ACCESS_DESCRIPTION *sk) { return sk_ACCESS_DESCRIPTION_shift(sk); } +size_t sk_ACCESS_DESCRIPTION_push__extern(struct stack_st_ACCESS_DESCRIPTION *sk, ACCESS_DESCRIPTION *p) { return sk_ACCESS_DESCRIPTION_push(sk, p); } +ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_pop__extern(struct stack_st_ACCESS_DESCRIPTION *sk) { return sk_ACCESS_DESCRIPTION_pop(sk); } +struct stack_st_ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_dup__extern(const struct stack_st_ACCESS_DESCRIPTION *sk) { return sk_ACCESS_DESCRIPTION_dup(sk); } +void sk_ACCESS_DESCRIPTION_sort__extern(struct stack_st_ACCESS_DESCRIPTION *sk) { sk_ACCESS_DESCRIPTION_sort(sk); } +void sk_ACCESS_DESCRIPTION_sort_and_dedup__extern(struct stack_st_ACCESS_DESCRIPTION *sk, sk_ACCESS_DESCRIPTION_free_func free_func) { sk_ACCESS_DESCRIPTION_sort_and_dedup(sk, free_func); } +int sk_ACCESS_DESCRIPTION_is_sorted__extern(const struct stack_st_ACCESS_DESCRIPTION *sk) { return sk_ACCESS_DESCRIPTION_is_sorted(sk); } +sk_ACCESS_DESCRIPTION_cmp_func sk_ACCESS_DESCRIPTION_set_cmp_func__extern(struct stack_st_ACCESS_DESCRIPTION *sk, sk_ACCESS_DESCRIPTION_cmp_func comp) { return sk_ACCESS_DESCRIPTION_set_cmp_func(sk, comp); } +struct stack_st_ACCESS_DESCRIPTION * sk_ACCESS_DESCRIPTION_deep_copy__extern(const struct stack_st_ACCESS_DESCRIPTION *sk, sk_ACCESS_DESCRIPTION_copy_func copy_func, sk_ACCESS_DESCRIPTION_free_func free_func) { return sk_ACCESS_DESCRIPTION_deep_copy(sk, copy_func, free_func); } +void sk_DIST_POINT_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_DIST_POINT_call_free_func(free_func, ptr); } +void * sk_DIST_POINT_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_DIST_POINT_call_copy_func(copy_func, ptr); } +int sk_DIST_POINT_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_DIST_POINT_call_cmp_func(cmp_func, a, b); } +int sk_DIST_POINT_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_DIST_POINT_call_delete_if_func(func, obj, data); } +struct stack_st_DIST_POINT * sk_DIST_POINT_new__extern(sk_DIST_POINT_cmp_func comp) { return sk_DIST_POINT_new(comp); } +struct stack_st_DIST_POINT * sk_DIST_POINT_new_null__extern(void) { return sk_DIST_POINT_new_null(); } +size_t sk_DIST_POINT_num__extern(const struct stack_st_DIST_POINT *sk) { return sk_DIST_POINT_num(sk); } +void sk_DIST_POINT_zero__extern(struct stack_st_DIST_POINT *sk) { sk_DIST_POINT_zero(sk); } +DIST_POINT * sk_DIST_POINT_value__extern(const struct stack_st_DIST_POINT *sk, size_t i) { return sk_DIST_POINT_value(sk, i); } +DIST_POINT * sk_DIST_POINT_set__extern(struct stack_st_DIST_POINT *sk, size_t i, DIST_POINT *p) { return sk_DIST_POINT_set(sk, i, p); } +void sk_DIST_POINT_free__extern(struct stack_st_DIST_POINT *sk) { sk_DIST_POINT_free(sk); } +void sk_DIST_POINT_pop_free__extern(struct stack_st_DIST_POINT *sk, sk_DIST_POINT_free_func free_func) { sk_DIST_POINT_pop_free(sk, free_func); } +size_t sk_DIST_POINT_insert__extern(struct stack_st_DIST_POINT *sk, DIST_POINT *p, size_t where) { return sk_DIST_POINT_insert(sk, p, where); } +DIST_POINT * sk_DIST_POINT_delete__extern(struct stack_st_DIST_POINT *sk, size_t where) { return sk_DIST_POINT_delete(sk, where); } +DIST_POINT * sk_DIST_POINT_delete_ptr__extern(struct stack_st_DIST_POINT *sk, const DIST_POINT *p) { return sk_DIST_POINT_delete_ptr(sk, p); } +void sk_DIST_POINT_delete_if__extern(struct stack_st_DIST_POINT *sk, sk_DIST_POINT_delete_if_func func, void *data) { sk_DIST_POINT_delete_if(sk, func, data); } +int sk_DIST_POINT_find__extern(const struct stack_st_DIST_POINT *sk, size_t *out_index, const DIST_POINT *p) { return sk_DIST_POINT_find(sk, out_index, p); } +DIST_POINT * sk_DIST_POINT_shift__extern(struct stack_st_DIST_POINT *sk) { return sk_DIST_POINT_shift(sk); } +size_t sk_DIST_POINT_push__extern(struct stack_st_DIST_POINT *sk, DIST_POINT *p) { return sk_DIST_POINT_push(sk, p); } +DIST_POINT * sk_DIST_POINT_pop__extern(struct stack_st_DIST_POINT *sk) { return sk_DIST_POINT_pop(sk); } +struct stack_st_DIST_POINT * sk_DIST_POINT_dup__extern(const struct stack_st_DIST_POINT *sk) { return sk_DIST_POINT_dup(sk); } +void sk_DIST_POINT_sort__extern(struct stack_st_DIST_POINT *sk) { sk_DIST_POINT_sort(sk); } +void sk_DIST_POINT_sort_and_dedup__extern(struct stack_st_DIST_POINT *sk, sk_DIST_POINT_free_func free_func) { sk_DIST_POINT_sort_and_dedup(sk, free_func); } +int sk_DIST_POINT_is_sorted__extern(const struct stack_st_DIST_POINT *sk) { return sk_DIST_POINT_is_sorted(sk); } +sk_DIST_POINT_cmp_func sk_DIST_POINT_set_cmp_func__extern(struct stack_st_DIST_POINT *sk, sk_DIST_POINT_cmp_func comp) { return sk_DIST_POINT_set_cmp_func(sk, comp); } +struct stack_st_DIST_POINT * sk_DIST_POINT_deep_copy__extern(const struct stack_st_DIST_POINT *sk, sk_DIST_POINT_copy_func copy_func, sk_DIST_POINT_free_func free_func) { return sk_DIST_POINT_deep_copy(sk, copy_func, free_func); } +void sk_POLICYQUALINFO_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_POLICYQUALINFO_call_free_func(free_func, ptr); } +void * sk_POLICYQUALINFO_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_POLICYQUALINFO_call_copy_func(copy_func, ptr); } +int sk_POLICYQUALINFO_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_POLICYQUALINFO_call_cmp_func(cmp_func, a, b); } +int sk_POLICYQUALINFO_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_POLICYQUALINFO_call_delete_if_func(func, obj, data); } +struct stack_st_POLICYQUALINFO * sk_POLICYQUALINFO_new__extern(sk_POLICYQUALINFO_cmp_func comp) { return sk_POLICYQUALINFO_new(comp); } +struct stack_st_POLICYQUALINFO * sk_POLICYQUALINFO_new_null__extern(void) { return sk_POLICYQUALINFO_new_null(); } +size_t sk_POLICYQUALINFO_num__extern(const struct stack_st_POLICYQUALINFO *sk) { return sk_POLICYQUALINFO_num(sk); } +void sk_POLICYQUALINFO_zero__extern(struct stack_st_POLICYQUALINFO *sk) { sk_POLICYQUALINFO_zero(sk); } +POLICYQUALINFO * sk_POLICYQUALINFO_value__extern(const struct stack_st_POLICYQUALINFO *sk, size_t i) { return sk_POLICYQUALINFO_value(sk, i); } +POLICYQUALINFO * sk_POLICYQUALINFO_set__extern(struct stack_st_POLICYQUALINFO *sk, size_t i, POLICYQUALINFO *p) { return sk_POLICYQUALINFO_set(sk, i, p); } +void sk_POLICYQUALINFO_free__extern(struct stack_st_POLICYQUALINFO *sk) { sk_POLICYQUALINFO_free(sk); } +void sk_POLICYQUALINFO_pop_free__extern(struct stack_st_POLICYQUALINFO *sk, sk_POLICYQUALINFO_free_func free_func) { sk_POLICYQUALINFO_pop_free(sk, free_func); } +size_t sk_POLICYQUALINFO_insert__extern(struct stack_st_POLICYQUALINFO *sk, POLICYQUALINFO *p, size_t where) { return sk_POLICYQUALINFO_insert(sk, p, where); } +POLICYQUALINFO * sk_POLICYQUALINFO_delete__extern(struct stack_st_POLICYQUALINFO *sk, size_t where) { return sk_POLICYQUALINFO_delete(sk, where); } +POLICYQUALINFO * sk_POLICYQUALINFO_delete_ptr__extern(struct stack_st_POLICYQUALINFO *sk, const POLICYQUALINFO *p) { return sk_POLICYQUALINFO_delete_ptr(sk, p); } +void sk_POLICYQUALINFO_delete_if__extern(struct stack_st_POLICYQUALINFO *sk, sk_POLICYQUALINFO_delete_if_func func, void *data) { sk_POLICYQUALINFO_delete_if(sk, func, data); } +int sk_POLICYQUALINFO_find__extern(const struct stack_st_POLICYQUALINFO *sk, size_t *out_index, const POLICYQUALINFO *p) { return sk_POLICYQUALINFO_find(sk, out_index, p); } +POLICYQUALINFO * sk_POLICYQUALINFO_shift__extern(struct stack_st_POLICYQUALINFO *sk) { return sk_POLICYQUALINFO_shift(sk); } +size_t sk_POLICYQUALINFO_push__extern(struct stack_st_POLICYQUALINFO *sk, POLICYQUALINFO *p) { return sk_POLICYQUALINFO_push(sk, p); } +POLICYQUALINFO * sk_POLICYQUALINFO_pop__extern(struct stack_st_POLICYQUALINFO *sk) { return sk_POLICYQUALINFO_pop(sk); } +struct stack_st_POLICYQUALINFO * sk_POLICYQUALINFO_dup__extern(const struct stack_st_POLICYQUALINFO *sk) { return sk_POLICYQUALINFO_dup(sk); } +void sk_POLICYQUALINFO_sort__extern(struct stack_st_POLICYQUALINFO *sk) { sk_POLICYQUALINFO_sort(sk); } +void sk_POLICYQUALINFO_sort_and_dedup__extern(struct stack_st_POLICYQUALINFO *sk, sk_POLICYQUALINFO_free_func free_func) { sk_POLICYQUALINFO_sort_and_dedup(sk, free_func); } +int sk_POLICYQUALINFO_is_sorted__extern(const struct stack_st_POLICYQUALINFO *sk) { return sk_POLICYQUALINFO_is_sorted(sk); } +sk_POLICYQUALINFO_cmp_func sk_POLICYQUALINFO_set_cmp_func__extern(struct stack_st_POLICYQUALINFO *sk, sk_POLICYQUALINFO_cmp_func comp) { return sk_POLICYQUALINFO_set_cmp_func(sk, comp); } +struct stack_st_POLICYQUALINFO * sk_POLICYQUALINFO_deep_copy__extern(const struct stack_st_POLICYQUALINFO *sk, sk_POLICYQUALINFO_copy_func copy_func, sk_POLICYQUALINFO_free_func free_func) { return sk_POLICYQUALINFO_deep_copy(sk, copy_func, free_func); } +void sk_POLICYINFO_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_POLICYINFO_call_free_func(free_func, ptr); } +void * sk_POLICYINFO_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_POLICYINFO_call_copy_func(copy_func, ptr); } +int sk_POLICYINFO_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_POLICYINFO_call_cmp_func(cmp_func, a, b); } +int sk_POLICYINFO_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_POLICYINFO_call_delete_if_func(func, obj, data); } +struct stack_st_POLICYINFO * sk_POLICYINFO_new__extern(sk_POLICYINFO_cmp_func comp) { return sk_POLICYINFO_new(comp); } +struct stack_st_POLICYINFO * sk_POLICYINFO_new_null__extern(void) { return sk_POLICYINFO_new_null(); } +size_t sk_POLICYINFO_num__extern(const struct stack_st_POLICYINFO *sk) { return sk_POLICYINFO_num(sk); } +void sk_POLICYINFO_zero__extern(struct stack_st_POLICYINFO *sk) { sk_POLICYINFO_zero(sk); } +POLICYINFO * sk_POLICYINFO_value__extern(const struct stack_st_POLICYINFO *sk, size_t i) { return sk_POLICYINFO_value(sk, i); } +POLICYINFO * sk_POLICYINFO_set__extern(struct stack_st_POLICYINFO *sk, size_t i, POLICYINFO *p) { return sk_POLICYINFO_set(sk, i, p); } +void sk_POLICYINFO_free__extern(struct stack_st_POLICYINFO *sk) { sk_POLICYINFO_free(sk); } +void sk_POLICYINFO_pop_free__extern(struct stack_st_POLICYINFO *sk, sk_POLICYINFO_free_func free_func) { sk_POLICYINFO_pop_free(sk, free_func); } +size_t sk_POLICYINFO_insert__extern(struct stack_st_POLICYINFO *sk, POLICYINFO *p, size_t where) { return sk_POLICYINFO_insert(sk, p, where); } +POLICYINFO * sk_POLICYINFO_delete__extern(struct stack_st_POLICYINFO *sk, size_t where) { return sk_POLICYINFO_delete(sk, where); } +POLICYINFO * sk_POLICYINFO_delete_ptr__extern(struct stack_st_POLICYINFO *sk, const POLICYINFO *p) { return sk_POLICYINFO_delete_ptr(sk, p); } +void sk_POLICYINFO_delete_if__extern(struct stack_st_POLICYINFO *sk, sk_POLICYINFO_delete_if_func func, void *data) { sk_POLICYINFO_delete_if(sk, func, data); } +int sk_POLICYINFO_find__extern(const struct stack_st_POLICYINFO *sk, size_t *out_index, const POLICYINFO *p) { return sk_POLICYINFO_find(sk, out_index, p); } +POLICYINFO * sk_POLICYINFO_shift__extern(struct stack_st_POLICYINFO *sk) { return sk_POLICYINFO_shift(sk); } +size_t sk_POLICYINFO_push__extern(struct stack_st_POLICYINFO *sk, POLICYINFO *p) { return sk_POLICYINFO_push(sk, p); } +POLICYINFO * sk_POLICYINFO_pop__extern(struct stack_st_POLICYINFO *sk) { return sk_POLICYINFO_pop(sk); } +struct stack_st_POLICYINFO * sk_POLICYINFO_dup__extern(const struct stack_st_POLICYINFO *sk) { return sk_POLICYINFO_dup(sk); } +void sk_POLICYINFO_sort__extern(struct stack_st_POLICYINFO *sk) { sk_POLICYINFO_sort(sk); } +void sk_POLICYINFO_sort_and_dedup__extern(struct stack_st_POLICYINFO *sk, sk_POLICYINFO_free_func free_func) { sk_POLICYINFO_sort_and_dedup(sk, free_func); } +int sk_POLICYINFO_is_sorted__extern(const struct stack_st_POLICYINFO *sk) { return sk_POLICYINFO_is_sorted(sk); } +sk_POLICYINFO_cmp_func sk_POLICYINFO_set_cmp_func__extern(struct stack_st_POLICYINFO *sk, sk_POLICYINFO_cmp_func comp) { return sk_POLICYINFO_set_cmp_func(sk, comp); } +struct stack_st_POLICYINFO * sk_POLICYINFO_deep_copy__extern(const struct stack_st_POLICYINFO *sk, sk_POLICYINFO_copy_func copy_func, sk_POLICYINFO_free_func free_func) { return sk_POLICYINFO_deep_copy(sk, copy_func, free_func); } +void sk_POLICY_MAPPING_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_POLICY_MAPPING_call_free_func(free_func, ptr); } +void * sk_POLICY_MAPPING_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_POLICY_MAPPING_call_copy_func(copy_func, ptr); } +int sk_POLICY_MAPPING_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_POLICY_MAPPING_call_cmp_func(cmp_func, a, b); } +int sk_POLICY_MAPPING_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_POLICY_MAPPING_call_delete_if_func(func, obj, data); } +struct stack_st_POLICY_MAPPING * sk_POLICY_MAPPING_new__extern(sk_POLICY_MAPPING_cmp_func comp) { return sk_POLICY_MAPPING_new(comp); } +struct stack_st_POLICY_MAPPING * sk_POLICY_MAPPING_new_null__extern(void) { return sk_POLICY_MAPPING_new_null(); } +size_t sk_POLICY_MAPPING_num__extern(const struct stack_st_POLICY_MAPPING *sk) { return sk_POLICY_MAPPING_num(sk); } +void sk_POLICY_MAPPING_zero__extern(struct stack_st_POLICY_MAPPING *sk) { sk_POLICY_MAPPING_zero(sk); } +POLICY_MAPPING * sk_POLICY_MAPPING_value__extern(const struct stack_st_POLICY_MAPPING *sk, size_t i) { return sk_POLICY_MAPPING_value(sk, i); } +POLICY_MAPPING * sk_POLICY_MAPPING_set__extern(struct stack_st_POLICY_MAPPING *sk, size_t i, POLICY_MAPPING *p) { return sk_POLICY_MAPPING_set(sk, i, p); } +void sk_POLICY_MAPPING_free__extern(struct stack_st_POLICY_MAPPING *sk) { sk_POLICY_MAPPING_free(sk); } +void sk_POLICY_MAPPING_pop_free__extern(struct stack_st_POLICY_MAPPING *sk, sk_POLICY_MAPPING_free_func free_func) { sk_POLICY_MAPPING_pop_free(sk, free_func); } +size_t sk_POLICY_MAPPING_insert__extern(struct stack_st_POLICY_MAPPING *sk, POLICY_MAPPING *p, size_t where) { return sk_POLICY_MAPPING_insert(sk, p, where); } +POLICY_MAPPING * sk_POLICY_MAPPING_delete__extern(struct stack_st_POLICY_MAPPING *sk, size_t where) { return sk_POLICY_MAPPING_delete(sk, where); } +POLICY_MAPPING * sk_POLICY_MAPPING_delete_ptr__extern(struct stack_st_POLICY_MAPPING *sk, const POLICY_MAPPING *p) { return sk_POLICY_MAPPING_delete_ptr(sk, p); } +void sk_POLICY_MAPPING_delete_if__extern(struct stack_st_POLICY_MAPPING *sk, sk_POLICY_MAPPING_delete_if_func func, void *data) { sk_POLICY_MAPPING_delete_if(sk, func, data); } +int sk_POLICY_MAPPING_find__extern(const struct stack_st_POLICY_MAPPING *sk, size_t *out_index, const POLICY_MAPPING *p) { return sk_POLICY_MAPPING_find(sk, out_index, p); } +POLICY_MAPPING * sk_POLICY_MAPPING_shift__extern(struct stack_st_POLICY_MAPPING *sk) { return sk_POLICY_MAPPING_shift(sk); } +size_t sk_POLICY_MAPPING_push__extern(struct stack_st_POLICY_MAPPING *sk, POLICY_MAPPING *p) { return sk_POLICY_MAPPING_push(sk, p); } +POLICY_MAPPING * sk_POLICY_MAPPING_pop__extern(struct stack_st_POLICY_MAPPING *sk) { return sk_POLICY_MAPPING_pop(sk); } +struct stack_st_POLICY_MAPPING * sk_POLICY_MAPPING_dup__extern(const struct stack_st_POLICY_MAPPING *sk) { return sk_POLICY_MAPPING_dup(sk); } +void sk_POLICY_MAPPING_sort__extern(struct stack_st_POLICY_MAPPING *sk) { sk_POLICY_MAPPING_sort(sk); } +void sk_POLICY_MAPPING_sort_and_dedup__extern(struct stack_st_POLICY_MAPPING *sk, sk_POLICY_MAPPING_free_func free_func) { sk_POLICY_MAPPING_sort_and_dedup(sk, free_func); } +int sk_POLICY_MAPPING_is_sorted__extern(const struct stack_st_POLICY_MAPPING *sk) { return sk_POLICY_MAPPING_is_sorted(sk); } +sk_POLICY_MAPPING_cmp_func sk_POLICY_MAPPING_set_cmp_func__extern(struct stack_st_POLICY_MAPPING *sk, sk_POLICY_MAPPING_cmp_func comp) { return sk_POLICY_MAPPING_set_cmp_func(sk, comp); } +struct stack_st_POLICY_MAPPING * sk_POLICY_MAPPING_deep_copy__extern(const struct stack_st_POLICY_MAPPING *sk, sk_POLICY_MAPPING_copy_func copy_func, sk_POLICY_MAPPING_free_func free_func) { return sk_POLICY_MAPPING_deep_copy(sk, copy_func, free_func); } +void sk_X509_ALGOR_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_ALGOR_call_free_func(free_func, ptr); } +void * sk_X509_ALGOR_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_ALGOR_call_copy_func(copy_func, ptr); } +int sk_X509_ALGOR_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_ALGOR_call_cmp_func(cmp_func, a, b); } +int sk_X509_ALGOR_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_ALGOR_call_delete_if_func(func, obj, data); } +struct stack_st_X509_ALGOR * sk_X509_ALGOR_new__extern(sk_X509_ALGOR_cmp_func comp) { return sk_X509_ALGOR_new(comp); } +struct stack_st_X509_ALGOR * sk_X509_ALGOR_new_null__extern(void) { return sk_X509_ALGOR_new_null(); } +size_t sk_X509_ALGOR_num__extern(const struct stack_st_X509_ALGOR *sk) { return sk_X509_ALGOR_num(sk); } +void sk_X509_ALGOR_zero__extern(struct stack_st_X509_ALGOR *sk) { sk_X509_ALGOR_zero(sk); } +X509_ALGOR * sk_X509_ALGOR_value__extern(const struct stack_st_X509_ALGOR *sk, size_t i) { return sk_X509_ALGOR_value(sk, i); } +X509_ALGOR * sk_X509_ALGOR_set__extern(struct stack_st_X509_ALGOR *sk, size_t i, X509_ALGOR *p) { return sk_X509_ALGOR_set(sk, i, p); } +void sk_X509_ALGOR_free__extern(struct stack_st_X509_ALGOR *sk) { sk_X509_ALGOR_free(sk); } +void sk_X509_ALGOR_pop_free__extern(struct stack_st_X509_ALGOR *sk, sk_X509_ALGOR_free_func free_func) { sk_X509_ALGOR_pop_free(sk, free_func); } +size_t sk_X509_ALGOR_insert__extern(struct stack_st_X509_ALGOR *sk, X509_ALGOR *p, size_t where) { return sk_X509_ALGOR_insert(sk, p, where); } +X509_ALGOR * sk_X509_ALGOR_delete__extern(struct stack_st_X509_ALGOR *sk, size_t where) { return sk_X509_ALGOR_delete(sk, where); } +X509_ALGOR * sk_X509_ALGOR_delete_ptr__extern(struct stack_st_X509_ALGOR *sk, const X509_ALGOR *p) { return sk_X509_ALGOR_delete_ptr(sk, p); } +void sk_X509_ALGOR_delete_if__extern(struct stack_st_X509_ALGOR *sk, sk_X509_ALGOR_delete_if_func func, void *data) { sk_X509_ALGOR_delete_if(sk, func, data); } +int sk_X509_ALGOR_find__extern(const struct stack_st_X509_ALGOR *sk, size_t *out_index, const X509_ALGOR *p) { return sk_X509_ALGOR_find(sk, out_index, p); } +X509_ALGOR * sk_X509_ALGOR_shift__extern(struct stack_st_X509_ALGOR *sk) { return sk_X509_ALGOR_shift(sk); } +size_t sk_X509_ALGOR_push__extern(struct stack_st_X509_ALGOR *sk, X509_ALGOR *p) { return sk_X509_ALGOR_push(sk, p); } +X509_ALGOR * sk_X509_ALGOR_pop__extern(struct stack_st_X509_ALGOR *sk) { return sk_X509_ALGOR_pop(sk); } +struct stack_st_X509_ALGOR * sk_X509_ALGOR_dup__extern(const struct stack_st_X509_ALGOR *sk) { return sk_X509_ALGOR_dup(sk); } +void sk_X509_ALGOR_sort__extern(struct stack_st_X509_ALGOR *sk) { sk_X509_ALGOR_sort(sk); } +void sk_X509_ALGOR_sort_and_dedup__extern(struct stack_st_X509_ALGOR *sk, sk_X509_ALGOR_free_func free_func) { sk_X509_ALGOR_sort_and_dedup(sk, free_func); } +int sk_X509_ALGOR_is_sorted__extern(const struct stack_st_X509_ALGOR *sk) { return sk_X509_ALGOR_is_sorted(sk); } +sk_X509_ALGOR_cmp_func sk_X509_ALGOR_set_cmp_func__extern(struct stack_st_X509_ALGOR *sk, sk_X509_ALGOR_cmp_func comp) { return sk_X509_ALGOR_set_cmp_func(sk, comp); } +struct stack_st_X509_ALGOR * sk_X509_ALGOR_deep_copy__extern(const struct stack_st_X509_ALGOR *sk, sk_X509_ALGOR_copy_func copy_func, sk_X509_ALGOR_free_func free_func) { return sk_X509_ALGOR_deep_copy(sk, copy_func, free_func); } +void sk_X509_ATTRIBUTE_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_ATTRIBUTE_call_free_func(free_func, ptr); } +void * sk_X509_ATTRIBUTE_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_ATTRIBUTE_call_copy_func(copy_func, ptr); } +int sk_X509_ATTRIBUTE_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_ATTRIBUTE_call_cmp_func(cmp_func, a, b); } +int sk_X509_ATTRIBUTE_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_ATTRIBUTE_call_delete_if_func(func, obj, data); } +struct stack_st_X509_ATTRIBUTE * sk_X509_ATTRIBUTE_new__extern(sk_X509_ATTRIBUTE_cmp_func comp) { return sk_X509_ATTRIBUTE_new(comp); } +struct stack_st_X509_ATTRIBUTE * sk_X509_ATTRIBUTE_new_null__extern(void) { return sk_X509_ATTRIBUTE_new_null(); } +size_t sk_X509_ATTRIBUTE_num__extern(const struct stack_st_X509_ATTRIBUTE *sk) { return sk_X509_ATTRIBUTE_num(sk); } +void sk_X509_ATTRIBUTE_zero__extern(struct stack_st_X509_ATTRIBUTE *sk) { sk_X509_ATTRIBUTE_zero(sk); } +X509_ATTRIBUTE * sk_X509_ATTRIBUTE_value__extern(const struct stack_st_X509_ATTRIBUTE *sk, size_t i) { return sk_X509_ATTRIBUTE_value(sk, i); } +X509_ATTRIBUTE * sk_X509_ATTRIBUTE_set__extern(struct stack_st_X509_ATTRIBUTE *sk, size_t i, X509_ATTRIBUTE *p) { return sk_X509_ATTRIBUTE_set(sk, i, p); } +void sk_X509_ATTRIBUTE_free__extern(struct stack_st_X509_ATTRIBUTE *sk) { sk_X509_ATTRIBUTE_free(sk); } +void sk_X509_ATTRIBUTE_pop_free__extern(struct stack_st_X509_ATTRIBUTE *sk, sk_X509_ATTRIBUTE_free_func free_func) { sk_X509_ATTRIBUTE_pop_free(sk, free_func); } +size_t sk_X509_ATTRIBUTE_insert__extern(struct stack_st_X509_ATTRIBUTE *sk, X509_ATTRIBUTE *p, size_t where) { return sk_X509_ATTRIBUTE_insert(sk, p, where); } +X509_ATTRIBUTE * sk_X509_ATTRIBUTE_delete__extern(struct stack_st_X509_ATTRIBUTE *sk, size_t where) { return sk_X509_ATTRIBUTE_delete(sk, where); } +X509_ATTRIBUTE * sk_X509_ATTRIBUTE_delete_ptr__extern(struct stack_st_X509_ATTRIBUTE *sk, const X509_ATTRIBUTE *p) { return sk_X509_ATTRIBUTE_delete_ptr(sk, p); } +void sk_X509_ATTRIBUTE_delete_if__extern(struct stack_st_X509_ATTRIBUTE *sk, sk_X509_ATTRIBUTE_delete_if_func func, void *data) { sk_X509_ATTRIBUTE_delete_if(sk, func, data); } +int sk_X509_ATTRIBUTE_find__extern(const struct stack_st_X509_ATTRIBUTE *sk, size_t *out_index, const X509_ATTRIBUTE *p) { return sk_X509_ATTRIBUTE_find(sk, out_index, p); } +X509_ATTRIBUTE * sk_X509_ATTRIBUTE_shift__extern(struct stack_st_X509_ATTRIBUTE *sk) { return sk_X509_ATTRIBUTE_shift(sk); } +size_t sk_X509_ATTRIBUTE_push__extern(struct stack_st_X509_ATTRIBUTE *sk, X509_ATTRIBUTE *p) { return sk_X509_ATTRIBUTE_push(sk, p); } +X509_ATTRIBUTE * sk_X509_ATTRIBUTE_pop__extern(struct stack_st_X509_ATTRIBUTE *sk) { return sk_X509_ATTRIBUTE_pop(sk); } +struct stack_st_X509_ATTRIBUTE * sk_X509_ATTRIBUTE_dup__extern(const struct stack_st_X509_ATTRIBUTE *sk) { return sk_X509_ATTRIBUTE_dup(sk); } +void sk_X509_ATTRIBUTE_sort__extern(struct stack_st_X509_ATTRIBUTE *sk) { sk_X509_ATTRIBUTE_sort(sk); } +void sk_X509_ATTRIBUTE_sort_and_dedup__extern(struct stack_st_X509_ATTRIBUTE *sk, sk_X509_ATTRIBUTE_free_func free_func) { sk_X509_ATTRIBUTE_sort_and_dedup(sk, free_func); } +int sk_X509_ATTRIBUTE_is_sorted__extern(const struct stack_st_X509_ATTRIBUTE *sk) { return sk_X509_ATTRIBUTE_is_sorted(sk); } +sk_X509_ATTRIBUTE_cmp_func sk_X509_ATTRIBUTE_set_cmp_func__extern(struct stack_st_X509_ATTRIBUTE *sk, sk_X509_ATTRIBUTE_cmp_func comp) { return sk_X509_ATTRIBUTE_set_cmp_func(sk, comp); } +struct stack_st_X509_ATTRIBUTE * sk_X509_ATTRIBUTE_deep_copy__extern(const struct stack_st_X509_ATTRIBUTE *sk, sk_X509_ATTRIBUTE_copy_func copy_func, sk_X509_ATTRIBUTE_free_func free_func) { return sk_X509_ATTRIBUTE_deep_copy(sk, copy_func, free_func); } +void sk_X509_OBJECT_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_OBJECT_call_free_func(free_func, ptr); } +void * sk_X509_OBJECT_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_OBJECT_call_copy_func(copy_func, ptr); } +int sk_X509_OBJECT_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_OBJECT_call_cmp_func(cmp_func, a, b); } +int sk_X509_OBJECT_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_OBJECT_call_delete_if_func(func, obj, data); } +struct stack_st_X509_OBJECT * sk_X509_OBJECT_new__extern(sk_X509_OBJECT_cmp_func comp) { return sk_X509_OBJECT_new(comp); } +struct stack_st_X509_OBJECT * sk_X509_OBJECT_new_null__extern(void) { return sk_X509_OBJECT_new_null(); } +size_t sk_X509_OBJECT_num__extern(const struct stack_st_X509_OBJECT *sk) { return sk_X509_OBJECT_num(sk); } +void sk_X509_OBJECT_zero__extern(struct stack_st_X509_OBJECT *sk) { sk_X509_OBJECT_zero(sk); } +X509_OBJECT * sk_X509_OBJECT_value__extern(const struct stack_st_X509_OBJECT *sk, size_t i) { return sk_X509_OBJECT_value(sk, i); } +X509_OBJECT * sk_X509_OBJECT_set__extern(struct stack_st_X509_OBJECT *sk, size_t i, X509_OBJECT *p) { return sk_X509_OBJECT_set(sk, i, p); } +void sk_X509_OBJECT_free__extern(struct stack_st_X509_OBJECT *sk) { sk_X509_OBJECT_free(sk); } +void sk_X509_OBJECT_pop_free__extern(struct stack_st_X509_OBJECT *sk, sk_X509_OBJECT_free_func free_func) { sk_X509_OBJECT_pop_free(sk, free_func); } +size_t sk_X509_OBJECT_insert__extern(struct stack_st_X509_OBJECT *sk, X509_OBJECT *p, size_t where) { return sk_X509_OBJECT_insert(sk, p, where); } +X509_OBJECT * sk_X509_OBJECT_delete__extern(struct stack_st_X509_OBJECT *sk, size_t where) { return sk_X509_OBJECT_delete(sk, where); } +X509_OBJECT * sk_X509_OBJECT_delete_ptr__extern(struct stack_st_X509_OBJECT *sk, const X509_OBJECT *p) { return sk_X509_OBJECT_delete_ptr(sk, p); } +void sk_X509_OBJECT_delete_if__extern(struct stack_st_X509_OBJECT *sk, sk_X509_OBJECT_delete_if_func func, void *data) { sk_X509_OBJECT_delete_if(sk, func, data); } +int sk_X509_OBJECT_find__extern(const struct stack_st_X509_OBJECT *sk, size_t *out_index, const X509_OBJECT *p) { return sk_X509_OBJECT_find(sk, out_index, p); } +X509_OBJECT * sk_X509_OBJECT_shift__extern(struct stack_st_X509_OBJECT *sk) { return sk_X509_OBJECT_shift(sk); } +size_t sk_X509_OBJECT_push__extern(struct stack_st_X509_OBJECT *sk, X509_OBJECT *p) { return sk_X509_OBJECT_push(sk, p); } +X509_OBJECT * sk_X509_OBJECT_pop__extern(struct stack_st_X509_OBJECT *sk) { return sk_X509_OBJECT_pop(sk); } +struct stack_st_X509_OBJECT * sk_X509_OBJECT_dup__extern(const struct stack_st_X509_OBJECT *sk) { return sk_X509_OBJECT_dup(sk); } +void sk_X509_OBJECT_sort__extern(struct stack_st_X509_OBJECT *sk) { sk_X509_OBJECT_sort(sk); } +void sk_X509_OBJECT_sort_and_dedup__extern(struct stack_st_X509_OBJECT *sk, sk_X509_OBJECT_free_func free_func) { sk_X509_OBJECT_sort_and_dedup(sk, free_func); } +int sk_X509_OBJECT_is_sorted__extern(const struct stack_st_X509_OBJECT *sk) { return sk_X509_OBJECT_is_sorted(sk); } +sk_X509_OBJECT_cmp_func sk_X509_OBJECT_set_cmp_func__extern(struct stack_st_X509_OBJECT *sk, sk_X509_OBJECT_cmp_func comp) { return sk_X509_OBJECT_set_cmp_func(sk, comp); } +struct stack_st_X509_OBJECT * sk_X509_OBJECT_deep_copy__extern(const struct stack_st_X509_OBJECT *sk, sk_X509_OBJECT_copy_func copy_func, sk_X509_OBJECT_free_func free_func) { return sk_X509_OBJECT_deep_copy(sk, copy_func, free_func); } +void sk_X509_INFO_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_X509_INFO_call_free_func(free_func, ptr); } +void * sk_X509_INFO_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_X509_INFO_call_copy_func(copy_func, ptr); } +int sk_X509_INFO_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_X509_INFO_call_cmp_func(cmp_func, a, b); } +int sk_X509_INFO_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_X509_INFO_call_delete_if_func(func, obj, data); } +struct stack_st_X509_INFO * sk_X509_INFO_new__extern(sk_X509_INFO_cmp_func comp) { return sk_X509_INFO_new(comp); } +struct stack_st_X509_INFO * sk_X509_INFO_new_null__extern(void) { return sk_X509_INFO_new_null(); } +size_t sk_X509_INFO_num__extern(const struct stack_st_X509_INFO *sk) { return sk_X509_INFO_num(sk); } +void sk_X509_INFO_zero__extern(struct stack_st_X509_INFO *sk) { sk_X509_INFO_zero(sk); } +X509_INFO * sk_X509_INFO_value__extern(const struct stack_st_X509_INFO *sk, size_t i) { return sk_X509_INFO_value(sk, i); } +X509_INFO * sk_X509_INFO_set__extern(struct stack_st_X509_INFO *sk, size_t i, X509_INFO *p) { return sk_X509_INFO_set(sk, i, p); } +void sk_X509_INFO_free__extern(struct stack_st_X509_INFO *sk) { sk_X509_INFO_free(sk); } +void sk_X509_INFO_pop_free__extern(struct stack_st_X509_INFO *sk, sk_X509_INFO_free_func free_func) { sk_X509_INFO_pop_free(sk, free_func); } +size_t sk_X509_INFO_insert__extern(struct stack_st_X509_INFO *sk, X509_INFO *p, size_t where) { return sk_X509_INFO_insert(sk, p, where); } +X509_INFO * sk_X509_INFO_delete__extern(struct stack_st_X509_INFO *sk, size_t where) { return sk_X509_INFO_delete(sk, where); } +X509_INFO * sk_X509_INFO_delete_ptr__extern(struct stack_st_X509_INFO *sk, const X509_INFO *p) { return sk_X509_INFO_delete_ptr(sk, p); } +void sk_X509_INFO_delete_if__extern(struct stack_st_X509_INFO *sk, sk_X509_INFO_delete_if_func func, void *data) { sk_X509_INFO_delete_if(sk, func, data); } +int sk_X509_INFO_find__extern(const struct stack_st_X509_INFO *sk, size_t *out_index, const X509_INFO *p) { return sk_X509_INFO_find(sk, out_index, p); } +X509_INFO * sk_X509_INFO_shift__extern(struct stack_st_X509_INFO *sk) { return sk_X509_INFO_shift(sk); } +size_t sk_X509_INFO_push__extern(struct stack_st_X509_INFO *sk, X509_INFO *p) { return sk_X509_INFO_push(sk, p); } +X509_INFO * sk_X509_INFO_pop__extern(struct stack_st_X509_INFO *sk) { return sk_X509_INFO_pop(sk); } +struct stack_st_X509_INFO * sk_X509_INFO_dup__extern(const struct stack_st_X509_INFO *sk) { return sk_X509_INFO_dup(sk); } +void sk_X509_INFO_sort__extern(struct stack_st_X509_INFO *sk) { sk_X509_INFO_sort(sk); } +void sk_X509_INFO_sort_and_dedup__extern(struct stack_st_X509_INFO *sk, sk_X509_INFO_free_func free_func) { sk_X509_INFO_sort_and_dedup(sk, free_func); } +int sk_X509_INFO_is_sorted__extern(const struct stack_st_X509_INFO *sk) { return sk_X509_INFO_is_sorted(sk); } +sk_X509_INFO_cmp_func sk_X509_INFO_set_cmp_func__extern(struct stack_st_X509_INFO *sk, sk_X509_INFO_cmp_func comp) { return sk_X509_INFO_set_cmp_func(sk, comp); } +struct stack_st_X509_INFO * sk_X509_INFO_deep_copy__extern(const struct stack_st_X509_INFO *sk, sk_X509_INFO_copy_func copy_func, sk_X509_INFO_free_func free_func) { return sk_X509_INFO_deep_copy(sk, copy_func, free_func); } +void sk_SSL_CIPHER_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_SSL_CIPHER_call_free_func(free_func, ptr); } +void * sk_SSL_CIPHER_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_SSL_CIPHER_call_copy_func(copy_func, ptr); } +int sk_SSL_CIPHER_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_SSL_CIPHER_call_cmp_func(cmp_func, a, b); } +int sk_SSL_CIPHER_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_SSL_CIPHER_call_delete_if_func(func, obj, data); } +struct stack_st_SSL_CIPHER * sk_SSL_CIPHER_new__extern(sk_SSL_CIPHER_cmp_func comp) { return sk_SSL_CIPHER_new(comp); } +struct stack_st_SSL_CIPHER * sk_SSL_CIPHER_new_null__extern(void) { return sk_SSL_CIPHER_new_null(); } +size_t sk_SSL_CIPHER_num__extern(const struct stack_st_SSL_CIPHER *sk) { return sk_SSL_CIPHER_num(sk); } +void sk_SSL_CIPHER_zero__extern(struct stack_st_SSL_CIPHER *sk) { sk_SSL_CIPHER_zero(sk); } +const SSL_CIPHER * sk_SSL_CIPHER_value__extern(const struct stack_st_SSL_CIPHER *sk, size_t i) { return sk_SSL_CIPHER_value(sk, i); } +const SSL_CIPHER * sk_SSL_CIPHER_set__extern(struct stack_st_SSL_CIPHER *sk, size_t i, const SSL_CIPHER *p) { return sk_SSL_CIPHER_set(sk, i, p); } +void sk_SSL_CIPHER_free__extern(struct stack_st_SSL_CIPHER *sk) { sk_SSL_CIPHER_free(sk); } +void sk_SSL_CIPHER_pop_free__extern(struct stack_st_SSL_CIPHER *sk, sk_SSL_CIPHER_free_func free_func) { sk_SSL_CIPHER_pop_free(sk, free_func); } +size_t sk_SSL_CIPHER_insert__extern(struct stack_st_SSL_CIPHER *sk, const SSL_CIPHER *p, size_t where) { return sk_SSL_CIPHER_insert(sk, p, where); } +const SSL_CIPHER * sk_SSL_CIPHER_delete__extern(struct stack_st_SSL_CIPHER *sk, size_t where) { return sk_SSL_CIPHER_delete(sk, where); } +const SSL_CIPHER * sk_SSL_CIPHER_delete_ptr__extern(struct stack_st_SSL_CIPHER *sk, const SSL_CIPHER *p) { return sk_SSL_CIPHER_delete_ptr(sk, p); } +void sk_SSL_CIPHER_delete_if__extern(struct stack_st_SSL_CIPHER *sk, sk_SSL_CIPHER_delete_if_func func, void *data) { sk_SSL_CIPHER_delete_if(sk, func, data); } +int sk_SSL_CIPHER_find__extern(const struct stack_st_SSL_CIPHER *sk, size_t *out_index, const SSL_CIPHER *p) { return sk_SSL_CIPHER_find(sk, out_index, p); } +const SSL_CIPHER * sk_SSL_CIPHER_shift__extern(struct stack_st_SSL_CIPHER *sk) { return sk_SSL_CIPHER_shift(sk); } +size_t sk_SSL_CIPHER_push__extern(struct stack_st_SSL_CIPHER *sk, const SSL_CIPHER *p) { return sk_SSL_CIPHER_push(sk, p); } +const SSL_CIPHER * sk_SSL_CIPHER_pop__extern(struct stack_st_SSL_CIPHER *sk) { return sk_SSL_CIPHER_pop(sk); } +struct stack_st_SSL_CIPHER * sk_SSL_CIPHER_dup__extern(const struct stack_st_SSL_CIPHER *sk) { return sk_SSL_CIPHER_dup(sk); } +void sk_SSL_CIPHER_sort__extern(struct stack_st_SSL_CIPHER *sk) { sk_SSL_CIPHER_sort(sk); } +void sk_SSL_CIPHER_sort_and_dedup__extern(struct stack_st_SSL_CIPHER *sk, sk_SSL_CIPHER_free_func free_func) { sk_SSL_CIPHER_sort_and_dedup(sk, free_func); } +int sk_SSL_CIPHER_is_sorted__extern(const struct stack_st_SSL_CIPHER *sk) { return sk_SSL_CIPHER_is_sorted(sk); } +sk_SSL_CIPHER_cmp_func sk_SSL_CIPHER_set_cmp_func__extern(struct stack_st_SSL_CIPHER *sk, sk_SSL_CIPHER_cmp_func comp) { return sk_SSL_CIPHER_set_cmp_func(sk, comp); } +struct stack_st_SSL_CIPHER * sk_SSL_CIPHER_deep_copy__extern(const struct stack_st_SSL_CIPHER *sk, sk_SSL_CIPHER_copy_func copy_func, sk_SSL_CIPHER_free_func free_func) { return sk_SSL_CIPHER_deep_copy(sk, copy_func, free_func); } +void sk_SRTP_PROTECTION_PROFILE_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_SRTP_PROTECTION_PROFILE_call_free_func(free_func, ptr); } +void * sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_SRTP_PROTECTION_PROFILE_call_copy_func(copy_func, ptr); } +int sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_SRTP_PROTECTION_PROFILE_call_cmp_func(cmp_func, a, b); } +int sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_SRTP_PROTECTION_PROFILE_call_delete_if_func(func, obj, data); } +struct stack_st_SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_new__extern(sk_SRTP_PROTECTION_PROFILE_cmp_func comp) { return sk_SRTP_PROTECTION_PROFILE_new(comp); } +struct stack_st_SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_new_null__extern(void) { return sk_SRTP_PROTECTION_PROFILE_new_null(); } +size_t sk_SRTP_PROTECTION_PROFILE_num__extern(const struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return sk_SRTP_PROTECTION_PROFILE_num(sk); } +void sk_SRTP_PROTECTION_PROFILE_zero__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { sk_SRTP_PROTECTION_PROFILE_zero(sk); } +const SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_value__extern(const struct stack_st_SRTP_PROTECTION_PROFILE *sk, size_t i) { return sk_SRTP_PROTECTION_PROFILE_value(sk, i); } +const SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_set__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, size_t i, const SRTP_PROTECTION_PROFILE *p) { return sk_SRTP_PROTECTION_PROFILE_set(sk, i, p); } +void sk_SRTP_PROTECTION_PROFILE_free__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { sk_SRTP_PROTECTION_PROFILE_free(sk); } +void sk_SRTP_PROTECTION_PROFILE_pop_free__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, sk_SRTP_PROTECTION_PROFILE_free_func free_func) { sk_SRTP_PROTECTION_PROFILE_pop_free(sk, free_func); } +size_t sk_SRTP_PROTECTION_PROFILE_insert__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, const SRTP_PROTECTION_PROFILE *p, size_t where) { return sk_SRTP_PROTECTION_PROFILE_insert(sk, p, where); } +const SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_delete__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, size_t where) { return sk_SRTP_PROTECTION_PROFILE_delete(sk, where); } +const SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, const SRTP_PROTECTION_PROFILE *p) { return sk_SRTP_PROTECTION_PROFILE_delete_ptr(sk, p); } +void sk_SRTP_PROTECTION_PROFILE_delete_if__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, sk_SRTP_PROTECTION_PROFILE_delete_if_func func, void *data) { sk_SRTP_PROTECTION_PROFILE_delete_if(sk, func, data); } +int sk_SRTP_PROTECTION_PROFILE_find__extern(const struct stack_st_SRTP_PROTECTION_PROFILE *sk, size_t *out_index, const SRTP_PROTECTION_PROFILE *p) { return sk_SRTP_PROTECTION_PROFILE_find(sk, out_index, p); } +const SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_shift__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return sk_SRTP_PROTECTION_PROFILE_shift(sk); } +size_t sk_SRTP_PROTECTION_PROFILE_push__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, const SRTP_PROTECTION_PROFILE *p) { return sk_SRTP_PROTECTION_PROFILE_push(sk, p); } +const SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_pop__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return sk_SRTP_PROTECTION_PROFILE_pop(sk); } +struct stack_st_SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_dup__extern(const struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return sk_SRTP_PROTECTION_PROFILE_dup(sk); } +void sk_SRTP_PROTECTION_PROFILE_sort__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk) { sk_SRTP_PROTECTION_PROFILE_sort(sk); } +void sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, sk_SRTP_PROTECTION_PROFILE_free_func free_func) { sk_SRTP_PROTECTION_PROFILE_sort_and_dedup(sk, free_func); } +int sk_SRTP_PROTECTION_PROFILE_is_sorted__extern(const struct stack_st_SRTP_PROTECTION_PROFILE *sk) { return sk_SRTP_PROTECTION_PROFILE_is_sorted(sk); } +sk_SRTP_PROTECTION_PROFILE_cmp_func sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern(struct stack_st_SRTP_PROTECTION_PROFILE *sk, sk_SRTP_PROTECTION_PROFILE_cmp_func comp) { return sk_SRTP_PROTECTION_PROFILE_set_cmp_func(sk, comp); } +struct stack_st_SRTP_PROTECTION_PROFILE * sk_SRTP_PROTECTION_PROFILE_deep_copy__extern(const struct stack_st_SRTP_PROTECTION_PROFILE *sk, sk_SRTP_PROTECTION_PROFILE_copy_func copy_func, sk_SRTP_PROTECTION_PROFILE_free_func free_func) { return sk_SRTP_PROTECTION_PROFILE_deep_copy(sk, copy_func, free_func); } +void sk_SSL_COMP_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_SSL_COMP_call_free_func(free_func, ptr); } +void * sk_SSL_COMP_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_SSL_COMP_call_copy_func(copy_func, ptr); } +int sk_SSL_COMP_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_SSL_COMP_call_cmp_func(cmp_func, a, b); } +int sk_SSL_COMP_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_SSL_COMP_call_delete_if_func(func, obj, data); } +struct stack_st_SSL_COMP * sk_SSL_COMP_new__extern(sk_SSL_COMP_cmp_func comp) { return sk_SSL_COMP_new(comp); } +struct stack_st_SSL_COMP * sk_SSL_COMP_new_null__extern(void) { return sk_SSL_COMP_new_null(); } +size_t sk_SSL_COMP_num__extern(const struct stack_st_SSL_COMP *sk) { return sk_SSL_COMP_num(sk); } +void sk_SSL_COMP_zero__extern(struct stack_st_SSL_COMP *sk) { sk_SSL_COMP_zero(sk); } +SSL_COMP * sk_SSL_COMP_value__extern(const struct stack_st_SSL_COMP *sk, size_t i) { return sk_SSL_COMP_value(sk, i); } +SSL_COMP * sk_SSL_COMP_set__extern(struct stack_st_SSL_COMP *sk, size_t i, SSL_COMP *p) { return sk_SSL_COMP_set(sk, i, p); } +void sk_SSL_COMP_free__extern(struct stack_st_SSL_COMP *sk) { sk_SSL_COMP_free(sk); } +void sk_SSL_COMP_pop_free__extern(struct stack_st_SSL_COMP *sk, sk_SSL_COMP_free_func free_func) { sk_SSL_COMP_pop_free(sk, free_func); } +size_t sk_SSL_COMP_insert__extern(struct stack_st_SSL_COMP *sk, SSL_COMP *p, size_t where) { return sk_SSL_COMP_insert(sk, p, where); } +SSL_COMP * sk_SSL_COMP_delete__extern(struct stack_st_SSL_COMP *sk, size_t where) { return sk_SSL_COMP_delete(sk, where); } +SSL_COMP * sk_SSL_COMP_delete_ptr__extern(struct stack_st_SSL_COMP *sk, const SSL_COMP *p) { return sk_SSL_COMP_delete_ptr(sk, p); } +void sk_SSL_COMP_delete_if__extern(struct stack_st_SSL_COMP *sk, sk_SSL_COMP_delete_if_func func, void *data) { sk_SSL_COMP_delete_if(sk, func, data); } +int sk_SSL_COMP_find__extern(const struct stack_st_SSL_COMP *sk, size_t *out_index, const SSL_COMP *p) { return sk_SSL_COMP_find(sk, out_index, p); } +SSL_COMP * sk_SSL_COMP_shift__extern(struct stack_st_SSL_COMP *sk) { return sk_SSL_COMP_shift(sk); } +size_t sk_SSL_COMP_push__extern(struct stack_st_SSL_COMP *sk, SSL_COMP *p) { return sk_SSL_COMP_push(sk, p); } +SSL_COMP * sk_SSL_COMP_pop__extern(struct stack_st_SSL_COMP *sk) { return sk_SSL_COMP_pop(sk); } +struct stack_st_SSL_COMP * sk_SSL_COMP_dup__extern(const struct stack_st_SSL_COMP *sk) { return sk_SSL_COMP_dup(sk); } +void sk_SSL_COMP_sort__extern(struct stack_st_SSL_COMP *sk) { sk_SSL_COMP_sort(sk); } +void sk_SSL_COMP_sort_and_dedup__extern(struct stack_st_SSL_COMP *sk, sk_SSL_COMP_free_func free_func) { sk_SSL_COMP_sort_and_dedup(sk, free_func); } +int sk_SSL_COMP_is_sorted__extern(const struct stack_st_SSL_COMP *sk) { return sk_SSL_COMP_is_sorted(sk); } +sk_SSL_COMP_cmp_func sk_SSL_COMP_set_cmp_func__extern(struct stack_st_SSL_COMP *sk, sk_SSL_COMP_cmp_func comp) { return sk_SSL_COMP_set_cmp_func(sk, comp); } +struct stack_st_SSL_COMP * sk_SSL_COMP_deep_copy__extern(const struct stack_st_SSL_COMP *sk, sk_SSL_COMP_copy_func copy_func, sk_SSL_COMP_free_func free_func) { return sk_SSL_COMP_deep_copy(sk, copy_func, free_func); } +void sk_TRUST_TOKEN_call_free_func__extern(OPENSSL_sk_free_func free_func, void *ptr) { sk_TRUST_TOKEN_call_free_func(free_func, ptr); } +void * sk_TRUST_TOKEN_call_copy_func__extern(OPENSSL_sk_copy_func copy_func, const void *ptr) { return sk_TRUST_TOKEN_call_copy_func(copy_func, ptr); } +int sk_TRUST_TOKEN_call_cmp_func__extern(OPENSSL_sk_cmp_func cmp_func, const void *a, const void *b) { return sk_TRUST_TOKEN_call_cmp_func(cmp_func, a, b); } +int sk_TRUST_TOKEN_call_delete_if_func__extern(OPENSSL_sk_delete_if_func func, void *obj, void *data) { return sk_TRUST_TOKEN_call_delete_if_func(func, obj, data); } +struct stack_st_TRUST_TOKEN * sk_TRUST_TOKEN_new__extern(sk_TRUST_TOKEN_cmp_func comp) { return sk_TRUST_TOKEN_new(comp); } +struct stack_st_TRUST_TOKEN * sk_TRUST_TOKEN_new_null__extern(void) { return sk_TRUST_TOKEN_new_null(); } +size_t sk_TRUST_TOKEN_num__extern(const struct stack_st_TRUST_TOKEN *sk) { return sk_TRUST_TOKEN_num(sk); } +void sk_TRUST_TOKEN_zero__extern(struct stack_st_TRUST_TOKEN *sk) { sk_TRUST_TOKEN_zero(sk); } +TRUST_TOKEN * sk_TRUST_TOKEN_value__extern(const struct stack_st_TRUST_TOKEN *sk, size_t i) { return sk_TRUST_TOKEN_value(sk, i); } +TRUST_TOKEN * sk_TRUST_TOKEN_set__extern(struct stack_st_TRUST_TOKEN *sk, size_t i, TRUST_TOKEN *p) { return sk_TRUST_TOKEN_set(sk, i, p); } +void sk_TRUST_TOKEN_free__extern(struct stack_st_TRUST_TOKEN *sk) { sk_TRUST_TOKEN_free(sk); } +void sk_TRUST_TOKEN_pop_free__extern(struct stack_st_TRUST_TOKEN *sk, sk_TRUST_TOKEN_free_func free_func) { sk_TRUST_TOKEN_pop_free(sk, free_func); } +size_t sk_TRUST_TOKEN_insert__extern(struct stack_st_TRUST_TOKEN *sk, TRUST_TOKEN *p, size_t where) { return sk_TRUST_TOKEN_insert(sk, p, where); } +TRUST_TOKEN * sk_TRUST_TOKEN_delete__extern(struct stack_st_TRUST_TOKEN *sk, size_t where) { return sk_TRUST_TOKEN_delete(sk, where); } +TRUST_TOKEN * sk_TRUST_TOKEN_delete_ptr__extern(struct stack_st_TRUST_TOKEN *sk, const TRUST_TOKEN *p) { return sk_TRUST_TOKEN_delete_ptr(sk, p); } +void sk_TRUST_TOKEN_delete_if__extern(struct stack_st_TRUST_TOKEN *sk, sk_TRUST_TOKEN_delete_if_func func, void *data) { sk_TRUST_TOKEN_delete_if(sk, func, data); } +int sk_TRUST_TOKEN_find__extern(const struct stack_st_TRUST_TOKEN *sk, size_t *out_index, const TRUST_TOKEN *p) { return sk_TRUST_TOKEN_find(sk, out_index, p); } +TRUST_TOKEN * sk_TRUST_TOKEN_shift__extern(struct stack_st_TRUST_TOKEN *sk) { return sk_TRUST_TOKEN_shift(sk); } +size_t sk_TRUST_TOKEN_push__extern(struct stack_st_TRUST_TOKEN *sk, TRUST_TOKEN *p) { return sk_TRUST_TOKEN_push(sk, p); } +TRUST_TOKEN * sk_TRUST_TOKEN_pop__extern(struct stack_st_TRUST_TOKEN *sk) { return sk_TRUST_TOKEN_pop(sk); } +struct stack_st_TRUST_TOKEN * sk_TRUST_TOKEN_dup__extern(const struct stack_st_TRUST_TOKEN *sk) { return sk_TRUST_TOKEN_dup(sk); } +void sk_TRUST_TOKEN_sort__extern(struct stack_st_TRUST_TOKEN *sk) { sk_TRUST_TOKEN_sort(sk); } +void sk_TRUST_TOKEN_sort_and_dedup__extern(struct stack_st_TRUST_TOKEN *sk, sk_TRUST_TOKEN_free_func free_func) { sk_TRUST_TOKEN_sort_and_dedup(sk, free_func); } +int sk_TRUST_TOKEN_is_sorted__extern(const struct stack_st_TRUST_TOKEN *sk) { return sk_TRUST_TOKEN_is_sorted(sk); } +sk_TRUST_TOKEN_cmp_func sk_TRUST_TOKEN_set_cmp_func__extern(struct stack_st_TRUST_TOKEN *sk, sk_TRUST_TOKEN_cmp_func comp) { return sk_TRUST_TOKEN_set_cmp_func(sk, comp); } +struct stack_st_TRUST_TOKEN * sk_TRUST_TOKEN_deep_copy__extern(const struct stack_st_TRUST_TOKEN *sk, sk_TRUST_TOKEN_copy_func copy_func, sk_TRUST_TOKEN_free_func free_func) { return sk_TRUST_TOKEN_deep_copy(sk, copy_func, free_func); } + +#if defined(__cplusplus) +} // extern "C" +#endif diff --git a/src/bssl/bindings/wrapper_aarch64-apple-darwin.rs b/src/bssl/bindings/wrapper_aarch64-apple-darwin.rs new file mode 100644 index 000000000000..8d58531de593 --- /dev/null +++ b/src/bssl/bindings/wrapper_aarch64-apple-darwin.rs @@ -0,0 +1,28622 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 5] = b"%llu\0"; +pub const BN_HEX_FMT1: &[u8; 5] = b"%llx\0"; +pub const BN_HEX_FMT2: &[u8; 8] = b"%016llx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type __int32_t = ::core::ffi::c_int; +pub type __int64_t = ::core::ffi::c_longlong; +pub type __darwin_va_list = __builtin_va_list; +pub type __darwin_time_t = ::core::ffi::c_long; +pub type __darwin_off_t = __int64_t; +pub type __darwin_suseconds_t = __int32_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: __darwin_time_t, + pub tv_usec: __darwin_suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type time_t = __darwin_time_t; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +pub type va_list = __darwin_va_list; +pub type fpos_t = __darwin_off_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::core::ffi::c_uchar, + pub _size: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sbuf"][::core::mem::size_of::<__sbuf>() - 16usize]; + ["Alignment of __sbuf"][::core::mem::align_of::<__sbuf>() - 8usize]; + ["Offset of field: __sbuf::_base"][::core::mem::offset_of!(__sbuf, _base) - 0usize]; + ["Offset of field: __sbuf::_size"][::core::mem::offset_of!(__sbuf, _size) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILEX { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::core::ffi::c_uchar, + pub _r: ::core::ffi::c_int, + pub _w: ::core::ffi::c_int, + pub _flags: ::core::ffi::c_short, + pub _file: ::core::ffi::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::core::ffi::c_int, + pub _cookie: *mut ::core::ffi::c_void, + pub _close: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub _read: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_char, + __n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _seek: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: fpos_t, + arg3: ::core::ffi::c_int, + ) -> fpos_t, + >, + pub _write: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *const ::core::ffi::c_char, + __n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::core::ffi::c_int, + pub _ubuf: [::core::ffi::c_uchar; 3usize], + pub _nbuf: [::core::ffi::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::core::ffi::c_int, + pub _offset: fpos_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sFILE"][::core::mem::size_of::<__sFILE>() - 152usize]; + ["Alignment of __sFILE"][::core::mem::align_of::<__sFILE>() - 8usize]; + ["Offset of field: __sFILE::_p"][::core::mem::offset_of!(__sFILE, _p) - 0usize]; + ["Offset of field: __sFILE::_r"][::core::mem::offset_of!(__sFILE, _r) - 8usize]; + ["Offset of field: __sFILE::_w"][::core::mem::offset_of!(__sFILE, _w) - 12usize]; + ["Offset of field: __sFILE::_flags"][::core::mem::offset_of!(__sFILE, _flags) - 16usize]; + ["Offset of field: __sFILE::_file"][::core::mem::offset_of!(__sFILE, _file) - 18usize]; + ["Offset of field: __sFILE::_bf"][::core::mem::offset_of!(__sFILE, _bf) - 24usize]; + ["Offset of field: __sFILE::_lbfsize"][::core::mem::offset_of!(__sFILE, _lbfsize) - 40usize]; + ["Offset of field: __sFILE::_cookie"][::core::mem::offset_of!(__sFILE, _cookie) - 48usize]; + ["Offset of field: __sFILE::_close"][::core::mem::offset_of!(__sFILE, _close) - 56usize]; + ["Offset of field: __sFILE::_read"][::core::mem::offset_of!(__sFILE, _read) - 64usize]; + ["Offset of field: __sFILE::_seek"][::core::mem::offset_of!(__sFILE, _seek) - 72usize]; + ["Offset of field: __sFILE::_write"][::core::mem::offset_of!(__sFILE, _write) - 80usize]; + ["Offset of field: __sFILE::_ub"][::core::mem::offset_of!(__sFILE, _ub) - 88usize]; + ["Offset of field: __sFILE::_extra"][::core::mem::offset_of!(__sFILE, _extra) - 104usize]; + ["Offset of field: __sFILE::_ur"][::core::mem::offset_of!(__sFILE, _ur) - 112usize]; + ["Offset of field: __sFILE::_ubuf"][::core::mem::offset_of!(__sFILE, _ubuf) - 116usize]; + ["Offset of field: __sFILE::_nbuf"][::core::mem::offset_of!(__sFILE, _nbuf) - 119usize]; + ["Offset of field: __sFILE::_lb"][::core::mem::offset_of!(__sFILE, _lb) - 120usize]; + ["Offset of field: __sFILE::_blksize"][::core::mem::offset_of!(__sFILE, _blksize) - 136usize]; + ["Offset of field: __sFILE::_offset"][::core::mem::offset_of!(__sFILE, _offset) - 144usize]; +}; +pub type FILE = __sFILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +pub type __builtin_va_list = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_aarch64-linux-android.rs b/src/bssl/bindings/wrapper_aarch64-linux-android.rs new file mode 100644 index 000000000000..00b960568981 --- /dev/null +++ b/src/bssl/bindings/wrapper_aarch64-linux-android.rs @@ -0,0 +1,28543 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[doc = r" If Bindgen could only determine the size and alignment of a"] +#[doc = r" type, it is represented like this."] +#[derive(PartialEq, Copy, Clone, Debug, Hash)] +#[repr(C)] +pub struct __BindgenOpaqueArray(pub [T; N]); +impl Default for __BindgenOpaqueArray { + fn default() -> Self { + Self([::default(); N]) + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type time_t = ::core::ffi::c_long; +pub type suseconds_t = ::core::ffi::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + _unused: [u8; 0], +} +pub type FILE = _IO_FILE; +pub type va_list = __BindgenOpaqueArray; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_aarch64-pc-windows-msvc.rs b/src/bssl/bindings/wrapper_aarch64-pc-windows-msvc.rs new file mode 100644 index 000000000000..0e3f6a8e39f6 --- /dev/null +++ b/src/bssl/bindings/wrapper_aarch64-pc-windows-msvc.rs @@ -0,0 +1,28481 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 5] = b"%llu\0"; +pub const BN_HEX_FMT1: &[u8; 5] = b"%llx\0"; +pub const BN_HEX_FMT2: &[u8; 8] = b"%016llx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type va_list = *mut ::core::ffi::c_char; +pub type __time64_t = ::core::ffi::c_longlong; +pub type time_t = __time64_t; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 36usize]; + ["Alignment of tm"][::core::mem::align_of::() - 4usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iobuf { + pub _Placeholder: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _iobuf"][::core::mem::size_of::<_iobuf>() - 8usize]; + ["Alignment of _iobuf"][::core::mem::align_of::<_iobuf>() - 8usize]; + ["Offset of field: _iobuf::_Placeholder"] + [::core::mem::offset_of!(_iobuf, _Placeholder) - 0usize]; +}; +pub type FILE = _iobuf; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_int; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 4usize]; + ["Offset of field: ASN1_ADB_st::unused"][::core::mem::offset_of!(ASN1_ADB_st, unused) - 8usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 16usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 24usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 32usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 40usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::h"][::core::mem::offset_of!(sha_state_st, h) - 0usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_aarch64-unknown-freebsd.rs b/src/bssl/bindings/wrapper_aarch64-unknown-freebsd.rs new file mode 100644 index 000000000000..34e877ad68cd --- /dev/null +++ b/src/bssl/bindings/wrapper_aarch64-unknown-freebsd.rs @@ -0,0 +1,28664 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[doc = r" If Bindgen could only determine the size and alignment of a"] +#[doc = r" type, it is represented like this."] +#[derive(PartialEq, Copy, Clone, Debug, Hash)] +#[repr(C)] +pub struct __BindgenOpaqueArray(pub [T; N]); +impl Default for __BindgenOpaqueArray { + fn default() -> Self { + Self([::default(); N]) + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type __int64_t = ::core::ffi::c_long; +pub type __time_t = __int64_t; +pub type __off_t = __int64_t; +pub type __suseconds_t = ::core::ffi::c_long; +#[repr(C)] +#[derive(Copy, Clone)] +pub union __mbstate_t { + pub __mbstate8: [::core::ffi::c_char; 128usize], + pub _mbstateL: __int64_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t"][::core::mem::size_of::<__mbstate_t>() - 128usize]; + ["Alignment of __mbstate_t"][::core::mem::align_of::<__mbstate_t>() - 8usize]; + ["Offset of field: __mbstate_t::__mbstate8"] + [::core::mem::offset_of!(__mbstate_t, __mbstate8) - 0usize]; + ["Offset of field: __mbstate_t::_mbstateL"] + [::core::mem::offset_of!(__mbstate_t, _mbstateL) - 0usize]; +}; +pub type __va_list = __BindgenOpaqueArray; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_mutex { + _unused: [u8; 0], +} +pub type suseconds_t = __suseconds_t; +pub type time_t = __time_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +pub type fpos_t = __off_t; +pub type va_list = __va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::core::ffi::c_uchar, + pub _size: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sbuf"][::core::mem::size_of::<__sbuf>() - 16usize]; + ["Alignment of __sbuf"][::core::mem::align_of::<__sbuf>() - 8usize]; + ["Offset of field: __sbuf::_base"][::core::mem::offset_of!(__sbuf, _base) - 0usize]; + ["Offset of field: __sbuf::_size"][::core::mem::offset_of!(__sbuf, _size) - 8usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::core::ffi::c_uchar, + pub _r: ::core::ffi::c_int, + pub _w: ::core::ffi::c_int, + pub _flags: ::core::ffi::c_short, + pub _file: ::core::ffi::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::core::ffi::c_int, + pub _cookie: *mut ::core::ffi::c_void, + pub _close: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub _read: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _seek: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: fpos_t, + arg3: ::core::ffi::c_int, + ) -> fpos_t, + >, + pub _write: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _ub: __sbuf, + pub _up: *mut ::core::ffi::c_uchar, + pub _ur: ::core::ffi::c_int, + pub _ubuf: [::core::ffi::c_uchar; 3usize], + pub _nbuf: [::core::ffi::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::core::ffi::c_int, + pub _offset: fpos_t, + pub _fl_mutex: *mut pthread_mutex, + pub _fl_owner: *mut pthread, + pub _fl_count: ::core::ffi::c_int, + pub _orientation: ::core::ffi::c_int, + pub _mbstate: __mbstate_t, + pub _flags2: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sFILE"][::core::mem::size_of::<__sFILE>() - 312usize]; + ["Alignment of __sFILE"][::core::mem::align_of::<__sFILE>() - 8usize]; + ["Offset of field: __sFILE::_p"][::core::mem::offset_of!(__sFILE, _p) - 0usize]; + ["Offset of field: __sFILE::_r"][::core::mem::offset_of!(__sFILE, _r) - 8usize]; + ["Offset of field: __sFILE::_w"][::core::mem::offset_of!(__sFILE, _w) - 12usize]; + ["Offset of field: __sFILE::_flags"][::core::mem::offset_of!(__sFILE, _flags) - 16usize]; + ["Offset of field: __sFILE::_file"][::core::mem::offset_of!(__sFILE, _file) - 18usize]; + ["Offset of field: __sFILE::_bf"][::core::mem::offset_of!(__sFILE, _bf) - 24usize]; + ["Offset of field: __sFILE::_lbfsize"][::core::mem::offset_of!(__sFILE, _lbfsize) - 40usize]; + ["Offset of field: __sFILE::_cookie"][::core::mem::offset_of!(__sFILE, _cookie) - 48usize]; + ["Offset of field: __sFILE::_close"][::core::mem::offset_of!(__sFILE, _close) - 56usize]; + ["Offset of field: __sFILE::_read"][::core::mem::offset_of!(__sFILE, _read) - 64usize]; + ["Offset of field: __sFILE::_seek"][::core::mem::offset_of!(__sFILE, _seek) - 72usize]; + ["Offset of field: __sFILE::_write"][::core::mem::offset_of!(__sFILE, _write) - 80usize]; + ["Offset of field: __sFILE::_ub"][::core::mem::offset_of!(__sFILE, _ub) - 88usize]; + ["Offset of field: __sFILE::_up"][::core::mem::offset_of!(__sFILE, _up) - 104usize]; + ["Offset of field: __sFILE::_ur"][::core::mem::offset_of!(__sFILE, _ur) - 112usize]; + ["Offset of field: __sFILE::_ubuf"][::core::mem::offset_of!(__sFILE, _ubuf) - 116usize]; + ["Offset of field: __sFILE::_nbuf"][::core::mem::offset_of!(__sFILE, _nbuf) - 119usize]; + ["Offset of field: __sFILE::_lb"][::core::mem::offset_of!(__sFILE, _lb) - 120usize]; + ["Offset of field: __sFILE::_blksize"][::core::mem::offset_of!(__sFILE, _blksize) - 136usize]; + ["Offset of field: __sFILE::_offset"][::core::mem::offset_of!(__sFILE, _offset) - 144usize]; + ["Offset of field: __sFILE::_fl_mutex"][::core::mem::offset_of!(__sFILE, _fl_mutex) - 152usize]; + ["Offset of field: __sFILE::_fl_owner"][::core::mem::offset_of!(__sFILE, _fl_owner) - 160usize]; + ["Offset of field: __sFILE::_fl_count"][::core::mem::offset_of!(__sFILE, _fl_count) - 168usize]; + ["Offset of field: __sFILE::_orientation"] + [::core::mem::offset_of!(__sFILE, _orientation) - 172usize]; + ["Offset of field: __sFILE::_mbstate"][::core::mem::offset_of!(__sFILE, _mbstate) - 176usize]; + ["Offset of field: __sFILE::_flags2"][::core::mem::offset_of!(__sFILE, _flags2) - 304usize]; +}; +pub type FILE = __sFILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_aarch64-unknown-linux-gnu.rs b/src/bssl/bindings/wrapper_aarch64-unknown-linux-gnu.rs new file mode 100644 index 000000000000..17d81707f855 --- /dev/null +++ b/src/bssl/bindings/wrapper_aarch64-unknown-linux-gnu.rs @@ -0,0 +1,28697 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[doc = r" If Bindgen could only determine the size and alignment of a"] +#[doc = r" type, it is represented like this."] +#[derive(PartialEq, Copy, Clone, Debug, Hash)] +#[repr(C)] +pub struct __BindgenOpaqueArray(pub [T; N]); +impl Default for __BindgenOpaqueArray { + fn default() -> Self { + Self([::default(); N]) + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type __uint64_t = ::core::ffi::c_ulong; +pub type __off_t = ::core::ffi::c_long; +pub type __off64_t = ::core::ffi::c_long; +pub type __time_t = ::core::ffi::c_long; +pub type __suseconds_t = ::core::ffi::c_long; +pub type time_t = __time_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: __time_t, + pub tv_usec: __suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +pub type __gnuc_va_list = __BindgenOpaqueArray; +pub type FILE = _IO_FILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_marker { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_codecvt { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_wide_data { + _unused: [u8; 0], +} +pub type _IO_lock_t = ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + pub _flags: ::core::ffi::c_int, + pub _IO_read_ptr: *mut ::core::ffi::c_char, + pub _IO_read_end: *mut ::core::ffi::c_char, + pub _IO_read_base: *mut ::core::ffi::c_char, + pub _IO_write_base: *mut ::core::ffi::c_char, + pub _IO_write_ptr: *mut ::core::ffi::c_char, + pub _IO_write_end: *mut ::core::ffi::c_char, + pub _IO_buf_base: *mut ::core::ffi::c_char, + pub _IO_buf_end: *mut ::core::ffi::c_char, + pub _IO_save_base: *mut ::core::ffi::c_char, + pub _IO_backup_base: *mut ::core::ffi::c_char, + pub _IO_save_end: *mut ::core::ffi::c_char, + pub _markers: *mut _IO_marker, + pub _chain: *mut _IO_FILE, + pub _fileno: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], + pub _old_offset: __off_t, + pub _cur_column: ::core::ffi::c_ushort, + pub _vtable_offset: ::core::ffi::c_schar, + pub _shortbuf: [::core::ffi::c_char; 1usize], + pub _lock: *mut _IO_lock_t, + pub _offset: __off64_t, + pub _codecvt: *mut _IO_codecvt, + pub _wide_data: *mut _IO_wide_data, + pub _freeres_list: *mut _IO_FILE, + pub _freeres_buf: *mut ::core::ffi::c_void, + pub _prevchain: *mut *mut _IO_FILE, + pub _mode: ::core::ffi::c_int, + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _IO_FILE"][::core::mem::size_of::<_IO_FILE>() - 216usize]; + ["Alignment of _IO_FILE"][::core::mem::align_of::<_IO_FILE>() - 8usize]; + ["Offset of field: _IO_FILE::_flags"][::core::mem::offset_of!(_IO_FILE, _flags) - 0usize]; + ["Offset of field: _IO_FILE::_IO_read_ptr"] + [::core::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize]; + ["Offset of field: _IO_FILE::_IO_read_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize]; + ["Offset of field: _IO_FILE::_IO_read_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize]; + ["Offset of field: _IO_FILE::_IO_write_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize]; + ["Offset of field: _IO_FILE::_IO_write_ptr"] + [::core::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize]; + ["Offset of field: _IO_FILE::_IO_write_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize]; + ["Offset of field: _IO_FILE::_IO_buf_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize]; + ["Offset of field: _IO_FILE::_IO_buf_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize]; + ["Offset of field: _IO_FILE::_IO_save_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize]; + ["Offset of field: _IO_FILE::_IO_backup_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize]; + ["Offset of field: _IO_FILE::_IO_save_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize]; + ["Offset of field: _IO_FILE::_markers"][::core::mem::offset_of!(_IO_FILE, _markers) - 96usize]; + ["Offset of field: _IO_FILE::_chain"][::core::mem::offset_of!(_IO_FILE, _chain) - 104usize]; + ["Offset of field: _IO_FILE::_fileno"][::core::mem::offset_of!(_IO_FILE, _fileno) - 112usize]; + ["Offset of field: _IO_FILE::_short_backupbuf"] + [::core::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize]; + ["Offset of field: _IO_FILE::_old_offset"] + [::core::mem::offset_of!(_IO_FILE, _old_offset) - 120usize]; + ["Offset of field: _IO_FILE::_cur_column"] + [::core::mem::offset_of!(_IO_FILE, _cur_column) - 128usize]; + ["Offset of field: _IO_FILE::_vtable_offset"] + [::core::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize]; + ["Offset of field: _IO_FILE::_shortbuf"] + [::core::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize]; + ["Offset of field: _IO_FILE::_lock"][::core::mem::offset_of!(_IO_FILE, _lock) - 136usize]; + ["Offset of field: _IO_FILE::_offset"][::core::mem::offset_of!(_IO_FILE, _offset) - 144usize]; + ["Offset of field: _IO_FILE::_codecvt"][::core::mem::offset_of!(_IO_FILE, _codecvt) - 152usize]; + ["Offset of field: _IO_FILE::_wide_data"] + [::core::mem::offset_of!(_IO_FILE, _wide_data) - 160usize]; + ["Offset of field: _IO_FILE::_freeres_list"] + [::core::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize]; + ["Offset of field: _IO_FILE::_freeres_buf"] + [::core::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize]; + ["Offset of field: _IO_FILE::_prevchain"] + [::core::mem::offset_of!(_IO_FILE, _prevchain) - 184usize]; + ["Offset of field: _IO_FILE::_mode"][::core::mem::offset_of!(_IO_FILE, _mode) - 192usize]; + ["Offset of field: _IO_FILE::_unused3"][::core::mem::offset_of!(_IO_FILE, _unused3) - 196usize]; + ["Offset of field: _IO_FILE::_total_written"] + [::core::mem::offset_of!(_IO_FILE, _total_written) - 200usize]; + ["Offset of field: _IO_FILE::_unused2"][::core::mem::offset_of!(_IO_FILE, _unused2) - 208usize]; +}; +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_aarch64-unknown-linux-musl.rs b/src/bssl/bindings/wrapper_aarch64-unknown-linux-musl.rs new file mode 100644 index 000000000000..00b960568981 --- /dev/null +++ b/src/bssl/bindings/wrapper_aarch64-unknown-linux-musl.rs @@ -0,0 +1,28543 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[doc = r" If Bindgen could only determine the size and alignment of a"] +#[doc = r" type, it is represented like this."] +#[derive(PartialEq, Copy, Clone, Debug, Hash)] +#[repr(C)] +pub struct __BindgenOpaqueArray(pub [T; N]); +impl Default for __BindgenOpaqueArray { + fn default() -> Self { + Self([::default(); N]) + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type time_t = ::core::ffi::c_long; +pub type suseconds_t = ::core::ffi::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + _unused: [u8; 0], +} +pub type FILE = _IO_FILE; +pub type va_list = __BindgenOpaqueArray; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_x86_64-apple-darwin.rs b/src/bssl/bindings/wrapper_x86_64-apple-darwin.rs new file mode 100644 index 000000000000..3ef70943f01f --- /dev/null +++ b/src/bssl/bindings/wrapper_x86_64-apple-darwin.rs @@ -0,0 +1,28643 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 5] = b"%llu\0"; +pub const BN_HEX_FMT1: &[u8; 5] = b"%llx\0"; +pub const BN_HEX_FMT2: &[u8; 8] = b"%016llx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type __int32_t = ::core::ffi::c_int; +pub type __int64_t = ::core::ffi::c_longlong; +pub type __darwin_va_list = __builtin_va_list; +pub type __darwin_time_t = ::core::ffi::c_long; +pub type __darwin_off_t = __int64_t; +pub type __darwin_suseconds_t = __int32_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: __darwin_time_t, + pub tv_usec: __darwin_suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type time_t = __darwin_time_t; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +pub type va_list = __darwin_va_list; +pub type fpos_t = __darwin_off_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::core::ffi::c_uchar, + pub _size: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sbuf"][::core::mem::size_of::<__sbuf>() - 16usize]; + ["Alignment of __sbuf"][::core::mem::align_of::<__sbuf>() - 8usize]; + ["Offset of field: __sbuf::_base"][::core::mem::offset_of!(__sbuf, _base) - 0usize]; + ["Offset of field: __sbuf::_size"][::core::mem::offset_of!(__sbuf, _size) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILEX { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::core::ffi::c_uchar, + pub _r: ::core::ffi::c_int, + pub _w: ::core::ffi::c_int, + pub _flags: ::core::ffi::c_short, + pub _file: ::core::ffi::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::core::ffi::c_int, + pub _cookie: *mut ::core::ffi::c_void, + pub _close: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub _read: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_char, + __n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _seek: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: fpos_t, + arg3: ::core::ffi::c_int, + ) -> fpos_t, + >, + pub _write: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *const ::core::ffi::c_char, + __n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::core::ffi::c_int, + pub _ubuf: [::core::ffi::c_uchar; 3usize], + pub _nbuf: [::core::ffi::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::core::ffi::c_int, + pub _offset: fpos_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sFILE"][::core::mem::size_of::<__sFILE>() - 152usize]; + ["Alignment of __sFILE"][::core::mem::align_of::<__sFILE>() - 8usize]; + ["Offset of field: __sFILE::_p"][::core::mem::offset_of!(__sFILE, _p) - 0usize]; + ["Offset of field: __sFILE::_r"][::core::mem::offset_of!(__sFILE, _r) - 8usize]; + ["Offset of field: __sFILE::_w"][::core::mem::offset_of!(__sFILE, _w) - 12usize]; + ["Offset of field: __sFILE::_flags"][::core::mem::offset_of!(__sFILE, _flags) - 16usize]; + ["Offset of field: __sFILE::_file"][::core::mem::offset_of!(__sFILE, _file) - 18usize]; + ["Offset of field: __sFILE::_bf"][::core::mem::offset_of!(__sFILE, _bf) - 24usize]; + ["Offset of field: __sFILE::_lbfsize"][::core::mem::offset_of!(__sFILE, _lbfsize) - 40usize]; + ["Offset of field: __sFILE::_cookie"][::core::mem::offset_of!(__sFILE, _cookie) - 48usize]; + ["Offset of field: __sFILE::_close"][::core::mem::offset_of!(__sFILE, _close) - 56usize]; + ["Offset of field: __sFILE::_read"][::core::mem::offset_of!(__sFILE, _read) - 64usize]; + ["Offset of field: __sFILE::_seek"][::core::mem::offset_of!(__sFILE, _seek) - 72usize]; + ["Offset of field: __sFILE::_write"][::core::mem::offset_of!(__sFILE, _write) - 80usize]; + ["Offset of field: __sFILE::_ub"][::core::mem::offset_of!(__sFILE, _ub) - 88usize]; + ["Offset of field: __sFILE::_extra"][::core::mem::offset_of!(__sFILE, _extra) - 104usize]; + ["Offset of field: __sFILE::_ur"][::core::mem::offset_of!(__sFILE, _ur) - 112usize]; + ["Offset of field: __sFILE::_ubuf"][::core::mem::offset_of!(__sFILE, _ubuf) - 116usize]; + ["Offset of field: __sFILE::_nbuf"][::core::mem::offset_of!(__sFILE, _nbuf) - 119usize]; + ["Offset of field: __sFILE::_lb"][::core::mem::offset_of!(__sFILE, _lb) - 120usize]; + ["Offset of field: __sFILE::_blksize"][::core::mem::offset_of!(__sFILE, _blksize) - 136usize]; + ["Offset of field: __sFILE::_offset"][::core::mem::offset_of!(__sFILE, _offset) - 144usize]; +}; +pub type FILE = __sFILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::core::ffi::c_uint, + pub fp_offset: ::core::ffi::c_uint, + pub overflow_arg_area: *mut ::core::ffi::c_void, + pub reg_save_area: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_x86_64-linux-android.rs b/src/bssl/bindings/wrapper_x86_64-linux-android.rs new file mode 100644 index 000000000000..af1e64ae5045 --- /dev/null +++ b/src/bssl/bindings/wrapper_x86_64-linux-android.rs @@ -0,0 +1,28555 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type time_t = ::core::ffi::c_long; +pub type suseconds_t = ::core::ffi::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + _unused: [u8; 0], +} +pub type FILE = _IO_FILE; +pub type va_list = __builtin_va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::core::ffi::c_uint, + pub fp_offset: ::core::ffi::c_uint, + pub overflow_arg_area: *mut ::core::ffi::c_void, + pub reg_save_area: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_x86_64-pc-windows-msvc.rs b/src/bssl/bindings/wrapper_x86_64-pc-windows-msvc.rs new file mode 100644 index 000000000000..0e3f6a8e39f6 --- /dev/null +++ b/src/bssl/bindings/wrapper_x86_64-pc-windows-msvc.rs @@ -0,0 +1,28481 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 5] = b"%llu\0"; +pub const BN_HEX_FMT1: &[u8; 5] = b"%llx\0"; +pub const BN_HEX_FMT2: &[u8; 8] = b"%016llx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type va_list = *mut ::core::ffi::c_char; +pub type __time64_t = ::core::ffi::c_longlong; +pub type time_t = __time64_t; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 36usize]; + ["Alignment of tm"][::core::mem::align_of::() - 4usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _iobuf { + pub _Placeholder: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _iobuf"][::core::mem::size_of::<_iobuf>() - 8usize]; + ["Alignment of _iobuf"][::core::mem::align_of::<_iobuf>() - 8usize]; + ["Offset of field: _iobuf::_Placeholder"] + [::core::mem::offset_of!(_iobuf, _Placeholder) - 0usize]; +}; +pub type FILE = _iobuf; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_int; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 4usize]; + ["Offset of field: ASN1_ADB_st::unused"][::core::mem::offset_of!(ASN1_ADB_st, unused) - 8usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 16usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 24usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 32usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 40usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::h"][::core::mem::offset_of!(sha_state_st, h) - 0usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: va_list, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_x86_64-unknown-freebsd.rs b/src/bssl/bindings/wrapper_x86_64-unknown-freebsd.rs new file mode 100644 index 000000000000..d1a8b149d8f6 --- /dev/null +++ b/src/bssl/bindings/wrapper_x86_64-unknown-freebsd.rs @@ -0,0 +1,28676 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type __int64_t = ::core::ffi::c_long; +pub type __time_t = __int64_t; +pub type __off_t = __int64_t; +pub type __suseconds_t = ::core::ffi::c_long; +#[repr(C)] +#[derive(Copy, Clone)] +pub union __mbstate_t { + pub __mbstate8: [::core::ffi::c_char; 128usize], + pub _mbstateL: __int64_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t"][::core::mem::size_of::<__mbstate_t>() - 128usize]; + ["Alignment of __mbstate_t"][::core::mem::align_of::<__mbstate_t>() - 8usize]; + ["Offset of field: __mbstate_t::__mbstate8"] + [::core::mem::offset_of!(__mbstate_t, __mbstate8) - 0usize]; + ["Offset of field: __mbstate_t::_mbstateL"] + [::core::mem::offset_of!(__mbstate_t, _mbstateL) - 0usize]; +}; +pub type __va_list = __builtin_va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_mutex { + _unused: [u8; 0], +} +pub type suseconds_t = __suseconds_t; +pub type time_t = __time_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +pub type fpos_t = __off_t; +pub type va_list = __va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sbuf { + pub _base: *mut ::core::ffi::c_uchar, + pub _size: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sbuf"][::core::mem::size_of::<__sbuf>() - 16usize]; + ["Alignment of __sbuf"][::core::mem::align_of::<__sbuf>() - 8usize]; + ["Offset of field: __sbuf::_base"][::core::mem::offset_of!(__sbuf, _base) - 0usize]; + ["Offset of field: __sbuf::_size"][::core::mem::offset_of!(__sbuf, _size) - 8usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sFILE { + pub _p: *mut ::core::ffi::c_uchar, + pub _r: ::core::ffi::c_int, + pub _w: ::core::ffi::c_int, + pub _flags: ::core::ffi::c_short, + pub _file: ::core::ffi::c_short, + pub _bf: __sbuf, + pub _lbfsize: ::core::ffi::c_int, + pub _cookie: *mut ::core::ffi::c_void, + pub _close: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub _read: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _seek: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: fpos_t, + arg3: ::core::ffi::c_int, + ) -> fpos_t, + >, + pub _write: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub _ub: __sbuf, + pub _up: *mut ::core::ffi::c_uchar, + pub _ur: ::core::ffi::c_int, + pub _ubuf: [::core::ffi::c_uchar; 3usize], + pub _nbuf: [::core::ffi::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::core::ffi::c_int, + pub _offset: fpos_t, + pub _fl_mutex: *mut pthread_mutex, + pub _fl_owner: *mut pthread, + pub _fl_count: ::core::ffi::c_int, + pub _orientation: ::core::ffi::c_int, + pub _mbstate: __mbstate_t, + pub _flags2: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sFILE"][::core::mem::size_of::<__sFILE>() - 312usize]; + ["Alignment of __sFILE"][::core::mem::align_of::<__sFILE>() - 8usize]; + ["Offset of field: __sFILE::_p"][::core::mem::offset_of!(__sFILE, _p) - 0usize]; + ["Offset of field: __sFILE::_r"][::core::mem::offset_of!(__sFILE, _r) - 8usize]; + ["Offset of field: __sFILE::_w"][::core::mem::offset_of!(__sFILE, _w) - 12usize]; + ["Offset of field: __sFILE::_flags"][::core::mem::offset_of!(__sFILE, _flags) - 16usize]; + ["Offset of field: __sFILE::_file"][::core::mem::offset_of!(__sFILE, _file) - 18usize]; + ["Offset of field: __sFILE::_bf"][::core::mem::offset_of!(__sFILE, _bf) - 24usize]; + ["Offset of field: __sFILE::_lbfsize"][::core::mem::offset_of!(__sFILE, _lbfsize) - 40usize]; + ["Offset of field: __sFILE::_cookie"][::core::mem::offset_of!(__sFILE, _cookie) - 48usize]; + ["Offset of field: __sFILE::_close"][::core::mem::offset_of!(__sFILE, _close) - 56usize]; + ["Offset of field: __sFILE::_read"][::core::mem::offset_of!(__sFILE, _read) - 64usize]; + ["Offset of field: __sFILE::_seek"][::core::mem::offset_of!(__sFILE, _seek) - 72usize]; + ["Offset of field: __sFILE::_write"][::core::mem::offset_of!(__sFILE, _write) - 80usize]; + ["Offset of field: __sFILE::_ub"][::core::mem::offset_of!(__sFILE, _ub) - 88usize]; + ["Offset of field: __sFILE::_up"][::core::mem::offset_of!(__sFILE, _up) - 104usize]; + ["Offset of field: __sFILE::_ur"][::core::mem::offset_of!(__sFILE, _ur) - 112usize]; + ["Offset of field: __sFILE::_ubuf"][::core::mem::offset_of!(__sFILE, _ubuf) - 116usize]; + ["Offset of field: __sFILE::_nbuf"][::core::mem::offset_of!(__sFILE, _nbuf) - 119usize]; + ["Offset of field: __sFILE::_lb"][::core::mem::offset_of!(__sFILE, _lb) - 120usize]; + ["Offset of field: __sFILE::_blksize"][::core::mem::offset_of!(__sFILE, _blksize) - 136usize]; + ["Offset of field: __sFILE::_offset"][::core::mem::offset_of!(__sFILE, _offset) - 144usize]; + ["Offset of field: __sFILE::_fl_mutex"][::core::mem::offset_of!(__sFILE, _fl_mutex) - 152usize]; + ["Offset of field: __sFILE::_fl_owner"][::core::mem::offset_of!(__sFILE, _fl_owner) - 160usize]; + ["Offset of field: __sFILE::_fl_count"][::core::mem::offset_of!(__sFILE, _fl_count) - 168usize]; + ["Offset of field: __sFILE::_orientation"] + [::core::mem::offset_of!(__sFILE, _orientation) - 172usize]; + ["Offset of field: __sFILE::_mbstate"][::core::mem::offset_of!(__sFILE, _mbstate) - 176usize]; + ["Offset of field: __sFILE::_flags2"][::core::mem::offset_of!(__sFILE, _flags2) - 304usize]; +}; +pub type FILE = __sFILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::core::ffi::c_uint, + pub fp_offset: ::core::ffi::c_uint, + pub overflow_arg_area: *mut ::core::ffi::c_void, + pub reg_save_area: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_x86_64-unknown-linux-gnu.rs b/src/bssl/bindings/wrapper_x86_64-unknown-linux-gnu.rs new file mode 100644 index 000000000000..4f7f9edce67f --- /dev/null +++ b/src/bssl/bindings/wrapper_x86_64-unknown-linux-gnu.rs @@ -0,0 +1,28709 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type __uint64_t = ::core::ffi::c_ulong; +pub type __off_t = ::core::ffi::c_long; +pub type __off64_t = ::core::ffi::c_long; +pub type __time_t = ::core::ffi::c_long; +pub type __suseconds_t = ::core::ffi::c_long; +pub type time_t = __time_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: __time_t, + pub tv_usec: __suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +pub type __gnuc_va_list = __builtin_va_list; +pub type FILE = _IO_FILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_marker { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_codecvt { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_wide_data { + _unused: [u8; 0], +} +pub type _IO_lock_t = ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + pub _flags: ::core::ffi::c_int, + pub _IO_read_ptr: *mut ::core::ffi::c_char, + pub _IO_read_end: *mut ::core::ffi::c_char, + pub _IO_read_base: *mut ::core::ffi::c_char, + pub _IO_write_base: *mut ::core::ffi::c_char, + pub _IO_write_ptr: *mut ::core::ffi::c_char, + pub _IO_write_end: *mut ::core::ffi::c_char, + pub _IO_buf_base: *mut ::core::ffi::c_char, + pub _IO_buf_end: *mut ::core::ffi::c_char, + pub _IO_save_base: *mut ::core::ffi::c_char, + pub _IO_backup_base: *mut ::core::ffi::c_char, + pub _IO_save_end: *mut ::core::ffi::c_char, + pub _markers: *mut _IO_marker, + pub _chain: *mut _IO_FILE, + pub _fileno: ::core::ffi::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::core::ffi::c_char; 1usize], + pub _old_offset: __off_t, + pub _cur_column: ::core::ffi::c_ushort, + pub _vtable_offset: ::core::ffi::c_schar, + pub _shortbuf: [::core::ffi::c_char; 1usize], + pub _lock: *mut _IO_lock_t, + pub _offset: __off64_t, + pub _codecvt: *mut _IO_codecvt, + pub _wide_data: *mut _IO_wide_data, + pub _freeres_list: *mut _IO_FILE, + pub _freeres_buf: *mut ::core::ffi::c_void, + pub _prevchain: *mut *mut _IO_FILE, + pub _mode: ::core::ffi::c_int, + pub _unused3: ::core::ffi::c_int, + pub _total_written: __uint64_t, + pub _unused2: [::core::ffi::c_char; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _IO_FILE"][::core::mem::size_of::<_IO_FILE>() - 216usize]; + ["Alignment of _IO_FILE"][::core::mem::align_of::<_IO_FILE>() - 8usize]; + ["Offset of field: _IO_FILE::_flags"][::core::mem::offset_of!(_IO_FILE, _flags) - 0usize]; + ["Offset of field: _IO_FILE::_IO_read_ptr"] + [::core::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize]; + ["Offset of field: _IO_FILE::_IO_read_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize]; + ["Offset of field: _IO_FILE::_IO_read_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize]; + ["Offset of field: _IO_FILE::_IO_write_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize]; + ["Offset of field: _IO_FILE::_IO_write_ptr"] + [::core::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize]; + ["Offset of field: _IO_FILE::_IO_write_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize]; + ["Offset of field: _IO_FILE::_IO_buf_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize]; + ["Offset of field: _IO_FILE::_IO_buf_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize]; + ["Offset of field: _IO_FILE::_IO_save_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize]; + ["Offset of field: _IO_FILE::_IO_backup_base"] + [::core::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize]; + ["Offset of field: _IO_FILE::_IO_save_end"] + [::core::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize]; + ["Offset of field: _IO_FILE::_markers"][::core::mem::offset_of!(_IO_FILE, _markers) - 96usize]; + ["Offset of field: _IO_FILE::_chain"][::core::mem::offset_of!(_IO_FILE, _chain) - 104usize]; + ["Offset of field: _IO_FILE::_fileno"][::core::mem::offset_of!(_IO_FILE, _fileno) - 112usize]; + ["Offset of field: _IO_FILE::_short_backupbuf"] + [::core::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize]; + ["Offset of field: _IO_FILE::_old_offset"] + [::core::mem::offset_of!(_IO_FILE, _old_offset) - 120usize]; + ["Offset of field: _IO_FILE::_cur_column"] + [::core::mem::offset_of!(_IO_FILE, _cur_column) - 128usize]; + ["Offset of field: _IO_FILE::_vtable_offset"] + [::core::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize]; + ["Offset of field: _IO_FILE::_shortbuf"] + [::core::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize]; + ["Offset of field: _IO_FILE::_lock"][::core::mem::offset_of!(_IO_FILE, _lock) - 136usize]; + ["Offset of field: _IO_FILE::_offset"][::core::mem::offset_of!(_IO_FILE, _offset) - 144usize]; + ["Offset of field: _IO_FILE::_codecvt"][::core::mem::offset_of!(_IO_FILE, _codecvt) - 152usize]; + ["Offset of field: _IO_FILE::_wide_data"] + [::core::mem::offset_of!(_IO_FILE, _wide_data) - 160usize]; + ["Offset of field: _IO_FILE::_freeres_list"] + [::core::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize]; + ["Offset of field: _IO_FILE::_freeres_buf"] + [::core::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize]; + ["Offset of field: _IO_FILE::_prevchain"] + [::core::mem::offset_of!(_IO_FILE, _prevchain) - 184usize]; + ["Offset of field: _IO_FILE::_mode"][::core::mem::offset_of!(_IO_FILE, _mode) - 192usize]; + ["Offset of field: _IO_FILE::_unused3"][::core::mem::offset_of!(_IO_FILE, _unused3) - 196usize]; + ["Offset of field: _IO_FILE::_total_written"] + [::core::mem::offset_of!(_IO_FILE, _total_written) - 200usize]; + ["Offset of field: _IO_FILE::_unused2"][::core::mem::offset_of!(_IO_FILE, _unused2) - 208usize]; +}; +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::core::ffi::c_int { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::core::ffi::c_int { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::core::ffi::c_int) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::core::ffi::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} +pub type va_list = __gnuc_va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::core::ffi::c_uint, + pub fp_offset: ::core::ffi::c_uint, + pub overflow_arg_area: *mut ::core::ffi::c_void, + pub reg_save_area: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/bindings/wrapper_x86_64-unknown-linux-musl.rs b/src/bssl/bindings/wrapper_x86_64-unknown-linux-musl.rs new file mode 100644 index 000000000000..af1e64ae5045 --- /dev/null +++ b/src/bssl/bindings/wrapper_x86_64-unknown-linux-musl.rs @@ -0,0 +1,28555 @@ +// BoringSSL commit: 1a41b9025c2c0a37edd07ff10f6944f03e028522 (stamped by regenerate.sh; verified by scripts/build/deps/boringssl.ts) +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +pub const OPENSSL_VERSION_NUMBER: i32 = 269488255; +pub const SSLEAY_VERSION_NUMBER: i32 = 269488255; +pub const BORINGSSL_API_VERSION: i32 = 42; +pub const AES_ENCRYPT: i32 = 1; +pub const AES_DECRYPT: i32 = 0; +pub const AES_MAXNR: i32 = 14; +pub const AES_BLOCK_SIZE: i32 = 16; +pub const ERR_FLAG_STRING: i32 = 1; +pub const ERR_FLAG_MALLOCED: i32 = 2; +pub const ERR_R_FATAL: i32 = 64; +pub const ERR_R_MALLOC_FAILURE: i32 = 65; +pub const ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED: i32 = 66; +pub const ERR_R_PASSED_NULL_PARAMETER: i32 = 67; +pub const ERR_R_INTERNAL_ERROR: i32 = 68; +pub const ERR_R_OVERFLOW: i32 = 69; +pub const ERR_ERROR_STRING_BUF_LEN: i32 = 120; +pub const ERR_TXT_STRING: i32 = 1; +pub const ERR_TXT_MALLOCED: i32 = 2; +pub const ERR_NUM_ERRORS: i32 = 16; +pub const BIO_RR_CONNECT: i32 = 2; +pub const BIO_RR_ACCEPT: i32 = 3; +pub const BIO_NOCLOSE: i32 = 0; +pub const BIO_CLOSE: i32 = 1; +pub const BIO_FP_TEXT: i32 = 16; +pub const BIO_CTRL_DGRAM_QUERY_MTU: i32 = 40; +pub const BIO_CTRL_DGRAM_SET_MTU: i32 = 42; +pub const BIO_CTRL_DGRAM_MTU_EXCEEDED: i32 = 43; +pub const BIO_CTRL_DGRAM_GET_PEER: i32 = 46; +pub const BIO_CTRL_DGRAM_GET_FALLBACK_MTU: i32 = 47; +pub const BIO_CTRL_RESET: i32 = 1; +pub const BIO_CTRL_EOF: i32 = 2; +pub const BIO_CTRL_INFO: i32 = 3; +pub const BIO_CTRL_GET_CLOSE: i32 = 8; +pub const BIO_CTRL_SET_CLOSE: i32 = 9; +pub const BIO_CTRL_PENDING: i32 = 10; +pub const BIO_CTRL_FLUSH: i32 = 11; +pub const BIO_CTRL_WPENDING: i32 = 13; +pub const BIO_CTRL_SET_CALLBACK: i32 = 14; +pub const BIO_CTRL_GET_CALLBACK: i32 = 15; +pub const BIO_CTRL_SET: i32 = 4; +pub const BIO_CTRL_GET: i32 = 5; +pub const BIO_CTRL_PUSH: i32 = 6; +pub const BIO_CTRL_POP: i32 = 7; +pub const BIO_CTRL_DUP: i32 = 12; +pub const BIO_CTRL_SET_FILENAME: i32 = 30; +pub const BIO_FLAGS_READ: i32 = 1; +pub const BIO_FLAGS_WRITE: i32 = 2; +pub const BIO_FLAGS_IO_SPECIAL: i32 = 4; +pub const BIO_FLAGS_RWS: i32 = 7; +pub const BIO_FLAGS_SHOULD_RETRY: i32 = 8; +pub const BIO_FLAGS_BASE64_NO_NL: i32 = 256; +pub const BIO_FLAGS_MEM_RDONLY: i32 = 512; +pub const BIO_TYPE_DESCRIPTOR: i32 = 256; +pub const BIO_TYPE_FILTER: i32 = 512; +pub const BIO_TYPE_SOURCE_SINK: i32 = 1024; +pub const BIO_TYPE_NONE: i32 = 0; +pub const BIO_TYPE_MEM: i32 = 1025; +pub const BIO_TYPE_FILE: i32 = 1026; +pub const BIO_TYPE_FD: i32 = 1284; +pub const BIO_TYPE_SOCKET: i32 = 1285; +pub const BIO_TYPE_NULL: i32 = 1030; +pub const BIO_TYPE_SSL: i32 = 519; +pub const BIO_TYPE_MD: i32 = 520; +pub const BIO_TYPE_BUFFER: i32 = 521; +pub const BIO_TYPE_CIPHER: i32 = 522; +pub const BIO_TYPE_BASE64: i32 = 523; +pub const BIO_TYPE_CONNECT: i32 = 1292; +pub const BIO_TYPE_ACCEPT: i32 = 1293; +pub const BIO_TYPE_PROXY_CLIENT: i32 = 526; +pub const BIO_TYPE_PROXY_SERVER: i32 = 527; +pub const BIO_TYPE_NBIO_TEST: i32 = 528; +pub const BIO_TYPE_NULL_FILTER: i32 = 529; +pub const BIO_TYPE_BER: i32 = 530; +pub const BIO_TYPE_BIO: i32 = 1043; +pub const BIO_TYPE_LINEBUFFER: i32 = 532; +pub const BIO_TYPE_DGRAM: i32 = 1301; +pub const BIO_TYPE_ASN1: i32 = 534; +pub const BIO_TYPE_COMP: i32 = 535; +pub const BIO_TYPE_START: i32 = 128; +pub const BIO_C_SET_CONNECT: i32 = 100; +pub const BIO_C_DO_STATE_MACHINE: i32 = 101; +pub const BIO_C_SET_NBIO: i32 = 102; +pub const BIO_C_SET_PROXY_PARAM: i32 = 103; +pub const BIO_C_SET_FD: i32 = 104; +pub const BIO_C_GET_FD: i32 = 105; +pub const BIO_C_SET_FILE_PTR: i32 = 106; +pub const BIO_C_GET_FILE_PTR: i32 = 107; +pub const BIO_C_SET_FILENAME: i32 = 108; +pub const BIO_C_SET_SSL: i32 = 109; +pub const BIO_C_SET_MD: i32 = 111; +pub const BIO_C_GET_MD: i32 = 112; +pub const BIO_C_GET_CIPHER_STATUS: i32 = 113; +pub const BIO_C_SET_BUF_MEM: i32 = 114; +pub const BIO_C_GET_BUF_MEM_PTR: i32 = 115; +pub const BIO_C_GET_BUFF_NUM_LINES: i32 = 116; +pub const BIO_C_SET_BUFF_SIZE: i32 = 117; +pub const BIO_C_SET_ACCEPT: i32 = 118; +pub const BIO_C_SSL_MODE: i32 = 119; +pub const BIO_C_GET_MD_CTX: i32 = 120; +pub const BIO_C_GET_PROXY_PARAM: i32 = 121; +pub const BIO_C_SET_BUFF_READ_DATA: i32 = 122; +pub const BIO_C_GET_ACCEPT: i32 = 124; +pub const BIO_C_FILE_SEEK: i32 = 128; +pub const BIO_C_GET_CIPHER_CTX: i32 = 129; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: i32 = 130; +pub const BIO_C_SET_BIND_MODE: i32 = 131; +pub const BIO_C_GET_BIND_MODE: i32 = 132; +pub const BIO_C_FILE_TELL: i32 = 133; +pub const BIO_C_GET_SOCKS: i32 = 134; +pub const BIO_C_SET_SOCKS: i32 = 135; +pub const BIO_C_SET_WRITE_BUF_SIZE: i32 = 136; +pub const BIO_C_GET_WRITE_BUF_SIZE: i32 = 137; +pub const BIO_C_GET_WRITE_GUARANTEE: i32 = 140; +pub const BIO_C_GET_READ_REQUEST: i32 = 141; +pub const BIO_C_SHUTDOWN_WR: i32 = 142; +pub const BIO_C_NREAD0: i32 = 143; +pub const BIO_C_NREAD: i32 = 144; +pub const BIO_C_NWRITE0: i32 = 145; +pub const BIO_C_NWRITE: i32 = 146; +pub const BIO_C_RESET_READ_REQUEST: i32 = 147; +pub const BIO_C_SET_MD_CTX: i32 = 148; +pub const BIO_C_SET_PREFIX: i32 = 149; +pub const BIO_C_GET_PREFIX: i32 = 150; +pub const BIO_C_SET_SUFFIX: i32 = 151; +pub const BIO_C_GET_SUFFIX: i32 = 152; +pub const BIO_C_SET_EX_ARG: i32 = 153; +pub const BIO_C_GET_EX_ARG: i32 = 154; +pub const BIO_R_BAD_FOPEN_MODE: i32 = 100; +pub const BIO_R_BROKEN_PIPE: i32 = 101; +pub const BIO_R_CONNECT_ERROR: i32 = 102; +pub const BIO_R_ERROR_SETTING_NBIO: i32 = 103; +pub const BIO_R_INVALID_ARGUMENT: i32 = 104; +pub const BIO_R_IN_USE: i32 = 105; +pub const BIO_R_KEEPALIVE: i32 = 106; +pub const BIO_R_NBIO_CONNECT_ERROR: i32 = 107; +pub const BIO_R_NO_HOSTNAME_SPECIFIED: i32 = 108; +pub const BIO_R_NO_PORT_SPECIFIED: i32 = 109; +pub const BIO_R_NO_SUCH_FILE: i32 = 110; +pub const BIO_R_NULL_PARAMETER: i32 = 111; +pub const BIO_R_SYS_LIB: i32 = 112; +pub const BIO_R_UNABLE_TO_CREATE_SOCKET: i32 = 113; +pub const BIO_R_UNINITIALIZED: i32 = 114; +pub const BIO_R_UNSUPPORTED_METHOD: i32 = 115; +pub const BIO_R_WRITE_TO_READ_ONLY_BIO: i32 = 116; +pub const BN_BITS2: i32 = 64; +pub const BN_DEC_FMT1: &[u8; 4] = b"%lu\0"; +pub const BN_HEX_FMT1: &[u8; 4] = b"%lx\0"; +pub const BN_HEX_FMT2: &[u8; 7] = b"%016lx\0"; +pub const BN_RAND_TOP_ANY: i32 = -1; +pub const BN_RAND_TOP_ONE: i32 = 0; +pub const BN_RAND_TOP_TWO: i32 = 1; +pub const BN_RAND_BOTTOM_ANY: i32 = 0; +pub const BN_RAND_BOTTOM_ODD: i32 = 1; +pub const BN_GENCB_GENERATED: i32 = 0; +pub const BN_GENCB_PRIME_TEST: i32 = 1; +pub const BN_prime_checks_for_validation: i32 = 64; +pub const BN_prime_checks_for_generation: i32 = 0; +pub const BN_prime_checks: i32 = 64; +pub const BN_FLG_MALLOCED: i32 = 1; +pub const BN_FLG_STATIC_DATA: i32 = 2; +pub const BN_R_ARG2_LT_ARG3: i32 = 100; +pub const BN_R_BAD_RECIPROCAL: i32 = 101; +pub const BN_R_BIGNUM_TOO_LONG: i32 = 102; +pub const BN_R_BITS_TOO_SMALL: i32 = 103; +pub const BN_R_CALLED_WITH_EVEN_MODULUS: i32 = 104; +pub const BN_R_DIV_BY_ZERO: i32 = 105; +pub const BN_R_EXPAND_ON_STATIC_BIGNUM_DATA: i32 = 106; +pub const BN_R_INPUT_NOT_REDUCED: i32 = 107; +pub const BN_R_INVALID_RANGE: i32 = 108; +pub const BN_R_NEGATIVE_NUMBER: i32 = 109; +pub const BN_R_NOT_A_SQUARE: i32 = 110; +pub const BN_R_NOT_INITIALIZED: i32 = 111; +pub const BN_R_NO_INVERSE: i32 = 112; +pub const BN_R_PRIVATE_KEY_TOO_LARGE: i32 = 113; +pub const BN_R_P_IS_NOT_PRIME: i32 = 114; +pub const BN_R_TOO_MANY_ITERATIONS: i32 = 115; +pub const BN_R_TOO_MANY_TEMPORARY_VARIABLES: i32 = 116; +pub const BN_R_BAD_ENCODING: i32 = 117; +pub const BN_R_ENCODE_ERROR: i32 = 118; +pub const BN_R_INVALID_INPUT: i32 = 119; +pub const V_ASN1_UNIVERSAL: i32 = 0; +pub const V_ASN1_APPLICATION: i32 = 64; +pub const V_ASN1_CONTEXT_SPECIFIC: i32 = 128; +pub const V_ASN1_PRIVATE: i32 = 192; +pub const V_ASN1_CONSTRUCTED: i32 = 32; +pub const V_ASN1_PRIMITIVE_TAG: i32 = 31; +pub const V_ASN1_MAX_UNIVERSAL: i32 = 255; +pub const V_ASN1_UNDEF: i32 = -1; +pub const V_ASN1_OTHER: i32 = -3; +pub const V_ASN1_ANY: i32 = -4; +pub const V_ASN1_EOC: i32 = 0; +pub const V_ASN1_BOOLEAN: i32 = 1; +pub const V_ASN1_INTEGER: i32 = 2; +pub const V_ASN1_BIT_STRING: i32 = 3; +pub const V_ASN1_OCTET_STRING: i32 = 4; +pub const V_ASN1_NULL: i32 = 5; +pub const V_ASN1_OBJECT: i32 = 6; +pub const V_ASN1_OBJECT_DESCRIPTOR: i32 = 7; +pub const V_ASN1_EXTERNAL: i32 = 8; +pub const V_ASN1_REAL: i32 = 9; +pub const V_ASN1_ENUMERATED: i32 = 10; +pub const V_ASN1_UTF8STRING: i32 = 12; +pub const V_ASN1_SEQUENCE: i32 = 16; +pub const V_ASN1_SET: i32 = 17; +pub const V_ASN1_NUMERICSTRING: i32 = 18; +pub const V_ASN1_PRINTABLESTRING: i32 = 19; +pub const V_ASN1_T61STRING: i32 = 20; +pub const V_ASN1_TELETEXSTRING: i32 = 20; +pub const V_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const V_ASN1_IA5STRING: i32 = 22; +pub const V_ASN1_UTCTIME: i32 = 23; +pub const V_ASN1_GENERALIZEDTIME: i32 = 24; +pub const V_ASN1_GRAPHICSTRING: i32 = 25; +pub const V_ASN1_ISO64STRING: i32 = 26; +pub const V_ASN1_VISIBLESTRING: i32 = 26; +pub const V_ASN1_GENERALSTRING: i32 = 27; +pub const V_ASN1_UNIVERSALSTRING: i32 = 28; +pub const V_ASN1_BMPSTRING: i32 = 30; +pub const V_ASN1_NEG: i32 = 256; +pub const V_ASN1_NEG_INTEGER: i32 = 258; +pub const V_ASN1_NEG_ENUMERATED: i32 = 266; +pub const B_ASN1_NUMERICSTRING: i32 = 1; +pub const B_ASN1_PRINTABLESTRING: i32 = 2; +pub const B_ASN1_T61STRING: i32 = 4; +pub const B_ASN1_TELETEXSTRING: i32 = 4; +pub const B_ASN1_VIDEOTEXSTRING: i32 = 8; +pub const B_ASN1_IA5STRING: i32 = 16; +pub const B_ASN1_GRAPHICSTRING: i32 = 32; +pub const B_ASN1_ISO64STRING: i32 = 64; +pub const B_ASN1_VISIBLESTRING: i32 = 64; +pub const B_ASN1_GENERALSTRING: i32 = 128; +pub const B_ASN1_UNIVERSALSTRING: i32 = 256; +pub const B_ASN1_OCTET_STRING: i32 = 512; +pub const B_ASN1_BIT_STRING: i32 = 1024; +pub const B_ASN1_BMPSTRING: i32 = 2048; +pub const B_ASN1_UTF8STRING: i32 = 8192; +pub const B_ASN1_UTCTIME: i32 = 16384; +pub const B_ASN1_GENERALIZEDTIME: i32 = 32768; +pub const B_ASN1_SEQUENCE: i32 = 65536; +pub const ASN1_BOOLEAN_FALSE: i32 = 0; +pub const ASN1_BOOLEAN_TRUE: i32 = 255; +pub const ASN1_BOOLEAN_NONE: i32 = -1; +pub const MBSTRING_FLAG: i32 = 4096; +pub const MBSTRING_UTF8: i32 = 4096; +pub const MBSTRING_ASC: i32 = 4097; +pub const MBSTRING_BMP: i32 = 4098; +pub const MBSTRING_UNIV: i32 = 4100; +pub const DIRSTRING_TYPE: i32 = 10246; +pub const PKCS9STRING_TYPE: i32 = 10262; +pub const STABLE_NO_MASK: i32 = 2; +pub const B_ASN1_DIRECTORYSTRING: i32 = 10502; +pub const B_ASN1_DISPLAYTEXT: i32 = 10320; +pub const B_ASN1_TIME: i32 = 49152; +pub const ASN1_STRFLGS_ESC_2253: i32 = 1; +pub const ASN1_STRFLGS_ESC_CTRL: i32 = 2; +pub const ASN1_STRFLGS_ESC_MSB: i32 = 4; +pub const ASN1_STRFLGS_ESC_QUOTE: i32 = 8; +pub const ASN1_STRFLGS_UTF8_CONVERT: i32 = 16; +pub const ASN1_STRFLGS_IGNORE_TYPE: i32 = 32; +pub const ASN1_STRFLGS_SHOW_TYPE: i32 = 64; +pub const ASN1_STRFLGS_DUMP_ALL: i32 = 128; +pub const ASN1_STRFLGS_DUMP_UNKNOWN: i32 = 256; +pub const ASN1_STRFLGS_DUMP_DER: i32 = 512; +pub const ASN1_STRFLGS_RFC2253: i32 = 791; +pub const ASN1_STRING_FLAG_BITS_LEFT: i32 = 8; +pub const ASN1_R_ASN1_LENGTH_MISMATCH: i32 = 100; +pub const ASN1_R_AUX_ERROR: i32 = 101; +pub const ASN1_R_BAD_GET_ASN1_OBJECT_CALL: i32 = 102; +pub const ASN1_R_BAD_OBJECT_HEADER: i32 = 103; +pub const ASN1_R_BMPSTRING_IS_WRONG_LENGTH: i32 = 104; +pub const ASN1_R_BN_LIB: i32 = 105; +pub const ASN1_R_BOOLEAN_IS_WRONG_LENGTH: i32 = 106; +pub const ASN1_R_BUFFER_TOO_SMALL: i32 = 107; +pub const ASN1_R_CONTEXT_NOT_INITIALISED: i32 = 108; +pub const ASN1_R_DECODE_ERROR: i32 = 109; +pub const ASN1_R_DEPTH_EXCEEDED: i32 = 110; +pub const ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED: i32 = 111; +pub const ASN1_R_ENCODE_ERROR: i32 = 112; +pub const ASN1_R_ERROR_GETTING_TIME: i32 = 113; +pub const ASN1_R_EXPECTING_AN_ASN1_SEQUENCE: i32 = 114; +pub const ASN1_R_EXPECTING_AN_INTEGER: i32 = 115; +pub const ASN1_R_EXPECTING_AN_OBJECT: i32 = 116; +pub const ASN1_R_EXPECTING_A_BOOLEAN: i32 = 117; +pub const ASN1_R_EXPECTING_A_TIME: i32 = 118; +pub const ASN1_R_EXPLICIT_LENGTH_MISMATCH: i32 = 119; +pub const ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED: i32 = 120; +pub const ASN1_R_FIELD_MISSING: i32 = 121; +pub const ASN1_R_FIRST_NUM_TOO_LARGE: i32 = 122; +pub const ASN1_R_HEADER_TOO_LONG: i32 = 123; +pub const ASN1_R_ILLEGAL_BITSTRING_FORMAT: i32 = 124; +pub const ASN1_R_ILLEGAL_BOOLEAN: i32 = 125; +pub const ASN1_R_ILLEGAL_CHARACTERS: i32 = 126; +pub const ASN1_R_ILLEGAL_FORMAT: i32 = 127; +pub const ASN1_R_ILLEGAL_HEX: i32 = 128; +pub const ASN1_R_ILLEGAL_IMPLICIT_TAG: i32 = 129; +pub const ASN1_R_ILLEGAL_INTEGER: i32 = 130; +pub const ASN1_R_ILLEGAL_NESTED_TAGGING: i32 = 131; +pub const ASN1_R_ILLEGAL_NULL: i32 = 132; +pub const ASN1_R_ILLEGAL_NULL_VALUE: i32 = 133; +pub const ASN1_R_ILLEGAL_OBJECT: i32 = 134; +pub const ASN1_R_ILLEGAL_OPTIONAL_ANY: i32 = 135; +pub const ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE: i32 = 136; +pub const ASN1_R_ILLEGAL_TAGGED_ANY: i32 = 137; +pub const ASN1_R_ILLEGAL_TIME_VALUE: i32 = 138; +pub const ASN1_R_INTEGER_NOT_ASCII_FORMAT: i32 = 139; +pub const ASN1_R_INTEGER_TOO_LARGE_FOR_LONG: i32 = 140; +pub const ASN1_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 141; +pub const ASN1_R_INVALID_BMPSTRING: i32 = 142; +pub const ASN1_R_INVALID_DIGIT: i32 = 143; +pub const ASN1_R_INVALID_MODIFIER: i32 = 144; +pub const ASN1_R_INVALID_NUMBER: i32 = 145; +pub const ASN1_R_INVALID_OBJECT_ENCODING: i32 = 146; +pub const ASN1_R_INVALID_SEPARATOR: i32 = 147; +pub const ASN1_R_INVALID_TIME_FORMAT: i32 = 148; +pub const ASN1_R_INVALID_UNIVERSALSTRING: i32 = 149; +pub const ASN1_R_INVALID_UTF8STRING: i32 = 150; +pub const ASN1_R_LIST_ERROR: i32 = 151; +pub const ASN1_R_MISSING_ASN1_EOS: i32 = 152; +pub const ASN1_R_MISSING_EOC: i32 = 153; +pub const ASN1_R_MISSING_SECOND_NUMBER: i32 = 154; +pub const ASN1_R_MISSING_VALUE: i32 = 155; +pub const ASN1_R_MSTRING_NOT_UNIVERSAL: i32 = 156; +pub const ASN1_R_MSTRING_WRONG_TAG: i32 = 157; +pub const ASN1_R_NESTED_ASN1_ERROR: i32 = 158; +pub const ASN1_R_NESTED_ASN1_STRING: i32 = 159; +pub const ASN1_R_NON_HEX_CHARACTERS: i32 = 160; +pub const ASN1_R_NOT_ASCII_FORMAT: i32 = 161; +pub const ASN1_R_NOT_ENOUGH_DATA: i32 = 162; +pub const ASN1_R_NO_MATCHING_CHOICE_TYPE: i32 = 163; +pub const ASN1_R_NULL_IS_WRONG_LENGTH: i32 = 164; +pub const ASN1_R_OBJECT_NOT_ASCII_FORMAT: i32 = 165; +pub const ASN1_R_ODD_NUMBER_OF_CHARS: i32 = 166; +pub const ASN1_R_SECOND_NUMBER_TOO_LARGE: i32 = 167; +pub const ASN1_R_SEQUENCE_LENGTH_MISMATCH: i32 = 168; +pub const ASN1_R_SEQUENCE_NOT_CONSTRUCTED: i32 = 169; +pub const ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG: i32 = 170; +pub const ASN1_R_SHORT_LINE: i32 = 171; +pub const ASN1_R_STREAMING_NOT_SUPPORTED: i32 = 172; +pub const ASN1_R_STRING_TOO_LONG: i32 = 173; +pub const ASN1_R_STRING_TOO_SHORT: i32 = 174; +pub const ASN1_R_TAG_VALUE_TOO_HIGH: i32 = 175; +pub const ASN1_R_TIME_NOT_ASCII_FORMAT: i32 = 176; +pub const ASN1_R_TOO_LONG: i32 = 177; +pub const ASN1_R_TYPE_NOT_CONSTRUCTED: i32 = 178; +pub const ASN1_R_TYPE_NOT_PRIMITIVE: i32 = 179; +pub const ASN1_R_UNEXPECTED_EOC: i32 = 180; +pub const ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH: i32 = 181; +pub const ASN1_R_UNKNOWN_FORMAT: i32 = 182; +pub const ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM: i32 = 183; +pub const ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM: i32 = 184; +pub const ASN1_R_UNKNOWN_TAG: i32 = 185; +pub const ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE: i32 = 186; +pub const ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 187; +pub const ASN1_R_UNSUPPORTED_TYPE: i32 = 188; +pub const ASN1_R_WRONG_PUBLIC_KEY_TYPE: i32 = 189; +pub const ASN1_R_WRONG_TAG: i32 = 190; +pub const ASN1_R_WRONG_TYPE: i32 = 191; +pub const ASN1_R_NESTED_TOO_DEEP: i32 = 192; +pub const ASN1_R_BAD_TEMPLATE: i32 = 193; +pub const ASN1_R_INVALID_BIT_STRING_PADDING: i32 = 194; +pub const ASN1_R_WRONG_INTEGER_TYPE: i32 = 195; +pub const ASN1_R_INVALID_INTEGER: i32 = 196; +pub const ASN1_TFLG_OPTIONAL: i32 = 1; +pub const ASN1_TFLG_SET_OF: i32 = 2; +pub const ASN1_TFLG_SEQUENCE_OF: i32 = 4; +pub const ASN1_TFLG_SK_MASK: i32 = 6; +pub const ASN1_TFLG_IMPTAG: i32 = 8; +pub const ASN1_TFLG_EXPTAG: i32 = 16; +pub const ASN1_TFLG_TAG_MASK: i32 = 24; +pub const ASN1_TFLG_UNIVERSAL: i32 = 0; +pub const ASN1_TFLG_APPLICATION: i32 = 64; +pub const ASN1_TFLG_CONTEXT: i32 = 128; +pub const ASN1_TFLG_PRIVATE: i32 = 192; +pub const ASN1_TFLG_TAG_CLASS: i32 = 192; +pub const ASN1_TFLG_ADB_MASK: i32 = 768; +pub const ASN1_TFLG_ADB_OID: i32 = 256; +pub const ASN1_ITYPE_PRIMITIVE: i32 = 0; +pub const ASN1_ITYPE_SEQUENCE: i32 = 1; +pub const ASN1_ITYPE_CHOICE: i32 = 2; +pub const ASN1_ITYPE_EXTERN: i32 = 4; +pub const ASN1_ITYPE_MSTRING: i32 = 5; +pub const ASN1_AFLG_REFCOUNT: i32 = 1; +pub const ASN1_AFLG_ENCODING: i32 = 2; +pub const ASN1_OP_NEW_PRE: i32 = 0; +pub const ASN1_OP_NEW_POST: i32 = 1; +pub const ASN1_OP_FREE_PRE: i32 = 2; +pub const ASN1_OP_FREE_POST: i32 = 3; +pub const ASN1_OP_D2I_PRE: i32 = 4; +pub const ASN1_OP_D2I_POST: i32 = 5; +pub const ASN1_OP_PRINT_PRE: i32 = 8; +pub const ASN1_OP_PRINT_POST: i32 = 9; +pub const ASN1_OP_STREAM_PRE: i32 = 10; +pub const ASN1_OP_STREAM_POST: i32 = 11; +pub const ASN1_OP_DETACHED_PRE: i32 = 12; +pub const ASN1_OP_DETACHED_POST: i32 = 13; +pub const BLAKE2B256_DIGEST_LENGTH: i32 = 32; +pub const BLAKE2B512_DIGEST_LENGTH: i32 = 64; +pub const BLAKE2B_CBLOCK: i32 = 128; +pub const BF_ENCRYPT: i32 = 1; +pub const BF_DECRYPT: i32 = 0; +pub const BF_ROUNDS: i32 = 16; +pub const BF_BLOCK: i32 = 8; +pub const CBS_ASN1_TAG_SHIFT: i32 = 24; +pub const CBS_ASN1_CONSTRUCTED: i32 = 536870912; +pub const CBS_ASN1_UNIVERSAL: i32 = 0; +pub const CBS_ASN1_APPLICATION: i32 = 1073741824; +pub const CBS_ASN1_CONTEXT_SPECIFIC: i64 = 2147483648; +pub const CBS_ASN1_PRIVATE: i64 = 3221225472; +pub const CBS_ASN1_CLASS_MASK: i64 = 3221225472; +pub const CBS_ASN1_TAG_NUMBER_MASK: i32 = 536870911; +pub const CBS_ASN1_BOOLEAN: i32 = 1; +pub const CBS_ASN1_INTEGER: i32 = 2; +pub const CBS_ASN1_BITSTRING: i32 = 3; +pub const CBS_ASN1_OCTETSTRING: i32 = 4; +pub const CBS_ASN1_NULL: i32 = 5; +pub const CBS_ASN1_OBJECT: i32 = 6; +pub const CBS_ASN1_ENUMERATED: i32 = 10; +pub const CBS_ASN1_UTF8STRING: i32 = 12; +pub const CBS_ASN1_SEQUENCE: i32 = 536870928; +pub const CBS_ASN1_SET: i32 = 536870929; +pub const CBS_ASN1_NUMERICSTRING: i32 = 18; +pub const CBS_ASN1_PRINTABLESTRING: i32 = 19; +pub const CBS_ASN1_T61STRING: i32 = 20; +pub const CBS_ASN1_VIDEOTEXSTRING: i32 = 21; +pub const CBS_ASN1_IA5STRING: i32 = 22; +pub const CBS_ASN1_UTCTIME: i32 = 23; +pub const CBS_ASN1_GENERALIZEDTIME: i32 = 24; +pub const CBS_ASN1_GRAPHICSTRING: i32 = 25; +pub const CBS_ASN1_VISIBLESTRING: i32 = 26; +pub const CBS_ASN1_GENERALSTRING: i32 = 27; +pub const CBS_ASN1_UNIVERSALSTRING: i32 = 28; +pub const CBS_ASN1_BMPSTRING: i32 = 30; +pub const CAST_ENCRYPT: i32 = 1; +pub const CAST_DECRYPT: i32 = 0; +pub const CAST_BLOCK: i32 = 8; +pub const CAST_KEY_LENGTH: i32 = 16; +pub const EVP_CIPH_STREAM_CIPHER: i32 = 0; +pub const EVP_CIPH_ECB_MODE: i32 = 1; +pub const EVP_CIPH_CBC_MODE: i32 = 2; +pub const EVP_CIPH_CFB_MODE: i32 = 3; +pub const EVP_CIPH_OFB_MODE: i32 = 4; +pub const EVP_CIPH_CTR_MODE: i32 = 5; +pub const EVP_CIPH_GCM_MODE: i32 = 6; +pub const EVP_CIPH_XTS_MODE: i32 = 7; +pub const EVP_CIPH_CCM_MODE: i32 = 8; +pub const EVP_CIPH_OCB_MODE: i32 = 9; +pub const EVP_CIPH_WRAP_MODE: i32 = 10; +pub const EVP_CIPH_VARIABLE_LENGTH: i32 = 64; +pub const EVP_CIPH_ALWAYS_CALL_INIT: i32 = 128; +pub const EVP_CIPH_CUSTOM_IV: i32 = 256; +pub const EVP_CIPH_CTRL_INIT: i32 = 512; +pub const EVP_CIPH_FLAG_CUSTOM_CIPHER: i32 = 1024; +pub const EVP_CIPH_FLAG_AEAD_CIPHER: i32 = 2048; +pub const EVP_CIPH_CUSTOM_COPY: i32 = 4096; +pub const EVP_CIPH_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_CIPHER_CTX_FLAG_WRAP_ALLOW: i32 = 0; +pub const EVP_CIPH_NO_PADDING: i32 = 2048; +pub const EVP_CTRL_INIT: i32 = 0; +pub const EVP_CTRL_SET_KEY_LENGTH: i32 = 1; +pub const EVP_CTRL_GET_RC2_KEY_BITS: i32 = 2; +pub const EVP_CTRL_SET_RC2_KEY_BITS: i32 = 3; +pub const EVP_CTRL_GET_RC5_ROUNDS: i32 = 4; +pub const EVP_CTRL_SET_RC5_ROUNDS: i32 = 5; +pub const EVP_CTRL_RAND_KEY: i32 = 6; +pub const EVP_CTRL_PBE_PRF_NID: i32 = 7; +pub const EVP_CTRL_COPY: i32 = 8; +pub const EVP_CTRL_AEAD_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_AEAD_GET_TAG: i32 = 16; +pub const EVP_CTRL_AEAD_SET_TAG: i32 = 17; +pub const EVP_CTRL_AEAD_SET_IV_FIXED: i32 = 18; +pub const EVP_CTRL_GCM_IV_GEN: i32 = 19; +pub const EVP_CTRL_AEAD_SET_MAC_KEY: i32 = 23; +pub const EVP_CTRL_GCM_SET_IV_INV: i32 = 24; +pub const EVP_CTRL_GET_IVLEN: i32 = 25; +pub const EVP_GCM_TLS_FIXED_IV_LEN: i32 = 4; +pub const EVP_GCM_TLS_EXPLICIT_IV_LEN: i32 = 8; +pub const EVP_GCM_TLS_TAG_LEN: i32 = 16; +pub const EVP_CTRL_GCM_SET_IVLEN: i32 = 9; +pub const EVP_CTRL_GCM_GET_TAG: i32 = 16; +pub const EVP_CTRL_GCM_SET_TAG: i32 = 17; +pub const EVP_CTRL_GCM_SET_IV_FIXED: i32 = 18; +pub const EVP_MAX_KEY_LENGTH: i32 = 64; +pub const EVP_MAX_IV_LENGTH: i32 = 16; +pub const EVP_MAX_BLOCK_LENGTH: i32 = 32; +pub const CIPHER_R_AES_KEY_SETUP_FAILED: i32 = 100; +pub const CIPHER_R_BAD_DECRYPT: i32 = 101; +pub const CIPHER_R_BAD_KEY_LENGTH: i32 = 102; +pub const CIPHER_R_BUFFER_TOO_SMALL: i32 = 103; +pub const CIPHER_R_CTRL_NOT_IMPLEMENTED: i32 = 104; +pub const CIPHER_R_CTRL_OPERATION_NOT_IMPLEMENTED: i32 = 105; +pub const CIPHER_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: i32 = 106; +pub const CIPHER_R_INITIALIZATION_ERROR: i32 = 107; +pub const CIPHER_R_INPUT_NOT_INITIALIZED: i32 = 108; +pub const CIPHER_R_INVALID_AD_SIZE: i32 = 109; +pub const CIPHER_R_INVALID_KEY_LENGTH: i32 = 110; +pub const CIPHER_R_INVALID_NONCE_SIZE: i32 = 111; +pub const CIPHER_R_INVALID_OPERATION: i32 = 112; +pub const CIPHER_R_IV_TOO_LARGE: i32 = 113; +pub const CIPHER_R_NO_CIPHER_SET: i32 = 114; +pub const CIPHER_R_OUTPUT_ALIASES_INPUT: i32 = 115; +pub const CIPHER_R_TAG_TOO_LARGE: i32 = 116; +pub const CIPHER_R_TOO_LARGE: i32 = 117; +pub const CIPHER_R_UNSUPPORTED_AD_SIZE: i32 = 118; +pub const CIPHER_R_UNSUPPORTED_INPUT_SIZE: i32 = 119; +pub const CIPHER_R_UNSUPPORTED_KEY_SIZE: i32 = 120; +pub const CIPHER_R_UNSUPPORTED_NONCE_SIZE: i32 = 121; +pub const CIPHER_R_UNSUPPORTED_TAG_SIZE: i32 = 122; +pub const CIPHER_R_WRONG_FINAL_BLOCK_LENGTH: i32 = 123; +pub const CIPHER_R_NO_DIRECTION_SET: i32 = 124; +pub const CIPHER_R_INVALID_NONCE: i32 = 125; +pub const CONF_MFLAGS_DEFAULT_SECTION: i32 = 0; +pub const CONF_MFLAGS_IGNORE_MISSING_FILE: i32 = 0; +pub const CONF_R_LIST_CANNOT_BE_NULL: i32 = 100; +pub const CONF_R_MISSING_CLOSE_SQUARE_BRACKET: i32 = 101; +pub const CONF_R_MISSING_EQUAL_SIGN: i32 = 102; +pub const CONF_R_NO_CLOSE_BRACE: i32 = 103; +pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; +pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; +pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; +pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const SHA224_CBLOCK: i32 = 64; +pub const SHA224_DIGEST_LENGTH: i32 = 28; +pub const SHA256_CBLOCK: i32 = 64; +pub const SHA256_DIGEST_LENGTH: i32 = 32; +pub const SHA384_CBLOCK: i32 = 128; +pub const SHA384_DIGEST_LENGTH: i32 = 48; +pub const SHA512_CBLOCK: i32 = 128; +pub const SHA512_DIGEST_LENGTH: i32 = 64; +pub const SHA512_256_DIGEST_LENGTH: i32 = 32; +pub const SHA512_224_DIGEST_LENGTH: i32 = 28; +pub const SHA512_224_DIGEST_BUFFER_LENGTH: i32 = 32; +pub const SHA_CBLOCK: i32 = 64; +pub const SHA_DIGEST_LENGTH: i32 = 20; +pub const CRYPTO_LOCK: i32 = 1; +pub const CRYPTO_UNLOCK: i32 = 2; +pub const CRYPTO_READ: i32 = 4; +pub const CRYPTO_WRITE: i32 = 8; +pub const OPENSSL_VERSION_TEXT: &[u8; 38] = b"OpenSSL 1.1.1 (compatible; BoringSSL)\0"; +pub const OPENSSL_VERSION: i32 = 0; +pub const OPENSSL_CFLAGS: i32 = 1; +pub const OPENSSL_BUILT_ON: i32 = 2; +pub const OPENSSL_PLATFORM: i32 = 3; +pub const OPENSSL_DIR: i32 = 4; +pub const SSLEAY_VERSION: i32 = 0; +pub const SSLEAY_CFLAGS: i32 = 1; +pub const SSLEAY_BUILT_ON: i32 = 2; +pub const SSLEAY_PLATFORM: i32 = 3; +pub const SSLEAY_DIR: i32 = 4; +pub const OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CRYPTO_STRINGS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_CIPHERS: i32 = 0; +pub const OPENSSL_INIT_NO_ADD_ALL_DIGESTS: i32 = 0; +pub const OPENSSL_INIT_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_LOAD_CONFIG: i32 = 0; +pub const OPENSSL_INIT_NO_ATEXIT: i32 = 0; +pub const OPENSSL_INIT_ATFORK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_RDRAND: i32 = 0; +pub const OPENSSL_INIT_ENGINE_DYNAMIC: i32 = 0; +pub const OPENSSL_INIT_ENGINE_OPENSSL: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CRYPTODEV: i32 = 0; +pub const OPENSSL_INIT_ENGINE_CAPI: i32 = 0; +pub const OPENSSL_INIT_ENGINE_PADLOCK: i32 = 0; +pub const OPENSSL_INIT_ENGINE_AFALG: i32 = 0; +pub const OPENSSL_INIT_ENGINE_ALL_BUILTIN: i32 = 0; +pub const CTR_DRBG_MIN_ENTROPY_LEN: i32 = 32; +pub const CTR_DRBG_MAX_ENTROPY_LEN: i32 = 64; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_NONCE_LEN: i32 = 16; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; +pub const X25519_PRIVATE_KEY_LEN: i32 = 32; +pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; +pub const X25519_SHARED_KEY_LEN: i32 = 32; +pub const ED25519_PRIVATE_KEY_LEN: i32 = 64; +pub const ED25519_PUBLIC_KEY_LEN: i32 = 32; +pub const ED25519_SIGNATURE_LEN: i32 = 64; +pub const SPAKE2_MAX_MSG_SIZE: i32 = 32; +pub const SPAKE2_MAX_KEY_SIZE: i32 = 64; +pub const DES_ENCRYPT: i32 = 1; +pub const DES_DECRYPT: i32 = 0; +pub const DES_CBC_MODE: i32 = 0; +pub const DES_PCBC_MODE: i32 = 1; +pub const OPENSSL_DH_MAX_MODULUS_BITS: i32 = 8192; +pub const DH_GENERATOR_2: i32 = 2; +pub const DH_GENERATOR_5: i32 = 5; +pub const DH_CHECK_P_NOT_PRIME: i32 = 1; +pub const DH_CHECK_P_NOT_SAFE_PRIME: i32 = 2; +pub const DH_CHECK_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_CHECK_Q_NOT_PRIME: i32 = 16; +pub const DH_CHECK_INVALID_Q_VALUE: i32 = 32; +pub const DH_NOT_SUITABLE_GENERATOR: i32 = 8; +pub const DH_UNABLE_TO_CHECK_GENERATOR: i32 = 4; +pub const DH_CHECK_PUBKEY_TOO_SMALL: i32 = 1; +pub const DH_CHECK_PUBKEY_TOO_LARGE: i32 = 2; +pub const DH_CHECK_PUBKEY_INVALID: i32 = 4; +pub const DH_R_BAD_GENERATOR: i32 = 100; +pub const DH_R_INVALID_PUBKEY: i32 = 101; +pub const DH_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DH_R_NO_PRIVATE_VALUE: i32 = 103; +pub const DH_R_DECODE_ERROR: i32 = 104; +pub const DH_R_ENCODE_ERROR: i32 = 105; +pub const DH_R_INVALID_PARAMETERS: i32 = 106; +pub const EVP_MAX_MD_SIZE: i32 = 64; +pub const EVP_MAX_MD_BLOCK_SIZE: i32 = 144; +pub const EVP_MD_FLAG_DIGALGID_ABSENT: i32 = 2; +pub const EVP_MD_FLAG_XOF: i32 = 4; +pub const EVP_MD_CTX_FLAG_NON_FIPS_ALLOW: i32 = 0; +pub const EVP_MAX_MD_DATA_SIZE: i32 = 240; +pub const DIGEST_R_INPUT_NOT_INITIALIZED: i32 = 100; +pub const DIGEST_R_DECODE_ERROR: i32 = 101; +pub const DIGEST_R_UNKNOWN_HASH: i32 = 102; +pub const OPENSSL_DSA_MAX_MODULUS_BITS: i32 = 8192; +pub const DSA_R_BAD_Q_VALUE: i32 = 100; +pub const DSA_R_MISSING_PARAMETERS: i32 = 101; +pub const DSA_R_MODULUS_TOO_LARGE: i32 = 102; +pub const DSA_R_NEED_NEW_SETUP_VALUES: i32 = 103; +pub const DSA_R_BAD_VERSION: i32 = 104; +pub const DSA_R_DECODE_ERROR: i32 = 105; +pub const DSA_R_ENCODE_ERROR: i32 = 106; +pub const DSA_R_INVALID_PARAMETERS: i32 = 107; +pub const DSA_R_TOO_MANY_ITERATIONS: i32 = 108; +pub const OPENSSL_EC_EXPLICIT_CURVE: i32 = 0; +pub const OPENSSL_EC_NAMED_CURVE: i32 = 1; +pub const ENGINE_R_OPERATION_NOT_SUPPORTED: i32 = 100; +pub const EC_PKEY_NO_PARAMETERS: i32 = 1; +pub const EC_PKEY_NO_PUBKEY: i32 = 2; +pub const ECDSA_FLAG_OPAQUE: i32 = 1; +pub const EC_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EC_R_COORDINATES_OUT_OF_RANGE: i32 = 101; +pub const EC_R_D2I_ECPKPARAMETERS_FAILURE: i32 = 102; +pub const EC_R_EC_GROUP_NEW_BY_NAME_FAILURE: i32 = 103; +pub const EC_R_GROUP2PKPARAMETERS_FAILURE: i32 = 104; +pub const EC_R_I2D_ECPKPARAMETERS_FAILURE: i32 = 105; +pub const EC_R_INCOMPATIBLE_OBJECTS: i32 = 106; +pub const EC_R_INVALID_COMPRESSED_POINT: i32 = 107; +pub const EC_R_INVALID_COMPRESSION_BIT: i32 = 108; +pub const EC_R_INVALID_ENCODING: i32 = 109; +pub const EC_R_INVALID_FIELD: i32 = 110; +pub const EC_R_INVALID_FORM: i32 = 111; +pub const EC_R_INVALID_GROUP_ORDER: i32 = 112; +pub const EC_R_INVALID_PRIVATE_KEY: i32 = 113; +pub const EC_R_MISSING_PARAMETERS: i32 = 114; +pub const EC_R_MISSING_PRIVATE_KEY: i32 = 115; +pub const EC_R_NON_NAMED_CURVE: i32 = 116; +pub const EC_R_NOT_INITIALIZED: i32 = 117; +pub const EC_R_PKPARAMETERS2GROUP_FAILURE: i32 = 118; +pub const EC_R_POINT_AT_INFINITY: i32 = 119; +pub const EC_R_POINT_IS_NOT_ON_CURVE: i32 = 120; +pub const EC_R_SLOT_FULL: i32 = 121; +pub const EC_R_UNDEFINED_GENERATOR: i32 = 122; +pub const EC_R_UNKNOWN_GROUP: i32 = 123; +pub const EC_R_UNKNOWN_ORDER: i32 = 124; +pub const EC_R_WRONG_ORDER: i32 = 125; +pub const EC_R_BIGNUM_OUT_OF_RANGE: i32 = 126; +pub const EC_R_WRONG_CURVE_PARAMETERS: i32 = 127; +pub const EC_R_DECODE_ERROR: i32 = 128; +pub const EC_R_ENCODE_ERROR: i32 = 129; +pub const EC_R_GROUP_MISMATCH: i32 = 130; +pub const EC_R_INVALID_COFACTOR: i32 = 131; +pub const EC_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 132; +pub const EC_R_INVALID_SCALAR: i32 = 133; +pub const ECDH_R_KDF_FAILED: i32 = 100; +pub const ECDH_R_NO_PRIVATE_VALUE: i32 = 101; +pub const ECDH_R_POINT_ARITHMETIC_FAILURE: i32 = 102; +pub const ECDH_R_UNKNOWN_DIGEST_LENGTH: i32 = 103; +pub const ECDSA_R_BAD_SIGNATURE: i32 = 100; +pub const ECDSA_R_MISSING_PARAMETERS: i32 = 101; +pub const ECDSA_R_NEED_NEW_SETUP_VALUES: i32 = 102; +pub const ECDSA_R_NOT_IMPLEMENTED: i32 = 103; +pub const ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED: i32 = 104; +pub const ECDSA_R_ENCODE_ERROR: i32 = 105; +pub const ECDSA_R_TOO_MANY_ITERATIONS: i32 = 106; +pub const EVP_R_BUFFER_TOO_SMALL: i32 = 100; +pub const EVP_R_COMMAND_NOT_SUPPORTED: i32 = 101; +pub const EVP_R_DECODE_ERROR: i32 = 102; +pub const EVP_R_DIFFERENT_KEY_TYPES: i32 = 103; +pub const EVP_R_DIFFERENT_PARAMETERS: i32 = 104; +pub const EVP_R_ENCODE_ERROR: i32 = 105; +pub const EVP_R_EXPECTING_A_EC_KEY: i32 = 106; +pub const EVP_R_EXPECTING_AN_RSA_KEY: i32 = 107; +pub const EVP_R_EXPECTING_A_DSA_KEY: i32 = 108; +pub const EVP_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE: i32 = 109; +pub const EVP_R_INVALID_DIGEST_LENGTH: i32 = 110; +pub const EVP_R_INVALID_DIGEST_TYPE: i32 = 111; +pub const EVP_R_INVALID_KEYBITS: i32 = 112; +pub const EVP_R_INVALID_MGF1_MD: i32 = 113; +pub const EVP_R_INVALID_OPERATION: i32 = 114; +pub const EVP_R_INVALID_PADDING_MODE: i32 = 115; +pub const EVP_R_INVALID_PSS_SALTLEN: i32 = 116; +pub const EVP_R_KEYS_NOT_SET: i32 = 117; +pub const EVP_R_MISSING_PARAMETERS: i32 = 118; +pub const EVP_R_NO_DEFAULT_DIGEST: i32 = 119; +pub const EVP_R_NO_KEY_SET: i32 = 120; +pub const EVP_R_NO_MDC2_SUPPORT: i32 = 121; +pub const EVP_R_NO_NID_FOR_CURVE: i32 = 122; +pub const EVP_R_NO_OPERATION_SET: i32 = 123; +pub const EVP_R_NO_PARAMETERS_SET: i32 = 124; +pub const EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE: i32 = 125; +pub const EVP_R_OPERATION_NOT_INITIALIZED: i32 = 126; +pub const EVP_R_UNKNOWN_PUBLIC_KEY_TYPE: i32 = 127; +pub const EVP_R_UNSUPPORTED_ALGORITHM: i32 = 128; +pub const EVP_R_UNSUPPORTED_PUBLIC_KEY_TYPE: i32 = 129; +pub const EVP_R_NOT_A_PRIVATE_KEY: i32 = 130; +pub const EVP_R_INVALID_SIGNATURE: i32 = 131; +pub const EVP_R_MEMORY_LIMIT_EXCEEDED: i32 = 132; +pub const EVP_R_INVALID_PARAMETERS: i32 = 133; +pub const EVP_R_INVALID_PEER_KEY: i32 = 134; +pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: i32 = 135; +pub const EVP_R_EMPTY_PSK: i32 = 136; +pub const EVP_R_INVALID_BUFFER_SIZE: i32 = 137; +pub const EVP_R_EXPECTING_A_DH_KEY: i32 = 138; +pub const EVP_R_PRIVATE_KEY_WAS_NOT_SEED: i32 = 139; +pub const EVP_R_MISSING_PUBLIC_KEY: i32 = 140; +pub const EVP_R_INVALID_CIPHERTEXT_LENGTH: i32 = 141; +pub const EVP_R_INVALID_SECRET_LENGTH: i32 = 142; +pub const EVP_R_OPERATON_NOT_INITIALIZED: i32 = 126; +pub const EVP_AEAD_MAX_KEY_LENGTH: i32 = 80; +pub const EVP_AEAD_MAX_NONCE_LENGTH: i32 = 24; +pub const EVP_AEAD_MAX_OVERHEAD: i32 = 64; +pub const EVP_AEAD_MAX_OPEN_OVERHEAD: i32 = 320; +pub const EVP_AEAD_DEFAULT_TAG_LENGTH: i32 = 0; +pub const CRYPTO_IOVEC_MAX: i32 = 16; +pub const SN_undef: &[u8; 6] = b"UNDEF\0"; +pub const LN_undef: &[u8; 10] = b"undefined\0"; +pub const NID_undef: i32 = 0; +pub const OBJ_undef: i32 = 0; +pub const SN_rsadsi: &[u8; 7] = b"rsadsi\0"; +pub const LN_rsadsi: &[u8; 24] = b"RSA Data Security, Inc.\0"; +pub const NID_rsadsi: i32 = 1; +pub const SN_pkcs: &[u8; 5] = b"pkcs\0"; +pub const LN_pkcs: &[u8; 29] = b"RSA Data Security, Inc. PKCS\0"; +pub const NID_pkcs: i32 = 2; +pub const SN_md2: &[u8; 4] = b"MD2\0"; +pub const LN_md2: &[u8; 4] = b"md2\0"; +pub const NID_md2: i32 = 3; +pub const SN_md5: &[u8; 4] = b"MD5\0"; +pub const LN_md5: &[u8; 4] = b"md5\0"; +pub const NID_md5: i32 = 4; +pub const SN_rc4: &[u8; 4] = b"RC4\0"; +pub const LN_rc4: &[u8; 4] = b"rc4\0"; +pub const NID_rc4: i32 = 5; +pub const LN_rsaEncryption: &[u8; 14] = b"rsaEncryption\0"; +pub const NID_rsaEncryption: i32 = 6; +pub const SN_md2WithRSAEncryption: &[u8; 8] = b"RSA-MD2\0"; +pub const LN_md2WithRSAEncryption: &[u8; 21] = b"md2WithRSAEncryption\0"; +pub const NID_md2WithRSAEncryption: i32 = 7; +pub const SN_md5WithRSAEncryption: &[u8; 8] = b"RSA-MD5\0"; +pub const LN_md5WithRSAEncryption: &[u8; 21] = b"md5WithRSAEncryption\0"; +pub const NID_md5WithRSAEncryption: i32 = 8; +pub const SN_pbeWithMD2AndDES_CBC: &[u8; 12] = b"PBE-MD2-DES\0"; +pub const LN_pbeWithMD2AndDES_CBC: &[u8; 21] = b"pbeWithMD2AndDES-CBC\0"; +pub const NID_pbeWithMD2AndDES_CBC: i32 = 9; +pub const SN_pbeWithMD5AndDES_CBC: &[u8; 12] = b"PBE-MD5-DES\0"; +pub const LN_pbeWithMD5AndDES_CBC: &[u8; 21] = b"pbeWithMD5AndDES-CBC\0"; +pub const NID_pbeWithMD5AndDES_CBC: i32 = 10; +pub const SN_X500: &[u8; 5] = b"X500\0"; +pub const LN_X500: &[u8; 27] = b"directory services (X.500)\0"; +pub const NID_X500: i32 = 11; +pub const OBJ_ENC_X500: i32 = 85; +pub const SN_X509: &[u8; 5] = b"X509\0"; +pub const NID_X509: i32 = 12; +pub const SN_commonName: &[u8; 3] = b"CN\0"; +pub const LN_commonName: &[u8; 11] = b"commonName\0"; +pub const NID_commonName: i32 = 13; +pub const SN_countryName: &[u8; 2] = b"C\0"; +pub const LN_countryName: &[u8; 12] = b"countryName\0"; +pub const NID_countryName: i32 = 14; +pub const SN_localityName: &[u8; 2] = b"L\0"; +pub const LN_localityName: &[u8; 13] = b"localityName\0"; +pub const NID_localityName: i32 = 15; +pub const SN_stateOrProvinceName: &[u8; 3] = b"ST\0"; +pub const LN_stateOrProvinceName: &[u8; 20] = b"stateOrProvinceName\0"; +pub const NID_stateOrProvinceName: i32 = 16; +pub const SN_organizationName: &[u8; 2] = b"O\0"; +pub const LN_organizationName: &[u8; 17] = b"organizationName\0"; +pub const NID_organizationName: i32 = 17; +pub const SN_organizationalUnitName: &[u8; 3] = b"OU\0"; +pub const LN_organizationalUnitName: &[u8; 23] = b"organizationalUnitName\0"; +pub const NID_organizationalUnitName: i32 = 18; +pub const SN_rsa: &[u8; 4] = b"RSA\0"; +pub const LN_rsa: &[u8; 4] = b"rsa\0"; +pub const NID_rsa: i32 = 19; +pub const SN_pkcs7: &[u8; 6] = b"pkcs7\0"; +pub const NID_pkcs7: i32 = 20; +pub const LN_pkcs7_data: &[u8; 11] = b"pkcs7-data\0"; +pub const NID_pkcs7_data: i32 = 21; +pub const LN_pkcs7_signed: &[u8; 17] = b"pkcs7-signedData\0"; +pub const NID_pkcs7_signed: i32 = 22; +pub const LN_pkcs7_enveloped: &[u8; 20] = b"pkcs7-envelopedData\0"; +pub const NID_pkcs7_enveloped: i32 = 23; +pub const LN_pkcs7_signedAndEnveloped: &[u8; 29] = b"pkcs7-signedAndEnvelopedData\0"; +pub const NID_pkcs7_signedAndEnveloped: i32 = 24; +pub const LN_pkcs7_digest: &[u8; 17] = b"pkcs7-digestData\0"; +pub const NID_pkcs7_digest: i32 = 25; +pub const LN_pkcs7_encrypted: &[u8; 20] = b"pkcs7-encryptedData\0"; +pub const NID_pkcs7_encrypted: i32 = 26; +pub const SN_pkcs3: &[u8; 6] = b"pkcs3\0"; +pub const NID_pkcs3: i32 = 27; +pub const LN_dhKeyAgreement: &[u8; 15] = b"dhKeyAgreement\0"; +pub const NID_dhKeyAgreement: i32 = 28; +pub const SN_des_ecb: &[u8; 8] = b"DES-ECB\0"; +pub const LN_des_ecb: &[u8; 8] = b"des-ecb\0"; +pub const NID_des_ecb: i32 = 29; +pub const SN_des_cfb64: &[u8; 8] = b"DES-CFB\0"; +pub const LN_des_cfb64: &[u8; 8] = b"des-cfb\0"; +pub const NID_des_cfb64: i32 = 30; +pub const SN_des_cbc: &[u8; 8] = b"DES-CBC\0"; +pub const LN_des_cbc: &[u8; 8] = b"des-cbc\0"; +pub const NID_des_cbc: i32 = 31; +pub const SN_des_ede_ecb: &[u8; 8] = b"DES-EDE\0"; +pub const LN_des_ede_ecb: &[u8; 8] = b"des-ede\0"; +pub const NID_des_ede_ecb: i32 = 32; +pub const SN_des_ede3_ecb: &[u8; 9] = b"DES-EDE3\0"; +pub const LN_des_ede3_ecb: &[u8; 9] = b"des-ede3\0"; +pub const NID_des_ede3_ecb: i32 = 33; +pub const SN_idea_cbc: &[u8; 9] = b"IDEA-CBC\0"; +pub const LN_idea_cbc: &[u8; 9] = b"idea-cbc\0"; +pub const NID_idea_cbc: i32 = 34; +pub const SN_idea_cfb64: &[u8; 9] = b"IDEA-CFB\0"; +pub const LN_idea_cfb64: &[u8; 9] = b"idea-cfb\0"; +pub const NID_idea_cfb64: i32 = 35; +pub const SN_idea_ecb: &[u8; 9] = b"IDEA-ECB\0"; +pub const LN_idea_ecb: &[u8; 9] = b"idea-ecb\0"; +pub const NID_idea_ecb: i32 = 36; +pub const SN_rc2_cbc: &[u8; 8] = b"RC2-CBC\0"; +pub const LN_rc2_cbc: &[u8; 8] = b"rc2-cbc\0"; +pub const NID_rc2_cbc: i32 = 37; +pub const SN_rc2_ecb: &[u8; 8] = b"RC2-ECB\0"; +pub const LN_rc2_ecb: &[u8; 8] = b"rc2-ecb\0"; +pub const NID_rc2_ecb: i32 = 38; +pub const SN_rc2_cfb64: &[u8; 8] = b"RC2-CFB\0"; +pub const LN_rc2_cfb64: &[u8; 8] = b"rc2-cfb\0"; +pub const NID_rc2_cfb64: i32 = 39; +pub const SN_rc2_ofb64: &[u8; 8] = b"RC2-OFB\0"; +pub const LN_rc2_ofb64: &[u8; 8] = b"rc2-ofb\0"; +pub const NID_rc2_ofb64: i32 = 40; +pub const SN_sha: &[u8; 4] = b"SHA\0"; +pub const LN_sha: &[u8; 4] = b"sha\0"; +pub const NID_sha: i32 = 41; +pub const SN_shaWithRSAEncryption: &[u8; 8] = b"RSA-SHA\0"; +pub const LN_shaWithRSAEncryption: &[u8; 21] = b"shaWithRSAEncryption\0"; +pub const NID_shaWithRSAEncryption: i32 = 42; +pub const SN_des_ede_cbc: &[u8; 12] = b"DES-EDE-CBC\0"; +pub const LN_des_ede_cbc: &[u8; 12] = b"des-ede-cbc\0"; +pub const NID_des_ede_cbc: i32 = 43; +pub const SN_des_ede3_cbc: &[u8; 13] = b"DES-EDE3-CBC\0"; +pub const LN_des_ede3_cbc: &[u8; 13] = b"des-ede3-cbc\0"; +pub const NID_des_ede3_cbc: i32 = 44; +pub const SN_des_ofb64: &[u8; 8] = b"DES-OFB\0"; +pub const LN_des_ofb64: &[u8; 8] = b"des-ofb\0"; +pub const NID_des_ofb64: i32 = 45; +pub const SN_idea_ofb64: &[u8; 9] = b"IDEA-OFB\0"; +pub const LN_idea_ofb64: &[u8; 9] = b"idea-ofb\0"; +pub const NID_idea_ofb64: i32 = 46; +pub const SN_pkcs9: &[u8; 6] = b"pkcs9\0"; +pub const NID_pkcs9: i32 = 47; +pub const LN_pkcs9_emailAddress: &[u8; 13] = b"emailAddress\0"; +pub const NID_pkcs9_emailAddress: i32 = 48; +pub const LN_pkcs9_unstructuredName: &[u8; 17] = b"unstructuredName\0"; +pub const NID_pkcs9_unstructuredName: i32 = 49; +pub const LN_pkcs9_contentType: &[u8; 12] = b"contentType\0"; +pub const NID_pkcs9_contentType: i32 = 50; +pub const LN_pkcs9_messageDigest: &[u8; 14] = b"messageDigest\0"; +pub const NID_pkcs9_messageDigest: i32 = 51; +pub const LN_pkcs9_signingTime: &[u8; 12] = b"signingTime\0"; +pub const NID_pkcs9_signingTime: i32 = 52; +pub const LN_pkcs9_countersignature: &[u8; 17] = b"countersignature\0"; +pub const NID_pkcs9_countersignature: i32 = 53; +pub const LN_pkcs9_challengePassword: &[u8; 18] = b"challengePassword\0"; +pub const NID_pkcs9_challengePassword: i32 = 54; +pub const LN_pkcs9_unstructuredAddress: &[u8; 20] = b"unstructuredAddress\0"; +pub const NID_pkcs9_unstructuredAddress: i32 = 55; +pub const LN_pkcs9_extCertAttributes: &[u8; 30] = b"extendedCertificateAttributes\0"; +pub const NID_pkcs9_extCertAttributes: i32 = 56; +pub const SN_netscape: &[u8; 9] = b"Netscape\0"; +pub const LN_netscape: &[u8; 30] = b"Netscape Communications Corp.\0"; +pub const NID_netscape: i32 = 57; +pub const SN_netscape_cert_extension: &[u8; 10] = b"nsCertExt\0"; +pub const LN_netscape_cert_extension: &[u8; 31] = b"Netscape Certificate Extension\0"; +pub const NID_netscape_cert_extension: i32 = 58; +pub const SN_netscape_data_type: &[u8; 11] = b"nsDataType\0"; +pub const LN_netscape_data_type: &[u8; 19] = b"Netscape Data Type\0"; +pub const NID_netscape_data_type: i32 = 59; +pub const SN_des_ede_cfb64: &[u8; 12] = b"DES-EDE-CFB\0"; +pub const LN_des_ede_cfb64: &[u8; 12] = b"des-ede-cfb\0"; +pub const NID_des_ede_cfb64: i32 = 60; +pub const SN_des_ede3_cfb64: &[u8; 13] = b"DES-EDE3-CFB\0"; +pub const LN_des_ede3_cfb64: &[u8; 13] = b"des-ede3-cfb\0"; +pub const NID_des_ede3_cfb64: i32 = 61; +pub const SN_des_ede_ofb64: &[u8; 12] = b"DES-EDE-OFB\0"; +pub const LN_des_ede_ofb64: &[u8; 12] = b"des-ede-ofb\0"; +pub const NID_des_ede_ofb64: i32 = 62; +pub const SN_des_ede3_ofb64: &[u8; 13] = b"DES-EDE3-OFB\0"; +pub const LN_des_ede3_ofb64: &[u8; 13] = b"des-ede3-ofb\0"; +pub const NID_des_ede3_ofb64: i32 = 63; +pub const SN_sha1: &[u8; 5] = b"SHA1\0"; +pub const LN_sha1: &[u8; 5] = b"sha1\0"; +pub const NID_sha1: i32 = 64; +pub const SN_sha1WithRSAEncryption: &[u8; 9] = b"RSA-SHA1\0"; +pub const LN_sha1WithRSAEncryption: &[u8; 22] = b"sha1WithRSAEncryption\0"; +pub const NID_sha1WithRSAEncryption: i32 = 65; +pub const SN_dsaWithSHA: &[u8; 8] = b"DSA-SHA\0"; +pub const LN_dsaWithSHA: &[u8; 11] = b"dsaWithSHA\0"; +pub const NID_dsaWithSHA: i32 = 66; +pub const SN_dsa_2: &[u8; 8] = b"DSA-old\0"; +pub const LN_dsa_2: &[u8; 18] = b"dsaEncryption-old\0"; +pub const NID_dsa_2: i32 = 67; +pub const SN_pbeWithSHA1AndRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-64\0"; +pub const LN_pbeWithSHA1AndRC2_CBC: &[u8; 22] = b"pbeWithSHA1AndRC2-CBC\0"; +pub const NID_pbeWithSHA1AndRC2_CBC: i32 = 68; +pub const LN_id_pbkdf2: &[u8; 7] = b"PBKDF2\0"; +pub const NID_id_pbkdf2: i32 = 69; +pub const SN_dsaWithSHA1_2: &[u8; 13] = b"DSA-SHA1-old\0"; +pub const LN_dsaWithSHA1_2: &[u8; 16] = b"dsaWithSHA1-old\0"; +pub const NID_dsaWithSHA1_2: i32 = 70; +pub const SN_netscape_cert_type: &[u8; 11] = b"nsCertType\0"; +pub const LN_netscape_cert_type: &[u8; 19] = b"Netscape Cert Type\0"; +pub const NID_netscape_cert_type: i32 = 71; +pub const SN_netscape_base_url: &[u8; 10] = b"nsBaseUrl\0"; +pub const LN_netscape_base_url: &[u8; 18] = b"Netscape Base Url\0"; +pub const NID_netscape_base_url: i32 = 72; +pub const SN_netscape_revocation_url: &[u8; 16] = b"nsRevocationUrl\0"; +pub const LN_netscape_revocation_url: &[u8; 24] = b"Netscape Revocation Url\0"; +pub const NID_netscape_revocation_url: i32 = 73; +pub const SN_netscape_ca_revocation_url: &[u8; 18] = b"nsCaRevocationUrl\0"; +pub const LN_netscape_ca_revocation_url: &[u8; 27] = b"Netscape CA Revocation Url\0"; +pub const NID_netscape_ca_revocation_url: i32 = 74; +pub const SN_netscape_renewal_url: &[u8; 13] = b"nsRenewalUrl\0"; +pub const LN_netscape_renewal_url: &[u8; 21] = b"Netscape Renewal Url\0"; +pub const NID_netscape_renewal_url: i32 = 75; +pub const SN_netscape_ca_policy_url: &[u8; 14] = b"nsCaPolicyUrl\0"; +pub const LN_netscape_ca_policy_url: &[u8; 23] = b"Netscape CA Policy Url\0"; +pub const NID_netscape_ca_policy_url: i32 = 76; +pub const SN_netscape_ssl_server_name: &[u8; 16] = b"nsSslServerName\0"; +pub const LN_netscape_ssl_server_name: &[u8; 25] = b"Netscape SSL Server Name\0"; +pub const NID_netscape_ssl_server_name: i32 = 77; +pub const SN_netscape_comment: &[u8; 10] = b"nsComment\0"; +pub const LN_netscape_comment: &[u8; 17] = b"Netscape Comment\0"; +pub const NID_netscape_comment: i32 = 78; +pub const SN_netscape_cert_sequence: &[u8; 15] = b"nsCertSequence\0"; +pub const LN_netscape_cert_sequence: &[u8; 30] = b"Netscape Certificate Sequence\0"; +pub const NID_netscape_cert_sequence: i32 = 79; +pub const SN_desx_cbc: &[u8; 9] = b"DESX-CBC\0"; +pub const LN_desx_cbc: &[u8; 9] = b"desx-cbc\0"; +pub const NID_desx_cbc: i32 = 80; +pub const SN_id_ce: &[u8; 6] = b"id-ce\0"; +pub const NID_id_ce: i32 = 81; +pub const SN_subject_key_identifier: &[u8; 21] = b"subjectKeyIdentifier\0"; +pub const LN_subject_key_identifier: &[u8; 30] = b"X509v3 Subject Key Identifier\0"; +pub const NID_subject_key_identifier: i32 = 82; +pub const SN_key_usage: &[u8; 9] = b"keyUsage\0"; +pub const LN_key_usage: &[u8; 17] = b"X509v3 Key Usage\0"; +pub const NID_key_usage: i32 = 83; +pub const SN_private_key_usage_period: &[u8; 22] = b"privateKeyUsagePeriod\0"; +pub const LN_private_key_usage_period: &[u8; 32] = b"X509v3 Private Key Usage Period\0"; +pub const NID_private_key_usage_period: i32 = 84; +pub const SN_subject_alt_name: &[u8; 15] = b"subjectAltName\0"; +pub const LN_subject_alt_name: &[u8; 32] = b"X509v3 Subject Alternative Name\0"; +pub const NID_subject_alt_name: i32 = 85; +pub const SN_issuer_alt_name: &[u8; 14] = b"issuerAltName\0"; +pub const LN_issuer_alt_name: &[u8; 31] = b"X509v3 Issuer Alternative Name\0"; +pub const NID_issuer_alt_name: i32 = 86; +pub const SN_basic_constraints: &[u8; 17] = b"basicConstraints\0"; +pub const LN_basic_constraints: &[u8; 25] = b"X509v3 Basic Constraints\0"; +pub const NID_basic_constraints: i32 = 87; +pub const SN_crl_number: &[u8; 10] = b"crlNumber\0"; +pub const LN_crl_number: &[u8; 18] = b"X509v3 CRL Number\0"; +pub const NID_crl_number: i32 = 88; +pub const SN_certificate_policies: &[u8; 20] = b"certificatePolicies\0"; +pub const LN_certificate_policies: &[u8; 28] = b"X509v3 Certificate Policies\0"; +pub const NID_certificate_policies: i32 = 89; +pub const SN_authority_key_identifier: &[u8; 23] = b"authorityKeyIdentifier\0"; +pub const LN_authority_key_identifier: &[u8; 32] = b"X509v3 Authority Key Identifier\0"; +pub const NID_authority_key_identifier: i32 = 90; +pub const SN_bf_cbc: &[u8; 7] = b"BF-CBC\0"; +pub const LN_bf_cbc: &[u8; 7] = b"bf-cbc\0"; +pub const NID_bf_cbc: i32 = 91; +pub const SN_bf_ecb: &[u8; 7] = b"BF-ECB\0"; +pub const LN_bf_ecb: &[u8; 7] = b"bf-ecb\0"; +pub const NID_bf_ecb: i32 = 92; +pub const SN_bf_cfb64: &[u8; 7] = b"BF-CFB\0"; +pub const LN_bf_cfb64: &[u8; 7] = b"bf-cfb\0"; +pub const NID_bf_cfb64: i32 = 93; +pub const SN_bf_ofb64: &[u8; 7] = b"BF-OFB\0"; +pub const LN_bf_ofb64: &[u8; 7] = b"bf-ofb\0"; +pub const NID_bf_ofb64: i32 = 94; +pub const SN_mdc2: &[u8; 5] = b"MDC2\0"; +pub const LN_mdc2: &[u8; 5] = b"mdc2\0"; +pub const NID_mdc2: i32 = 95; +pub const SN_mdc2WithRSA: &[u8; 9] = b"RSA-MDC2\0"; +pub const LN_mdc2WithRSA: &[u8; 12] = b"mdc2WithRSA\0"; +pub const NID_mdc2WithRSA: i32 = 96; +pub const SN_rc4_40: &[u8; 7] = b"RC4-40\0"; +pub const LN_rc4_40: &[u8; 7] = b"rc4-40\0"; +pub const NID_rc4_40: i32 = 97; +pub const SN_rc2_40_cbc: &[u8; 11] = b"RC2-40-CBC\0"; +pub const LN_rc2_40_cbc: &[u8; 11] = b"rc2-40-cbc\0"; +pub const NID_rc2_40_cbc: i32 = 98; +pub const SN_givenName: &[u8; 3] = b"GN\0"; +pub const LN_givenName: &[u8; 10] = b"givenName\0"; +pub const NID_givenName: i32 = 99; +pub const SN_surname: &[u8; 3] = b"SN\0"; +pub const LN_surname: &[u8; 8] = b"surname\0"; +pub const NID_surname: i32 = 100; +pub const SN_initials: &[u8; 9] = b"initials\0"; +pub const LN_initials: &[u8; 9] = b"initials\0"; +pub const NID_initials: i32 = 101; +pub const SN_crl_distribution_points: &[u8; 22] = b"crlDistributionPoints\0"; +pub const LN_crl_distribution_points: &[u8; 31] = b"X509v3 CRL Distribution Points\0"; +pub const NID_crl_distribution_points: i32 = 103; +pub const SN_md5WithRSA: &[u8; 11] = b"RSA-NP-MD5\0"; +pub const LN_md5WithRSA: &[u8; 11] = b"md5WithRSA\0"; +pub const NID_md5WithRSA: i32 = 104; +pub const LN_serialNumber: &[u8; 13] = b"serialNumber\0"; +pub const NID_serialNumber: i32 = 105; +pub const SN_title: &[u8; 6] = b"title\0"; +pub const LN_title: &[u8; 6] = b"title\0"; +pub const NID_title: i32 = 106; +pub const LN_description: &[u8; 12] = b"description\0"; +pub const NID_description: i32 = 107; +pub const SN_cast5_cbc: &[u8; 10] = b"CAST5-CBC\0"; +pub const LN_cast5_cbc: &[u8; 10] = b"cast5-cbc\0"; +pub const NID_cast5_cbc: i32 = 108; +pub const SN_cast5_ecb: &[u8; 10] = b"CAST5-ECB\0"; +pub const LN_cast5_ecb: &[u8; 10] = b"cast5-ecb\0"; +pub const NID_cast5_ecb: i32 = 109; +pub const SN_cast5_cfb64: &[u8; 10] = b"CAST5-CFB\0"; +pub const LN_cast5_cfb64: &[u8; 10] = b"cast5-cfb\0"; +pub const NID_cast5_cfb64: i32 = 110; +pub const SN_cast5_ofb64: &[u8; 10] = b"CAST5-OFB\0"; +pub const LN_cast5_ofb64: &[u8; 10] = b"cast5-ofb\0"; +pub const NID_cast5_ofb64: i32 = 111; +pub const LN_pbeWithMD5AndCast5_CBC: &[u8; 22] = b"pbeWithMD5AndCast5CBC\0"; +pub const NID_pbeWithMD5AndCast5_CBC: i32 = 112; +pub const SN_dsaWithSHA1: &[u8; 9] = b"DSA-SHA1\0"; +pub const LN_dsaWithSHA1: &[u8; 12] = b"dsaWithSHA1\0"; +pub const NID_dsaWithSHA1: i32 = 113; +pub const SN_md5_sha1: &[u8; 9] = b"MD5-SHA1\0"; +pub const LN_md5_sha1: &[u8; 9] = b"md5-sha1\0"; +pub const NID_md5_sha1: i32 = 114; +pub const SN_sha1WithRSA: &[u8; 11] = b"RSA-SHA1-2\0"; +pub const LN_sha1WithRSA: &[u8; 12] = b"sha1WithRSA\0"; +pub const NID_sha1WithRSA: i32 = 115; +pub const SN_dsa: &[u8; 4] = b"DSA\0"; +pub const LN_dsa: &[u8; 14] = b"dsaEncryption\0"; +pub const NID_dsa: i32 = 116; +pub const SN_ripemd160: &[u8; 10] = b"RIPEMD160\0"; +pub const LN_ripemd160: &[u8; 10] = b"ripemd160\0"; +pub const NID_ripemd160: i32 = 117; +pub const SN_ripemd160WithRSA: &[u8; 14] = b"RSA-RIPEMD160\0"; +pub const LN_ripemd160WithRSA: &[u8; 17] = b"ripemd160WithRSA\0"; +pub const NID_ripemd160WithRSA: i32 = 119; +pub const SN_rc5_cbc: &[u8; 8] = b"RC5-CBC\0"; +pub const LN_rc5_cbc: &[u8; 8] = b"rc5-cbc\0"; +pub const NID_rc5_cbc: i32 = 120; +pub const SN_rc5_ecb: &[u8; 8] = b"RC5-ECB\0"; +pub const LN_rc5_ecb: &[u8; 8] = b"rc5-ecb\0"; +pub const NID_rc5_ecb: i32 = 121; +pub const SN_rc5_cfb64: &[u8; 8] = b"RC5-CFB\0"; +pub const LN_rc5_cfb64: &[u8; 8] = b"rc5-cfb\0"; +pub const NID_rc5_cfb64: i32 = 122; +pub const SN_rc5_ofb64: &[u8; 8] = b"RC5-OFB\0"; +pub const LN_rc5_ofb64: &[u8; 8] = b"rc5-ofb\0"; +pub const NID_rc5_ofb64: i32 = 123; +pub const SN_zlib_compression: &[u8; 5] = b"ZLIB\0"; +pub const LN_zlib_compression: &[u8; 17] = b"zlib compression\0"; +pub const NID_zlib_compression: i32 = 125; +pub const SN_ext_key_usage: &[u8; 17] = b"extendedKeyUsage\0"; +pub const LN_ext_key_usage: &[u8; 26] = b"X509v3 Extended Key Usage\0"; +pub const NID_ext_key_usage: i32 = 126; +pub const SN_id_pkix: &[u8; 5] = b"PKIX\0"; +pub const NID_id_pkix: i32 = 127; +pub const SN_id_kp: &[u8; 6] = b"id-kp\0"; +pub const NID_id_kp: i32 = 128; +pub const SN_server_auth: &[u8; 11] = b"serverAuth\0"; +pub const LN_server_auth: &[u8; 30] = b"TLS Web Server Authentication\0"; +pub const NID_server_auth: i32 = 129; +pub const SN_client_auth: &[u8; 11] = b"clientAuth\0"; +pub const LN_client_auth: &[u8; 30] = b"TLS Web Client Authentication\0"; +pub const NID_client_auth: i32 = 130; +pub const SN_code_sign: &[u8; 12] = b"codeSigning\0"; +pub const LN_code_sign: &[u8; 13] = b"Code Signing\0"; +pub const NID_code_sign: i32 = 131; +pub const SN_email_protect: &[u8; 16] = b"emailProtection\0"; +pub const LN_email_protect: &[u8; 18] = b"E-mail Protection\0"; +pub const NID_email_protect: i32 = 132; +pub const SN_time_stamp: &[u8; 13] = b"timeStamping\0"; +pub const LN_time_stamp: &[u8; 14] = b"Time Stamping\0"; +pub const NID_time_stamp: i32 = 133; +pub const SN_ms_code_ind: &[u8; 10] = b"msCodeInd\0"; +pub const LN_ms_code_ind: &[u8; 34] = b"Microsoft Individual Code Signing\0"; +pub const NID_ms_code_ind: i32 = 134; +pub const SN_ms_code_com: &[u8; 10] = b"msCodeCom\0"; +pub const LN_ms_code_com: &[u8; 34] = b"Microsoft Commercial Code Signing\0"; +pub const NID_ms_code_com: i32 = 135; +pub const SN_ms_ctl_sign: &[u8; 10] = b"msCTLSign\0"; +pub const LN_ms_ctl_sign: &[u8; 29] = b"Microsoft Trust List Signing\0"; +pub const NID_ms_ctl_sign: i32 = 136; +pub const SN_ms_sgc: &[u8; 6] = b"msSGC\0"; +pub const LN_ms_sgc: &[u8; 30] = b"Microsoft Server Gated Crypto\0"; +pub const NID_ms_sgc: i32 = 137; +pub const SN_ms_efs: &[u8; 6] = b"msEFS\0"; +pub const LN_ms_efs: &[u8; 32] = b"Microsoft Encrypted File System\0"; +pub const NID_ms_efs: i32 = 138; +pub const SN_ns_sgc: &[u8; 6] = b"nsSGC\0"; +pub const LN_ns_sgc: &[u8; 29] = b"Netscape Server Gated Crypto\0"; +pub const NID_ns_sgc: i32 = 139; +pub const SN_delta_crl: &[u8; 9] = b"deltaCRL\0"; +pub const LN_delta_crl: &[u8; 27] = b"X509v3 Delta CRL Indicator\0"; +pub const NID_delta_crl: i32 = 140; +pub const SN_crl_reason: &[u8; 10] = b"CRLReason\0"; +pub const LN_crl_reason: &[u8; 23] = b"X509v3 CRL Reason Code\0"; +pub const NID_crl_reason: i32 = 141; +pub const SN_invalidity_date: &[u8; 15] = b"invalidityDate\0"; +pub const LN_invalidity_date: &[u8; 16] = b"Invalidity Date\0"; +pub const NID_invalidity_date: i32 = 142; +pub const SN_sxnet: &[u8; 8] = b"SXNetID\0"; +pub const LN_sxnet: &[u8; 19] = b"Strong Extranet ID\0"; +pub const NID_sxnet: i32 = 143; +pub const SN_pbe_WithSHA1And128BitRC4: &[u8; 17] = b"PBE-SHA1-RC4-128\0"; +pub const LN_pbe_WithSHA1And128BitRC4: &[u8; 24] = b"pbeWithSHA1And128BitRC4\0"; +pub const NID_pbe_WithSHA1And128BitRC4: i32 = 144; +pub const SN_pbe_WithSHA1And40BitRC4: &[u8; 16] = b"PBE-SHA1-RC4-40\0"; +pub const LN_pbe_WithSHA1And40BitRC4: &[u8; 23] = b"pbeWithSHA1And40BitRC4\0"; +pub const NID_pbe_WithSHA1And40BitRC4: i32 = 145; +pub const SN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-3DES\0"; +pub const LN_pbe_WithSHA1And3_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And3-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: i32 = 146; +pub const SN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 14] = b"PBE-SHA1-2DES\0"; +pub const LN_pbe_WithSHA1And2_Key_TripleDES_CBC: &[u8; 33] = b"pbeWithSHA1And2-KeyTripleDES-CBC\0"; +pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: i32 = 147; +pub const SN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 17] = b"PBE-SHA1-RC2-128\0"; +pub const LN_pbe_WithSHA1And128BitRC2_CBC: &[u8; 28] = b"pbeWithSHA1And128BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And128BitRC2_CBC: i32 = 148; +pub const SN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 16] = b"PBE-SHA1-RC2-40\0"; +pub const LN_pbe_WithSHA1And40BitRC2_CBC: &[u8; 27] = b"pbeWithSHA1And40BitRC2-CBC\0"; +pub const NID_pbe_WithSHA1And40BitRC2_CBC: i32 = 149; +pub const LN_keyBag: &[u8; 7] = b"keyBag\0"; +pub const NID_keyBag: i32 = 150; +pub const LN_pkcs8ShroudedKeyBag: &[u8; 20] = b"pkcs8ShroudedKeyBag\0"; +pub const NID_pkcs8ShroudedKeyBag: i32 = 151; +pub const LN_certBag: &[u8; 8] = b"certBag\0"; +pub const NID_certBag: i32 = 152; +pub const LN_crlBag: &[u8; 7] = b"crlBag\0"; +pub const NID_crlBag: i32 = 153; +pub const LN_secretBag: &[u8; 10] = b"secretBag\0"; +pub const NID_secretBag: i32 = 154; +pub const LN_safeContentsBag: &[u8; 16] = b"safeContentsBag\0"; +pub const NID_safeContentsBag: i32 = 155; +pub const LN_friendlyName: &[u8; 13] = b"friendlyName\0"; +pub const NID_friendlyName: i32 = 156; +pub const LN_localKeyID: &[u8; 11] = b"localKeyID\0"; +pub const NID_localKeyID: i32 = 157; +pub const LN_x509Certificate: &[u8; 16] = b"x509Certificate\0"; +pub const NID_x509Certificate: i32 = 158; +pub const LN_sdsiCertificate: &[u8; 16] = b"sdsiCertificate\0"; +pub const NID_sdsiCertificate: i32 = 159; +pub const LN_x509Crl: &[u8; 8] = b"x509Crl\0"; +pub const NID_x509Crl: i32 = 160; +pub const LN_pbes2: &[u8; 6] = b"PBES2\0"; +pub const NID_pbes2: i32 = 161; +pub const LN_pbmac1: &[u8; 7] = b"PBMAC1\0"; +pub const NID_pbmac1: i32 = 162; +pub const LN_hmacWithSHA1: &[u8; 13] = b"hmacWithSHA1\0"; +pub const NID_hmacWithSHA1: i32 = 163; +pub const SN_id_qt_cps: &[u8; 10] = b"id-qt-cps\0"; +pub const LN_id_qt_cps: &[u8; 21] = b"Policy Qualifier CPS\0"; +pub const NID_id_qt_cps: i32 = 164; +pub const SN_id_qt_unotice: &[u8; 14] = b"id-qt-unotice\0"; +pub const LN_id_qt_unotice: &[u8; 29] = b"Policy Qualifier User Notice\0"; +pub const NID_id_qt_unotice: i32 = 165; +pub const SN_rc2_64_cbc: &[u8; 11] = b"RC2-64-CBC\0"; +pub const LN_rc2_64_cbc: &[u8; 11] = b"rc2-64-cbc\0"; +pub const NID_rc2_64_cbc: i32 = 166; +pub const SN_SMIMECapabilities: &[u8; 11] = b"SMIME-CAPS\0"; +pub const LN_SMIMECapabilities: &[u8; 20] = b"S/MIME Capabilities\0"; +pub const NID_SMIMECapabilities: i32 = 167; +pub const SN_pbeWithMD2AndRC2_CBC: &[u8; 15] = b"PBE-MD2-RC2-64\0"; +pub const LN_pbeWithMD2AndRC2_CBC: &[u8; 21] = b"pbeWithMD2AndRC2-CBC\0"; +pub const NID_pbeWithMD2AndRC2_CBC: i32 = 168; +pub const SN_pbeWithMD5AndRC2_CBC: &[u8; 15] = b"PBE-MD5-RC2-64\0"; +pub const LN_pbeWithMD5AndRC2_CBC: &[u8; 21] = b"pbeWithMD5AndRC2-CBC\0"; +pub const NID_pbeWithMD5AndRC2_CBC: i32 = 169; +pub const SN_pbeWithSHA1AndDES_CBC: &[u8; 13] = b"PBE-SHA1-DES\0"; +pub const LN_pbeWithSHA1AndDES_CBC: &[u8; 22] = b"pbeWithSHA1AndDES-CBC\0"; +pub const NID_pbeWithSHA1AndDES_CBC: i32 = 170; +pub const SN_ms_ext_req: &[u8; 9] = b"msExtReq\0"; +pub const LN_ms_ext_req: &[u8; 28] = b"Microsoft Extension Request\0"; +pub const NID_ms_ext_req: i32 = 171; +pub const SN_ext_req: &[u8; 7] = b"extReq\0"; +pub const LN_ext_req: &[u8; 18] = b"Extension Request\0"; +pub const NID_ext_req: i32 = 172; +pub const SN_name: &[u8; 5] = b"name\0"; +pub const LN_name: &[u8; 5] = b"name\0"; +pub const NID_name: i32 = 173; +pub const SN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const LN_dnQualifier: &[u8; 12] = b"dnQualifier\0"; +pub const NID_dnQualifier: i32 = 174; +pub const SN_id_pe: &[u8; 6] = b"id-pe\0"; +pub const NID_id_pe: i32 = 175; +pub const SN_id_ad: &[u8; 6] = b"id-ad\0"; +pub const NID_id_ad: i32 = 176; +pub const SN_info_access: &[u8; 20] = b"authorityInfoAccess\0"; +pub const LN_info_access: &[u8; 29] = b"Authority Information Access\0"; +pub const NID_info_access: i32 = 177; +pub const SN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const LN_ad_OCSP: &[u8; 5] = b"OCSP\0"; +pub const NID_ad_OCSP: i32 = 178; +pub const SN_ad_ca_issuers: &[u8; 10] = b"caIssuers\0"; +pub const LN_ad_ca_issuers: &[u8; 11] = b"CA Issuers\0"; +pub const NID_ad_ca_issuers: i32 = 179; +pub const SN_OCSP_sign: &[u8; 12] = b"OCSPSigning\0"; +pub const LN_OCSP_sign: &[u8; 13] = b"OCSP Signing\0"; +pub const NID_OCSP_sign: i32 = 180; +pub const SN_iso: &[u8; 4] = b"ISO\0"; +pub const LN_iso: &[u8; 4] = b"iso\0"; +pub const NID_iso: i32 = 181; +pub const OBJ_iso: i32 = 1; +pub const SN_member_body: &[u8; 12] = b"member-body\0"; +pub const LN_member_body: &[u8; 16] = b"ISO Member Body\0"; +pub const NID_member_body: i32 = 182; +pub const OBJ_ENC_member_body: i32 = 42; +pub const SN_ISO_US: &[u8; 7] = b"ISO-US\0"; +pub const LN_ISO_US: &[u8; 19] = b"ISO US Member Body\0"; +pub const NID_ISO_US: i32 = 183; +pub const SN_X9_57: &[u8; 6] = b"X9-57\0"; +pub const LN_X9_57: &[u8; 6] = b"X9.57\0"; +pub const NID_X9_57: i32 = 184; +pub const SN_X9cm: &[u8; 5] = b"X9cm\0"; +pub const LN_X9cm: &[u8; 11] = b"X9.57 CM ?\0"; +pub const NID_X9cm: i32 = 185; +pub const SN_pkcs1: &[u8; 6] = b"pkcs1\0"; +pub const NID_pkcs1: i32 = 186; +pub const SN_pkcs5: &[u8; 6] = b"pkcs5\0"; +pub const NID_pkcs5: i32 = 187; +pub const SN_SMIME: &[u8; 6] = b"SMIME\0"; +pub const LN_SMIME: &[u8; 7] = b"S/MIME\0"; +pub const NID_SMIME: i32 = 188; +pub const SN_id_smime_mod: &[u8; 13] = b"id-smime-mod\0"; +pub const NID_id_smime_mod: i32 = 189; +pub const SN_id_smime_ct: &[u8; 12] = b"id-smime-ct\0"; +pub const NID_id_smime_ct: i32 = 190; +pub const SN_id_smime_aa: &[u8; 12] = b"id-smime-aa\0"; +pub const NID_id_smime_aa: i32 = 191; +pub const SN_id_smime_alg: &[u8; 13] = b"id-smime-alg\0"; +pub const NID_id_smime_alg: i32 = 192; +pub const SN_id_smime_cd: &[u8; 12] = b"id-smime-cd\0"; +pub const NID_id_smime_cd: i32 = 193; +pub const SN_id_smime_spq: &[u8; 13] = b"id-smime-spq\0"; +pub const NID_id_smime_spq: i32 = 194; +pub const SN_id_smime_cti: &[u8; 13] = b"id-smime-cti\0"; +pub const NID_id_smime_cti: i32 = 195; +pub const SN_id_smime_mod_cms: &[u8; 17] = b"id-smime-mod-cms\0"; +pub const NID_id_smime_mod_cms: i32 = 196; +pub const SN_id_smime_mod_ess: &[u8; 17] = b"id-smime-mod-ess\0"; +pub const NID_id_smime_mod_ess: i32 = 197; +pub const SN_id_smime_mod_oid: &[u8; 17] = b"id-smime-mod-oid\0"; +pub const NID_id_smime_mod_oid: i32 = 198; +pub const SN_id_smime_mod_msg_v3: &[u8; 20] = b"id-smime-mod-msg-v3\0"; +pub const NID_id_smime_mod_msg_v3: i32 = 199; +pub const SN_id_smime_mod_ets_eSignature_88: &[u8; 31] = b"id-smime-mod-ets-eSignature-88\0"; +pub const NID_id_smime_mod_ets_eSignature_88: i32 = 200; +pub const SN_id_smime_mod_ets_eSignature_97: &[u8; 31] = b"id-smime-mod-ets-eSignature-97\0"; +pub const NID_id_smime_mod_ets_eSignature_97: i32 = 201; +pub const SN_id_smime_mod_ets_eSigPolicy_88: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-88\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_88: i32 = 202; +pub const SN_id_smime_mod_ets_eSigPolicy_97: &[u8; 31] = b"id-smime-mod-ets-eSigPolicy-97\0"; +pub const NID_id_smime_mod_ets_eSigPolicy_97: i32 = 203; +pub const SN_id_smime_ct_receipt: &[u8; 20] = b"id-smime-ct-receipt\0"; +pub const NID_id_smime_ct_receipt: i32 = 204; +pub const SN_id_smime_ct_authData: &[u8; 21] = b"id-smime-ct-authData\0"; +pub const NID_id_smime_ct_authData: i32 = 205; +pub const SN_id_smime_ct_publishCert: &[u8; 24] = b"id-smime-ct-publishCert\0"; +pub const NID_id_smime_ct_publishCert: i32 = 206; +pub const SN_id_smime_ct_TSTInfo: &[u8; 20] = b"id-smime-ct-TSTInfo\0"; +pub const NID_id_smime_ct_TSTInfo: i32 = 207; +pub const SN_id_smime_ct_TDTInfo: &[u8; 20] = b"id-smime-ct-TDTInfo\0"; +pub const NID_id_smime_ct_TDTInfo: i32 = 208; +pub const SN_id_smime_ct_contentInfo: &[u8; 24] = b"id-smime-ct-contentInfo\0"; +pub const NID_id_smime_ct_contentInfo: i32 = 209; +pub const SN_id_smime_ct_DVCSRequestData: &[u8; 28] = b"id-smime-ct-DVCSRequestData\0"; +pub const NID_id_smime_ct_DVCSRequestData: i32 = 210; +pub const SN_id_smime_ct_DVCSResponseData: &[u8; 29] = b"id-smime-ct-DVCSResponseData\0"; +pub const NID_id_smime_ct_DVCSResponseData: i32 = 211; +pub const SN_id_smime_aa_receiptRequest: &[u8; 27] = b"id-smime-aa-receiptRequest\0"; +pub const NID_id_smime_aa_receiptRequest: i32 = 212; +pub const SN_id_smime_aa_securityLabel: &[u8; 26] = b"id-smime-aa-securityLabel\0"; +pub const NID_id_smime_aa_securityLabel: i32 = 213; +pub const SN_id_smime_aa_mlExpandHistory: &[u8; 28] = b"id-smime-aa-mlExpandHistory\0"; +pub const NID_id_smime_aa_mlExpandHistory: i32 = 214; +pub const SN_id_smime_aa_contentHint: &[u8; 24] = b"id-smime-aa-contentHint\0"; +pub const NID_id_smime_aa_contentHint: i32 = 215; +pub const SN_id_smime_aa_msgSigDigest: &[u8; 25] = b"id-smime-aa-msgSigDigest\0"; +pub const NID_id_smime_aa_msgSigDigest: i32 = 216; +pub const SN_id_smime_aa_encapContentType: &[u8; 29] = b"id-smime-aa-encapContentType\0"; +pub const NID_id_smime_aa_encapContentType: i32 = 217; +pub const SN_id_smime_aa_contentIdentifier: &[u8; 30] = b"id-smime-aa-contentIdentifier\0"; +pub const NID_id_smime_aa_contentIdentifier: i32 = 218; +pub const SN_id_smime_aa_macValue: &[u8; 21] = b"id-smime-aa-macValue\0"; +pub const NID_id_smime_aa_macValue: i32 = 219; +pub const SN_id_smime_aa_equivalentLabels: &[u8; 29] = b"id-smime-aa-equivalentLabels\0"; +pub const NID_id_smime_aa_equivalentLabels: i32 = 220; +pub const SN_id_smime_aa_contentReference: &[u8; 29] = b"id-smime-aa-contentReference\0"; +pub const NID_id_smime_aa_contentReference: i32 = 221; +pub const SN_id_smime_aa_encrypKeyPref: &[u8; 26] = b"id-smime-aa-encrypKeyPref\0"; +pub const NID_id_smime_aa_encrypKeyPref: i32 = 222; +pub const SN_id_smime_aa_signingCertificate: &[u8; 31] = b"id-smime-aa-signingCertificate\0"; +pub const NID_id_smime_aa_signingCertificate: i32 = 223; +pub const SN_id_smime_aa_smimeEncryptCerts: &[u8; 30] = b"id-smime-aa-smimeEncryptCerts\0"; +pub const NID_id_smime_aa_smimeEncryptCerts: i32 = 224; +pub const SN_id_smime_aa_timeStampToken: &[u8; 27] = b"id-smime-aa-timeStampToken\0"; +pub const NID_id_smime_aa_timeStampToken: i32 = 225; +pub const SN_id_smime_aa_ets_sigPolicyId: &[u8; 28] = b"id-smime-aa-ets-sigPolicyId\0"; +pub const NID_id_smime_aa_ets_sigPolicyId: i32 = 226; +pub const SN_id_smime_aa_ets_commitmentType: &[u8; 31] = b"id-smime-aa-ets-commitmentType\0"; +pub const NID_id_smime_aa_ets_commitmentType: i32 = 227; +pub const SN_id_smime_aa_ets_signerLocation: &[u8; 31] = b"id-smime-aa-ets-signerLocation\0"; +pub const NID_id_smime_aa_ets_signerLocation: i32 = 228; +pub const SN_id_smime_aa_ets_signerAttr: &[u8; 27] = b"id-smime-aa-ets-signerAttr\0"; +pub const NID_id_smime_aa_ets_signerAttr: i32 = 229; +pub const SN_id_smime_aa_ets_otherSigCert: &[u8; 29] = b"id-smime-aa-ets-otherSigCert\0"; +pub const NID_id_smime_aa_ets_otherSigCert: i32 = 230; +pub const SN_id_smime_aa_ets_contentTimestamp: &[u8; 33] = b"id-smime-aa-ets-contentTimestamp\0"; +pub const NID_id_smime_aa_ets_contentTimestamp: i32 = 231; +pub const SN_id_smime_aa_ets_CertificateRefs: &[u8; 32] = b"id-smime-aa-ets-CertificateRefs\0"; +pub const NID_id_smime_aa_ets_CertificateRefs: i32 = 232; +pub const SN_id_smime_aa_ets_RevocationRefs: &[u8; 31] = b"id-smime-aa-ets-RevocationRefs\0"; +pub const NID_id_smime_aa_ets_RevocationRefs: i32 = 233; +pub const SN_id_smime_aa_ets_certValues: &[u8; 27] = b"id-smime-aa-ets-certValues\0"; +pub const NID_id_smime_aa_ets_certValues: i32 = 234; +pub const SN_id_smime_aa_ets_revocationValues: &[u8; 33] = b"id-smime-aa-ets-revocationValues\0"; +pub const NID_id_smime_aa_ets_revocationValues: i32 = 235; +pub const SN_id_smime_aa_ets_escTimeStamp: &[u8; 29] = b"id-smime-aa-ets-escTimeStamp\0"; +pub const NID_id_smime_aa_ets_escTimeStamp: i32 = 236; +pub const SN_id_smime_aa_ets_certCRLTimestamp: &[u8; 33] = b"id-smime-aa-ets-certCRLTimestamp\0"; +pub const NID_id_smime_aa_ets_certCRLTimestamp: i32 = 237; +pub const SN_id_smime_aa_ets_archiveTimeStamp: &[u8; 33] = b"id-smime-aa-ets-archiveTimeStamp\0"; +pub const NID_id_smime_aa_ets_archiveTimeStamp: i32 = 238; +pub const SN_id_smime_aa_signatureType: &[u8; 26] = b"id-smime-aa-signatureType\0"; +pub const NID_id_smime_aa_signatureType: i32 = 239; +pub const SN_id_smime_aa_dvcs_dvc: &[u8; 21] = b"id-smime-aa-dvcs-dvc\0"; +pub const NID_id_smime_aa_dvcs_dvc: i32 = 240; +pub const SN_id_smime_alg_ESDHwith3DES: &[u8; 26] = b"id-smime-alg-ESDHwith3DES\0"; +pub const NID_id_smime_alg_ESDHwith3DES: i32 = 241; +pub const SN_id_smime_alg_ESDHwithRC2: &[u8; 25] = b"id-smime-alg-ESDHwithRC2\0"; +pub const NID_id_smime_alg_ESDHwithRC2: i32 = 242; +pub const SN_id_smime_alg_3DESwrap: &[u8; 22] = b"id-smime-alg-3DESwrap\0"; +pub const NID_id_smime_alg_3DESwrap: i32 = 243; +pub const SN_id_smime_alg_RC2wrap: &[u8; 21] = b"id-smime-alg-RC2wrap\0"; +pub const NID_id_smime_alg_RC2wrap: i32 = 244; +pub const SN_id_smime_alg_ESDH: &[u8; 18] = b"id-smime-alg-ESDH\0"; +pub const NID_id_smime_alg_ESDH: i32 = 245; +pub const SN_id_smime_alg_CMS3DESwrap: &[u8; 25] = b"id-smime-alg-CMS3DESwrap\0"; +pub const NID_id_smime_alg_CMS3DESwrap: i32 = 246; +pub const SN_id_smime_alg_CMSRC2wrap: &[u8; 24] = b"id-smime-alg-CMSRC2wrap\0"; +pub const NID_id_smime_alg_CMSRC2wrap: i32 = 247; +pub const SN_id_smime_cd_ldap: &[u8; 17] = b"id-smime-cd-ldap\0"; +pub const NID_id_smime_cd_ldap: i32 = 248; +pub const SN_id_smime_spq_ets_sqt_uri: &[u8; 25] = b"id-smime-spq-ets-sqt-uri\0"; +pub const NID_id_smime_spq_ets_sqt_uri: i32 = 249; +pub const SN_id_smime_spq_ets_sqt_unotice: &[u8; 29] = b"id-smime-spq-ets-sqt-unotice\0"; +pub const NID_id_smime_spq_ets_sqt_unotice: i32 = 250; +pub const SN_id_smime_cti_ets_proofOfOrigin: &[u8; 31] = b"id-smime-cti-ets-proofOfOrigin\0"; +pub const NID_id_smime_cti_ets_proofOfOrigin: i32 = 251; +pub const SN_id_smime_cti_ets_proofOfReceipt: &[u8; 32] = b"id-smime-cti-ets-proofOfReceipt\0"; +pub const NID_id_smime_cti_ets_proofOfReceipt: i32 = 252; +pub const SN_id_smime_cti_ets_proofOfDelivery: &[u8; 33] = b"id-smime-cti-ets-proofOfDelivery\0"; +pub const NID_id_smime_cti_ets_proofOfDelivery: i32 = 253; +pub const SN_id_smime_cti_ets_proofOfSender: &[u8; 31] = b"id-smime-cti-ets-proofOfSender\0"; +pub const NID_id_smime_cti_ets_proofOfSender: i32 = 254; +pub const SN_id_smime_cti_ets_proofOfApproval: &[u8; 33] = b"id-smime-cti-ets-proofOfApproval\0"; +pub const NID_id_smime_cti_ets_proofOfApproval: i32 = 255; +pub const SN_id_smime_cti_ets_proofOfCreation: &[u8; 33] = b"id-smime-cti-ets-proofOfCreation\0"; +pub const NID_id_smime_cti_ets_proofOfCreation: i32 = 256; +pub const SN_md4: &[u8; 4] = b"MD4\0"; +pub const LN_md4: &[u8; 4] = b"md4\0"; +pub const NID_md4: i32 = 257; +pub const SN_id_pkix_mod: &[u8; 12] = b"id-pkix-mod\0"; +pub const NID_id_pkix_mod: i32 = 258; +pub const SN_id_qt: &[u8; 6] = b"id-qt\0"; +pub const NID_id_qt: i32 = 259; +pub const SN_id_it: &[u8; 6] = b"id-it\0"; +pub const NID_id_it: i32 = 260; +pub const SN_id_pkip: &[u8; 8] = b"id-pkip\0"; +pub const NID_id_pkip: i32 = 261; +pub const SN_id_alg: &[u8; 7] = b"id-alg\0"; +pub const NID_id_alg: i32 = 262; +pub const SN_id_cmc: &[u8; 7] = b"id-cmc\0"; +pub const NID_id_cmc: i32 = 263; +pub const SN_id_on: &[u8; 6] = b"id-on\0"; +pub const NID_id_on: i32 = 264; +pub const SN_id_pda: &[u8; 7] = b"id-pda\0"; +pub const NID_id_pda: i32 = 265; +pub const SN_id_aca: &[u8; 7] = b"id-aca\0"; +pub const NID_id_aca: i32 = 266; +pub const SN_id_qcs: &[u8; 7] = b"id-qcs\0"; +pub const NID_id_qcs: i32 = 267; +pub const SN_id_cct: &[u8; 7] = b"id-cct\0"; +pub const NID_id_cct: i32 = 268; +pub const SN_id_pkix1_explicit_88: &[u8; 21] = b"id-pkix1-explicit-88\0"; +pub const NID_id_pkix1_explicit_88: i32 = 269; +pub const SN_id_pkix1_implicit_88: &[u8; 21] = b"id-pkix1-implicit-88\0"; +pub const NID_id_pkix1_implicit_88: i32 = 270; +pub const SN_id_pkix1_explicit_93: &[u8; 21] = b"id-pkix1-explicit-93\0"; +pub const NID_id_pkix1_explicit_93: i32 = 271; +pub const SN_id_pkix1_implicit_93: &[u8; 21] = b"id-pkix1-implicit-93\0"; +pub const NID_id_pkix1_implicit_93: i32 = 272; +pub const SN_id_mod_crmf: &[u8; 12] = b"id-mod-crmf\0"; +pub const NID_id_mod_crmf: i32 = 273; +pub const SN_id_mod_cmc: &[u8; 11] = b"id-mod-cmc\0"; +pub const NID_id_mod_cmc: i32 = 274; +pub const SN_id_mod_kea_profile_88: &[u8; 22] = b"id-mod-kea-profile-88\0"; +pub const NID_id_mod_kea_profile_88: i32 = 275; +pub const SN_id_mod_kea_profile_93: &[u8; 22] = b"id-mod-kea-profile-93\0"; +pub const NID_id_mod_kea_profile_93: i32 = 276; +pub const SN_id_mod_cmp: &[u8; 11] = b"id-mod-cmp\0"; +pub const NID_id_mod_cmp: i32 = 277; +pub const SN_id_mod_qualified_cert_88: &[u8; 25] = b"id-mod-qualified-cert-88\0"; +pub const NID_id_mod_qualified_cert_88: i32 = 278; +pub const SN_id_mod_qualified_cert_93: &[u8; 25] = b"id-mod-qualified-cert-93\0"; +pub const NID_id_mod_qualified_cert_93: i32 = 279; +pub const SN_id_mod_attribute_cert: &[u8; 22] = b"id-mod-attribute-cert\0"; +pub const NID_id_mod_attribute_cert: i32 = 280; +pub const SN_id_mod_timestamp_protocol: &[u8; 26] = b"id-mod-timestamp-protocol\0"; +pub const NID_id_mod_timestamp_protocol: i32 = 281; +pub const SN_id_mod_ocsp: &[u8; 12] = b"id-mod-ocsp\0"; +pub const NID_id_mod_ocsp: i32 = 282; +pub const SN_id_mod_dvcs: &[u8; 12] = b"id-mod-dvcs\0"; +pub const NID_id_mod_dvcs: i32 = 283; +pub const SN_id_mod_cmp2000: &[u8; 15] = b"id-mod-cmp2000\0"; +pub const NID_id_mod_cmp2000: i32 = 284; +pub const SN_biometricInfo: &[u8; 14] = b"biometricInfo\0"; +pub const LN_biometricInfo: &[u8; 15] = b"Biometric Info\0"; +pub const NID_biometricInfo: i32 = 285; +pub const SN_qcStatements: &[u8; 13] = b"qcStatements\0"; +pub const NID_qcStatements: i32 = 286; +pub const SN_ac_auditEntity: &[u8; 15] = b"ac-auditEntity\0"; +pub const NID_ac_auditEntity: i32 = 287; +pub const SN_ac_targeting: &[u8; 13] = b"ac-targeting\0"; +pub const NID_ac_targeting: i32 = 288; +pub const SN_aaControls: &[u8; 11] = b"aaControls\0"; +pub const NID_aaControls: i32 = 289; +pub const SN_sbgp_ipAddrBlock: &[u8; 17] = b"sbgp-ipAddrBlock\0"; +pub const NID_sbgp_ipAddrBlock: i32 = 290; +pub const SN_sbgp_autonomousSysNum: &[u8; 22] = b"sbgp-autonomousSysNum\0"; +pub const NID_sbgp_autonomousSysNum: i32 = 291; +pub const SN_sbgp_routerIdentifier: &[u8; 22] = b"sbgp-routerIdentifier\0"; +pub const NID_sbgp_routerIdentifier: i32 = 292; +pub const SN_textNotice: &[u8; 11] = b"textNotice\0"; +pub const NID_textNotice: i32 = 293; +pub const SN_ipsecEndSystem: &[u8; 15] = b"ipsecEndSystem\0"; +pub const LN_ipsecEndSystem: &[u8; 17] = b"IPSec End System\0"; +pub const NID_ipsecEndSystem: i32 = 294; +pub const SN_ipsecTunnel: &[u8; 12] = b"ipsecTunnel\0"; +pub const LN_ipsecTunnel: &[u8; 13] = b"IPSec Tunnel\0"; +pub const NID_ipsecTunnel: i32 = 295; +pub const SN_ipsecUser: &[u8; 10] = b"ipsecUser\0"; +pub const LN_ipsecUser: &[u8; 11] = b"IPSec User\0"; +pub const NID_ipsecUser: i32 = 296; +pub const SN_dvcs: &[u8; 5] = b"DVCS\0"; +pub const LN_dvcs: &[u8; 5] = b"dvcs\0"; +pub const NID_dvcs: i32 = 297; +pub const SN_id_it_caProtEncCert: &[u8; 20] = b"id-it-caProtEncCert\0"; +pub const NID_id_it_caProtEncCert: i32 = 298; +pub const SN_id_it_signKeyPairTypes: &[u8; 23] = b"id-it-signKeyPairTypes\0"; +pub const NID_id_it_signKeyPairTypes: i32 = 299; +pub const SN_id_it_encKeyPairTypes: &[u8; 22] = b"id-it-encKeyPairTypes\0"; +pub const NID_id_it_encKeyPairTypes: i32 = 300; +pub const SN_id_it_preferredSymmAlg: &[u8; 23] = b"id-it-preferredSymmAlg\0"; +pub const NID_id_it_preferredSymmAlg: i32 = 301; +pub const SN_id_it_caKeyUpdateInfo: &[u8; 22] = b"id-it-caKeyUpdateInfo\0"; +pub const NID_id_it_caKeyUpdateInfo: i32 = 302; +pub const SN_id_it_currentCRL: &[u8; 17] = b"id-it-currentCRL\0"; +pub const NID_id_it_currentCRL: i32 = 303; +pub const SN_id_it_unsupportedOIDs: &[u8; 22] = b"id-it-unsupportedOIDs\0"; +pub const NID_id_it_unsupportedOIDs: i32 = 304; +pub const SN_id_it_subscriptionRequest: &[u8; 26] = b"id-it-subscriptionRequest\0"; +pub const NID_id_it_subscriptionRequest: i32 = 305; +pub const SN_id_it_subscriptionResponse: &[u8; 27] = b"id-it-subscriptionResponse\0"; +pub const NID_id_it_subscriptionResponse: i32 = 306; +pub const SN_id_it_keyPairParamReq: &[u8; 22] = b"id-it-keyPairParamReq\0"; +pub const NID_id_it_keyPairParamReq: i32 = 307; +pub const SN_id_it_keyPairParamRep: &[u8; 22] = b"id-it-keyPairParamRep\0"; +pub const NID_id_it_keyPairParamRep: i32 = 308; +pub const SN_id_it_revPassphrase: &[u8; 20] = b"id-it-revPassphrase\0"; +pub const NID_id_it_revPassphrase: i32 = 309; +pub const SN_id_it_implicitConfirm: &[u8; 22] = b"id-it-implicitConfirm\0"; +pub const NID_id_it_implicitConfirm: i32 = 310; +pub const SN_id_it_confirmWaitTime: &[u8; 22] = b"id-it-confirmWaitTime\0"; +pub const NID_id_it_confirmWaitTime: i32 = 311; +pub const SN_id_it_origPKIMessage: &[u8; 21] = b"id-it-origPKIMessage\0"; +pub const NID_id_it_origPKIMessage: i32 = 312; +pub const SN_id_regCtrl: &[u8; 11] = b"id-regCtrl\0"; +pub const NID_id_regCtrl: i32 = 313; +pub const SN_id_regInfo: &[u8; 11] = b"id-regInfo\0"; +pub const NID_id_regInfo: i32 = 314; +pub const SN_id_regCtrl_regToken: &[u8; 20] = b"id-regCtrl-regToken\0"; +pub const NID_id_regCtrl_regToken: i32 = 315; +pub const SN_id_regCtrl_authenticator: &[u8; 25] = b"id-regCtrl-authenticator\0"; +pub const NID_id_regCtrl_authenticator: i32 = 316; +pub const SN_id_regCtrl_pkiPublicationInfo: &[u8; 30] = b"id-regCtrl-pkiPublicationInfo\0"; +pub const NID_id_regCtrl_pkiPublicationInfo: i32 = 317; +pub const SN_id_regCtrl_pkiArchiveOptions: &[u8; 29] = b"id-regCtrl-pkiArchiveOptions\0"; +pub const NID_id_regCtrl_pkiArchiveOptions: i32 = 318; +pub const SN_id_regCtrl_oldCertID: &[u8; 21] = b"id-regCtrl-oldCertID\0"; +pub const NID_id_regCtrl_oldCertID: i32 = 319; +pub const SN_id_regCtrl_protocolEncrKey: &[u8; 27] = b"id-regCtrl-protocolEncrKey\0"; +pub const NID_id_regCtrl_protocolEncrKey: i32 = 320; +pub const SN_id_regInfo_utf8Pairs: &[u8; 21] = b"id-regInfo-utf8Pairs\0"; +pub const NID_id_regInfo_utf8Pairs: i32 = 321; +pub const SN_id_regInfo_certReq: &[u8; 19] = b"id-regInfo-certReq\0"; +pub const NID_id_regInfo_certReq: i32 = 322; +pub const SN_id_alg_des40: &[u8; 13] = b"id-alg-des40\0"; +pub const NID_id_alg_des40: i32 = 323; +pub const SN_id_alg_noSignature: &[u8; 19] = b"id-alg-noSignature\0"; +pub const NID_id_alg_noSignature: i32 = 324; +pub const SN_id_alg_dh_sig_hmac_sha1: &[u8; 24] = b"id-alg-dh-sig-hmac-sha1\0"; +pub const NID_id_alg_dh_sig_hmac_sha1: i32 = 325; +pub const SN_id_alg_dh_pop: &[u8; 14] = b"id-alg-dh-pop\0"; +pub const NID_id_alg_dh_pop: i32 = 326; +pub const SN_id_cmc_statusInfo: &[u8; 18] = b"id-cmc-statusInfo\0"; +pub const NID_id_cmc_statusInfo: i32 = 327; +pub const SN_id_cmc_identification: &[u8; 22] = b"id-cmc-identification\0"; +pub const NID_id_cmc_identification: i32 = 328; +pub const SN_id_cmc_identityProof: &[u8; 21] = b"id-cmc-identityProof\0"; +pub const NID_id_cmc_identityProof: i32 = 329; +pub const SN_id_cmc_dataReturn: &[u8; 18] = b"id-cmc-dataReturn\0"; +pub const NID_id_cmc_dataReturn: i32 = 330; +pub const SN_id_cmc_transactionId: &[u8; 21] = b"id-cmc-transactionId\0"; +pub const NID_id_cmc_transactionId: i32 = 331; +pub const SN_id_cmc_senderNonce: &[u8; 19] = b"id-cmc-senderNonce\0"; +pub const NID_id_cmc_senderNonce: i32 = 332; +pub const SN_id_cmc_recipientNonce: &[u8; 22] = b"id-cmc-recipientNonce\0"; +pub const NID_id_cmc_recipientNonce: i32 = 333; +pub const SN_id_cmc_addExtensions: &[u8; 21] = b"id-cmc-addExtensions\0"; +pub const NID_id_cmc_addExtensions: i32 = 334; +pub const SN_id_cmc_encryptedPOP: &[u8; 20] = b"id-cmc-encryptedPOP\0"; +pub const NID_id_cmc_encryptedPOP: i32 = 335; +pub const SN_id_cmc_decryptedPOP: &[u8; 20] = b"id-cmc-decryptedPOP\0"; +pub const NID_id_cmc_decryptedPOP: i32 = 336; +pub const SN_id_cmc_lraPOPWitness: &[u8; 21] = b"id-cmc-lraPOPWitness\0"; +pub const NID_id_cmc_lraPOPWitness: i32 = 337; +pub const SN_id_cmc_getCert: &[u8; 15] = b"id-cmc-getCert\0"; +pub const NID_id_cmc_getCert: i32 = 338; +pub const SN_id_cmc_getCRL: &[u8; 14] = b"id-cmc-getCRL\0"; +pub const NID_id_cmc_getCRL: i32 = 339; +pub const SN_id_cmc_revokeRequest: &[u8; 21] = b"id-cmc-revokeRequest\0"; +pub const NID_id_cmc_revokeRequest: i32 = 340; +pub const SN_id_cmc_regInfo: &[u8; 15] = b"id-cmc-regInfo\0"; +pub const NID_id_cmc_regInfo: i32 = 341; +pub const SN_id_cmc_responseInfo: &[u8; 20] = b"id-cmc-responseInfo\0"; +pub const NID_id_cmc_responseInfo: i32 = 342; +pub const SN_id_cmc_queryPending: &[u8; 20] = b"id-cmc-queryPending\0"; +pub const NID_id_cmc_queryPending: i32 = 343; +pub const SN_id_cmc_popLinkRandom: &[u8; 21] = b"id-cmc-popLinkRandom\0"; +pub const NID_id_cmc_popLinkRandom: i32 = 344; +pub const SN_id_cmc_popLinkWitness: &[u8; 22] = b"id-cmc-popLinkWitness\0"; +pub const NID_id_cmc_popLinkWitness: i32 = 345; +pub const SN_id_cmc_confirmCertAcceptance: &[u8; 29] = b"id-cmc-confirmCertAcceptance\0"; +pub const NID_id_cmc_confirmCertAcceptance: i32 = 346; +pub const SN_id_on_personalData: &[u8; 19] = b"id-on-personalData\0"; +pub const NID_id_on_personalData: i32 = 347; +pub const SN_id_pda_dateOfBirth: &[u8; 19] = b"id-pda-dateOfBirth\0"; +pub const NID_id_pda_dateOfBirth: i32 = 348; +pub const SN_id_pda_placeOfBirth: &[u8; 20] = b"id-pda-placeOfBirth\0"; +pub const NID_id_pda_placeOfBirth: i32 = 349; +pub const SN_id_pda_gender: &[u8; 14] = b"id-pda-gender\0"; +pub const NID_id_pda_gender: i32 = 351; +pub const SN_id_pda_countryOfCitizenship: &[u8; 28] = b"id-pda-countryOfCitizenship\0"; +pub const NID_id_pda_countryOfCitizenship: i32 = 352; +pub const SN_id_pda_countryOfResidence: &[u8; 26] = b"id-pda-countryOfResidence\0"; +pub const NID_id_pda_countryOfResidence: i32 = 353; +pub const SN_id_aca_authenticationInfo: &[u8; 26] = b"id-aca-authenticationInfo\0"; +pub const NID_id_aca_authenticationInfo: i32 = 354; +pub const SN_id_aca_accessIdentity: &[u8; 22] = b"id-aca-accessIdentity\0"; +pub const NID_id_aca_accessIdentity: i32 = 355; +pub const SN_id_aca_chargingIdentity: &[u8; 24] = b"id-aca-chargingIdentity\0"; +pub const NID_id_aca_chargingIdentity: i32 = 356; +pub const SN_id_aca_group: &[u8; 13] = b"id-aca-group\0"; +pub const NID_id_aca_group: i32 = 357; +pub const SN_id_aca_role: &[u8; 12] = b"id-aca-role\0"; +pub const NID_id_aca_role: i32 = 358; +pub const SN_id_qcs_pkixQCSyntax_v1: &[u8; 23] = b"id-qcs-pkixQCSyntax-v1\0"; +pub const NID_id_qcs_pkixQCSyntax_v1: i32 = 359; +pub const SN_id_cct_crs: &[u8; 11] = b"id-cct-crs\0"; +pub const NID_id_cct_crs: i32 = 360; +pub const SN_id_cct_PKIData: &[u8; 15] = b"id-cct-PKIData\0"; +pub const NID_id_cct_PKIData: i32 = 361; +pub const SN_id_cct_PKIResponse: &[u8; 19] = b"id-cct-PKIResponse\0"; +pub const NID_id_cct_PKIResponse: i32 = 362; +pub const SN_ad_timeStamping: &[u8; 16] = b"ad_timestamping\0"; +pub const LN_ad_timeStamping: &[u8; 17] = b"AD Time Stamping\0"; +pub const NID_ad_timeStamping: i32 = 363; +pub const SN_ad_dvcs: &[u8; 8] = b"AD_DVCS\0"; +pub const LN_ad_dvcs: &[u8; 8] = b"ad dvcs\0"; +pub const NID_ad_dvcs: i32 = 364; +pub const SN_id_pkix_OCSP_basic: &[u8; 18] = b"basicOCSPResponse\0"; +pub const LN_id_pkix_OCSP_basic: &[u8; 20] = b"Basic OCSP Response\0"; +pub const NID_id_pkix_OCSP_basic: i32 = 365; +pub const SN_id_pkix_OCSP_Nonce: &[u8; 6] = b"Nonce\0"; +pub const LN_id_pkix_OCSP_Nonce: &[u8; 11] = b"OCSP Nonce\0"; +pub const NID_id_pkix_OCSP_Nonce: i32 = 366; +pub const SN_id_pkix_OCSP_CrlID: &[u8; 6] = b"CrlID\0"; +pub const LN_id_pkix_OCSP_CrlID: &[u8; 12] = b"OCSP CRL ID\0"; +pub const NID_id_pkix_OCSP_CrlID: i32 = 367; +pub const SN_id_pkix_OCSP_acceptableResponses: &[u8; 20] = b"acceptableResponses\0"; +pub const LN_id_pkix_OCSP_acceptableResponses: &[u8; 26] = b"Acceptable OCSP Responses\0"; +pub const NID_id_pkix_OCSP_acceptableResponses: i32 = 368; +pub const SN_id_pkix_OCSP_noCheck: &[u8; 8] = b"noCheck\0"; +pub const LN_id_pkix_OCSP_noCheck: &[u8; 14] = b"OCSP No Check\0"; +pub const NID_id_pkix_OCSP_noCheck: i32 = 369; +pub const SN_id_pkix_OCSP_archiveCutoff: &[u8; 14] = b"archiveCutoff\0"; +pub const LN_id_pkix_OCSP_archiveCutoff: &[u8; 20] = b"OCSP Archive Cutoff\0"; +pub const NID_id_pkix_OCSP_archiveCutoff: i32 = 370; +pub const SN_id_pkix_OCSP_serviceLocator: &[u8; 15] = b"serviceLocator\0"; +pub const LN_id_pkix_OCSP_serviceLocator: &[u8; 21] = b"OCSP Service Locator\0"; +pub const NID_id_pkix_OCSP_serviceLocator: i32 = 371; +pub const SN_id_pkix_OCSP_extendedStatus: &[u8; 15] = b"extendedStatus\0"; +pub const LN_id_pkix_OCSP_extendedStatus: &[u8; 21] = b"Extended OCSP Status\0"; +pub const NID_id_pkix_OCSP_extendedStatus: i32 = 372; +pub const SN_id_pkix_OCSP_valid: &[u8; 6] = b"valid\0"; +pub const NID_id_pkix_OCSP_valid: i32 = 373; +pub const SN_id_pkix_OCSP_path: &[u8; 5] = b"path\0"; +pub const NID_id_pkix_OCSP_path: i32 = 374; +pub const SN_id_pkix_OCSP_trustRoot: &[u8; 10] = b"trustRoot\0"; +pub const LN_id_pkix_OCSP_trustRoot: &[u8; 11] = b"Trust Root\0"; +pub const NID_id_pkix_OCSP_trustRoot: i32 = 375; +pub const SN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const LN_algorithm: &[u8; 10] = b"algorithm\0"; +pub const NID_algorithm: i32 = 376; +pub const SN_rsaSignature: &[u8; 13] = b"rsaSignature\0"; +pub const NID_rsaSignature: i32 = 377; +pub const SN_X500algorithms: &[u8; 15] = b"X500algorithms\0"; +pub const LN_X500algorithms: &[u8; 32] = b"directory services - algorithms\0"; +pub const NID_X500algorithms: i32 = 378; +pub const SN_org: &[u8; 4] = b"ORG\0"; +pub const LN_org: &[u8; 4] = b"org\0"; +pub const NID_org: i32 = 379; +pub const OBJ_ENC_org: i32 = 43; +pub const SN_dod: &[u8; 4] = b"DOD\0"; +pub const LN_dod: &[u8; 4] = b"dod\0"; +pub const NID_dod: i32 = 380; +pub const SN_iana: &[u8; 5] = b"IANA\0"; +pub const LN_iana: &[u8; 5] = b"iana\0"; +pub const NID_iana: i32 = 381; +pub const SN_Directory: &[u8; 10] = b"directory\0"; +pub const LN_Directory: &[u8; 10] = b"Directory\0"; +pub const NID_Directory: i32 = 382; +pub const SN_Management: &[u8; 5] = b"mgmt\0"; +pub const LN_Management: &[u8; 11] = b"Management\0"; +pub const NID_Management: i32 = 383; +pub const SN_Experimental: &[u8; 13] = b"experimental\0"; +pub const LN_Experimental: &[u8; 13] = b"Experimental\0"; +pub const NID_Experimental: i32 = 384; +pub const SN_Private: &[u8; 8] = b"private\0"; +pub const LN_Private: &[u8; 8] = b"Private\0"; +pub const NID_Private: i32 = 385; +pub const SN_Security: &[u8; 9] = b"security\0"; +pub const LN_Security: &[u8; 9] = b"Security\0"; +pub const NID_Security: i32 = 386; +pub const SN_SNMPv2: &[u8; 7] = b"snmpv2\0"; +pub const LN_SNMPv2: &[u8; 7] = b"SNMPv2\0"; +pub const NID_SNMPv2: i32 = 387; +pub const LN_Mail: &[u8; 5] = b"Mail\0"; +pub const NID_Mail: i32 = 388; +pub const SN_Enterprises: &[u8; 12] = b"enterprises\0"; +pub const LN_Enterprises: &[u8; 12] = b"Enterprises\0"; +pub const NID_Enterprises: i32 = 389; +pub const SN_dcObject: &[u8; 9] = b"dcobject\0"; +pub const LN_dcObject: &[u8; 9] = b"dcObject\0"; +pub const NID_dcObject: i32 = 390; +pub const SN_domainComponent: &[u8; 3] = b"DC\0"; +pub const LN_domainComponent: &[u8; 16] = b"domainComponent\0"; +pub const NID_domainComponent: i32 = 391; +pub const SN_Domain: &[u8; 7] = b"domain\0"; +pub const LN_Domain: &[u8; 7] = b"Domain\0"; +pub const NID_Domain: i32 = 392; +pub const SN_selected_attribute_types: &[u8; 25] = b"selected-attribute-types\0"; +pub const LN_selected_attribute_types: &[u8; 25] = b"Selected Attribute Types\0"; +pub const NID_selected_attribute_types: i32 = 394; +pub const SN_clearance: &[u8; 10] = b"clearance\0"; +pub const NID_clearance: i32 = 395; +pub const SN_md4WithRSAEncryption: &[u8; 8] = b"RSA-MD4\0"; +pub const LN_md4WithRSAEncryption: &[u8; 21] = b"md4WithRSAEncryption\0"; +pub const NID_md4WithRSAEncryption: i32 = 396; +pub const SN_ac_proxying: &[u8; 12] = b"ac-proxying\0"; +pub const NID_ac_proxying: i32 = 397; +pub const SN_sinfo_access: &[u8; 18] = b"subjectInfoAccess\0"; +pub const LN_sinfo_access: &[u8; 27] = b"Subject Information Access\0"; +pub const NID_sinfo_access: i32 = 398; +pub const SN_id_aca_encAttrs: &[u8; 16] = b"id-aca-encAttrs\0"; +pub const NID_id_aca_encAttrs: i32 = 399; +pub const SN_role: &[u8; 5] = b"role\0"; +pub const LN_role: &[u8; 5] = b"role\0"; +pub const NID_role: i32 = 400; +pub const SN_policy_constraints: &[u8; 18] = b"policyConstraints\0"; +pub const LN_policy_constraints: &[u8; 26] = b"X509v3 Policy Constraints\0"; +pub const NID_policy_constraints: i32 = 401; +pub const SN_target_information: &[u8; 18] = b"targetInformation\0"; +pub const LN_target_information: &[u8; 20] = b"X509v3 AC Targeting\0"; +pub const NID_target_information: i32 = 402; +pub const SN_no_rev_avail: &[u8; 11] = b"noRevAvail\0"; +pub const LN_no_rev_avail: &[u8; 31] = b"X509v3 No Revocation Available\0"; +pub const NID_no_rev_avail: i32 = 403; +pub const SN_ansi_X9_62: &[u8; 11] = b"ansi-X9-62\0"; +pub const LN_ansi_X9_62: &[u8; 11] = b"ANSI X9.62\0"; +pub const NID_ansi_X9_62: i32 = 405; +pub const SN_X9_62_prime_field: &[u8; 12] = b"prime-field\0"; +pub const NID_X9_62_prime_field: i32 = 406; +pub const SN_X9_62_characteristic_two_field: &[u8; 25] = b"characteristic-two-field\0"; +pub const NID_X9_62_characteristic_two_field: i32 = 407; +pub const SN_X9_62_id_ecPublicKey: &[u8; 15] = b"id-ecPublicKey\0"; +pub const NID_X9_62_id_ecPublicKey: i32 = 408; +pub const SN_X9_62_prime192v1: &[u8; 11] = b"prime192v1\0"; +pub const NID_X9_62_prime192v1: i32 = 409; +pub const SN_X9_62_prime192v2: &[u8; 11] = b"prime192v2\0"; +pub const NID_X9_62_prime192v2: i32 = 410; +pub const SN_X9_62_prime192v3: &[u8; 11] = b"prime192v3\0"; +pub const NID_X9_62_prime192v3: i32 = 411; +pub const SN_X9_62_prime239v1: &[u8; 11] = b"prime239v1\0"; +pub const NID_X9_62_prime239v1: i32 = 412; +pub const SN_X9_62_prime239v2: &[u8; 11] = b"prime239v2\0"; +pub const NID_X9_62_prime239v2: i32 = 413; +pub const SN_X9_62_prime239v3: &[u8; 11] = b"prime239v3\0"; +pub const NID_X9_62_prime239v3: i32 = 414; +pub const SN_X9_62_prime256v1: &[u8; 11] = b"prime256v1\0"; +pub const NID_X9_62_prime256v1: i32 = 415; +pub const SN_ecdsa_with_SHA1: &[u8; 16] = b"ecdsa-with-SHA1\0"; +pub const NID_ecdsa_with_SHA1: i32 = 416; +pub const SN_ms_csp_name: &[u8; 8] = b"CSPName\0"; +pub const LN_ms_csp_name: &[u8; 19] = b"Microsoft CSP Name\0"; +pub const NID_ms_csp_name: i32 = 417; +pub const SN_aes_128_ecb: &[u8; 12] = b"AES-128-ECB\0"; +pub const LN_aes_128_ecb: &[u8; 12] = b"aes-128-ecb\0"; +pub const NID_aes_128_ecb: i32 = 418; +pub const SN_aes_128_cbc: &[u8; 12] = b"AES-128-CBC\0"; +pub const LN_aes_128_cbc: &[u8; 12] = b"aes-128-cbc\0"; +pub const NID_aes_128_cbc: i32 = 419; +pub const SN_aes_128_ofb128: &[u8; 12] = b"AES-128-OFB\0"; +pub const LN_aes_128_ofb128: &[u8; 12] = b"aes-128-ofb\0"; +pub const NID_aes_128_ofb128: i32 = 420; +pub const SN_aes_128_cfb128: &[u8; 12] = b"AES-128-CFB\0"; +pub const LN_aes_128_cfb128: &[u8; 12] = b"aes-128-cfb\0"; +pub const NID_aes_128_cfb128: i32 = 421; +pub const SN_aes_192_ecb: &[u8; 12] = b"AES-192-ECB\0"; +pub const LN_aes_192_ecb: &[u8; 12] = b"aes-192-ecb\0"; +pub const NID_aes_192_ecb: i32 = 422; +pub const SN_aes_192_cbc: &[u8; 12] = b"AES-192-CBC\0"; +pub const LN_aes_192_cbc: &[u8; 12] = b"aes-192-cbc\0"; +pub const NID_aes_192_cbc: i32 = 423; +pub const SN_aes_192_ofb128: &[u8; 12] = b"AES-192-OFB\0"; +pub const LN_aes_192_ofb128: &[u8; 12] = b"aes-192-ofb\0"; +pub const NID_aes_192_ofb128: i32 = 424; +pub const SN_aes_192_cfb128: &[u8; 12] = b"AES-192-CFB\0"; +pub const LN_aes_192_cfb128: &[u8; 12] = b"aes-192-cfb\0"; +pub const NID_aes_192_cfb128: i32 = 425; +pub const SN_aes_256_ecb: &[u8; 12] = b"AES-256-ECB\0"; +pub const LN_aes_256_ecb: &[u8; 12] = b"aes-256-ecb\0"; +pub const NID_aes_256_ecb: i32 = 426; +pub const SN_aes_256_cbc: &[u8; 12] = b"AES-256-CBC\0"; +pub const LN_aes_256_cbc: &[u8; 12] = b"aes-256-cbc\0"; +pub const NID_aes_256_cbc: i32 = 427; +pub const SN_aes_256_ofb128: &[u8; 12] = b"AES-256-OFB\0"; +pub const LN_aes_256_ofb128: &[u8; 12] = b"aes-256-ofb\0"; +pub const NID_aes_256_ofb128: i32 = 428; +pub const SN_aes_256_cfb128: &[u8; 12] = b"AES-256-CFB\0"; +pub const LN_aes_256_cfb128: &[u8; 12] = b"aes-256-cfb\0"; +pub const NID_aes_256_cfb128: i32 = 429; +pub const SN_hold_instruction_code: &[u8; 20] = b"holdInstructionCode\0"; +pub const LN_hold_instruction_code: &[u8; 22] = b"Hold Instruction Code\0"; +pub const NID_hold_instruction_code: i32 = 430; +pub const SN_hold_instruction_none: &[u8; 20] = b"holdInstructionNone\0"; +pub const LN_hold_instruction_none: &[u8; 22] = b"Hold Instruction None\0"; +pub const NID_hold_instruction_none: i32 = 431; +pub const SN_hold_instruction_call_issuer: &[u8; 26] = b"holdInstructionCallIssuer\0"; +pub const LN_hold_instruction_call_issuer: &[u8; 29] = b"Hold Instruction Call Issuer\0"; +pub const NID_hold_instruction_call_issuer: i32 = 432; +pub const SN_hold_instruction_reject: &[u8; 22] = b"holdInstructionReject\0"; +pub const LN_hold_instruction_reject: &[u8; 24] = b"Hold Instruction Reject\0"; +pub const NID_hold_instruction_reject: i32 = 433; +pub const SN_data: &[u8; 5] = b"data\0"; +pub const NID_data: i32 = 434; +pub const OBJ_ENC_data: i32 = 9; +pub const SN_pss: &[u8; 4] = b"pss\0"; +pub const NID_pss: i32 = 435; +pub const SN_ucl: &[u8; 4] = b"ucl\0"; +pub const NID_ucl: i32 = 436; +pub const SN_pilot: &[u8; 6] = b"pilot\0"; +pub const NID_pilot: i32 = 437; +pub const LN_pilotAttributeType: &[u8; 19] = b"pilotAttributeType\0"; +pub const NID_pilotAttributeType: i32 = 438; +pub const LN_pilotAttributeSyntax: &[u8; 21] = b"pilotAttributeSyntax\0"; +pub const NID_pilotAttributeSyntax: i32 = 439; +pub const LN_pilotObjectClass: &[u8; 17] = b"pilotObjectClass\0"; +pub const NID_pilotObjectClass: i32 = 440; +pub const LN_pilotGroups: &[u8; 12] = b"pilotGroups\0"; +pub const NID_pilotGroups: i32 = 441; +pub const LN_iA5StringSyntax: &[u8; 16] = b"iA5StringSyntax\0"; +pub const NID_iA5StringSyntax: i32 = 442; +pub const LN_caseIgnoreIA5StringSyntax: &[u8; 26] = b"caseIgnoreIA5StringSyntax\0"; +pub const NID_caseIgnoreIA5StringSyntax: i32 = 443; +pub const LN_pilotObject: &[u8; 12] = b"pilotObject\0"; +pub const NID_pilotObject: i32 = 444; +pub const LN_pilotPerson: &[u8; 12] = b"pilotPerson\0"; +pub const NID_pilotPerson: i32 = 445; +pub const SN_account: &[u8; 8] = b"account\0"; +pub const NID_account: i32 = 446; +pub const SN_document: &[u8; 9] = b"document\0"; +pub const NID_document: i32 = 447; +pub const SN_room: &[u8; 5] = b"room\0"; +pub const NID_room: i32 = 448; +pub const LN_documentSeries: &[u8; 15] = b"documentSeries\0"; +pub const NID_documentSeries: i32 = 449; +pub const LN_rFC822localPart: &[u8; 16] = b"rFC822localPart\0"; +pub const NID_rFC822localPart: i32 = 450; +pub const LN_dNSDomain: &[u8; 10] = b"dNSDomain\0"; +pub const NID_dNSDomain: i32 = 451; +pub const LN_domainRelatedObject: &[u8; 20] = b"domainRelatedObject\0"; +pub const NID_domainRelatedObject: i32 = 452; +pub const LN_friendlyCountry: &[u8; 16] = b"friendlyCountry\0"; +pub const NID_friendlyCountry: i32 = 453; +pub const LN_simpleSecurityObject: &[u8; 21] = b"simpleSecurityObject\0"; +pub const NID_simpleSecurityObject: i32 = 454; +pub const LN_pilotOrganization: &[u8; 18] = b"pilotOrganization\0"; +pub const NID_pilotOrganization: i32 = 455; +pub const LN_pilotDSA: &[u8; 9] = b"pilotDSA\0"; +pub const NID_pilotDSA: i32 = 456; +pub const LN_qualityLabelledData: &[u8; 20] = b"qualityLabelledData\0"; +pub const NID_qualityLabelledData: i32 = 457; +pub const SN_userId: &[u8; 4] = b"UID\0"; +pub const LN_userId: &[u8; 7] = b"userId\0"; +pub const NID_userId: i32 = 458; +pub const LN_textEncodedORAddress: &[u8; 21] = b"textEncodedORAddress\0"; +pub const NID_textEncodedORAddress: i32 = 459; +pub const SN_rfc822Mailbox: &[u8; 5] = b"mail\0"; +pub const LN_rfc822Mailbox: &[u8; 14] = b"rfc822Mailbox\0"; +pub const NID_rfc822Mailbox: i32 = 460; +pub const SN_info: &[u8; 5] = b"info\0"; +pub const NID_info: i32 = 461; +pub const LN_favouriteDrink: &[u8; 15] = b"favouriteDrink\0"; +pub const NID_favouriteDrink: i32 = 462; +pub const LN_roomNumber: &[u8; 11] = b"roomNumber\0"; +pub const NID_roomNumber: i32 = 463; +pub const SN_photo: &[u8; 6] = b"photo\0"; +pub const NID_photo: i32 = 464; +pub const LN_userClass: &[u8; 10] = b"userClass\0"; +pub const NID_userClass: i32 = 465; +pub const SN_host: &[u8; 5] = b"host\0"; +pub const NID_host: i32 = 466; +pub const SN_manager: &[u8; 8] = b"manager\0"; +pub const NID_manager: i32 = 467; +pub const LN_documentIdentifier: &[u8; 19] = b"documentIdentifier\0"; +pub const NID_documentIdentifier: i32 = 468; +pub const LN_documentTitle: &[u8; 14] = b"documentTitle\0"; +pub const NID_documentTitle: i32 = 469; +pub const LN_documentVersion: &[u8; 16] = b"documentVersion\0"; +pub const NID_documentVersion: i32 = 470; +pub const LN_documentAuthor: &[u8; 15] = b"documentAuthor\0"; +pub const NID_documentAuthor: i32 = 471; +pub const LN_documentLocation: &[u8; 17] = b"documentLocation\0"; +pub const NID_documentLocation: i32 = 472; +pub const LN_homeTelephoneNumber: &[u8; 20] = b"homeTelephoneNumber\0"; +pub const NID_homeTelephoneNumber: i32 = 473; +pub const SN_secretary: &[u8; 10] = b"secretary\0"; +pub const NID_secretary: i32 = 474; +pub const LN_otherMailbox: &[u8; 13] = b"otherMailbox\0"; +pub const NID_otherMailbox: i32 = 475; +pub const LN_lastModifiedTime: &[u8; 17] = b"lastModifiedTime\0"; +pub const NID_lastModifiedTime: i32 = 476; +pub const LN_lastModifiedBy: &[u8; 15] = b"lastModifiedBy\0"; +pub const NID_lastModifiedBy: i32 = 477; +pub const LN_aRecord: &[u8; 8] = b"aRecord\0"; +pub const NID_aRecord: i32 = 478; +pub const LN_pilotAttributeType27: &[u8; 21] = b"pilotAttributeType27\0"; +pub const NID_pilotAttributeType27: i32 = 479; +pub const LN_mXRecord: &[u8; 9] = b"mXRecord\0"; +pub const NID_mXRecord: i32 = 480; +pub const LN_nSRecord: &[u8; 9] = b"nSRecord\0"; +pub const NID_nSRecord: i32 = 481; +pub const LN_sOARecord: &[u8; 10] = b"sOARecord\0"; +pub const NID_sOARecord: i32 = 482; +pub const LN_cNAMERecord: &[u8; 12] = b"cNAMERecord\0"; +pub const NID_cNAMERecord: i32 = 483; +pub const LN_associatedDomain: &[u8; 17] = b"associatedDomain\0"; +pub const NID_associatedDomain: i32 = 484; +pub const LN_associatedName: &[u8; 15] = b"associatedName\0"; +pub const NID_associatedName: i32 = 485; +pub const LN_homePostalAddress: &[u8; 18] = b"homePostalAddress\0"; +pub const NID_homePostalAddress: i32 = 486; +pub const LN_personalTitle: &[u8; 14] = b"personalTitle\0"; +pub const NID_personalTitle: i32 = 487; +pub const LN_mobileTelephoneNumber: &[u8; 22] = b"mobileTelephoneNumber\0"; +pub const NID_mobileTelephoneNumber: i32 = 488; +pub const LN_pagerTelephoneNumber: &[u8; 21] = b"pagerTelephoneNumber\0"; +pub const NID_pagerTelephoneNumber: i32 = 489; +pub const LN_friendlyCountryName: &[u8; 20] = b"friendlyCountryName\0"; +pub const NID_friendlyCountryName: i32 = 490; +pub const LN_organizationalStatus: &[u8; 21] = b"organizationalStatus\0"; +pub const NID_organizationalStatus: i32 = 491; +pub const LN_janetMailbox: &[u8; 13] = b"janetMailbox\0"; +pub const NID_janetMailbox: i32 = 492; +pub const LN_mailPreferenceOption: &[u8; 21] = b"mailPreferenceOption\0"; +pub const NID_mailPreferenceOption: i32 = 493; +pub const LN_buildingName: &[u8; 13] = b"buildingName\0"; +pub const NID_buildingName: i32 = 494; +pub const LN_dSAQuality: &[u8; 11] = b"dSAQuality\0"; +pub const NID_dSAQuality: i32 = 495; +pub const LN_singleLevelQuality: &[u8; 19] = b"singleLevelQuality\0"; +pub const NID_singleLevelQuality: i32 = 496; +pub const LN_subtreeMinimumQuality: &[u8; 22] = b"subtreeMinimumQuality\0"; +pub const NID_subtreeMinimumQuality: i32 = 497; +pub const LN_subtreeMaximumQuality: &[u8; 22] = b"subtreeMaximumQuality\0"; +pub const NID_subtreeMaximumQuality: i32 = 498; +pub const LN_personalSignature: &[u8; 18] = b"personalSignature\0"; +pub const NID_personalSignature: i32 = 499; +pub const LN_dITRedirect: &[u8; 12] = b"dITRedirect\0"; +pub const NID_dITRedirect: i32 = 500; +pub const SN_audio: &[u8; 6] = b"audio\0"; +pub const NID_audio: i32 = 501; +pub const LN_documentPublisher: &[u8; 18] = b"documentPublisher\0"; +pub const NID_documentPublisher: i32 = 502; +pub const LN_x500UniqueIdentifier: &[u8; 21] = b"x500UniqueIdentifier\0"; +pub const NID_x500UniqueIdentifier: i32 = 503; +pub const SN_mime_mhs: &[u8; 9] = b"mime-mhs\0"; +pub const LN_mime_mhs: &[u8; 9] = b"MIME MHS\0"; +pub const NID_mime_mhs: i32 = 504; +pub const SN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const LN_mime_mhs_headings: &[u8; 18] = b"mime-mhs-headings\0"; +pub const NID_mime_mhs_headings: i32 = 505; +pub const SN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const LN_mime_mhs_bodies: &[u8; 16] = b"mime-mhs-bodies\0"; +pub const NID_mime_mhs_bodies: i32 = 506; +pub const SN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const LN_id_hex_partial_message: &[u8; 23] = b"id-hex-partial-message\0"; +pub const NID_id_hex_partial_message: i32 = 507; +pub const SN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const LN_id_hex_multipart_message: &[u8; 25] = b"id-hex-multipart-message\0"; +pub const NID_id_hex_multipart_message: i32 = 508; +pub const LN_generationQualifier: &[u8; 20] = b"generationQualifier\0"; +pub const NID_generationQualifier: i32 = 509; +pub const LN_pseudonym: &[u8; 10] = b"pseudonym\0"; +pub const NID_pseudonym: i32 = 510; +pub const SN_id_set: &[u8; 7] = b"id-set\0"; +pub const LN_id_set: &[u8; 31] = b"Secure Electronic Transactions\0"; +pub const NID_id_set: i32 = 512; +pub const SN_set_ctype: &[u8; 10] = b"set-ctype\0"; +pub const LN_set_ctype: &[u8; 14] = b"content types\0"; +pub const NID_set_ctype: i32 = 513; +pub const SN_set_msgExt: &[u8; 11] = b"set-msgExt\0"; +pub const LN_set_msgExt: &[u8; 19] = b"message extensions\0"; +pub const NID_set_msgExt: i32 = 514; +pub const SN_set_attr: &[u8; 9] = b"set-attr\0"; +pub const NID_set_attr: i32 = 515; +pub const SN_set_policy: &[u8; 11] = b"set-policy\0"; +pub const NID_set_policy: i32 = 516; +pub const SN_set_certExt: &[u8; 12] = b"set-certExt\0"; +pub const LN_set_certExt: &[u8; 23] = b"certificate extensions\0"; +pub const NID_set_certExt: i32 = 517; +pub const SN_set_brand: &[u8; 10] = b"set-brand\0"; +pub const NID_set_brand: i32 = 518; +pub const SN_setct_PANData: &[u8; 14] = b"setct-PANData\0"; +pub const NID_setct_PANData: i32 = 519; +pub const SN_setct_PANToken: &[u8; 15] = b"setct-PANToken\0"; +pub const NID_setct_PANToken: i32 = 520; +pub const SN_setct_PANOnly: &[u8; 14] = b"setct-PANOnly\0"; +pub const NID_setct_PANOnly: i32 = 521; +pub const SN_setct_OIData: &[u8; 13] = b"setct-OIData\0"; +pub const NID_setct_OIData: i32 = 522; +pub const SN_setct_PI: &[u8; 9] = b"setct-PI\0"; +pub const NID_setct_PI: i32 = 523; +pub const SN_setct_PIData: &[u8; 13] = b"setct-PIData\0"; +pub const NID_setct_PIData: i32 = 524; +pub const SN_setct_PIDataUnsigned: &[u8; 21] = b"setct-PIDataUnsigned\0"; +pub const NID_setct_PIDataUnsigned: i32 = 525; +pub const SN_setct_HODInput: &[u8; 15] = b"setct-HODInput\0"; +pub const NID_setct_HODInput: i32 = 526; +pub const SN_setct_AuthResBaggage: &[u8; 21] = b"setct-AuthResBaggage\0"; +pub const NID_setct_AuthResBaggage: i32 = 527; +pub const SN_setct_AuthRevReqBaggage: &[u8; 24] = b"setct-AuthRevReqBaggage\0"; +pub const NID_setct_AuthRevReqBaggage: i32 = 528; +pub const SN_setct_AuthRevResBaggage: &[u8; 24] = b"setct-AuthRevResBaggage\0"; +pub const NID_setct_AuthRevResBaggage: i32 = 529; +pub const SN_setct_CapTokenSeq: &[u8; 18] = b"setct-CapTokenSeq\0"; +pub const NID_setct_CapTokenSeq: i32 = 530; +pub const SN_setct_PInitResData: &[u8; 19] = b"setct-PInitResData\0"; +pub const NID_setct_PInitResData: i32 = 531; +pub const SN_setct_PI_TBS: &[u8; 13] = b"setct-PI-TBS\0"; +pub const NID_setct_PI_TBS: i32 = 532; +pub const SN_setct_PResData: &[u8; 15] = b"setct-PResData\0"; +pub const NID_setct_PResData: i32 = 533; +pub const SN_setct_AuthReqTBS: &[u8; 17] = b"setct-AuthReqTBS\0"; +pub const NID_setct_AuthReqTBS: i32 = 534; +pub const SN_setct_AuthResTBS: &[u8; 17] = b"setct-AuthResTBS\0"; +pub const NID_setct_AuthResTBS: i32 = 535; +pub const SN_setct_AuthResTBSX: &[u8; 18] = b"setct-AuthResTBSX\0"; +pub const NID_setct_AuthResTBSX: i32 = 536; +pub const SN_setct_AuthTokenTBS: &[u8; 19] = b"setct-AuthTokenTBS\0"; +pub const NID_setct_AuthTokenTBS: i32 = 537; +pub const SN_setct_CapTokenData: &[u8; 19] = b"setct-CapTokenData\0"; +pub const NID_setct_CapTokenData: i32 = 538; +pub const SN_setct_CapTokenTBS: &[u8; 18] = b"setct-CapTokenTBS\0"; +pub const NID_setct_CapTokenTBS: i32 = 539; +pub const SN_setct_AcqCardCodeMsg: &[u8; 21] = b"setct-AcqCardCodeMsg\0"; +pub const NID_setct_AcqCardCodeMsg: i32 = 540; +pub const SN_setct_AuthRevReqTBS: &[u8; 20] = b"setct-AuthRevReqTBS\0"; +pub const NID_setct_AuthRevReqTBS: i32 = 541; +pub const SN_setct_AuthRevResData: &[u8; 21] = b"setct-AuthRevResData\0"; +pub const NID_setct_AuthRevResData: i32 = 542; +pub const SN_setct_AuthRevResTBS: &[u8; 20] = b"setct-AuthRevResTBS\0"; +pub const NID_setct_AuthRevResTBS: i32 = 543; +pub const SN_setct_CapReqTBS: &[u8; 16] = b"setct-CapReqTBS\0"; +pub const NID_setct_CapReqTBS: i32 = 544; +pub const SN_setct_CapReqTBSX: &[u8; 17] = b"setct-CapReqTBSX\0"; +pub const NID_setct_CapReqTBSX: i32 = 545; +pub const SN_setct_CapResData: &[u8; 17] = b"setct-CapResData\0"; +pub const NID_setct_CapResData: i32 = 546; +pub const SN_setct_CapRevReqTBS: &[u8; 19] = b"setct-CapRevReqTBS\0"; +pub const NID_setct_CapRevReqTBS: i32 = 547; +pub const SN_setct_CapRevReqTBSX: &[u8; 20] = b"setct-CapRevReqTBSX\0"; +pub const NID_setct_CapRevReqTBSX: i32 = 548; +pub const SN_setct_CapRevResData: &[u8; 20] = b"setct-CapRevResData\0"; +pub const NID_setct_CapRevResData: i32 = 549; +pub const SN_setct_CredReqTBS: &[u8; 17] = b"setct-CredReqTBS\0"; +pub const NID_setct_CredReqTBS: i32 = 550; +pub const SN_setct_CredReqTBSX: &[u8; 18] = b"setct-CredReqTBSX\0"; +pub const NID_setct_CredReqTBSX: i32 = 551; +pub const SN_setct_CredResData: &[u8; 18] = b"setct-CredResData\0"; +pub const NID_setct_CredResData: i32 = 552; +pub const SN_setct_CredRevReqTBS: &[u8; 20] = b"setct-CredRevReqTBS\0"; +pub const NID_setct_CredRevReqTBS: i32 = 553; +pub const SN_setct_CredRevReqTBSX: &[u8; 21] = b"setct-CredRevReqTBSX\0"; +pub const NID_setct_CredRevReqTBSX: i32 = 554; +pub const SN_setct_CredRevResData: &[u8; 21] = b"setct-CredRevResData\0"; +pub const NID_setct_CredRevResData: i32 = 555; +pub const SN_setct_PCertReqData: &[u8; 19] = b"setct-PCertReqData\0"; +pub const NID_setct_PCertReqData: i32 = 556; +pub const SN_setct_PCertResTBS: &[u8; 18] = b"setct-PCertResTBS\0"; +pub const NID_setct_PCertResTBS: i32 = 557; +pub const SN_setct_BatchAdminReqData: &[u8; 24] = b"setct-BatchAdminReqData\0"; +pub const NID_setct_BatchAdminReqData: i32 = 558; +pub const SN_setct_BatchAdminResData: &[u8; 24] = b"setct-BatchAdminResData\0"; +pub const NID_setct_BatchAdminResData: i32 = 559; +pub const SN_setct_CardCInitResTBS: &[u8; 22] = b"setct-CardCInitResTBS\0"; +pub const NID_setct_CardCInitResTBS: i32 = 560; +pub const SN_setct_MeAqCInitResTBS: &[u8; 22] = b"setct-MeAqCInitResTBS\0"; +pub const NID_setct_MeAqCInitResTBS: i32 = 561; +pub const SN_setct_RegFormResTBS: &[u8; 20] = b"setct-RegFormResTBS\0"; +pub const NID_setct_RegFormResTBS: i32 = 562; +pub const SN_setct_CertReqData: &[u8; 18] = b"setct-CertReqData\0"; +pub const NID_setct_CertReqData: i32 = 563; +pub const SN_setct_CertReqTBS: &[u8; 17] = b"setct-CertReqTBS\0"; +pub const NID_setct_CertReqTBS: i32 = 564; +pub const SN_setct_CertResData: &[u8; 18] = b"setct-CertResData\0"; +pub const NID_setct_CertResData: i32 = 565; +pub const SN_setct_CertInqReqTBS: &[u8; 20] = b"setct-CertInqReqTBS\0"; +pub const NID_setct_CertInqReqTBS: i32 = 566; +pub const SN_setct_ErrorTBS: &[u8; 15] = b"setct-ErrorTBS\0"; +pub const NID_setct_ErrorTBS: i32 = 567; +pub const SN_setct_PIDualSignedTBE: &[u8; 22] = b"setct-PIDualSignedTBE\0"; +pub const NID_setct_PIDualSignedTBE: i32 = 568; +pub const SN_setct_PIUnsignedTBE: &[u8; 20] = b"setct-PIUnsignedTBE\0"; +pub const NID_setct_PIUnsignedTBE: i32 = 569; +pub const SN_setct_AuthReqTBE: &[u8; 17] = b"setct-AuthReqTBE\0"; +pub const NID_setct_AuthReqTBE: i32 = 570; +pub const SN_setct_AuthResTBE: &[u8; 17] = b"setct-AuthResTBE\0"; +pub const NID_setct_AuthResTBE: i32 = 571; +pub const SN_setct_AuthResTBEX: &[u8; 18] = b"setct-AuthResTBEX\0"; +pub const NID_setct_AuthResTBEX: i32 = 572; +pub const SN_setct_AuthTokenTBE: &[u8; 19] = b"setct-AuthTokenTBE\0"; +pub const NID_setct_AuthTokenTBE: i32 = 573; +pub const SN_setct_CapTokenTBE: &[u8; 18] = b"setct-CapTokenTBE\0"; +pub const NID_setct_CapTokenTBE: i32 = 574; +pub const SN_setct_CapTokenTBEX: &[u8; 19] = b"setct-CapTokenTBEX\0"; +pub const NID_setct_CapTokenTBEX: i32 = 575; +pub const SN_setct_AcqCardCodeMsgTBE: &[u8; 24] = b"setct-AcqCardCodeMsgTBE\0"; +pub const NID_setct_AcqCardCodeMsgTBE: i32 = 576; +pub const SN_setct_AuthRevReqTBE: &[u8; 20] = b"setct-AuthRevReqTBE\0"; +pub const NID_setct_AuthRevReqTBE: i32 = 577; +pub const SN_setct_AuthRevResTBE: &[u8; 20] = b"setct-AuthRevResTBE\0"; +pub const NID_setct_AuthRevResTBE: i32 = 578; +pub const SN_setct_AuthRevResTBEB: &[u8; 21] = b"setct-AuthRevResTBEB\0"; +pub const NID_setct_AuthRevResTBEB: i32 = 579; +pub const SN_setct_CapReqTBE: &[u8; 16] = b"setct-CapReqTBE\0"; +pub const NID_setct_CapReqTBE: i32 = 580; +pub const SN_setct_CapReqTBEX: &[u8; 17] = b"setct-CapReqTBEX\0"; +pub const NID_setct_CapReqTBEX: i32 = 581; +pub const SN_setct_CapResTBE: &[u8; 16] = b"setct-CapResTBE\0"; +pub const NID_setct_CapResTBE: i32 = 582; +pub const SN_setct_CapRevReqTBE: &[u8; 19] = b"setct-CapRevReqTBE\0"; +pub const NID_setct_CapRevReqTBE: i32 = 583; +pub const SN_setct_CapRevReqTBEX: &[u8; 20] = b"setct-CapRevReqTBEX\0"; +pub const NID_setct_CapRevReqTBEX: i32 = 584; +pub const SN_setct_CapRevResTBE: &[u8; 19] = b"setct-CapRevResTBE\0"; +pub const NID_setct_CapRevResTBE: i32 = 585; +pub const SN_setct_CredReqTBE: &[u8; 17] = b"setct-CredReqTBE\0"; +pub const NID_setct_CredReqTBE: i32 = 586; +pub const SN_setct_CredReqTBEX: &[u8; 18] = b"setct-CredReqTBEX\0"; +pub const NID_setct_CredReqTBEX: i32 = 587; +pub const SN_setct_CredResTBE: &[u8; 17] = b"setct-CredResTBE\0"; +pub const NID_setct_CredResTBE: i32 = 588; +pub const SN_setct_CredRevReqTBE: &[u8; 20] = b"setct-CredRevReqTBE\0"; +pub const NID_setct_CredRevReqTBE: i32 = 589; +pub const SN_setct_CredRevReqTBEX: &[u8; 21] = b"setct-CredRevReqTBEX\0"; +pub const NID_setct_CredRevReqTBEX: i32 = 590; +pub const SN_setct_CredRevResTBE: &[u8; 20] = b"setct-CredRevResTBE\0"; +pub const NID_setct_CredRevResTBE: i32 = 591; +pub const SN_setct_BatchAdminReqTBE: &[u8; 23] = b"setct-BatchAdminReqTBE\0"; +pub const NID_setct_BatchAdminReqTBE: i32 = 592; +pub const SN_setct_BatchAdminResTBE: &[u8; 23] = b"setct-BatchAdminResTBE\0"; +pub const NID_setct_BatchAdminResTBE: i32 = 593; +pub const SN_setct_RegFormReqTBE: &[u8; 20] = b"setct-RegFormReqTBE\0"; +pub const NID_setct_RegFormReqTBE: i32 = 594; +pub const SN_setct_CertReqTBE: &[u8; 17] = b"setct-CertReqTBE\0"; +pub const NID_setct_CertReqTBE: i32 = 595; +pub const SN_setct_CertReqTBEX: &[u8; 18] = b"setct-CertReqTBEX\0"; +pub const NID_setct_CertReqTBEX: i32 = 596; +pub const SN_setct_CertResTBE: &[u8; 17] = b"setct-CertResTBE\0"; +pub const NID_setct_CertResTBE: i32 = 597; +pub const SN_setct_CRLNotificationTBS: &[u8; 25] = b"setct-CRLNotificationTBS\0"; +pub const NID_setct_CRLNotificationTBS: i32 = 598; +pub const SN_setct_CRLNotificationResTBS: &[u8; 28] = b"setct-CRLNotificationResTBS\0"; +pub const NID_setct_CRLNotificationResTBS: i32 = 599; +pub const SN_setct_BCIDistributionTBS: &[u8; 25] = b"setct-BCIDistributionTBS\0"; +pub const NID_setct_BCIDistributionTBS: i32 = 600; +pub const SN_setext_genCrypt: &[u8; 16] = b"setext-genCrypt\0"; +pub const LN_setext_genCrypt: &[u8; 19] = b"generic cryptogram\0"; +pub const NID_setext_genCrypt: i32 = 601; +pub const SN_setext_miAuth: &[u8; 14] = b"setext-miAuth\0"; +pub const LN_setext_miAuth: &[u8; 24] = b"merchant initiated auth\0"; +pub const NID_setext_miAuth: i32 = 602; +pub const SN_setext_pinSecure: &[u8; 17] = b"setext-pinSecure\0"; +pub const NID_setext_pinSecure: i32 = 603; +pub const SN_setext_pinAny: &[u8; 14] = b"setext-pinAny\0"; +pub const NID_setext_pinAny: i32 = 604; +pub const SN_setext_track2: &[u8; 14] = b"setext-track2\0"; +pub const NID_setext_track2: i32 = 605; +pub const SN_setext_cv: &[u8; 10] = b"setext-cv\0"; +pub const LN_setext_cv: &[u8; 24] = b"additional verification\0"; +pub const NID_setext_cv: i32 = 606; +pub const SN_set_policy_root: &[u8; 16] = b"set-policy-root\0"; +pub const NID_set_policy_root: i32 = 607; +pub const SN_setCext_hashedRoot: &[u8; 19] = b"setCext-hashedRoot\0"; +pub const NID_setCext_hashedRoot: i32 = 608; +pub const SN_setCext_certType: &[u8; 17] = b"setCext-certType\0"; +pub const NID_setCext_certType: i32 = 609; +pub const SN_setCext_merchData: &[u8; 18] = b"setCext-merchData\0"; +pub const NID_setCext_merchData: i32 = 610; +pub const SN_setCext_cCertRequired: &[u8; 22] = b"setCext-cCertRequired\0"; +pub const NID_setCext_cCertRequired: i32 = 611; +pub const SN_setCext_tunneling: &[u8; 18] = b"setCext-tunneling\0"; +pub const NID_setCext_tunneling: i32 = 612; +pub const SN_setCext_setExt: &[u8; 15] = b"setCext-setExt\0"; +pub const NID_setCext_setExt: i32 = 613; +pub const SN_setCext_setQualf: &[u8; 17] = b"setCext-setQualf\0"; +pub const NID_setCext_setQualf: i32 = 614; +pub const SN_setCext_PGWYcapabilities: &[u8; 25] = b"setCext-PGWYcapabilities\0"; +pub const NID_setCext_PGWYcapabilities: i32 = 615; +pub const SN_setCext_TokenIdentifier: &[u8; 24] = b"setCext-TokenIdentifier\0"; +pub const NID_setCext_TokenIdentifier: i32 = 616; +pub const SN_setCext_Track2Data: &[u8; 19] = b"setCext-Track2Data\0"; +pub const NID_setCext_Track2Data: i32 = 617; +pub const SN_setCext_TokenType: &[u8; 18] = b"setCext-TokenType\0"; +pub const NID_setCext_TokenType: i32 = 618; +pub const SN_setCext_IssuerCapabilities: &[u8; 27] = b"setCext-IssuerCapabilities\0"; +pub const NID_setCext_IssuerCapabilities: i32 = 619; +pub const SN_setAttr_Cert: &[u8; 13] = b"setAttr-Cert\0"; +pub const NID_setAttr_Cert: i32 = 620; +pub const SN_setAttr_PGWYcap: &[u8; 16] = b"setAttr-PGWYcap\0"; +pub const LN_setAttr_PGWYcap: &[u8; 29] = b"payment gateway capabilities\0"; +pub const NID_setAttr_PGWYcap: i32 = 621; +pub const SN_setAttr_TokenType: &[u8; 18] = b"setAttr-TokenType\0"; +pub const NID_setAttr_TokenType: i32 = 622; +pub const SN_setAttr_IssCap: &[u8; 15] = b"setAttr-IssCap\0"; +pub const LN_setAttr_IssCap: &[u8; 20] = b"issuer capabilities\0"; +pub const NID_setAttr_IssCap: i32 = 623; +pub const SN_set_rootKeyThumb: &[u8; 17] = b"set-rootKeyThumb\0"; +pub const NID_set_rootKeyThumb: i32 = 624; +pub const SN_set_addPolicy: &[u8; 14] = b"set-addPolicy\0"; +pub const NID_set_addPolicy: i32 = 625; +pub const SN_setAttr_Token_EMV: &[u8; 18] = b"setAttr-Token-EMV\0"; +pub const NID_setAttr_Token_EMV: i32 = 626; +pub const SN_setAttr_Token_B0Prime: &[u8; 22] = b"setAttr-Token-B0Prime\0"; +pub const NID_setAttr_Token_B0Prime: i32 = 627; +pub const SN_setAttr_IssCap_CVM: &[u8; 19] = b"setAttr-IssCap-CVM\0"; +pub const NID_setAttr_IssCap_CVM: i32 = 628; +pub const SN_setAttr_IssCap_T2: &[u8; 18] = b"setAttr-IssCap-T2\0"; +pub const NID_setAttr_IssCap_T2: i32 = 629; +pub const SN_setAttr_IssCap_Sig: &[u8; 19] = b"setAttr-IssCap-Sig\0"; +pub const NID_setAttr_IssCap_Sig: i32 = 630; +pub const SN_setAttr_GenCryptgrm: &[u8; 20] = b"setAttr-GenCryptgrm\0"; +pub const LN_setAttr_GenCryptgrm: &[u8; 20] = b"generate cryptogram\0"; +pub const NID_setAttr_GenCryptgrm: i32 = 631; +pub const SN_setAttr_T2Enc: &[u8; 14] = b"setAttr-T2Enc\0"; +pub const LN_setAttr_T2Enc: &[u8; 18] = b"encrypted track 2\0"; +pub const NID_setAttr_T2Enc: i32 = 632; +pub const SN_setAttr_T2cleartxt: &[u8; 19] = b"setAttr-T2cleartxt\0"; +pub const LN_setAttr_T2cleartxt: &[u8; 18] = b"cleartext track 2\0"; +pub const NID_setAttr_T2cleartxt: i32 = 633; +pub const SN_setAttr_TokICCsig: &[u8; 18] = b"setAttr-TokICCsig\0"; +pub const LN_setAttr_TokICCsig: &[u8; 23] = b"ICC or token signature\0"; +pub const NID_setAttr_TokICCsig: i32 = 634; +pub const SN_setAttr_SecDevSig: &[u8; 18] = b"setAttr-SecDevSig\0"; +pub const LN_setAttr_SecDevSig: &[u8; 24] = b"secure device signature\0"; +pub const NID_setAttr_SecDevSig: i32 = 635; +pub const SN_set_brand_IATA_ATA: &[u8; 19] = b"set-brand-IATA-ATA\0"; +pub const NID_set_brand_IATA_ATA: i32 = 636; +pub const SN_set_brand_Diners: &[u8; 17] = b"set-brand-Diners\0"; +pub const NID_set_brand_Diners: i32 = 637; +pub const SN_set_brand_AmericanExpress: &[u8; 26] = b"set-brand-AmericanExpress\0"; +pub const NID_set_brand_AmericanExpress: i32 = 638; +pub const SN_set_brand_JCB: &[u8; 14] = b"set-brand-JCB\0"; +pub const NID_set_brand_JCB: i32 = 639; +pub const SN_set_brand_Visa: &[u8; 15] = b"set-brand-Visa\0"; +pub const NID_set_brand_Visa: i32 = 640; +pub const SN_set_brand_MasterCard: &[u8; 21] = b"set-brand-MasterCard\0"; +pub const NID_set_brand_MasterCard: i32 = 641; +pub const SN_set_brand_Novus: &[u8; 16] = b"set-brand-Novus\0"; +pub const NID_set_brand_Novus: i32 = 642; +pub const SN_des_cdmf: &[u8; 9] = b"DES-CDMF\0"; +pub const LN_des_cdmf: &[u8; 9] = b"des-cdmf\0"; +pub const NID_des_cdmf: i32 = 643; +pub const SN_rsaOAEPEncryptionSET: &[u8; 21] = b"rsaOAEPEncryptionSET\0"; +pub const NID_rsaOAEPEncryptionSET: i32 = 644; +pub const SN_itu_t: &[u8; 6] = b"ITU-T\0"; +pub const LN_itu_t: &[u8; 6] = b"itu-t\0"; +pub const NID_itu_t: i32 = 645; +pub const OBJ_itu_t: i32 = 0; +pub const SN_joint_iso_itu_t: &[u8; 16] = b"JOINT-ISO-ITU-T\0"; +pub const LN_joint_iso_itu_t: &[u8; 16] = b"joint-iso-itu-t\0"; +pub const NID_joint_iso_itu_t: i32 = 646; +pub const OBJ_joint_iso_itu_t: i32 = 2; +pub const SN_international_organizations: &[u8; 28] = b"international-organizations\0"; +pub const LN_international_organizations: &[u8; 28] = b"International Organizations\0"; +pub const NID_international_organizations: i32 = 647; +pub const OBJ_ENC_international_organizations: i32 = 103; +pub const SN_ms_smartcard_login: &[u8; 17] = b"msSmartcardLogin\0"; +pub const LN_ms_smartcard_login: &[u8; 25] = b"Microsoft Smartcardlogin\0"; +pub const NID_ms_smartcard_login: i32 = 648; +pub const SN_ms_upn: &[u8; 6] = b"msUPN\0"; +pub const LN_ms_upn: &[u8; 35] = b"Microsoft Universal Principal Name\0"; +pub const NID_ms_upn: i32 = 649; +pub const SN_aes_128_cfb1: &[u8; 13] = b"AES-128-CFB1\0"; +pub const LN_aes_128_cfb1: &[u8; 13] = b"aes-128-cfb1\0"; +pub const NID_aes_128_cfb1: i32 = 650; +pub const SN_aes_192_cfb1: &[u8; 13] = b"AES-192-CFB1\0"; +pub const LN_aes_192_cfb1: &[u8; 13] = b"aes-192-cfb1\0"; +pub const NID_aes_192_cfb1: i32 = 651; +pub const SN_aes_256_cfb1: &[u8; 13] = b"AES-256-CFB1\0"; +pub const LN_aes_256_cfb1: &[u8; 13] = b"aes-256-cfb1\0"; +pub const NID_aes_256_cfb1: i32 = 652; +pub const SN_aes_128_cfb8: &[u8; 13] = b"AES-128-CFB8\0"; +pub const LN_aes_128_cfb8: &[u8; 13] = b"aes-128-cfb8\0"; +pub const NID_aes_128_cfb8: i32 = 653; +pub const SN_aes_192_cfb8: &[u8; 13] = b"AES-192-CFB8\0"; +pub const LN_aes_192_cfb8: &[u8; 13] = b"aes-192-cfb8\0"; +pub const NID_aes_192_cfb8: i32 = 654; +pub const SN_aes_256_cfb8: &[u8; 13] = b"AES-256-CFB8\0"; +pub const LN_aes_256_cfb8: &[u8; 13] = b"aes-256-cfb8\0"; +pub const NID_aes_256_cfb8: i32 = 655; +pub const SN_des_cfb1: &[u8; 9] = b"DES-CFB1\0"; +pub const LN_des_cfb1: &[u8; 9] = b"des-cfb1\0"; +pub const NID_des_cfb1: i32 = 656; +pub const SN_des_cfb8: &[u8; 9] = b"DES-CFB8\0"; +pub const LN_des_cfb8: &[u8; 9] = b"des-cfb8\0"; +pub const NID_des_cfb8: i32 = 657; +pub const SN_des_ede3_cfb1: &[u8; 14] = b"DES-EDE3-CFB1\0"; +pub const LN_des_ede3_cfb1: &[u8; 14] = b"des-ede3-cfb1\0"; +pub const NID_des_ede3_cfb1: i32 = 658; +pub const SN_des_ede3_cfb8: &[u8; 14] = b"DES-EDE3-CFB8\0"; +pub const LN_des_ede3_cfb8: &[u8; 14] = b"des-ede3-cfb8\0"; +pub const NID_des_ede3_cfb8: i32 = 659; +pub const SN_streetAddress: &[u8; 7] = b"street\0"; +pub const LN_streetAddress: &[u8; 14] = b"streetAddress\0"; +pub const NID_streetAddress: i32 = 660; +pub const LN_postalCode: &[u8; 11] = b"postalCode\0"; +pub const NID_postalCode: i32 = 661; +pub const SN_id_ppl: &[u8; 7] = b"id-ppl\0"; +pub const NID_id_ppl: i32 = 662; +pub const SN_proxyCertInfo: &[u8; 14] = b"proxyCertInfo\0"; +pub const LN_proxyCertInfo: &[u8; 30] = b"Proxy Certificate Information\0"; +pub const NID_proxyCertInfo: i32 = 663; +pub const SN_id_ppl_anyLanguage: &[u8; 19] = b"id-ppl-anyLanguage\0"; +pub const LN_id_ppl_anyLanguage: &[u8; 13] = b"Any language\0"; +pub const NID_id_ppl_anyLanguage: i32 = 664; +pub const SN_id_ppl_inheritAll: &[u8; 18] = b"id-ppl-inheritAll\0"; +pub const LN_id_ppl_inheritAll: &[u8; 12] = b"Inherit all\0"; +pub const NID_id_ppl_inheritAll: i32 = 665; +pub const SN_name_constraints: &[u8; 16] = b"nameConstraints\0"; +pub const LN_name_constraints: &[u8; 24] = b"X509v3 Name Constraints\0"; +pub const NID_name_constraints: i32 = 666; +pub const SN_Independent: &[u8; 19] = b"id-ppl-independent\0"; +pub const LN_Independent: &[u8; 12] = b"Independent\0"; +pub const NID_Independent: i32 = 667; +pub const SN_sha256WithRSAEncryption: &[u8; 11] = b"RSA-SHA256\0"; +pub const LN_sha256WithRSAEncryption: &[u8; 24] = b"sha256WithRSAEncryption\0"; +pub const NID_sha256WithRSAEncryption: i32 = 668; +pub const SN_sha384WithRSAEncryption: &[u8; 11] = b"RSA-SHA384\0"; +pub const LN_sha384WithRSAEncryption: &[u8; 24] = b"sha384WithRSAEncryption\0"; +pub const NID_sha384WithRSAEncryption: i32 = 669; +pub const SN_sha512WithRSAEncryption: &[u8; 11] = b"RSA-SHA512\0"; +pub const LN_sha512WithRSAEncryption: &[u8; 24] = b"sha512WithRSAEncryption\0"; +pub const NID_sha512WithRSAEncryption: i32 = 670; +pub const SN_sha224WithRSAEncryption: &[u8; 11] = b"RSA-SHA224\0"; +pub const LN_sha224WithRSAEncryption: &[u8; 24] = b"sha224WithRSAEncryption\0"; +pub const NID_sha224WithRSAEncryption: i32 = 671; +pub const SN_sha256: &[u8; 7] = b"SHA256\0"; +pub const LN_sha256: &[u8; 7] = b"sha256\0"; +pub const NID_sha256: i32 = 672; +pub const SN_sha384: &[u8; 7] = b"SHA384\0"; +pub const LN_sha384: &[u8; 7] = b"sha384\0"; +pub const NID_sha384: i32 = 673; +pub const SN_sha512: &[u8; 7] = b"SHA512\0"; +pub const LN_sha512: &[u8; 7] = b"sha512\0"; +pub const NID_sha512: i32 = 674; +pub const SN_sha224: &[u8; 7] = b"SHA224\0"; +pub const LN_sha224: &[u8; 7] = b"sha224\0"; +pub const NID_sha224: i32 = 675; +pub const SN_identified_organization: &[u8; 24] = b"identified-organization\0"; +pub const NID_identified_organization: i32 = 676; +pub const OBJ_ENC_identified_organization: i32 = 43; +pub const SN_certicom_arc: &[u8; 13] = b"certicom-arc\0"; +pub const NID_certicom_arc: i32 = 677; +pub const SN_wap: &[u8; 4] = b"wap\0"; +pub const NID_wap: i32 = 678; +pub const SN_wap_wsg: &[u8; 8] = b"wap-wsg\0"; +pub const NID_wap_wsg: i32 = 679; +pub const SN_X9_62_id_characteristic_two_basis: &[u8; 28] = b"id-characteristic-two-basis\0"; +pub const NID_X9_62_id_characteristic_two_basis: i32 = 680; +pub const SN_X9_62_onBasis: &[u8; 8] = b"onBasis\0"; +pub const NID_X9_62_onBasis: i32 = 681; +pub const SN_X9_62_tpBasis: &[u8; 8] = b"tpBasis\0"; +pub const NID_X9_62_tpBasis: i32 = 682; +pub const SN_X9_62_ppBasis: &[u8; 8] = b"ppBasis\0"; +pub const NID_X9_62_ppBasis: i32 = 683; +pub const SN_X9_62_c2pnb163v1: &[u8; 11] = b"c2pnb163v1\0"; +pub const NID_X9_62_c2pnb163v1: i32 = 684; +pub const SN_X9_62_c2pnb163v2: &[u8; 11] = b"c2pnb163v2\0"; +pub const NID_X9_62_c2pnb163v2: i32 = 685; +pub const SN_X9_62_c2pnb163v3: &[u8; 11] = b"c2pnb163v3\0"; +pub const NID_X9_62_c2pnb163v3: i32 = 686; +pub const SN_X9_62_c2pnb176v1: &[u8; 11] = b"c2pnb176v1\0"; +pub const NID_X9_62_c2pnb176v1: i32 = 687; +pub const SN_X9_62_c2tnb191v1: &[u8; 11] = b"c2tnb191v1\0"; +pub const NID_X9_62_c2tnb191v1: i32 = 688; +pub const SN_X9_62_c2tnb191v2: &[u8; 11] = b"c2tnb191v2\0"; +pub const NID_X9_62_c2tnb191v2: i32 = 689; +pub const SN_X9_62_c2tnb191v3: &[u8; 11] = b"c2tnb191v3\0"; +pub const NID_X9_62_c2tnb191v3: i32 = 690; +pub const SN_X9_62_c2onb191v4: &[u8; 11] = b"c2onb191v4\0"; +pub const NID_X9_62_c2onb191v4: i32 = 691; +pub const SN_X9_62_c2onb191v5: &[u8; 11] = b"c2onb191v5\0"; +pub const NID_X9_62_c2onb191v5: i32 = 692; +pub const SN_X9_62_c2pnb208w1: &[u8; 11] = b"c2pnb208w1\0"; +pub const NID_X9_62_c2pnb208w1: i32 = 693; +pub const SN_X9_62_c2tnb239v1: &[u8; 11] = b"c2tnb239v1\0"; +pub const NID_X9_62_c2tnb239v1: i32 = 694; +pub const SN_X9_62_c2tnb239v2: &[u8; 11] = b"c2tnb239v2\0"; +pub const NID_X9_62_c2tnb239v2: i32 = 695; +pub const SN_X9_62_c2tnb239v3: &[u8; 11] = b"c2tnb239v3\0"; +pub const NID_X9_62_c2tnb239v3: i32 = 696; +pub const SN_X9_62_c2onb239v4: &[u8; 11] = b"c2onb239v4\0"; +pub const NID_X9_62_c2onb239v4: i32 = 697; +pub const SN_X9_62_c2onb239v5: &[u8; 11] = b"c2onb239v5\0"; +pub const NID_X9_62_c2onb239v5: i32 = 698; +pub const SN_X9_62_c2pnb272w1: &[u8; 11] = b"c2pnb272w1\0"; +pub const NID_X9_62_c2pnb272w1: i32 = 699; +pub const SN_X9_62_c2pnb304w1: &[u8; 11] = b"c2pnb304w1\0"; +pub const NID_X9_62_c2pnb304w1: i32 = 700; +pub const SN_X9_62_c2tnb359v1: &[u8; 11] = b"c2tnb359v1\0"; +pub const NID_X9_62_c2tnb359v1: i32 = 701; +pub const SN_X9_62_c2pnb368w1: &[u8; 11] = b"c2pnb368w1\0"; +pub const NID_X9_62_c2pnb368w1: i32 = 702; +pub const SN_X9_62_c2tnb431r1: &[u8; 11] = b"c2tnb431r1\0"; +pub const NID_X9_62_c2tnb431r1: i32 = 703; +pub const SN_secp112r1: &[u8; 10] = b"secp112r1\0"; +pub const NID_secp112r1: i32 = 704; +pub const SN_secp112r2: &[u8; 10] = b"secp112r2\0"; +pub const NID_secp112r2: i32 = 705; +pub const SN_secp128r1: &[u8; 10] = b"secp128r1\0"; +pub const NID_secp128r1: i32 = 706; +pub const SN_secp128r2: &[u8; 10] = b"secp128r2\0"; +pub const NID_secp128r2: i32 = 707; +pub const SN_secp160k1: &[u8; 10] = b"secp160k1\0"; +pub const NID_secp160k1: i32 = 708; +pub const SN_secp160r1: &[u8; 10] = b"secp160r1\0"; +pub const NID_secp160r1: i32 = 709; +pub const SN_secp160r2: &[u8; 10] = b"secp160r2\0"; +pub const NID_secp160r2: i32 = 710; +pub const SN_secp192k1: &[u8; 10] = b"secp192k1\0"; +pub const NID_secp192k1: i32 = 711; +pub const SN_secp224k1: &[u8; 10] = b"secp224k1\0"; +pub const NID_secp224k1: i32 = 712; +pub const SN_secp224r1: &[u8; 10] = b"secp224r1\0"; +pub const NID_secp224r1: i32 = 713; +pub const SN_secp256k1: &[u8; 10] = b"secp256k1\0"; +pub const NID_secp256k1: i32 = 714; +pub const SN_secp384r1: &[u8; 10] = b"secp384r1\0"; +pub const NID_secp384r1: i32 = 715; +pub const SN_secp521r1: &[u8; 10] = b"secp521r1\0"; +pub const NID_secp521r1: i32 = 716; +pub const SN_sect113r1: &[u8; 10] = b"sect113r1\0"; +pub const NID_sect113r1: i32 = 717; +pub const SN_sect113r2: &[u8; 10] = b"sect113r2\0"; +pub const NID_sect113r2: i32 = 718; +pub const SN_sect131r1: &[u8; 10] = b"sect131r1\0"; +pub const NID_sect131r1: i32 = 719; +pub const SN_sect131r2: &[u8; 10] = b"sect131r2\0"; +pub const NID_sect131r2: i32 = 720; +pub const SN_sect163k1: &[u8; 10] = b"sect163k1\0"; +pub const NID_sect163k1: i32 = 721; +pub const SN_sect163r1: &[u8; 10] = b"sect163r1\0"; +pub const NID_sect163r1: i32 = 722; +pub const SN_sect163r2: &[u8; 10] = b"sect163r2\0"; +pub const NID_sect163r2: i32 = 723; +pub const SN_sect193r1: &[u8; 10] = b"sect193r1\0"; +pub const NID_sect193r1: i32 = 724; +pub const SN_sect193r2: &[u8; 10] = b"sect193r2\0"; +pub const NID_sect193r2: i32 = 725; +pub const SN_sect233k1: &[u8; 10] = b"sect233k1\0"; +pub const NID_sect233k1: i32 = 726; +pub const SN_sect233r1: &[u8; 10] = b"sect233r1\0"; +pub const NID_sect233r1: i32 = 727; +pub const SN_sect239k1: &[u8; 10] = b"sect239k1\0"; +pub const NID_sect239k1: i32 = 728; +pub const SN_sect283k1: &[u8; 10] = b"sect283k1\0"; +pub const NID_sect283k1: i32 = 729; +pub const SN_sect283r1: &[u8; 10] = b"sect283r1\0"; +pub const NID_sect283r1: i32 = 730; +pub const SN_sect409k1: &[u8; 10] = b"sect409k1\0"; +pub const NID_sect409k1: i32 = 731; +pub const SN_sect409r1: &[u8; 10] = b"sect409r1\0"; +pub const NID_sect409r1: i32 = 732; +pub const SN_sect571k1: &[u8; 10] = b"sect571k1\0"; +pub const NID_sect571k1: i32 = 733; +pub const SN_sect571r1: &[u8; 10] = b"sect571r1\0"; +pub const NID_sect571r1: i32 = 734; +pub const SN_wap_wsg_idm_ecid_wtls1: &[u8; 23] = b"wap-wsg-idm-ecid-wtls1\0"; +pub const NID_wap_wsg_idm_ecid_wtls1: i32 = 735; +pub const SN_wap_wsg_idm_ecid_wtls3: &[u8; 23] = b"wap-wsg-idm-ecid-wtls3\0"; +pub const NID_wap_wsg_idm_ecid_wtls3: i32 = 736; +pub const SN_wap_wsg_idm_ecid_wtls4: &[u8; 23] = b"wap-wsg-idm-ecid-wtls4\0"; +pub const NID_wap_wsg_idm_ecid_wtls4: i32 = 737; +pub const SN_wap_wsg_idm_ecid_wtls5: &[u8; 23] = b"wap-wsg-idm-ecid-wtls5\0"; +pub const NID_wap_wsg_idm_ecid_wtls5: i32 = 738; +pub const SN_wap_wsg_idm_ecid_wtls6: &[u8; 23] = b"wap-wsg-idm-ecid-wtls6\0"; +pub const NID_wap_wsg_idm_ecid_wtls6: i32 = 739; +pub const SN_wap_wsg_idm_ecid_wtls7: &[u8; 23] = b"wap-wsg-idm-ecid-wtls7\0"; +pub const NID_wap_wsg_idm_ecid_wtls7: i32 = 740; +pub const SN_wap_wsg_idm_ecid_wtls8: &[u8; 23] = b"wap-wsg-idm-ecid-wtls8\0"; +pub const NID_wap_wsg_idm_ecid_wtls8: i32 = 741; +pub const SN_wap_wsg_idm_ecid_wtls9: &[u8; 23] = b"wap-wsg-idm-ecid-wtls9\0"; +pub const NID_wap_wsg_idm_ecid_wtls9: i32 = 742; +pub const SN_wap_wsg_idm_ecid_wtls10: &[u8; 24] = b"wap-wsg-idm-ecid-wtls10\0"; +pub const NID_wap_wsg_idm_ecid_wtls10: i32 = 743; +pub const SN_wap_wsg_idm_ecid_wtls11: &[u8; 24] = b"wap-wsg-idm-ecid-wtls11\0"; +pub const NID_wap_wsg_idm_ecid_wtls11: i32 = 744; +pub const SN_wap_wsg_idm_ecid_wtls12: &[u8; 24] = b"wap-wsg-idm-ecid-wtls12\0"; +pub const NID_wap_wsg_idm_ecid_wtls12: i32 = 745; +pub const SN_any_policy: &[u8; 10] = b"anyPolicy\0"; +pub const LN_any_policy: &[u8; 18] = b"X509v3 Any Policy\0"; +pub const NID_any_policy: i32 = 746; +pub const SN_policy_mappings: &[u8; 15] = b"policyMappings\0"; +pub const LN_policy_mappings: &[u8; 23] = b"X509v3 Policy Mappings\0"; +pub const NID_policy_mappings: i32 = 747; +pub const SN_inhibit_any_policy: &[u8; 17] = b"inhibitAnyPolicy\0"; +pub const LN_inhibit_any_policy: &[u8; 26] = b"X509v3 Inhibit Any Policy\0"; +pub const NID_inhibit_any_policy: i32 = 748; +pub const SN_ipsec3: &[u8; 14] = b"Oakley-EC2N-3\0"; +pub const LN_ipsec3: &[u8; 7] = b"ipsec3\0"; +pub const NID_ipsec3: i32 = 749; +pub const SN_ipsec4: &[u8; 14] = b"Oakley-EC2N-4\0"; +pub const LN_ipsec4: &[u8; 7] = b"ipsec4\0"; +pub const NID_ipsec4: i32 = 750; +pub const SN_camellia_128_cbc: &[u8; 17] = b"CAMELLIA-128-CBC\0"; +pub const LN_camellia_128_cbc: &[u8; 17] = b"camellia-128-cbc\0"; +pub const NID_camellia_128_cbc: i32 = 751; +pub const SN_camellia_192_cbc: &[u8; 17] = b"CAMELLIA-192-CBC\0"; +pub const LN_camellia_192_cbc: &[u8; 17] = b"camellia-192-cbc\0"; +pub const NID_camellia_192_cbc: i32 = 752; +pub const SN_camellia_256_cbc: &[u8; 17] = b"CAMELLIA-256-CBC\0"; +pub const LN_camellia_256_cbc: &[u8; 17] = b"camellia-256-cbc\0"; +pub const NID_camellia_256_cbc: i32 = 753; +pub const SN_camellia_128_ecb: &[u8; 17] = b"CAMELLIA-128-ECB\0"; +pub const LN_camellia_128_ecb: &[u8; 17] = b"camellia-128-ecb\0"; +pub const NID_camellia_128_ecb: i32 = 754; +pub const SN_camellia_192_ecb: &[u8; 17] = b"CAMELLIA-192-ECB\0"; +pub const LN_camellia_192_ecb: &[u8; 17] = b"camellia-192-ecb\0"; +pub const NID_camellia_192_ecb: i32 = 755; +pub const SN_camellia_256_ecb: &[u8; 17] = b"CAMELLIA-256-ECB\0"; +pub const LN_camellia_256_ecb: &[u8; 17] = b"camellia-256-ecb\0"; +pub const NID_camellia_256_ecb: i32 = 756; +pub const SN_camellia_128_cfb128: &[u8; 17] = b"CAMELLIA-128-CFB\0"; +pub const LN_camellia_128_cfb128: &[u8; 17] = b"camellia-128-cfb\0"; +pub const NID_camellia_128_cfb128: i32 = 757; +pub const SN_camellia_192_cfb128: &[u8; 17] = b"CAMELLIA-192-CFB\0"; +pub const LN_camellia_192_cfb128: &[u8; 17] = b"camellia-192-cfb\0"; +pub const NID_camellia_192_cfb128: i32 = 758; +pub const SN_camellia_256_cfb128: &[u8; 17] = b"CAMELLIA-256-CFB\0"; +pub const LN_camellia_256_cfb128: &[u8; 17] = b"camellia-256-cfb\0"; +pub const NID_camellia_256_cfb128: i32 = 759; +pub const SN_camellia_128_cfb1: &[u8; 18] = b"CAMELLIA-128-CFB1\0"; +pub const LN_camellia_128_cfb1: &[u8; 18] = b"camellia-128-cfb1\0"; +pub const NID_camellia_128_cfb1: i32 = 760; +pub const SN_camellia_192_cfb1: &[u8; 18] = b"CAMELLIA-192-CFB1\0"; +pub const LN_camellia_192_cfb1: &[u8; 18] = b"camellia-192-cfb1\0"; +pub const NID_camellia_192_cfb1: i32 = 761; +pub const SN_camellia_256_cfb1: &[u8; 18] = b"CAMELLIA-256-CFB1\0"; +pub const LN_camellia_256_cfb1: &[u8; 18] = b"camellia-256-cfb1\0"; +pub const NID_camellia_256_cfb1: i32 = 762; +pub const SN_camellia_128_cfb8: &[u8; 18] = b"CAMELLIA-128-CFB8\0"; +pub const LN_camellia_128_cfb8: &[u8; 18] = b"camellia-128-cfb8\0"; +pub const NID_camellia_128_cfb8: i32 = 763; +pub const SN_camellia_192_cfb8: &[u8; 18] = b"CAMELLIA-192-CFB8\0"; +pub const LN_camellia_192_cfb8: &[u8; 18] = b"camellia-192-cfb8\0"; +pub const NID_camellia_192_cfb8: i32 = 764; +pub const SN_camellia_256_cfb8: &[u8; 18] = b"CAMELLIA-256-CFB8\0"; +pub const LN_camellia_256_cfb8: &[u8; 18] = b"camellia-256-cfb8\0"; +pub const NID_camellia_256_cfb8: i32 = 765; +pub const SN_camellia_128_ofb128: &[u8; 17] = b"CAMELLIA-128-OFB\0"; +pub const LN_camellia_128_ofb128: &[u8; 17] = b"camellia-128-ofb\0"; +pub const NID_camellia_128_ofb128: i32 = 766; +pub const SN_camellia_192_ofb128: &[u8; 17] = b"CAMELLIA-192-OFB\0"; +pub const LN_camellia_192_ofb128: &[u8; 17] = b"camellia-192-ofb\0"; +pub const NID_camellia_192_ofb128: i32 = 767; +pub const SN_camellia_256_ofb128: &[u8; 17] = b"CAMELLIA-256-OFB\0"; +pub const LN_camellia_256_ofb128: &[u8; 17] = b"camellia-256-ofb\0"; +pub const NID_camellia_256_ofb128: i32 = 768; +pub const SN_subject_directory_attributes: &[u8; 27] = b"subjectDirectoryAttributes\0"; +pub const LN_subject_directory_attributes: &[u8; 36] = b"X509v3 Subject Directory Attributes\0"; +pub const NID_subject_directory_attributes: i32 = 769; +pub const SN_issuing_distribution_point: &[u8; 25] = b"issuingDistributionPoint\0"; +pub const LN_issuing_distribution_point: &[u8; 34] = b"X509v3 Issuing Distribution Point\0"; +pub const NID_issuing_distribution_point: i32 = 770; +pub const SN_certificate_issuer: &[u8; 18] = b"certificateIssuer\0"; +pub const LN_certificate_issuer: &[u8; 26] = b"X509v3 Certificate Issuer\0"; +pub const NID_certificate_issuer: i32 = 771; +pub const SN_kisa: &[u8; 5] = b"KISA\0"; +pub const LN_kisa: &[u8; 5] = b"kisa\0"; +pub const NID_kisa: i32 = 773; +pub const SN_seed_ecb: &[u8; 9] = b"SEED-ECB\0"; +pub const LN_seed_ecb: &[u8; 9] = b"seed-ecb\0"; +pub const NID_seed_ecb: i32 = 776; +pub const SN_seed_cbc: &[u8; 9] = b"SEED-CBC\0"; +pub const LN_seed_cbc: &[u8; 9] = b"seed-cbc\0"; +pub const NID_seed_cbc: i32 = 777; +pub const SN_seed_ofb128: &[u8; 9] = b"SEED-OFB\0"; +pub const LN_seed_ofb128: &[u8; 9] = b"seed-ofb\0"; +pub const NID_seed_ofb128: i32 = 778; +pub const SN_seed_cfb128: &[u8; 9] = b"SEED-CFB\0"; +pub const LN_seed_cfb128: &[u8; 9] = b"seed-cfb\0"; +pub const NID_seed_cfb128: i32 = 779; +pub const SN_hmac_md5: &[u8; 9] = b"HMAC-MD5\0"; +pub const LN_hmac_md5: &[u8; 9] = b"hmac-md5\0"; +pub const NID_hmac_md5: i32 = 780; +pub const SN_hmac_sha1: &[u8; 10] = b"HMAC-SHA1\0"; +pub const LN_hmac_sha1: &[u8; 10] = b"hmac-sha1\0"; +pub const NID_hmac_sha1: i32 = 781; +pub const SN_id_PasswordBasedMAC: &[u8; 20] = b"id-PasswordBasedMAC\0"; +pub const LN_id_PasswordBasedMAC: &[u8; 19] = b"password based MAC\0"; +pub const NID_id_PasswordBasedMAC: i32 = 782; +pub const SN_id_DHBasedMac: &[u8; 14] = b"id-DHBasedMac\0"; +pub const LN_id_DHBasedMac: &[u8; 25] = b"Diffie-Hellman based MAC\0"; +pub const NID_id_DHBasedMac: i32 = 783; +pub const SN_id_it_suppLangTags: &[u8; 19] = b"id-it-suppLangTags\0"; +pub const NID_id_it_suppLangTags: i32 = 784; +pub const SN_caRepository: &[u8; 13] = b"caRepository\0"; +pub const LN_caRepository: &[u8; 14] = b"CA Repository\0"; +pub const NID_caRepository: i32 = 785; +pub const SN_id_smime_ct_compressedData: &[u8; 27] = b"id-smime-ct-compressedData\0"; +pub const NID_id_smime_ct_compressedData: i32 = 786; +pub const SN_id_ct_asciiTextWithCRLF: &[u8; 24] = b"id-ct-asciiTextWithCRLF\0"; +pub const NID_id_ct_asciiTextWithCRLF: i32 = 787; +pub const SN_id_aes128_wrap: &[u8; 15] = b"id-aes128-wrap\0"; +pub const NID_id_aes128_wrap: i32 = 788; +pub const SN_id_aes192_wrap: &[u8; 15] = b"id-aes192-wrap\0"; +pub const NID_id_aes192_wrap: i32 = 789; +pub const SN_id_aes256_wrap: &[u8; 15] = b"id-aes256-wrap\0"; +pub const NID_id_aes256_wrap: i32 = 790; +pub const SN_ecdsa_with_Recommended: &[u8; 23] = b"ecdsa-with-Recommended\0"; +pub const NID_ecdsa_with_Recommended: i32 = 791; +pub const SN_ecdsa_with_Specified: &[u8; 21] = b"ecdsa-with-Specified\0"; +pub const NID_ecdsa_with_Specified: i32 = 792; +pub const SN_ecdsa_with_SHA224: &[u8; 18] = b"ecdsa-with-SHA224\0"; +pub const NID_ecdsa_with_SHA224: i32 = 793; +pub const SN_ecdsa_with_SHA256: &[u8; 18] = b"ecdsa-with-SHA256\0"; +pub const NID_ecdsa_with_SHA256: i32 = 794; +pub const SN_ecdsa_with_SHA384: &[u8; 18] = b"ecdsa-with-SHA384\0"; +pub const NID_ecdsa_with_SHA384: i32 = 795; +pub const SN_ecdsa_with_SHA512: &[u8; 18] = b"ecdsa-with-SHA512\0"; +pub const NID_ecdsa_with_SHA512: i32 = 796; +pub const LN_hmacWithMD5: &[u8; 12] = b"hmacWithMD5\0"; +pub const NID_hmacWithMD5: i32 = 797; +pub const LN_hmacWithSHA224: &[u8; 15] = b"hmacWithSHA224\0"; +pub const NID_hmacWithSHA224: i32 = 798; +pub const LN_hmacWithSHA256: &[u8; 15] = b"hmacWithSHA256\0"; +pub const NID_hmacWithSHA256: i32 = 799; +pub const LN_hmacWithSHA384: &[u8; 15] = b"hmacWithSHA384\0"; +pub const NID_hmacWithSHA384: i32 = 800; +pub const LN_hmacWithSHA512: &[u8; 15] = b"hmacWithSHA512\0"; +pub const NID_hmacWithSHA512: i32 = 801; +pub const SN_dsa_with_SHA224: &[u8; 16] = b"dsa_with_SHA224\0"; +pub const NID_dsa_with_SHA224: i32 = 802; +pub const SN_dsa_with_SHA256: &[u8; 16] = b"dsa_with_SHA256\0"; +pub const NID_dsa_with_SHA256: i32 = 803; +pub const SN_whirlpool: &[u8; 10] = b"whirlpool\0"; +pub const NID_whirlpool: i32 = 804; +pub const SN_cryptopro: &[u8; 10] = b"cryptopro\0"; +pub const NID_cryptopro: i32 = 805; +pub const SN_cryptocom: &[u8; 10] = b"cryptocom\0"; +pub const NID_cryptocom: i32 = 806; +pub const SN_id_GostR3411_94_with_GostR3410_2001: &[u8; 36] = + b"id-GostR3411-94-with-GostR3410-2001\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001: &[u8; 39] = + b"GOST R 34.11-94 with GOST R 34.10-2001\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001: i32 = 807; +pub const SN_id_GostR3411_94_with_GostR3410_94: &[u8; 34] = b"id-GostR3411-94-with-GostR3410-94\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94: &[u8; 37] = + b"GOST R 34.11-94 with GOST R 34.10-94\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94: i32 = 808; +pub const SN_id_GostR3411_94: &[u8; 10] = b"md_gost94\0"; +pub const LN_id_GostR3411_94: &[u8; 16] = b"GOST R 34.11-94\0"; +pub const NID_id_GostR3411_94: i32 = 809; +pub const SN_id_HMACGostR3411_94: &[u8; 20] = b"id-HMACGostR3411-94\0"; +pub const LN_id_HMACGostR3411_94: &[u8; 19] = b"HMAC GOST 34.11-94\0"; +pub const NID_id_HMACGostR3411_94: i32 = 810; +pub const SN_id_GostR3410_2001: &[u8; 9] = b"gost2001\0"; +pub const LN_id_GostR3410_2001: &[u8; 18] = b"GOST R 34.10-2001\0"; +pub const NID_id_GostR3410_2001: i32 = 811; +pub const SN_id_GostR3410_94: &[u8; 7] = b"gost94\0"; +pub const LN_id_GostR3410_94: &[u8; 16] = b"GOST R 34.10-94\0"; +pub const NID_id_GostR3410_94: i32 = 812; +pub const SN_id_Gost28147_89: &[u8; 7] = b"gost89\0"; +pub const LN_id_Gost28147_89: &[u8; 14] = b"GOST 28147-89\0"; +pub const NID_id_Gost28147_89: i32 = 813; +pub const SN_gost89_cnt: &[u8; 11] = b"gost89-cnt\0"; +pub const NID_gost89_cnt: i32 = 814; +pub const SN_id_Gost28147_89_MAC: &[u8; 9] = b"gost-mac\0"; +pub const LN_id_Gost28147_89_MAC: &[u8; 18] = b"GOST 28147-89 MAC\0"; +pub const NID_id_Gost28147_89_MAC: i32 = 815; +pub const SN_id_GostR3411_94_prf: &[u8; 17] = b"prf-gostr3411-94\0"; +pub const LN_id_GostR3411_94_prf: &[u8; 20] = b"GOST R 34.11-94 PRF\0"; +pub const NID_id_GostR3411_94_prf: i32 = 816; +pub const SN_id_GostR3410_2001DH: &[u8; 20] = b"id-GostR3410-2001DH\0"; +pub const LN_id_GostR3410_2001DH: &[u8; 21] = b"GOST R 34.10-2001 DH\0"; +pub const NID_id_GostR3410_2001DH: i32 = 817; +pub const SN_id_GostR3410_94DH: &[u8; 18] = b"id-GostR3410-94DH\0"; +pub const LN_id_GostR3410_94DH: &[u8; 19] = b"GOST R 34.10-94 DH\0"; +pub const NID_id_GostR3410_94DH: i32 = 818; +pub const SN_id_Gost28147_89_CryptoPro_KeyMeshing: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-KeyMeshing\0"; +pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: i32 = 819; +pub const SN_id_Gost28147_89_None_KeyMeshing: &[u8; 32] = b"id-Gost28147-89-None-KeyMeshing\0"; +pub const NID_id_Gost28147_89_None_KeyMeshing: i32 = 820; +pub const SN_id_GostR3411_94_TestParamSet: &[u8; 29] = b"id-GostR3411-94-TestParamSet\0"; +pub const NID_id_GostR3411_94_TestParamSet: i32 = 821; +pub const SN_id_GostR3411_94_CryptoProParamSet: &[u8; 34] = b"id-GostR3411-94-CryptoProParamSet\0"; +pub const NID_id_GostR3411_94_CryptoProParamSet: i32 = 822; +pub const SN_id_Gost28147_89_TestParamSet: &[u8; 29] = b"id-Gost28147-89-TestParamSet\0"; +pub const NID_id_Gost28147_89_TestParamSet: i32 = 823; +pub const SN_id_Gost28147_89_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-A-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: i32 = 824; +pub const SN_id_Gost28147_89_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-B-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: i32 = 825; +pub const SN_id_Gost28147_89_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-C-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: i32 = 826; +pub const SN_id_Gost28147_89_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-Gost28147-89-CryptoPro-D-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: i32 = 827; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: i32 = 828; +pub const SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: &[u8; 45] = + b"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: i32 = 829; +pub const SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: &[u8; 41] = + b"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\0"; +pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: i32 = 830; +pub const SN_id_GostR3410_94_TestParamSet: &[u8; 29] = b"id-GostR3410-94-TestParamSet\0"; +pub const NID_id_GostR3410_94_TestParamSet: i32 = 831; +pub const SN_id_GostR3410_94_CryptoPro_A_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: i32 = 832; +pub const SN_id_GostR3410_94_CryptoPro_B_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: i32 = 833; +pub const SN_id_GostR3410_94_CryptoPro_C_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: i32 = 834; +pub const SN_id_GostR3410_94_CryptoPro_D_ParamSet: &[u8; 37] = + b"id-GostR3410-94-CryptoPro-D-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: i32 = 835; +pub const SN_id_GostR3410_94_CryptoPro_XchA_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: i32 = 836; +pub const SN_id_GostR3410_94_CryptoPro_XchB_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: i32 = 837; +pub const SN_id_GostR3410_94_CryptoPro_XchC_ParamSet: &[u8; 40] = + b"id-GostR3410-94-CryptoPro-XchC-ParamSet\0"; +pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: i32 = 838; +pub const SN_id_GostR3410_2001_TestParamSet: &[u8; 31] = b"id-GostR3410-2001-TestParamSet\0"; +pub const NID_id_GostR3410_2001_TestParamSet: i32 = 839; +pub const SN_id_GostR3410_2001_CryptoPro_A_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-A-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: i32 = 840; +pub const SN_id_GostR3410_2001_CryptoPro_B_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-B-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: i32 = 841; +pub const SN_id_GostR3410_2001_CryptoPro_C_ParamSet: &[u8; 39] = + b"id-GostR3410-2001-CryptoPro-C-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: i32 = 842; +pub const SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchA-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: i32 = 843; +pub const SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet: &[u8; 42] = + b"id-GostR3410-2001-CryptoPro-XchB-ParamSet\0"; +pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: i32 = 844; +pub const SN_id_GostR3410_94_a: &[u8; 18] = b"id-GostR3410-94-a\0"; +pub const NID_id_GostR3410_94_a: i32 = 845; +pub const SN_id_GostR3410_94_aBis: &[u8; 21] = b"id-GostR3410-94-aBis\0"; +pub const NID_id_GostR3410_94_aBis: i32 = 846; +pub const SN_id_GostR3410_94_b: &[u8; 18] = b"id-GostR3410-94-b\0"; +pub const NID_id_GostR3410_94_b: i32 = 847; +pub const SN_id_GostR3410_94_bBis: &[u8; 21] = b"id-GostR3410-94-bBis\0"; +pub const NID_id_GostR3410_94_bBis: i32 = 848; +pub const SN_id_Gost28147_89_cc: &[u8; 19] = b"id-Gost28147-89-cc\0"; +pub const LN_id_Gost28147_89_cc: &[u8; 33] = b"GOST 28147-89 Cryptocom ParamSet\0"; +pub const NID_id_Gost28147_89_cc: i32 = 849; +pub const SN_id_GostR3410_94_cc: &[u8; 9] = b"gost94cc\0"; +pub const LN_id_GostR3410_94_cc: &[u8; 24] = b"GOST 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3410_94_cc: i32 = 850; +pub const SN_id_GostR3410_2001_cc: &[u8; 11] = b"gost2001cc\0"; +pub const LN_id_GostR3410_2001_cc: &[u8; 26] = b"GOST 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3410_2001_cc: i32 = 851; +pub const SN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 37] = + b"id-GostR3411-94-with-GostR3410-94-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_94_cc: &[u8; 47] = + b"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_94_cc: i32 = 852; +pub const SN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 39] = + b"id-GostR3411-94-with-GostR3410-2001-cc\0"; +pub const LN_id_GostR3411_94_with_GostR3410_2001_cc: &[u8; 49] = + b"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\0"; +pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: i32 = 853; +pub const SN_id_GostR3410_2001_ParamSet_cc: &[u8; 30] = b"id-GostR3410-2001-ParamSet-cc\0"; +pub const LN_id_GostR3410_2001_ParamSet_cc: &[u8; 41] = + b"GOST R 3410-2001 Parameter Set Cryptocom\0"; +pub const NID_id_GostR3410_2001_ParamSet_cc: i32 = 854; +pub const SN_hmac: &[u8; 5] = b"HMAC\0"; +pub const LN_hmac: &[u8; 5] = b"hmac\0"; +pub const NID_hmac: i32 = 855; +pub const SN_LocalKeySet: &[u8; 12] = b"LocalKeySet\0"; +pub const LN_LocalKeySet: &[u8; 24] = b"Microsoft Local Key set\0"; +pub const NID_LocalKeySet: i32 = 856; +pub const SN_freshest_crl: &[u8; 12] = b"freshestCRL\0"; +pub const LN_freshest_crl: &[u8; 20] = b"X509v3 Freshest CRL\0"; +pub const NID_freshest_crl: i32 = 857; +pub const SN_id_on_permanentIdentifier: &[u8; 26] = b"id-on-permanentIdentifier\0"; +pub const LN_id_on_permanentIdentifier: &[u8; 21] = b"Permanent Identifier\0"; +pub const NID_id_on_permanentIdentifier: i32 = 858; +pub const LN_searchGuide: &[u8; 12] = b"searchGuide\0"; +pub const NID_searchGuide: i32 = 859; +pub const LN_businessCategory: &[u8; 17] = b"businessCategory\0"; +pub const NID_businessCategory: i32 = 860; +pub const LN_postalAddress: &[u8; 14] = b"postalAddress\0"; +pub const NID_postalAddress: i32 = 861; +pub const LN_postOfficeBox: &[u8; 14] = b"postOfficeBox\0"; +pub const NID_postOfficeBox: i32 = 862; +pub const LN_physicalDeliveryOfficeName: &[u8; 27] = b"physicalDeliveryOfficeName\0"; +pub const NID_physicalDeliveryOfficeName: i32 = 863; +pub const LN_telephoneNumber: &[u8; 16] = b"telephoneNumber\0"; +pub const NID_telephoneNumber: i32 = 864; +pub const LN_telexNumber: &[u8; 12] = b"telexNumber\0"; +pub const NID_telexNumber: i32 = 865; +pub const LN_teletexTerminalIdentifier: &[u8; 26] = b"teletexTerminalIdentifier\0"; +pub const NID_teletexTerminalIdentifier: i32 = 866; +pub const LN_facsimileTelephoneNumber: &[u8; 25] = b"facsimileTelephoneNumber\0"; +pub const NID_facsimileTelephoneNumber: i32 = 867; +pub const LN_x121Address: &[u8; 12] = b"x121Address\0"; +pub const NID_x121Address: i32 = 868; +pub const LN_internationaliSDNNumber: &[u8; 24] = b"internationaliSDNNumber\0"; +pub const NID_internationaliSDNNumber: i32 = 869; +pub const LN_registeredAddress: &[u8; 18] = b"registeredAddress\0"; +pub const NID_registeredAddress: i32 = 870; +pub const LN_destinationIndicator: &[u8; 21] = b"destinationIndicator\0"; +pub const NID_destinationIndicator: i32 = 871; +pub const LN_preferredDeliveryMethod: &[u8; 24] = b"preferredDeliveryMethod\0"; +pub const NID_preferredDeliveryMethod: i32 = 872; +pub const LN_presentationAddress: &[u8; 20] = b"presentationAddress\0"; +pub const NID_presentationAddress: i32 = 873; +pub const LN_supportedApplicationContext: &[u8; 28] = b"supportedApplicationContext\0"; +pub const NID_supportedApplicationContext: i32 = 874; +pub const SN_member: &[u8; 7] = b"member\0"; +pub const NID_member: i32 = 875; +pub const SN_owner: &[u8; 6] = b"owner\0"; +pub const NID_owner: i32 = 876; +pub const LN_roleOccupant: &[u8; 13] = b"roleOccupant\0"; +pub const NID_roleOccupant: i32 = 877; +pub const SN_seeAlso: &[u8; 8] = b"seeAlso\0"; +pub const NID_seeAlso: i32 = 878; +pub const LN_userPassword: &[u8; 13] = b"userPassword\0"; +pub const NID_userPassword: i32 = 879; +pub const LN_userCertificate: &[u8; 16] = b"userCertificate\0"; +pub const NID_userCertificate: i32 = 880; +pub const LN_cACertificate: &[u8; 14] = b"cACertificate\0"; +pub const NID_cACertificate: i32 = 881; +pub const LN_authorityRevocationList: &[u8; 24] = b"authorityRevocationList\0"; +pub const NID_authorityRevocationList: i32 = 882; +pub const LN_certificateRevocationList: &[u8; 26] = b"certificateRevocationList\0"; +pub const NID_certificateRevocationList: i32 = 883; +pub const LN_crossCertificatePair: &[u8; 21] = b"crossCertificatePair\0"; +pub const NID_crossCertificatePair: i32 = 884; +pub const LN_enhancedSearchGuide: &[u8; 20] = b"enhancedSearchGuide\0"; +pub const NID_enhancedSearchGuide: i32 = 885; +pub const LN_protocolInformation: &[u8; 20] = b"protocolInformation\0"; +pub const NID_protocolInformation: i32 = 886; +pub const LN_distinguishedName: &[u8; 18] = b"distinguishedName\0"; +pub const NID_distinguishedName: i32 = 887; +pub const LN_uniqueMember: &[u8; 13] = b"uniqueMember\0"; +pub const NID_uniqueMember: i32 = 888; +pub const LN_houseIdentifier: &[u8; 16] = b"houseIdentifier\0"; +pub const NID_houseIdentifier: i32 = 889; +pub const LN_supportedAlgorithms: &[u8; 20] = b"supportedAlgorithms\0"; +pub const NID_supportedAlgorithms: i32 = 890; +pub const LN_deltaRevocationList: &[u8; 20] = b"deltaRevocationList\0"; +pub const NID_deltaRevocationList: i32 = 891; +pub const SN_dmdName: &[u8; 8] = b"dmdName\0"; +pub const NID_dmdName: i32 = 892; +pub const SN_id_alg_PWRI_KEK: &[u8; 16] = b"id-alg-PWRI-KEK\0"; +pub const NID_id_alg_PWRI_KEK: i32 = 893; +pub const SN_cmac: &[u8; 5] = b"CMAC\0"; +pub const LN_cmac: &[u8; 5] = b"cmac\0"; +pub const NID_cmac: i32 = 894; +pub const SN_aes_128_gcm: &[u8; 14] = b"id-aes128-GCM\0"; +pub const LN_aes_128_gcm: &[u8; 12] = b"aes-128-gcm\0"; +pub const NID_aes_128_gcm: i32 = 895; +pub const SN_aes_128_ccm: &[u8; 14] = b"id-aes128-CCM\0"; +pub const LN_aes_128_ccm: &[u8; 12] = b"aes-128-ccm\0"; +pub const NID_aes_128_ccm: i32 = 896; +pub const SN_id_aes128_wrap_pad: &[u8; 19] = b"id-aes128-wrap-pad\0"; +pub const NID_id_aes128_wrap_pad: i32 = 897; +pub const SN_aes_192_gcm: &[u8; 14] = b"id-aes192-GCM\0"; +pub const LN_aes_192_gcm: &[u8; 12] = b"aes-192-gcm\0"; +pub const NID_aes_192_gcm: i32 = 898; +pub const SN_aes_192_ccm: &[u8; 14] = b"id-aes192-CCM\0"; +pub const LN_aes_192_ccm: &[u8; 12] = b"aes-192-ccm\0"; +pub const NID_aes_192_ccm: i32 = 899; +pub const SN_id_aes192_wrap_pad: &[u8; 19] = b"id-aes192-wrap-pad\0"; +pub const NID_id_aes192_wrap_pad: i32 = 900; +pub const SN_aes_256_gcm: &[u8; 14] = b"id-aes256-GCM\0"; +pub const LN_aes_256_gcm: &[u8; 12] = b"aes-256-gcm\0"; +pub const NID_aes_256_gcm: i32 = 901; +pub const SN_aes_256_ccm: &[u8; 14] = b"id-aes256-CCM\0"; +pub const LN_aes_256_ccm: &[u8; 12] = b"aes-256-ccm\0"; +pub const NID_aes_256_ccm: i32 = 902; +pub const SN_id_aes256_wrap_pad: &[u8; 19] = b"id-aes256-wrap-pad\0"; +pub const NID_id_aes256_wrap_pad: i32 = 903; +pub const SN_aes_128_ctr: &[u8; 12] = b"AES-128-CTR\0"; +pub const LN_aes_128_ctr: &[u8; 12] = b"aes-128-ctr\0"; +pub const NID_aes_128_ctr: i32 = 904; +pub const SN_aes_192_ctr: &[u8; 12] = b"AES-192-CTR\0"; +pub const LN_aes_192_ctr: &[u8; 12] = b"aes-192-ctr\0"; +pub const NID_aes_192_ctr: i32 = 905; +pub const SN_aes_256_ctr: &[u8; 12] = b"AES-256-CTR\0"; +pub const LN_aes_256_ctr: &[u8; 12] = b"aes-256-ctr\0"; +pub const NID_aes_256_ctr: i32 = 906; +pub const SN_id_camellia128_wrap: &[u8; 20] = b"id-camellia128-wrap\0"; +pub const NID_id_camellia128_wrap: i32 = 907; +pub const SN_id_camellia192_wrap: &[u8; 20] = b"id-camellia192-wrap\0"; +pub const NID_id_camellia192_wrap: i32 = 908; +pub const SN_id_camellia256_wrap: &[u8; 20] = b"id-camellia256-wrap\0"; +pub const NID_id_camellia256_wrap: i32 = 909; +pub const SN_anyExtendedKeyUsage: &[u8; 20] = b"anyExtendedKeyUsage\0"; +pub const LN_anyExtendedKeyUsage: &[u8; 23] = b"Any Extended Key Usage\0"; +pub const NID_anyExtendedKeyUsage: i32 = 910; +pub const SN_mgf1: &[u8; 5] = b"MGF1\0"; +pub const LN_mgf1: &[u8; 5] = b"mgf1\0"; +pub const NID_mgf1: i32 = 911; +pub const SN_rsassaPss: &[u8; 11] = b"RSASSA-PSS\0"; +pub const LN_rsassaPss: &[u8; 10] = b"rsassaPss\0"; +pub const NID_rsassaPss: i32 = 912; +pub const SN_aes_128_xts: &[u8; 12] = b"AES-128-XTS\0"; +pub const LN_aes_128_xts: &[u8; 12] = b"aes-128-xts\0"; +pub const NID_aes_128_xts: i32 = 913; +pub const SN_aes_256_xts: &[u8; 12] = b"AES-256-XTS\0"; +pub const LN_aes_256_xts: &[u8; 12] = b"aes-256-xts\0"; +pub const NID_aes_256_xts: i32 = 914; +pub const SN_rc4_hmac_md5: &[u8; 13] = b"RC4-HMAC-MD5\0"; +pub const LN_rc4_hmac_md5: &[u8; 13] = b"rc4-hmac-md5\0"; +pub const NID_rc4_hmac_md5: i32 = 915; +pub const SN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"AES-128-CBC-HMAC-SHA1\0"; +pub const LN_aes_128_cbc_hmac_sha1: &[u8; 22] = b"aes-128-cbc-hmac-sha1\0"; +pub const NID_aes_128_cbc_hmac_sha1: i32 = 916; +pub const SN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"AES-192-CBC-HMAC-SHA1\0"; +pub const LN_aes_192_cbc_hmac_sha1: &[u8; 22] = b"aes-192-cbc-hmac-sha1\0"; +pub const NID_aes_192_cbc_hmac_sha1: i32 = 917; +pub const SN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"AES-256-CBC-HMAC-SHA1\0"; +pub const LN_aes_256_cbc_hmac_sha1: &[u8; 22] = b"aes-256-cbc-hmac-sha1\0"; +pub const NID_aes_256_cbc_hmac_sha1: i32 = 918; +pub const SN_rsaesOaep: &[u8; 11] = b"RSAES-OAEP\0"; +pub const LN_rsaesOaep: &[u8; 10] = b"rsaesOaep\0"; +pub const NID_rsaesOaep: i32 = 919; +pub const SN_dhpublicnumber: &[u8; 15] = b"dhpublicnumber\0"; +pub const LN_dhpublicnumber: &[u8; 9] = b"X9.42 DH\0"; +pub const NID_dhpublicnumber: i32 = 920; +pub const SN_brainpoolP160r1: &[u8; 16] = b"brainpoolP160r1\0"; +pub const NID_brainpoolP160r1: i32 = 921; +pub const SN_brainpoolP160t1: &[u8; 16] = b"brainpoolP160t1\0"; +pub const NID_brainpoolP160t1: i32 = 922; +pub const SN_brainpoolP192r1: &[u8; 16] = b"brainpoolP192r1\0"; +pub const NID_brainpoolP192r1: i32 = 923; +pub const SN_brainpoolP192t1: &[u8; 16] = b"brainpoolP192t1\0"; +pub const NID_brainpoolP192t1: i32 = 924; +pub const SN_brainpoolP224r1: &[u8; 16] = b"brainpoolP224r1\0"; +pub const NID_brainpoolP224r1: i32 = 925; +pub const SN_brainpoolP224t1: &[u8; 16] = b"brainpoolP224t1\0"; +pub const NID_brainpoolP224t1: i32 = 926; +pub const SN_brainpoolP256r1: &[u8; 16] = b"brainpoolP256r1\0"; +pub const NID_brainpoolP256r1: i32 = 927; +pub const SN_brainpoolP256t1: &[u8; 16] = b"brainpoolP256t1\0"; +pub const NID_brainpoolP256t1: i32 = 928; +pub const SN_brainpoolP320r1: &[u8; 16] = b"brainpoolP320r1\0"; +pub const NID_brainpoolP320r1: i32 = 929; +pub const SN_brainpoolP320t1: &[u8; 16] = b"brainpoolP320t1\0"; +pub const NID_brainpoolP320t1: i32 = 930; +pub const SN_brainpoolP384r1: &[u8; 16] = b"brainpoolP384r1\0"; +pub const NID_brainpoolP384r1: i32 = 931; +pub const SN_brainpoolP384t1: &[u8; 16] = b"brainpoolP384t1\0"; +pub const NID_brainpoolP384t1: i32 = 932; +pub const SN_brainpoolP512r1: &[u8; 16] = b"brainpoolP512r1\0"; +pub const NID_brainpoolP512r1: i32 = 933; +pub const SN_brainpoolP512t1: &[u8; 16] = b"brainpoolP512t1\0"; +pub const NID_brainpoolP512t1: i32 = 934; +pub const SN_pSpecified: &[u8; 11] = b"PSPECIFIED\0"; +pub const LN_pSpecified: &[u8; 11] = b"pSpecified\0"; +pub const NID_pSpecified: i32 = 935; +pub const SN_dhSinglePass_stdDH_sha1kdf_scheme: &[u8; 34] = b"dhSinglePass-stdDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha1kdf_scheme: i32 = 936; +pub const SN_dhSinglePass_stdDH_sha224kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha224kdf_scheme: i32 = 937; +pub const SN_dhSinglePass_stdDH_sha256kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha256kdf_scheme: i32 = 938; +pub const SN_dhSinglePass_stdDH_sha384kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha384kdf_scheme: i32 = 939; +pub const SN_dhSinglePass_stdDH_sha512kdf_scheme: &[u8; 36] = + b"dhSinglePass-stdDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_stdDH_sha512kdf_scheme: i32 = 940; +pub const SN_dhSinglePass_cofactorDH_sha1kdf_scheme: &[u8; 39] = + b"dhSinglePass-cofactorDH-sha1kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha1kdf_scheme: i32 = 941; +pub const SN_dhSinglePass_cofactorDH_sha224kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha224kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha224kdf_scheme: i32 = 942; +pub const SN_dhSinglePass_cofactorDH_sha256kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha256kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha256kdf_scheme: i32 = 943; +pub const SN_dhSinglePass_cofactorDH_sha384kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha384kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha384kdf_scheme: i32 = 944; +pub const SN_dhSinglePass_cofactorDH_sha512kdf_scheme: &[u8; 41] = + b"dhSinglePass-cofactorDH-sha512kdf-scheme\0"; +pub const NID_dhSinglePass_cofactorDH_sha512kdf_scheme: i32 = 945; +pub const SN_dh_std_kdf: &[u8; 11] = b"dh-std-kdf\0"; +pub const NID_dh_std_kdf: i32 = 946; +pub const SN_dh_cofactor_kdf: &[u8; 16] = b"dh-cofactor-kdf\0"; +pub const NID_dh_cofactor_kdf: i32 = 947; +pub const SN_X25519: &[u8; 7] = b"X25519\0"; +pub const NID_X25519: i32 = 948; +pub const SN_ED25519: &[u8; 8] = b"ED25519\0"; +pub const NID_ED25519: i32 = 949; +pub const SN_chacha20_poly1305: &[u8; 18] = b"ChaCha20-Poly1305\0"; +pub const LN_chacha20_poly1305: &[u8; 18] = b"chacha20-poly1305\0"; +pub const NID_chacha20_poly1305: i32 = 950; +pub const SN_kx_rsa: &[u8; 6] = b"KxRSA\0"; +pub const LN_kx_rsa: &[u8; 7] = b"kx-rsa\0"; +pub const NID_kx_rsa: i32 = 951; +pub const SN_kx_ecdhe: &[u8; 8] = b"KxECDHE\0"; +pub const LN_kx_ecdhe: &[u8; 9] = b"kx-ecdhe\0"; +pub const NID_kx_ecdhe: i32 = 952; +pub const SN_kx_psk: &[u8; 6] = b"KxPSK\0"; +pub const LN_kx_psk: &[u8; 7] = b"kx-psk\0"; +pub const NID_kx_psk: i32 = 953; +pub const SN_auth_rsa: &[u8; 8] = b"AuthRSA\0"; +pub const LN_auth_rsa: &[u8; 9] = b"auth-rsa\0"; +pub const NID_auth_rsa: i32 = 954; +pub const SN_auth_ecdsa: &[u8; 10] = b"AuthECDSA\0"; +pub const LN_auth_ecdsa: &[u8; 11] = b"auth-ecdsa\0"; +pub const NID_auth_ecdsa: i32 = 955; +pub const SN_auth_psk: &[u8; 8] = b"AuthPSK\0"; +pub const LN_auth_psk: &[u8; 9] = b"auth-psk\0"; +pub const NID_auth_psk: i32 = 956; +pub const SN_kx_any: &[u8; 6] = b"KxANY\0"; +pub const LN_kx_any: &[u8; 7] = b"kx-any\0"; +pub const NID_kx_any: i32 = 957; +pub const SN_auth_any: &[u8; 8] = b"AuthANY\0"; +pub const LN_auth_any: &[u8; 9] = b"auth-any\0"; +pub const NID_auth_any: i32 = 958; +pub const SN_ED448: &[u8; 6] = b"ED448\0"; +pub const NID_ED448: i32 = 960; +pub const SN_X448: &[u8; 5] = b"X448\0"; +pub const NID_X448: i32 = 961; +pub const SN_sha512_256: &[u8; 11] = b"SHA512-256\0"; +pub const LN_sha512_256: &[u8; 11] = b"sha512-256\0"; +pub const NID_sha512_256: i32 = 962; +pub const SN_hkdf: &[u8; 5] = b"HKDF\0"; +pub const LN_hkdf: &[u8; 5] = b"hkdf\0"; +pub const NID_hkdf: i32 = 963; +pub const SN_X25519Kyber768Draft00: &[u8; 22] = b"X25519Kyber768Draft00\0"; +pub const NID_X25519Kyber768Draft00: i32 = 964; +pub const SN_X25519MLKEM768: &[u8; 15] = b"X25519MLKEM768\0"; +pub const NID_X25519MLKEM768: i32 = 965; +pub const SN_ML_KEM_1024: &[u8; 19] = b"id-alg-ml-kem-1024\0"; +pub const LN_ML_KEM_1024: &[u8; 12] = b"ML-KEM-1024\0"; +pub const NID_ML_KEM_1024: i32 = 966; +pub const SN_ML_DSA_44: &[u8; 13] = b"id-ml-dsa-44\0"; +pub const LN_ML_DSA_44: &[u8; 10] = b"ML-DSA-44\0"; +pub const NID_ML_DSA_44: i32 = 967; +pub const SN_ML_DSA_65: &[u8; 13] = b"id-ml-dsa-65\0"; +pub const LN_ML_DSA_65: &[u8; 10] = b"ML-DSA-65\0"; +pub const NID_ML_DSA_65: i32 = 968; +pub const SN_ML_DSA_87: &[u8; 13] = b"id-ml-dsa-87\0"; +pub const LN_ML_DSA_87: &[u8; 10] = b"ML-DSA-87\0"; +pub const NID_ML_DSA_87: i32 = 969; +pub const SN_ML_KEM_768: &[u8; 18] = b"id-alg-ml-kem-768\0"; +pub const LN_ML_KEM_768: &[u8; 11] = b"ML-KEM-768\0"; +pub const NID_ML_KEM_768: i32 = 970; +pub const SN_X_Wing: &[u8; 7] = b"X-Wing\0"; +pub const NID_X_Wing: i32 = 972; +pub const SN_sha512_224: &[u8; 11] = b"SHA512-224\0"; +pub const LN_sha512_224: &[u8; 11] = b"sha512-224\0"; +pub const NID_sha512_224: i32 = 1094; +pub const SN_sha3_224: &[u8; 9] = b"SHA3-224\0"; +pub const LN_sha3_224: &[u8; 9] = b"sha3-224\0"; +pub const NID_sha3_224: i32 = 1096; +pub const SN_sha3_256: &[u8; 9] = b"SHA3-256\0"; +pub const LN_sha3_256: &[u8; 9] = b"sha3-256\0"; +pub const NID_sha3_256: i32 = 1097; +pub const SN_sha3_384: &[u8; 9] = b"SHA3-384\0"; +pub const LN_sha3_384: &[u8; 9] = b"sha3-384\0"; +pub const NID_sha3_384: i32 = 1098; +pub const SN_sha3_512: &[u8; 9] = b"SHA3-512\0"; +pub const LN_sha3_512: &[u8; 9] = b"sha3-512\0"; +pub const NID_sha3_512: i32 = 1099; +pub const SN_shake128: &[u8; 9] = b"SHAKE128\0"; +pub const LN_shake128: &[u8; 9] = b"shake128\0"; +pub const NID_shake128: i32 = 1100; +pub const SN_shake256: &[u8; 9] = b"SHAKE256\0"; +pub const LN_shake256: &[u8; 9] = b"shake256\0"; +pub const NID_shake256: i32 = 1101; +pub const EVP_PKEY_NONE: i32 = 0; +pub const EVP_PKEY_RSA: i32 = 6; +pub const EVP_PKEY_RSA_PSS: i32 = 912; +pub const EVP_PKEY_DSA: i32 = 116; +pub const EVP_PKEY_EC: i32 = 408; +pub const EVP_PKEY_ED25519: i32 = 949; +pub const EVP_PKEY_X25519: i32 = 948; +pub const EVP_PKEY_HKDF: i32 = 963; +pub const EVP_PKEY_DH: i32 = 28; +pub const EVP_PKEY_ML_DSA_44: i32 = 967; +pub const EVP_PKEY_ML_DSA_65: i32 = 968; +pub const EVP_PKEY_ML_DSA_87: i32 = 969; +pub const EVP_PKEY_ML_KEM_768: i32 = 970; +pub const EVP_PKEY_ML_KEM_1024: i32 = 966; +pub const EVP_PKEY_XWING: i32 = 972; +pub const EVP_PKEY_RSA2: i32 = 19; +pub const EVP_PKEY_X448: i32 = 961; +pub const EVP_PKEY_ED448: i32 = 960; +pub const HKDF_R_OUTPUT_TOO_LARGE: i32 = 100; +pub const EVP_HPKE_DHKEM_P256_HKDF_SHA256: i32 = 16; +pub const EVP_HPKE_DHKEM_X25519_HKDF_SHA256: i32 = 32; +pub const EVP_HPKE_XWING: i32 = 25722; +pub const EVP_HPKE_MLKEM768: i32 = 65; +pub const EVP_HPKE_MLKEM1024: i32 = 66; +pub const EVP_HPKE_MAX_PUBLIC_KEY_LENGTH: i32 = 1568; +pub const EVP_HPKE_MAX_PRIVATE_KEY_LENGTH: i32 = 64; +pub const EVP_HPKE_MAX_ENC_LENGTH: i32 = 1568; +pub const EVP_HPKE_HKDF_SHA256: i32 = 1; +pub const EVP_HPKE_HKDF_SHA384: i32 = 2; +pub const EVP_HPKE_AES_128_GCM: i32 = 1; +pub const EVP_HPKE_AES_256_GCM: i32 = 2; +pub const EVP_HPKE_CHACHA20_POLY1305: i32 = 3; +pub const EVP_HPKE_MAX_OVERHEAD: i32 = 64; +pub const HRSS_SAMPLE_BYTES: i32 = 700; +pub const HRSS_GENERATE_KEY_BYTES: i32 = 1432; +pub const HRSS_ENCAP_BYTES: i32 = 1400; +pub const HRSS_PUBLIC_KEY_BYTES: i32 = 1138; +pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; +pub const HRSS_KEY_BYTES: i32 = 32; +pub const HRSS_POLY3_BYTES: i32 = 140; +pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; +pub const MD4_CBLOCK: i32 = 64; +pub const MD4_DIGEST_LENGTH: i32 = 16; +pub const MD5_CBLOCK: i32 = 64; +pub const MD5_DIGEST_LENGTH: i32 = 16; +pub const MLDSA_SEED_BYTES: i32 = 32; +pub const MLDSA_MU_BYTES: i32 = 64; +pub const MLDSA65_PUBLIC_KEY_BYTES: i32 = 1952; +pub const MLDSA65_SIGNATURE_BYTES: i32 = 3309; +pub const MLDSA87_PUBLIC_KEY_BYTES: i32 = 2592; +pub const MLDSA87_SIGNATURE_BYTES: i32 = 4627; +pub const MLDSA44_PUBLIC_KEY_BYTES: i32 = 1312; +pub const MLDSA44_SIGNATURE_BYTES: i32 = 2420; +pub const MLKEM768_PUBLIC_KEY_BYTES: i32 = 1184; +pub const MLKEM_SEED_BYTES: i32 = 64; +pub const MLKEM768_CIPHERTEXT_BYTES: i32 = 1088; +pub const MLKEM_SHARED_SECRET_BYTES: i32 = 32; +pub const MLKEM1024_PUBLIC_KEY_BYTES: i32 = 1568; +pub const MLKEM1024_CIPHERTEXT_BYTES: i32 = 1568; +pub const OBJ_NAME_TYPE_MD_METH: i32 = 1; +pub const OBJ_NAME_TYPE_CIPHER_METH: i32 = 2; +pub const OBJ_R_UNKNOWN_NID: i32 = 100; +pub const OBJ_R_INVALID_OID_STRING: i32 = 101; +pub const PKCS7_DETACHED: i32 = 64; +pub const PKCS7_TEXT: i32 = 1; +pub const PKCS7_NOCERTS: i32 = 2; +pub const PKCS7_NOSIGS: i32 = 4; +pub const PKCS7_NOCHAIN: i32 = 8; +pub const PKCS7_NOINTERN: i32 = 16; +pub const PKCS7_NOVERIFY: i32 = 32; +pub const PKCS7_BINARY: i32 = 128; +pub const PKCS7_NOATTR: i32 = 256; +pub const PKCS7_NOSMIMECAP: i32 = 512; +pub const PKCS7_STREAM: i32 = 4096; +pub const PKCS7_PARTIAL: i32 = 16384; +pub const PKCS7_R_BAD_PKCS7_VERSION: i32 = 100; +pub const PKCS7_R_NOT_PKCS7_SIGNED_DATA: i32 = 101; +pub const PKCS7_R_NO_CERTIFICATES_INCLUDED: i32 = 102; +pub const PKCS7_R_NO_CRLS_INCLUDED: i32 = 103; +pub const OPENSSL_RSA_MAX_MODULUS_BITS: i32 = 16384; +pub const RSA_PKCS1_PADDING: i32 = 1; +pub const RSA_NO_PADDING: i32 = 3; +pub const RSA_PKCS1_OAEP_PADDING: i32 = 4; +pub const RSA_PKCS1_PSS_PADDING: i32 = 6; +pub const RSA_PSS_SALTLEN_DIGEST: i32 = -1; +pub const RSA_PSS_SALTLEN_AUTO: i32 = -2; +pub const RSA_FLAG_OPAQUE: i32 = 1; +pub const RSA_FLAG_NO_BLINDING: i32 = 8; +pub const RSA_FLAG_EXT_PKEY: i32 = 32; +pub const RSA_FLAG_NO_PUBLIC_EXPONENT: i32 = 64; +pub const RSA_FLAG_LARGE_PUBLIC_EXPONENT: i32 = 128; +pub const RSA_3: i32 = 3; +pub const RSA_F4: i32 = 65537; +pub const RSA_METHOD_FLAG_NO_CHECK: i32 = 1; +pub const RSA_R_BAD_ENCODING: i32 = 100; +pub const RSA_R_BAD_E_VALUE: i32 = 101; +pub const RSA_R_BAD_FIXED_HEADER_DECRYPT: i32 = 102; +pub const RSA_R_BAD_PAD_BYTE_COUNT: i32 = 103; +pub const RSA_R_BAD_RSA_PARAMETERS: i32 = 104; +pub const RSA_R_BAD_SIGNATURE: i32 = 105; +pub const RSA_R_BAD_VERSION: i32 = 106; +pub const RSA_R_BLOCK_TYPE_IS_NOT_01: i32 = 107; +pub const RSA_R_BN_NOT_INITIALIZED: i32 = 108; +pub const RSA_R_CANNOT_RECOVER_MULTI_PRIME_KEY: i32 = 109; +pub const RSA_R_CRT_PARAMS_ALREADY_GIVEN: i32 = 110; +pub const RSA_R_CRT_VALUES_INCORRECT: i32 = 111; +pub const RSA_R_DATA_LEN_NOT_EQUAL_TO_MOD_LEN: i32 = 112; +pub const RSA_R_DATA_TOO_LARGE: i32 = 113; +pub const RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE: i32 = 114; +pub const RSA_R_DATA_TOO_LARGE_FOR_MODULUS: i32 = 115; +pub const RSA_R_DATA_TOO_SMALL: i32 = 116; +pub const RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE: i32 = 117; +pub const RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY: i32 = 118; +pub const RSA_R_D_E_NOT_CONGRUENT_TO_1: i32 = 119; +pub const RSA_R_EMPTY_PUBLIC_KEY: i32 = 120; +pub const RSA_R_ENCODE_ERROR: i32 = 121; +pub const RSA_R_FIRST_OCTET_INVALID: i32 = 122; +pub const RSA_R_INCONSISTENT_SET_OF_CRT_VALUES: i32 = 123; +pub const RSA_R_INTERNAL_ERROR: i32 = 124; +pub const RSA_R_INVALID_MESSAGE_LENGTH: i32 = 125; +pub const RSA_R_KEY_SIZE_TOO_SMALL: i32 = 126; +pub const RSA_R_LAST_OCTET_INVALID: i32 = 127; +pub const RSA_R_MODULUS_TOO_LARGE: i32 = 128; +pub const RSA_R_MUST_HAVE_AT_LEAST_TWO_PRIMES: i32 = 129; +pub const RSA_R_NO_PUBLIC_EXPONENT: i32 = 130; +pub const RSA_R_NULL_BEFORE_BLOCK_MISSING: i32 = 131; +pub const RSA_R_N_NOT_EQUAL_P_Q: i32 = 132; +pub const RSA_R_OAEP_DECODING_ERROR: i32 = 133; +pub const RSA_R_ONLY_ONE_OF_P_Q_GIVEN: i32 = 134; +pub const RSA_R_OUTPUT_BUFFER_TOO_SMALL: i32 = 135; +pub const RSA_R_PADDING_CHECK_FAILED: i32 = 136; +pub const RSA_R_PKCS_DECODING_ERROR: i32 = 137; +pub const RSA_R_SLEN_CHECK_FAILED: i32 = 138; +pub const RSA_R_SLEN_RECOVERY_FAILED: i32 = 139; +pub const RSA_R_TOO_LONG: i32 = 140; +pub const RSA_R_TOO_MANY_ITERATIONS: i32 = 141; +pub const RSA_R_UNKNOWN_ALGORITHM_TYPE: i32 = 142; +pub const RSA_R_UNKNOWN_PADDING_TYPE: i32 = 143; +pub const RSA_R_VALUE_MISSING: i32 = 144; +pub const RSA_R_WRONG_SIGNATURE_LENGTH: i32 = 145; +pub const RSA_R_PUBLIC_KEY_VALIDATION_FAILED: i32 = 146; +pub const RSA_R_D_OUT_OF_RANGE: i32 = 147; +pub const RSA_R_BLOCK_TYPE_IS_NOT_02: i32 = 148; +pub const X509V3_R_BAD_IP_ADDRESS: i32 = 100; +pub const X509V3_R_BAD_OBJECT: i32 = 101; +pub const X509V3_R_BN_DEC2BN_ERROR: i32 = 102; +pub const X509V3_R_BN_TO_ASN1_INTEGER_ERROR: i32 = 103; +pub const X509V3_R_CANNOT_FIND_FREE_FUNCTION: i32 = 104; +pub const X509V3_R_DIRNAME_ERROR: i32 = 105; +pub const X509V3_R_DISTPOINT_ALREADY_SET: i32 = 106; +pub const X509V3_R_DUPLICATE_ZONE_ID: i32 = 107; +pub const X509V3_R_ERROR_CONVERTING_ZONE: i32 = 108; +pub const X509V3_R_ERROR_CREATING_EXTENSION: i32 = 109; +pub const X509V3_R_ERROR_IN_EXTENSION: i32 = 110; +pub const X509V3_R_EXPECTED_A_SECTION_NAME: i32 = 111; +pub const X509V3_R_EXTENSION_EXISTS: i32 = 112; +pub const X509V3_R_EXTENSION_NAME_ERROR: i32 = 113; +pub const X509V3_R_EXTENSION_NOT_FOUND: i32 = 114; +pub const X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED: i32 = 115; +pub const X509V3_R_EXTENSION_VALUE_ERROR: i32 = 116; +pub const X509V3_R_ILLEGAL_EMPTY_EXTENSION: i32 = 117; +pub const X509V3_R_ILLEGAL_HEX_DIGIT: i32 = 118; +pub const X509V3_R_INCORRECT_POLICY_SYNTAX_TAG: i32 = 119; +pub const X509V3_R_INVALID_BOOLEAN_STRING: i32 = 120; +pub const X509V3_R_INVALID_EXTENSION_STRING: i32 = 121; +pub const X509V3_R_INVALID_MULTIPLE_RDNS: i32 = 122; +pub const X509V3_R_INVALID_NAME: i32 = 123; +pub const X509V3_R_INVALID_NULL_ARGUMENT: i32 = 124; +pub const X509V3_R_INVALID_NULL_NAME: i32 = 125; +pub const X509V3_R_INVALID_NULL_VALUE: i32 = 126; +pub const X509V3_R_INVALID_NUMBER: i32 = 127; +pub const X509V3_R_INVALID_NUMBERS: i32 = 128; +pub const X509V3_R_INVALID_OBJECT_IDENTIFIER: i32 = 129; +pub const X509V3_R_INVALID_OPTION: i32 = 130; +pub const X509V3_R_INVALID_POLICY_IDENTIFIER: i32 = 131; +pub const X509V3_R_INVALID_PROXY_POLICY_SETTING: i32 = 132; +pub const X509V3_R_INVALID_PURPOSE: i32 = 133; +pub const X509V3_R_INVALID_SECTION: i32 = 134; +pub const X509V3_R_INVALID_SYNTAX: i32 = 135; +pub const X509V3_R_ISSUER_DECODE_ERROR: i32 = 136; +pub const X509V3_R_MISSING_VALUE: i32 = 137; +pub const X509V3_R_NEED_ORGANIZATION_AND_NUMBERS: i32 = 138; +pub const X509V3_R_NO_CONFIG_DATABASE: i32 = 139; +pub const X509V3_R_NO_ISSUER_CERTIFICATE: i32 = 140; +pub const X509V3_R_NO_ISSUER_DETAILS: i32 = 141; +pub const X509V3_R_NO_POLICY_IDENTIFIER: i32 = 142; +pub const X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED: i32 = 143; +pub const X509V3_R_NO_PUBLIC_KEY: i32 = 144; +pub const X509V3_R_NO_SUBJECT_DETAILS: i32 = 145; +pub const X509V3_R_ODD_NUMBER_OF_DIGITS: i32 = 146; +pub const X509V3_R_OPERATION_NOT_DEFINED: i32 = 147; +pub const X509V3_R_OTHERNAME_ERROR: i32 = 148; +pub const X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED: i32 = 149; +pub const X509V3_R_POLICY_PATH_LENGTH: i32 = 150; +pub const X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED: i32 = 151; +pub const X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY: i32 = 152; +pub const X509V3_R_SECTION_NOT_FOUND: i32 = 153; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS: i32 = 154; +pub const X509V3_R_UNABLE_TO_GET_ISSUER_KEYID: i32 = 155; +pub const X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT: i32 = 156; +pub const X509V3_R_UNKNOWN_EXTENSION: i32 = 157; +pub const X509V3_R_UNKNOWN_EXTENSION_NAME: i32 = 158; +pub const X509V3_R_UNKNOWN_OPTION: i32 = 159; +pub const X509V3_R_UNSUPPORTED_OPTION: i32 = 160; +pub const X509V3_R_UNSUPPORTED_TYPE: i32 = 161; +pub const X509V3_R_USER_TOO_LONG: i32 = 162; +pub const X509V3_R_INVALID_VALUE: i32 = 163; +pub const X509V3_R_TRAILING_DATA_IN_EXTENSION: i32 = 164; +pub const X509_VERSION_1: i32 = 0; +pub const X509_VERSION_2: i32 = 1; +pub const X509_VERSION_3: i32 = 2; +pub const EXFLAG_BCONS: i32 = 1; +pub const EXFLAG_KUSAGE: i32 = 2; +pub const EXFLAG_XKUSAGE: i32 = 4; +pub const EXFLAG_CA: i32 = 16; +pub const EXFLAG_SI: i32 = 32; +pub const EXFLAG_V1: i32 = 64; +pub const EXFLAG_INVALID: i32 = 128; +pub const EXFLAG_SET: i32 = 256; +pub const EXFLAG_CRITICAL: i32 = 512; +pub const EXFLAG_SS: i32 = 8192; +pub const X509v3_KU_DIGITAL_SIGNATURE: i32 = 128; +pub const X509v3_KU_NON_REPUDIATION: i32 = 64; +pub const X509v3_KU_KEY_ENCIPHERMENT: i32 = 32; +pub const X509v3_KU_DATA_ENCIPHERMENT: i32 = 16; +pub const X509v3_KU_KEY_AGREEMENT: i32 = 8; +pub const X509v3_KU_KEY_CERT_SIGN: i32 = 4; +pub const X509v3_KU_CRL_SIGN: i32 = 2; +pub const X509v3_KU_ENCIPHER_ONLY: i32 = 1; +pub const X509v3_KU_DECIPHER_ONLY: i32 = 32768; +pub const XKU_SSL_SERVER: i32 = 1; +pub const XKU_SSL_CLIENT: i32 = 2; +pub const XKU_SMIME: i32 = 4; +pub const XKU_CODE_SIGN: i32 = 8; +pub const XKU_SGC: i32 = 16; +pub const XKU_OCSP_SIGN: i32 = 32; +pub const XKU_TIMESTAMP: i32 = 64; +pub const XKU_DVCS: i32 = 128; +pub const XKU_ANYEKU: i32 = 256; +pub const X509_CRL_VERSION_1: i32 = 0; +pub const X509_CRL_VERSION_2: i32 = 1; +pub const X509_REQ_VERSION_1: i32 = 0; +pub const X509V3_ADD_OP_MASK: i32 = 15; +pub const X509V3_ADD_DEFAULT: i32 = 0; +pub const X509V3_ADD_APPEND: i32 = 1; +pub const X509V3_ADD_REPLACE: i32 = 2; +pub const X509V3_ADD_REPLACE_EXISTING: i32 = 3; +pub const X509V3_ADD_KEEP_EXISTING: i32 = 4; +pub const X509V3_ADD_DELETE: i32 = 5; +pub const X509V3_ADD_SILENT: i32 = 16; +pub const GEN_OTHERNAME: i32 = 0; +pub const GEN_EMAIL: i32 = 1; +pub const GEN_DNS: i32 = 2; +pub const GEN_X400: i32 = 3; +pub const GEN_DIRNAME: i32 = 4; +pub const GEN_EDIPARTY: i32 = 5; +pub const GEN_URI: i32 = 6; +pub const GEN_IPADD: i32 = 7; +pub const GEN_RID: i32 = 8; +pub const X509_LU_NONE: i32 = 0; +pub const X509_LU_X509: i32 = 1; +pub const X509_LU_CRL: i32 = 2; +pub const X509_LU_PKEY: i32 = 3; +pub const X509_V_OK: i32 = 0; +pub const X509_V_ERR_UNSPECIFIED: i32 = 1; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: i32 = 2; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: i32 = 3; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: i32 = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: i32 = 5; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: i32 = 6; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: i32 = 7; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: i32 = 8; +pub const X509_V_ERR_CERT_NOT_YET_VALID: i32 = 9; +pub const X509_V_ERR_CERT_HAS_EXPIRED: i32 = 10; +pub const X509_V_ERR_CRL_NOT_YET_VALID: i32 = 11; +pub const X509_V_ERR_CRL_HAS_EXPIRED: i32 = 12; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: i32 = 13; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: i32 = 14; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: i32 = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: i32 = 16; +pub const X509_V_ERR_OUT_OF_MEM: i32 = 17; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: i32 = 18; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: i32 = 19; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: i32 = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: i32 = 21; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: i32 = 22; +pub const X509_V_ERR_CERT_REVOKED: i32 = 23; +pub const X509_V_ERR_INVALID_CA: i32 = 24; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: i32 = 25; +pub const X509_V_ERR_INVALID_PURPOSE: i32 = 26; +pub const X509_V_ERR_CERT_UNTRUSTED: i32 = 27; +pub const X509_V_ERR_CERT_REJECTED: i32 = 28; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: i32 = 29; +pub const X509_V_ERR_AKID_SKID_MISMATCH: i32 = 30; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: i32 = 31; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: i32 = 32; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: i32 = 33; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: i32 = 34; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: i32 = 35; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: i32 = 36; +pub const X509_V_ERR_INVALID_NON_CA: i32 = 37; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: i32 = 38; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: i32 = 39; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: i32 = 40; +pub const X509_V_ERR_INVALID_EXTENSION: i32 = 41; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: i32 = 42; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: i32 = 43; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: i32 = 44; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: i32 = 45; +pub const X509_V_ERR_UNNESTED_RESOURCE: i32 = 46; +pub const X509_V_ERR_PERMITTED_VIOLATION: i32 = 47; +pub const X509_V_ERR_EXCLUDED_VIOLATION: i32 = 48; +pub const X509_V_ERR_SUBTREE_MINMAX: i32 = 49; +pub const X509_V_ERR_APPLICATION_VERIFICATION: i32 = 50; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: i32 = 51; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: i32 = 52; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: i32 = 53; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: i32 = 54; +pub const X509_V_ERR_HOSTNAME_MISMATCH: i32 = 62; +pub const X509_V_ERR_EMAIL_MISMATCH: i32 = 63; +pub const X509_V_ERR_IP_ADDRESS_MISMATCH: i32 = 64; +pub const X509_V_ERR_INVALID_CALL: i32 = 65; +pub const X509_V_ERR_STORE_LOOKUP: i32 = 66; +pub const X509_V_ERR_NAME_CONSTRAINTS_WITHOUT_SANS: i32 = 67; +pub const X509_V_FLAG_CB_ISSUER_CHECK: i32 = 1; +pub const X509_V_FLAG_USE_CHECK_TIME: i32 = 2; +pub const X509_V_FLAG_CRL_CHECK: i32 = 4; +pub const X509_V_FLAG_CRL_CHECK_ALL: i32 = 8; +pub const X509_V_FLAG_IGNORE_CRITICAL: i32 = 16; +pub const X509_V_FLAG_X509_STRICT: i32 = 0; +pub const X509_V_FLAG_ALLOW_PROXY_CERTS: i32 = 64; +pub const X509_V_FLAG_POLICY_CHECK: i32 = 128; +pub const X509_V_FLAG_EXPLICIT_POLICY: i32 = 256; +pub const X509_V_FLAG_INHIBIT_ANY: i32 = 512; +pub const X509_V_FLAG_INHIBIT_MAP: i32 = 1024; +pub const X509_V_FLAG_NOTIFY_POLICY: i32 = 2048; +pub const X509_V_FLAG_EXTENDED_CRL_SUPPORT: i32 = 4096; +pub const X509_V_FLAG_USE_DELTAS: i32 = 8192; +pub const X509_V_FLAG_CHECK_SS_SIGNATURE: i32 = 16384; +pub const X509_V_FLAG_TRUSTED_FIRST: i32 = 32768; +pub const X509_V_FLAG_PARTIAL_CHAIN: i32 = 524288; +pub const X509_V_FLAG_NO_ALT_CHAINS: i32 = 1048576; +pub const X509_V_FLAG_NO_CHECK_TIME: i32 = 2097152; +pub const X509_CHECK_FLAG_NO_WILDCARDS: i32 = 2; +pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: i32 = 32; +pub const X509_PURPOSE_SSL_CLIENT: i32 = 1; +pub const X509_PURPOSE_SSL_SERVER: i32 = 2; +pub const X509_PURPOSE_NS_SSL_SERVER: i32 = 3; +pub const X509_PURPOSE_SMIME_SIGN: i32 = 4; +pub const X509_PURPOSE_SMIME_ENCRYPT: i32 = 5; +pub const X509_PURPOSE_CRL_SIGN: i32 = 6; +pub const X509_PURPOSE_ANY: i32 = 7; +pub const X509_PURPOSE_OCSP_HELPER: i32 = 8; +pub const X509_PURPOSE_TIMESTAMP_SIGN: i32 = 9; +pub const X509_TRUST_COMPAT: i32 = 1; +pub const X509_TRUST_SSL_CLIENT: i32 = 2; +pub const X509_TRUST_SSL_SERVER: i32 = 3; +pub const X509_TRUST_EMAIL: i32 = 4; +pub const X509_TRUST_OBJECT_SIGN: i32 = 5; +pub const X509_TRUST_TSA: i32 = 8; +pub const X509_FILETYPE_PEM: i32 = 1; +pub const X509_FILETYPE_ASN1: i32 = 2; +pub const X509_FILETYPE_DEFAULT: i32 = 3; +pub const X509_L_FILE_LOAD: i32 = 1; +pub const X509_L_ADD_DIR: i32 = 2; +pub const X509_FLAG_COMPAT: i32 = 0; +pub const X509_FLAG_NO_HEADER: i32 = 1; +pub const X509_FLAG_NO_VERSION: i32 = 2; +pub const X509_FLAG_NO_SERIAL: i32 = 4; +pub const X509_FLAG_NO_SIGNAME: i32 = 8; +pub const X509_FLAG_NO_ISSUER: i32 = 16; +pub const X509_FLAG_NO_VALIDITY: i32 = 32; +pub const X509_FLAG_NO_SUBJECT: i32 = 64; +pub const X509_FLAG_NO_PUBKEY: i32 = 128; +pub const X509_FLAG_NO_EXTENSIONS: i32 = 256; +pub const X509_FLAG_NO_SIGDUMP: i32 = 512; +pub const X509_FLAG_NO_AUX: i32 = 1024; +pub const X509_FLAG_NO_ATTRIBUTES: i32 = 2048; +pub const X509_FLAG_NO_IDS: i32 = 4096; +pub const X509V3_EXT_UNKNOWN_MASK: i32 = 983040; +pub const X509V3_EXT_DEFAULT: i32 = 0; +pub const X509V3_EXT_ERROR_UNKNOWN: i32 = 65536; +pub const X509V3_EXT_PARSE_UNKNOWN: i32 = 131072; +pub const X509V3_EXT_DUMP_UNKNOWN: i32 = 196608; +pub const XN_FLAG_COMPAT: i32 = 0; +pub const XN_FLAG_SEP_MASK: i32 = 983040; +pub const XN_FLAG_SEP_COMMA_PLUS: i32 = 65536; +pub const XN_FLAG_SEP_CPLUS_SPC: i32 = 131072; +pub const XN_FLAG_SEP_SPLUS_SPC: i32 = 196608; +pub const XN_FLAG_SEP_MULTILINE: i32 = 262144; +pub const XN_FLAG_DN_REV: i32 = 1048576; +pub const XN_FLAG_FN_MASK: i32 = 6291456; +pub const XN_FLAG_FN_SN: i32 = 0; +pub const XN_FLAG_SPC_EQ: i32 = 8388608; +pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: i32 = 16777216; +pub const XN_FLAG_RFC2253: i32 = 17892119; +pub const XN_FLAG_ONELINE: i32 = 8520479; +pub const X509_TRUST_TRUSTED: i32 = 1; +pub const X509_TRUST_REJECTED: i32 = 2; +pub const X509_TRUST_UNTRUSTED: i32 = 3; +pub const X509V3_EXT_MULTILINE: i32 = 4; +pub const X509V3_CTX_TEST: i32 = 1; +pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: i32 = 0; +pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: i32 = 0; +pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: i32 = 0; +pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: i32 = 0; +pub const NS_SSL_CLIENT: i32 = 128; +pub const NS_SSL_SERVER: i32 = 64; +pub const NS_SMIME: i32 = 32; +pub const NS_OBJSIGN: i32 = 16; +pub const NS_SSL_CA: i32 = 4; +pub const NS_SMIME_CA: i32 = 2; +pub const NS_OBJSIGN_CA: i32 = 1; +pub const NS_ANY_CA: i32 = 7; +pub const X509_R_AKID_MISMATCH: i32 = 100; +pub const X509_R_BAD_PKCS7_VERSION: i32 = 101; +pub const X509_R_BAD_X509_FILETYPE: i32 = 102; +pub const X509_R_BASE64_DECODE_ERROR: i32 = 103; +pub const X509_R_CANT_CHECK_DH_KEY: i32 = 104; +pub const X509_R_CERT_ALREADY_IN_HASH_TABLE: i32 = 105; +pub const X509_R_CRL_ALREADY_DELTA: i32 = 106; +pub const X509_R_CRL_VERIFY_FAILURE: i32 = 107; +pub const X509_R_IDP_MISMATCH: i32 = 108; +pub const X509_R_INVALID_BIT_STRING_BITS_LEFT: i32 = 109; +pub const X509_R_INVALID_DIRECTORY: i32 = 110; +pub const X509_R_INVALID_FIELD_NAME: i32 = 111; +pub const X509_R_INVALID_PSS_PARAMETERS: i32 = 112; +pub const X509_R_INVALID_TRUST: i32 = 113; +pub const X509_R_ISSUER_MISMATCH: i32 = 114; +pub const X509_R_KEY_TYPE_MISMATCH: i32 = 115; +pub const X509_R_KEY_VALUES_MISMATCH: i32 = 116; +pub const X509_R_LOADING_CERT_DIR: i32 = 117; +pub const X509_R_LOADING_DEFAULTS: i32 = 118; +pub const X509_R_NEWER_CRL_NOT_NEWER: i32 = 119; +pub const X509_R_NOT_PKCS7_SIGNED_DATA: i32 = 120; +pub const X509_R_NO_CERTIFICATES_INCLUDED: i32 = 121; +pub const X509_R_NO_CERT_SET_FOR_US_TO_VERIFY: i32 = 122; +pub const X509_R_NO_CRLS_INCLUDED: i32 = 123; +pub const X509_R_NO_CRL_NUMBER: i32 = 124; +pub const X509_R_PUBLIC_KEY_DECODE_ERROR: i32 = 125; +pub const X509_R_PUBLIC_KEY_ENCODE_ERROR: i32 = 126; +pub const X509_R_SHOULD_RETRY: i32 = 127; +pub const X509_R_UNKNOWN_KEY_TYPE: i32 = 128; +pub const X509_R_UNKNOWN_NID: i32 = 129; +pub const X509_R_UNKNOWN_PURPOSE_ID: i32 = 130; +pub const X509_R_UNKNOWN_TRUST_ID: i32 = 131; +pub const X509_R_UNSUPPORTED_ALGORITHM: i32 = 132; +pub const X509_R_WRONG_LOOKUP_TYPE: i32 = 133; +pub const X509_R_WRONG_TYPE: i32 = 134; +pub const X509_R_NAME_TOO_LONG: i32 = 135; +pub const X509_R_INVALID_PARAMETER: i32 = 136; +pub const X509_R_SIGNATURE_ALGORITHM_MISMATCH: i32 = 137; +pub const X509_R_DELTA_CRL_WITHOUT_CRL_NUMBER: i32 = 138; +pub const X509_R_INVALID_FIELD_FOR_VERSION: i32 = 139; +pub const X509_R_INVALID_VERSION: i32 = 140; +pub const X509_R_NO_CERTIFICATE_FOUND: i32 = 141; +pub const X509_R_NO_CERTIFICATE_OR_CRL_FOUND: i32 = 142; +pub const X509_R_NO_CRL_FOUND: i32 = 143; +pub const X509_R_INVALID_POLICY_EXTENSION: i32 = 144; +pub const PEM_BUFSIZE: i32 = 1024; +pub const PEM_STRING_X509_OLD: &[u8; 17] = b"X509 CERTIFICATE\0"; +pub const PEM_STRING_X509: &[u8; 12] = b"CERTIFICATE\0"; +pub const PEM_STRING_X509_PAIR: &[u8; 17] = b"CERTIFICATE PAIR\0"; +pub const PEM_STRING_X509_TRUSTED: &[u8; 20] = b"TRUSTED CERTIFICATE\0"; +pub const PEM_STRING_X509_REQ_OLD: &[u8; 24] = b"NEW CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_REQ: &[u8; 20] = b"CERTIFICATE REQUEST\0"; +pub const PEM_STRING_X509_CRL: &[u8; 9] = b"X509 CRL\0"; +pub const PEM_STRING_PUBLIC: &[u8; 11] = b"PUBLIC KEY\0"; +pub const PEM_STRING_RSA: &[u8; 16] = b"RSA PRIVATE KEY\0"; +pub const PEM_STRING_RSA_PUBLIC: &[u8; 15] = b"RSA PUBLIC KEY\0"; +pub const PEM_STRING_DSA: &[u8; 16] = b"DSA PRIVATE KEY\0"; +pub const PEM_STRING_DSA_PUBLIC: &[u8; 15] = b"DSA PUBLIC KEY\0"; +pub const PEM_STRING_EC: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_PKCS7: &[u8; 6] = b"PKCS7\0"; +pub const PEM_STRING_PKCS7_SIGNED: &[u8; 20] = b"PKCS #7 SIGNED DATA\0"; +pub const PEM_STRING_PKCS8: &[u8; 22] = b"ENCRYPTED PRIVATE KEY\0"; +pub const PEM_STRING_PKCS8INF: &[u8; 12] = b"PRIVATE KEY\0"; +pub const PEM_STRING_DHPARAMS: &[u8; 14] = b"DH PARAMETERS\0"; +pub const PEM_STRING_SSL_SESSION: &[u8; 23] = b"SSL SESSION PARAMETERS\0"; +pub const PEM_STRING_DSAPARAMS: &[u8; 15] = b"DSA PARAMETERS\0"; +pub const PEM_STRING_ECDSA_PUBLIC: &[u8; 17] = b"ECDSA PUBLIC KEY\0"; +pub const PEM_STRING_ECPRIVATEKEY: &[u8; 15] = b"EC PRIVATE KEY\0"; +pub const PEM_STRING_CMS: &[u8; 4] = b"CMS\0"; +pub const PEM_STRING_EVP_PKEY: &[u8; 16] = b"ANY PRIVATE KEY\0"; +pub const PEM_R_BAD_BASE64_DECODE: i32 = 100; +pub const PEM_R_BAD_DECRYPT: i32 = 101; +pub const PEM_R_BAD_END_LINE: i32 = 102; +pub const PEM_R_BAD_IV_CHARS: i32 = 103; +pub const PEM_R_BAD_PASSWORD_READ: i32 = 104; +pub const PEM_R_CIPHER_IS_NULL: i32 = 105; +pub const PEM_R_ERROR_CONVERTING_PRIVATE_KEY: i32 = 106; +pub const PEM_R_NOT_DEK_INFO: i32 = 107; +pub const PEM_R_NOT_ENCRYPTED: i32 = 108; +pub const PEM_R_NOT_PROC_TYPE: i32 = 109; +pub const PEM_R_NO_START_LINE: i32 = 110; +pub const PEM_R_READ_KEY: i32 = 111; +pub const PEM_R_SHORT_HEADER: i32 = 112; +pub const PEM_R_UNSUPPORTED_CIPHER: i32 = 113; +pub const PEM_R_UNSUPPORTED_ENCRYPTION: i32 = 114; +pub const PEM_R_UNSUPPORTED_PROC_TYPE_VERSION: i32 = 115; +pub const PEM_R_NO_DATA: i32 = 116; +pub const PKCS12_DEFAULT_ITER: i32 = 2048; +pub const PKCS8_R_BAD_PKCS12_DATA: i32 = 100; +pub const PKCS8_R_BAD_PKCS12_VERSION: i32 = 101; +pub const PKCS8_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER: i32 = 102; +pub const PKCS8_R_CRYPT_ERROR: i32 = 103; +pub const PKCS8_R_DECODE_ERROR: i32 = 104; +pub const PKCS8_R_ENCODE_ERROR: i32 = 105; +pub const PKCS8_R_ENCRYPT_ERROR: i32 = 106; +pub const PKCS8_R_ERROR_SETTING_CIPHER_PARAMS: i32 = 107; +pub const PKCS8_R_INCORRECT_PASSWORD: i32 = 108; +pub const PKCS8_R_KEYGEN_FAILURE: i32 = 109; +pub const PKCS8_R_KEY_GEN_ERROR: i32 = 110; +pub const PKCS8_R_METHOD_NOT_SUPPORTED: i32 = 111; +pub const PKCS8_R_MISSING_MAC: i32 = 112; +pub const PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12: i32 = 113; +pub const PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED: i32 = 114; +pub const PKCS8_R_PKCS12_TOO_DEEPLY_NESTED: i32 = 115; +pub const PKCS8_R_PRIVATE_KEY_DECODE_ERROR: i32 = 116; +pub const PKCS8_R_PRIVATE_KEY_ENCODE_ERROR: i32 = 117; +pub const PKCS8_R_TOO_LONG: i32 = 118; +pub const PKCS8_R_UNKNOWN_ALGORITHM: i32 = 119; +pub const PKCS8_R_UNKNOWN_CIPHER: i32 = 120; +pub const PKCS8_R_UNKNOWN_CIPHER_ALGORITHM: i32 = 121; +pub const PKCS8_R_UNKNOWN_DIGEST: i32 = 122; +pub const PKCS8_R_UNKNOWN_HASH: i32 = 123; +pub const PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM: i32 = 124; +pub const PKCS8_R_UNSUPPORTED_KEYLENGTH: i32 = 125; +pub const PKCS8_R_UNSUPPORTED_SALT_TYPE: i32 = 126; +pub const PKCS8_R_UNSUPPORTED_CIPHER: i32 = 127; +pub const PKCS8_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION: i32 = 128; +pub const PKCS8_R_BAD_ITERATION_COUNT: i32 = 129; +pub const PKCS8_R_UNSUPPORTED_PRF: i32 = 130; +pub const PKCS8_R_INVALID_CHARACTERS: i32 = 131; +pub const PKCS8_R_UNSUPPORTED_OPTIONS: i32 = 132; +pub const PKCS8_R_AMBIGUOUS_FRIENDLY_NAME: i32 = 133; +pub const RIPEMD160_CBLOCK: i32 = 64; +pub const RIPEMD160_LBLOCK: i32 = 16; +pub const RIPEMD160_DIGEST_LENGTH: i32 = 20; +pub const SLHDSA_SHA2_128S_PUBLIC_KEY_BYTES: i32 = 32; +pub const SLHDSA_SHA2_128S_PRIVATE_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHA2_128S_SIGNATURE_BYTES: i32 = 7856; +pub const SLHDSA_SHAKE_256F_PUBLIC_KEY_BYTES: i32 = 64; +pub const SLHDSA_SHAKE_256F_PRIVATE_KEY_BYTES: i32 = 128; +pub const SLHDSA_SHAKE_256F_SIGNATURE_BYTES: i32 = 49856; +pub const SSL2_MT_CLIENT_HELLO: i32 = 1; +pub const SSL2_VERSION: i32 = 2; +pub const SSL3_CK_RSA_DES_192_CBC3_SHA: i32 = 50331658; +pub const SSL3_CK_SCSV: i32 = 50331903; +pub const SSL3_CK_FALLBACK_SCSV: i32 = 50353664; +pub const SSL3_TXT_RSA_DES_192_CBC3_SHA: &[u8; 13] = b"DES-CBC3-SHA\0"; +pub const SSL3_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL3_MASTER_SECRET_SIZE: i32 = 48; +pub const SSL3_RANDOM_SIZE: i32 = 32; +pub const SSL3_SESSION_ID_SIZE: i32 = 32; +pub const SSL3_RT_HEADER_LENGTH: i32 = 5; +pub const SSL3_HM_HEADER_LENGTH: i32 = 4; +pub const SSL3_ALIGN_PAYLOAD: i32 = 8; +pub const SSL3_RT_MAX_MD_SIZE: i32 = 64; +pub const SSL_RT_MAX_CIPHER_BLOCK_SIZE: i32 = 16; +pub const SSL3_RT_MAX_PLAIN_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_COMPRESSED_OVERHEAD: i32 = 1024; +pub const SSL3_RT_MAX_ENCRYPTED_OVERHEAD: i32 = 320; +pub const SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD: i32 = 88; +pub const SSL3_RT_MAX_COMPRESSED_LENGTH: i32 = 16384; +pub const SSL3_RT_MAX_ENCRYPTED_LENGTH: i32 = 16704; +pub const SSL3_RT_MAX_PACKET_SIZE: i32 = 16709; +pub const SSL3_RT_CHANGE_CIPHER_SPEC: i32 = 20; +pub const SSL3_RT_ALERT: i32 = 21; +pub const SSL3_RT_HANDSHAKE: i32 = 22; +pub const SSL3_RT_APPLICATION_DATA: i32 = 23; +pub const SSL3_RT_ACK: i32 = 26; +pub const SSL3_RT_HEADER: i32 = 256; +pub const SSL3_RT_CLIENT_HELLO_INNER: i32 = 257; +pub const SSL3_AL_WARNING: i32 = 1; +pub const SSL3_AL_FATAL: i32 = 2; +pub const SSL3_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL3_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL3_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL3_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL3_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL3_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL3_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL3_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL3_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL3_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL3_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL3_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL3_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL3_CT_RSA_SIGN: i32 = 1; +pub const SSL3_MT_HELLO_REQUEST: i32 = 0; +pub const SSL3_MT_CLIENT_HELLO: i32 = 1; +pub const SSL3_MT_SERVER_HELLO: i32 = 2; +pub const SSL3_MT_NEW_SESSION_TICKET: i32 = 4; +pub const SSL3_MT_END_OF_EARLY_DATA: i32 = 5; +pub const SSL3_MT_ENCRYPTED_EXTENSIONS: i32 = 8; +pub const SSL3_MT_CERTIFICATE: i32 = 11; +pub const SSL3_MT_SERVER_KEY_EXCHANGE: i32 = 12; +pub const SSL3_MT_CERTIFICATE_REQUEST: i32 = 13; +pub const SSL3_MT_SERVER_HELLO_DONE: i32 = 14; +pub const SSL3_MT_CERTIFICATE_VERIFY: i32 = 15; +pub const SSL3_MT_CLIENT_KEY_EXCHANGE: i32 = 16; +pub const SSL3_MT_FINISHED: i32 = 20; +pub const SSL3_MT_CERTIFICATE_STATUS: i32 = 22; +pub const SSL3_MT_SUPPLEMENTAL_DATA: i32 = 23; +pub const SSL3_MT_KEY_UPDATE: i32 = 24; +pub const SSL3_MT_COMPRESSED_CERTIFICATE: i32 = 25; +pub const SSL3_MT_NEXT_PROTO: i32 = 67; +pub const SSL3_MT_CHANNEL_ID: i32 = 203; +pub const SSL3_MT_MESSAGE_HASH: i32 = 254; +pub const DTLS1_MT_HELLO_VERIFY_REQUEST: i32 = 3; +pub const SSL3_MT_SERVER_DONE: i32 = 14; +pub const SSL3_MT_NEWSESSION_TICKET: i32 = 4; +pub const SSL3_MT_CCS: i32 = 1; +pub const TLS1_AD_END_OF_EARLY_DATA: i32 = 1; +pub const TLS1_AD_DECRYPTION_FAILED: i32 = 21; +pub const TLS1_AD_RECORD_OVERFLOW: i32 = 22; +pub const TLS1_AD_UNKNOWN_CA: i32 = 48; +pub const TLS1_AD_ACCESS_DENIED: i32 = 49; +pub const TLS1_AD_DECODE_ERROR: i32 = 50; +pub const TLS1_AD_DECRYPT_ERROR: i32 = 51; +pub const TLS1_AD_EXPORT_RESTRICTION: i32 = 60; +pub const TLS1_AD_PROTOCOL_VERSION: i32 = 70; +pub const TLS1_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const TLS1_AD_INTERNAL_ERROR: i32 = 80; +pub const TLS1_AD_USER_CANCELLED: i32 = 90; +pub const TLS1_AD_NO_RENEGOTIATION: i32 = 100; +pub const TLS1_AD_MISSING_EXTENSION: i32 = 109; +pub const TLS1_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const TLS1_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const TLS1_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const TLS1_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const TLS1_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const TLS1_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const TLS1_AD_ECH_REQUIRED: i32 = 121; +pub const TLSEXT_TYPE_server_name: i32 = 0; +pub const TLSEXT_TYPE_status_request: i32 = 5; +pub const TLSEXT_TYPE_ec_point_formats: i32 = 11; +pub const TLSEXT_TYPE_signature_algorithms: i32 = 13; +pub const TLSEXT_TYPE_srtp: i32 = 14; +pub const TLSEXT_TYPE_application_layer_protocol_negotiation: i32 = 16; +pub const TLSEXT_TYPE_client_cert_type: i32 = 19; +pub const TLSEXT_TYPE_server_cert_type: i32 = 20; +pub const TLSEXT_TYPE_padding: i32 = 21; +pub const TLSEXT_TYPE_extended_master_secret: i32 = 23; +pub const TLSEXT_TYPE_quic_transport_parameters_legacy: i32 = 65445; +pub const TLSEXT_TYPE_quic_transport_parameters: i32 = 57; +pub const TLSEXT_TYPE_quic_transport_parameters_standard: i32 = 57; +pub const TLSEXT_TYPE_cert_compression: i32 = 27; +pub const TLSEXT_TYPE_session_ticket: i32 = 35; +pub const TLSEXT_TYPE_supported_groups: i32 = 10; +pub const TLSEXT_TYPE_pre_shared_key: i32 = 41; +pub const TLSEXT_TYPE_early_data: i32 = 42; +pub const TLSEXT_TYPE_supported_versions: i32 = 43; +pub const TLSEXT_TYPE_cookie: i32 = 44; +pub const TLSEXT_TYPE_psk_key_exchange_modes: i32 = 45; +pub const TLSEXT_TYPE_certificate_authorities: i32 = 47; +pub const TLSEXT_TYPE_signature_algorithms_cert: i32 = 50; +pub const TLSEXT_TYPE_key_share: i32 = 51; +pub const TLSEXT_TYPE_renegotiate: i32 = 65281; +pub const TLSEXT_TYPE_delegated_credential: i32 = 34; +pub const TLSEXT_TYPE_application_settings_old: i32 = 17513; +pub const TLSEXT_TYPE_application_settings: i32 = 17613; +pub const TLSEXT_TYPE_encrypted_client_hello: i32 = 65037; +pub const TLSEXT_TYPE_ech_outer_extensions: i32 = 64768; +pub const TLSEXT_TYPE_pake: i32 = 35387; +pub const TLSEXT_TYPE_certificate_timestamp: i32 = 18; +pub const TLSEXT_TYPE_next_proto_neg: i32 = 13172; +pub const TLSEXT_TYPE_channel_id: i32 = 30032; +pub const TLSEXT_TYPE_trust_anchors: i32 = 51764; +pub const TLSEXT_TYPE_server_padding: i32 = 4832; +pub const TLSEXT_TYPE_tls_flags: i32 = 62; +pub const TLSEXT_STATUSTYPE_nothing: i32 = -1; +pub const TLSEXT_STATUSTYPE_ocsp: i32 = 1; +pub const TLSEXT_ECPOINTFORMAT_uncompressed: i32 = 0; +pub const TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime: i32 = 1; +pub const TLSEXT_signature_anonymous: i32 = 0; +pub const TLSEXT_signature_rsa: i32 = 1; +pub const TLSEXT_signature_dsa: i32 = 2; +pub const TLSEXT_signature_ecdsa: i32 = 3; +pub const TLSEXT_hash_none: i32 = 0; +pub const TLSEXT_hash_md5: i32 = 1; +pub const TLSEXT_hash_sha1: i32 = 2; +pub const TLSEXT_hash_sha224: i32 = 3; +pub const TLSEXT_hash_sha256: i32 = 4; +pub const TLSEXT_hash_sha384: i32 = 5; +pub const TLSEXT_hash_sha512: i32 = 6; +pub const TLSEXT_cert_compression_zlib: i32 = 1; +pub const TLSEXT_cert_compression_brotli: i32 = 2; +pub const TLSEXT_MAXLEN_host_name: i32 = 255; +pub const TLS1_CK_PSK_WITH_AES_128_CBC_SHA: i32 = 50331788; +pub const TLS1_CK_PSK_WITH_AES_256_CBC_SHA: i32 = 50331789; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 50380853; +pub const TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 50380854; +pub const TLS1_CK_RSA_WITH_AES_128_SHA: i32 = 50331695; +pub const TLS1_CK_RSA_WITH_AES_256_SHA: i32 = 50331701; +pub const TLS1_CK_RSA_WITH_AES_128_GCM_SHA256: i32 = 50331804; +pub const TLS1_CK_RSA_WITH_AES_256_GCM_SHA384: i32 = 50331805; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 50380809; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 50380810; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 50380819; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 50380820; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 50380835; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 50380839; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 50380843; +pub const TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 50380844; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 50380847; +pub const TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 50380848; +pub const TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384040; +pub const TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384041; +pub const TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 50384044; +pub const TLS1_3_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_3_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_3_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_CK_AES_128_GCM_SHA256: i32 = 50336513; +pub const TLS1_CK_AES_256_GCM_SHA384: i32 = 50336514; +pub const TLS1_CK_CHACHA20_POLY1305_SHA256: i32 = 50336515; +pub const TLS1_TXT_PSK_WITH_AES_128_CBC_SHA: &[u8; 19] = b"PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_PSK_WITH_AES_256_CBC_SHA: &[u8; 19] = b"PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES128-CBC-SHA\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA: &[u8; 25] = b"ECDHE-PSK-AES256-CBC-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_SHA: &[u8; 11] = b"AES128-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_SHA: &[u8; 11] = b"AES256-SHA\0"; +pub const TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256: &[u8; 18] = b"AES128-GCM-SHA256\0"; +pub const TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384: &[u8; 18] = b"AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: &[u8; 23] = b"ECDHE-ECDSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES128-SHA\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA: &[u8; 21] = b"ECDHE-RSA-AES256-SHA\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: &[u8; 26] = b"ECDHE-ECDSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA256: &[u8; 24] = b"ECDHE-RSA-AES128-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: &[u8; 30] = + b"ECDHE-ECDSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256: &[u8; 28] = b"ECDHE-RSA-AES128-GCM-SHA256\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384: &[u8; 28] = b"ECDHE-RSA-AES256-GCM-SHA384\0"; +pub const TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-RSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: &[u8; 30] = + b"ECDHE-ECDSA-CHACHA20-POLY1305\0"; +pub const TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: &[u8; 28] = + b"ECDHE-PSK-CHACHA20-POLY1305\0"; +pub const TLS1_3_RFC_AES_128_GCM_SHA256: &[u8; 23] = b"TLS_AES_128_GCM_SHA256\0"; +pub const TLS1_3_RFC_AES_256_GCM_SHA384: &[u8; 23] = b"TLS_AES_256_GCM_SHA384\0"; +pub const TLS1_3_RFC_CHACHA20_POLY1305_SHA256: &[u8; 29] = b"TLS_CHACHA20_POLY1305_SHA256\0"; +pub const TLS_CT_RSA_SIGN: i32 = 1; +pub const TLS_CT_DSS_SIGN: i32 = 2; +pub const TLS_CT_RSA_FIXED_DH: i32 = 3; +pub const TLS_CT_DSS_FIXED_DH: i32 = 4; +pub const TLS_CT_ECDSA_SIGN: i32 = 64; +pub const TLS_CT_RSA_FIXED_ECDH: i32 = 65; +pub const TLS_CT_ECDSA_FIXED_ECDH: i32 = 66; +pub const SSL_KEY_UPDATE_REQUESTED: i32 = 1; +pub const SSL_KEY_UPDATE_NOT_REQUESTED: i32 = 0; +pub const SSL_ERROR_NONE: i32 = 0; +pub const SSL_ERROR_SSL: i32 = 1; +pub const SSL_ERROR_WANT_READ: i32 = 2; +pub const SSL_ERROR_WANT_WRITE: i32 = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: i32 = 4; +pub const SSL_ERROR_SYSCALL: i32 = 5; +pub const SSL_ERROR_ZERO_RETURN: i32 = 6; +pub const SSL_ERROR_WANT_CONNECT: i32 = 7; +pub const SSL_ERROR_WANT_ACCEPT: i32 = 8; +pub const SSL_ERROR_WANT_CHANNEL_ID_LOOKUP: i32 = 9; +pub const SSL_ERROR_PENDING_SESSION: i32 = 11; +pub const SSL_ERROR_PENDING_CERTIFICATE: i32 = 12; +pub const SSL_ERROR_WANT_PRIVATE_KEY_OPERATION: i32 = 13; +pub const SSL_ERROR_PENDING_TICKET: i32 = 14; +pub const SSL_ERROR_EARLY_DATA_REJECTED: i32 = 15; +pub const SSL_ERROR_WANT_CERTIFICATE_VERIFY: i32 = 16; +pub const SSL_ERROR_HANDOFF: i32 = 17; +pub const SSL_ERROR_HANDBACK: i32 = 18; +pub const SSL_ERROR_WANT_RENEGOTIATE: i32 = 19; +pub const SSL_ERROR_HANDSHAKE_HINTS_READY: i32 = 20; +pub const DTLS1_VERSION_MAJOR: i32 = 254; +pub const SSL3_VERSION_MAJOR: i32 = 3; +pub const SSL3_VERSION: i32 = 768; +pub const TLS1_VERSION: i32 = 769; +pub const TLS1_1_VERSION: i32 = 770; +pub const TLS1_2_VERSION: i32 = 771; +pub const TLS1_3_VERSION: i32 = 772; +pub const DTLS1_VERSION: i32 = 65279; +pub const DTLS1_2_VERSION: i32 = 65277; +pub const DTLS1_3_VERSION: i32 = 65276; +pub const SSL_OP_LEGACY_SERVER_CONNECT: i32 = 4; +pub const SSL_OP_NO_QUERY_MTU: i32 = 4096; +pub const SSL_OP_NO_TICKET: i32 = 16384; +pub const SSL_OP_CIPHER_SERVER_PREFERENCE: i32 = 4194304; +pub const SSL_OP_ALL: i32 = 4; +pub const SSL_OP_NO_TLSv1: i32 = 67108864; +pub const SSL_OP_NO_TLSv1_2: i32 = 134217728; +pub const SSL_OP_NO_TLSv1_1: i32 = 268435456; +pub const SSL_OP_NO_TLSv1_3: i32 = 536870912; +pub const SSL_OP_NO_DTLSv1: i32 = 67108864; +pub const SSL_OP_NO_DTLSv1_2: i32 = 134217728; +pub const SSL_MODE_ENABLE_PARTIAL_WRITE: i32 = 1; +pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: i32 = 2; +pub const SSL_MODE_NO_AUTO_CHAIN: i32 = 8; +pub const SSL_MODE_ENABLE_FALSE_START: i32 = 128; +pub const SSL_MODE_CBC_RECORD_SPLITTING: i32 = 256; +pub const SSL_MODE_NO_SESSION_CREATION: i32 = 512; +pub const SSL_MODE_SEND_FALLBACK_SCSV: i32 = 1024; +pub const SSL_SIGN_RSA_PKCS1_SHA1: i32 = 513; +pub const SSL_SIGN_RSA_PKCS1_SHA256: i32 = 1025; +pub const SSL_SIGN_RSA_PKCS1_SHA384: i32 = 1281; +pub const SSL_SIGN_RSA_PKCS1_SHA512: i32 = 1537; +pub const SSL_SIGN_ECDSA_SHA1: i32 = 515; +pub const SSL_SIGN_ECDSA_SECP256R1_SHA256: i32 = 1027; +pub const SSL_SIGN_ECDSA_SECP384R1_SHA384: i32 = 1283; +pub const SSL_SIGN_ECDSA_SECP521R1_SHA512: i32 = 1539; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_RSAE_SHA512: i32 = 2054; +pub const SSL_SIGN_ED25519: i32 = 2055; +pub const SSL_SIGN_ML_DSA_44: i32 = 2308; +pub const SSL_SIGN_ML_DSA_65: i32 = 2309; +pub const SSL_SIGN_ML_DSA_87: i32 = 2310; +pub const SSL_SIGN_RSA_PKCS1_SHA256_LEGACY: i32 = 1056; +pub const SSL_SIGN_RSA_PKCS1_MD5_SHA1: i32 = 65281; +pub const SSL_FILETYPE_PEM: i32 = 1; +pub const SSL_FILETYPE_ASN1: i32 = 2; +pub const SSL_CIPHER_AES_128_GCM_SHA256: i32 = 4865; +pub const SSL_CIPHER_AES_256_GCM_SHA384: i32 = 4866; +pub const SSL_CIPHER_CHACHA20_POLY1305_SHA256: i32 = 4867; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: i32 = 49195; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: i32 = 49196; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_GCM_SHA256: i32 = 49199; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_GCM_SHA384: i32 = 49200; +pub const SSL_CIPHER_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52392; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: i32 = 52393; +pub const SSL_CIPHER_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: i32 = 52396; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: i32 = 49161; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: i32 = 49162; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA: i32 = 49171; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_256_CBC_SHA: i32 = 49172; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_128_CBC_SHA: i32 = 49205; +pub const SSL_CIPHER_ECDHE_PSK_WITH_AES_256_CBC_SHA: i32 = 49206; +pub const SSL_CIPHER_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: i32 = 49187; +pub const SSL_CIPHER_ECDHE_RSA_WITH_AES_128_CBC_SHA256: i32 = 49191; +pub const SSL_CIPHER_RSA_WITH_AES_128_GCM_SHA256: i32 = 156; +pub const SSL_CIPHER_RSA_WITH_AES_256_GCM_SHA384: i32 = 157; +pub const SSL_CIPHER_RSA_WITH_AES_128_CBC_SHA: i32 = 47; +pub const SSL_CIPHER_RSA_WITH_AES_256_CBC_SHA: i32 = 53; +pub const SSL_CIPHER_PSK_WITH_AES_128_CBC_SHA: i32 = 140; +pub const SSL_CIPHER_PSK_WITH_AES_256_CBC_SHA: i32 = 141; +pub const SSL_CIPHER_RSA_WITH_3DES_EDE_CBC_SHA: i32 = 10; +pub const SSL_CIPHER_EMPTY_RENEGOTIATION_INFO_SCSV: i32 = 255; +pub const SSL_CIPHER_FALLBACK_SCSV: i32 = 22016; +pub const SSL_DEFAULT_CIPHER_LIST: &[u8; 4] = b"ALL\0"; +pub const SSL_MAX_SSL_SESSION_ID_LENGTH: i32 = 32; +pub const SSL_MAX_MASTER_KEY_LENGTH: i32 = 48; +pub const SSL_SESS_CACHE_OFF: i32 = 0; +pub const SSL_SESS_CACHE_CLIENT: i32 = 1; +pub const SSL_SESS_CACHE_SERVER: i32 = 2; +pub const SSL_SESS_CACHE_BOTH: i32 = 3; +pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: i32 = 128; +pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: i32 = 256; +pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: i32 = 512; +pub const SSL_SESS_CACHE_NO_INTERNAL: i32 = 768; +pub const SSL_DEFAULT_SESSION_TIMEOUT: i32 = 7200; +pub const SSL_DEFAULT_SESSION_PSK_DHE_TIMEOUT: i32 = 172800; +pub const SSL_DEFAULT_SESSION_AUTH_TIMEOUT: i32 = 604800; +pub const SSL_MAX_SID_CTX_LENGTH: i32 = 32; +pub const SSL_SESSION_CACHE_MAX_SIZE_DEFAULT: i32 = 20480; +pub const SSL_DEFAULT_TICKET_KEY_ROTATION_INTERVAL: i32 = 172800; +pub const SSL_TICKET_KEY_NAME_LEN: i32 = 16; +pub const SSL_GROUP_SECP256R1: i32 = 23; +pub const SSL_GROUP_SECP384R1: i32 = 24; +pub const SSL_GROUP_SECP521R1: i32 = 25; +pub const SSL_GROUP_X25519: i32 = 29; +pub const SSL_GROUP_X25519_MLKEM768: i32 = 4588; +pub const SSL_GROUP_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const SSL_GROUP_MLKEM1024: i32 = 514; +pub const SSL_GROUP_FLAG_EQUAL_PREFERENCE_WITH_NEXT: i32 = 1; +pub const SSL_VERIFY_NONE: i32 = 0; +pub const SSL_VERIFY_PEER: i32 = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: i32 = 2; +pub const TLSEXT_NAMETYPE_host_name: i32 = 0; +pub const SSL_TLSEXT_ERR_OK: i32 = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: i32 = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: i32 = 2; +pub const SSL_TLSEXT_ERR_NOACK: i32 = 3; +pub const OPENSSL_NPN_UNSUPPORTED: i32 = 0; +pub const OPENSSL_NPN_NEGOTIATED: i32 = 1; +pub const OPENSSL_NPN_NO_OVERLAP: i32 = 2; +pub const SRTP_AES128_CM_SHA1_80: i32 = 1; +pub const SRTP_AES128_CM_SHA1_32: i32 = 2; +pub const SRTP_AES128_F8_SHA1_80: i32 = 3; +pub const SRTP_AES128_F8_SHA1_32: i32 = 4; +pub const SRTP_NULL_SHA1_80: i32 = 5; +pub const SRTP_NULL_SHA1_32: i32 = 6; +pub const SRTP_AEAD_AES_128_GCM: i32 = 7; +pub const SRTP_AEAD_AES_256_GCM: i32 = 8; +pub const PSK_MAX_IDENTITY_LEN: i32 = 128; +pub const PSK_MAX_PSK_LEN: i32 = 256; +pub const TLSEXT_cert_type_x509: i32 = 0; +pub const TLSEXT_cert_type_rpk: i32 = 2; +pub const SSL_PAKE_SPAKE2PLUSV1: i32 = 32150; +pub const SSL_AD_REASON_OFFSET: i32 = 1000; +pub const SSL_AD_CLOSE_NOTIFY: i32 = 0; +pub const SSL_AD_UNEXPECTED_MESSAGE: i32 = 10; +pub const SSL_AD_BAD_RECORD_MAC: i32 = 20; +pub const SSL_AD_DECRYPTION_FAILED: i32 = 21; +pub const SSL_AD_RECORD_OVERFLOW: i32 = 22; +pub const SSL_AD_DECOMPRESSION_FAILURE: i32 = 30; +pub const SSL_AD_HANDSHAKE_FAILURE: i32 = 40; +pub const SSL_AD_NO_CERTIFICATE: i32 = 41; +pub const SSL_AD_BAD_CERTIFICATE: i32 = 42; +pub const SSL_AD_UNSUPPORTED_CERTIFICATE: i32 = 43; +pub const SSL_AD_CERTIFICATE_REVOKED: i32 = 44; +pub const SSL_AD_CERTIFICATE_EXPIRED: i32 = 45; +pub const SSL_AD_CERTIFICATE_UNKNOWN: i32 = 46; +pub const SSL_AD_ILLEGAL_PARAMETER: i32 = 47; +pub const SSL_AD_UNKNOWN_CA: i32 = 48; +pub const SSL_AD_ACCESS_DENIED: i32 = 49; +pub const SSL_AD_DECODE_ERROR: i32 = 50; +pub const SSL_AD_DECRYPT_ERROR: i32 = 51; +pub const SSL_AD_EXPORT_RESTRICTION: i32 = 60; +pub const SSL_AD_PROTOCOL_VERSION: i32 = 70; +pub const SSL_AD_INSUFFICIENT_SECURITY: i32 = 71; +pub const SSL_AD_INTERNAL_ERROR: i32 = 80; +pub const SSL_AD_INAPPROPRIATE_FALLBACK: i32 = 86; +pub const SSL_AD_USER_CANCELLED: i32 = 90; +pub const SSL_AD_NO_RENEGOTIATION: i32 = 100; +pub const SSL_AD_MISSING_EXTENSION: i32 = 109; +pub const SSL_AD_UNSUPPORTED_EXTENSION: i32 = 110; +pub const SSL_AD_CERTIFICATE_UNOBTAINABLE: i32 = 111; +pub const SSL_AD_UNRECOGNIZED_NAME: i32 = 112; +pub const SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 113; +pub const SSL_AD_BAD_CERTIFICATE_HASH_VALUE: i32 = 114; +pub const SSL_AD_UNKNOWN_PSK_IDENTITY: i32 = 115; +pub const SSL_AD_CERTIFICATE_REQUIRED: i32 = 116; +pub const SSL_AD_NO_APPLICATION_PROTOCOL: i32 = 120; +pub const SSL_AD_ECH_REQUIRED: i32 = 121; +pub const SSL_MAX_CERT_LIST_DEFAULT: i32 = 102400; +pub const SSL_ST_CONNECT: i32 = 4096; +pub const SSL_ST_ACCEPT: i32 = 8192; +pub const SSL_ST_MASK: i32 = 4095; +pub const SSL_ST_INIT: i32 = 12288; +pub const SSL_ST_OK: i32 = 3; +pub const SSL_ST_RENEGOTIATE: i32 = 12292; +pub const SSL_ST_BEFORE: i32 = 12293; +pub const TLS_ST_OK: i32 = 3; +pub const TLS_ST_BEFORE: i32 = 12293; +pub const SSL_CB_LOOP: i32 = 1; +pub const SSL_CB_EXIT: i32 = 2; +pub const SSL_CB_READ: i32 = 4; +pub const SSL_CB_WRITE: i32 = 8; +pub const SSL_CB_ALERT: i32 = 16384; +pub const SSL_CB_READ_ALERT: i32 = 16388; +pub const SSL_CB_WRITE_ALERT: i32 = 16392; +pub const SSL_CB_ACCEPT_LOOP: i32 = 8193; +pub const SSL_CB_ACCEPT_EXIT: i32 = 8194; +pub const SSL_CB_CONNECT_LOOP: i32 = 4097; +pub const SSL_CB_CONNECT_EXIT: i32 = 4098; +pub const SSL_CB_HANDSHAKE_START: i32 = 16; +pub const SSL_CB_HANDSHAKE_DONE: i32 = 32; +pub const SSL_SENT_SHUTDOWN: i32 = 1; +pub const SSL_RECEIVED_SHUTDOWN: i32 = 2; +pub const SSL_MODE_HANDSHAKE_CUTTHROUGH: i32 = 128; +pub const SSL_MODE_AUTO_RETRY: i32 = 0; +pub const SSL_MODE_RELEASE_BUFFERS: i32 = 0; +pub const SSL_MODE_SEND_CLIENTHELLO_TIME: i32 = 0; +pub const SSL_MODE_SEND_SERVERHELLO_TIME: i32 = 0; +pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: i32 = 0; +pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: i32 = 0; +pub const SSL_OP_EPHEMERAL_RSA: i32 = 0; +pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: i32 = 0; +pub const SSL_OP_MICROSOFT_SESS_ID_BUG: i32 = 0; +pub const SSL_OP_MSIE_SSLV2_RSA_PADDING: i32 = 0; +pub const SSL_OP_NETSCAPE_CA_DN_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: i32 = 0; +pub const SSL_OP_NO_COMPRESSION: i32 = 0; +pub const SSL_OP_NO_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: i32 = 0; +pub const SSL_OP_NO_SSLv2: i32 = 0; +pub const SSL_OP_NO_SSLv3: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_1: i32 = 0; +pub const SSL_OP_PKCS1_CHECK_2: i32 = 0; +pub const SSL_OP_SINGLE_DH_USE: i32 = 0; +pub const SSL_OP_SINGLE_ECDH_USE: i32 = 0; +pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: i32 = 0; +pub const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: i32 = 0; +pub const SSL_OP_TLS_BLOCK_PADDING_BUG: i32 = 0; +pub const SSL_OP_TLS_D5_BUG: i32 = 0; +pub const SSL_OP_TLS_ROLLBACK_BUG: i32 = 0; +pub const SSL_VERIFY_CLIENT_ONCE: i32 = 0; +pub const SSL_NOTHING: i32 = 0; +pub const SSL_WRITING: i32 = 3; +pub const SSL_READING: i32 = 2; +pub const SSL_TXT_MEDIUM: &[u8; 7] = b"MEDIUM\0"; +pub const SSL_TXT_HIGH: &[u8; 5] = b"HIGH\0"; +pub const SSL_TXT_FIPS: &[u8; 5] = b"FIPS\0"; +pub const SSL_TXT_kRSA: &[u8; 5] = b"kRSA\0"; +pub const SSL_TXT_kDHE: &[u8; 5] = b"kDHE\0"; +pub const SSL_TXT_kEDH: &[u8; 5] = b"kEDH\0"; +pub const SSL_TXT_kECDHE: &[u8; 7] = b"kECDHE\0"; +pub const SSL_TXT_kEECDH: &[u8; 7] = b"kEECDH\0"; +pub const SSL_TXT_kPSK: &[u8; 5] = b"kPSK\0"; +pub const SSL_TXT_aRSA: &[u8; 5] = b"aRSA\0"; +pub const SSL_TXT_aECDSA: &[u8; 7] = b"aECDSA\0"; +pub const SSL_TXT_aPSK: &[u8; 5] = b"aPSK\0"; +pub const SSL_TXT_DH: &[u8; 3] = b"DH\0"; +pub const SSL_TXT_DHE: &[u8; 4] = b"DHE\0"; +pub const SSL_TXT_EDH: &[u8; 4] = b"EDH\0"; +pub const SSL_TXT_RSA: &[u8; 4] = b"RSA\0"; +pub const SSL_TXT_ECDH: &[u8; 5] = b"ECDH\0"; +pub const SSL_TXT_ECDHE: &[u8; 6] = b"ECDHE\0"; +pub const SSL_TXT_EECDH: &[u8; 6] = b"EECDH\0"; +pub const SSL_TXT_ECDSA: &[u8; 6] = b"ECDSA\0"; +pub const SSL_TXT_PSK: &[u8; 4] = b"PSK\0"; +pub const SSL_TXT_3DES: &[u8; 5] = b"3DES\0"; +pub const SSL_TXT_RC4: &[u8; 4] = b"RC4\0"; +pub const SSL_TXT_AES128: &[u8; 7] = b"AES128\0"; +pub const SSL_TXT_AES256: &[u8; 7] = b"AES256\0"; +pub const SSL_TXT_AES: &[u8; 4] = b"AES\0"; +pub const SSL_TXT_AES_GCM: &[u8; 7] = b"AESGCM\0"; +pub const SSL_TXT_CHACHA20: &[u8; 9] = b"CHACHA20\0"; +pub const SSL_TXT_MD5: &[u8; 4] = b"MD5\0"; +pub const SSL_TXT_SHA1: &[u8; 5] = b"SHA1\0"; +pub const SSL_TXT_SHA: &[u8; 4] = b"SHA\0"; +pub const SSL_TXT_SHA256: &[u8; 7] = b"SHA256\0"; +pub const SSL_TXT_SHA384: &[u8; 7] = b"SHA384\0"; +pub const SSL_TXT_SSLV3: &[u8; 6] = b"SSLv3\0"; +pub const SSL_TXT_TLSV1: &[u8; 6] = b"TLSv1\0"; +pub const SSL_TXT_TLSV1_1: &[u8; 8] = b"TLSv1.1\0"; +pub const SSL_TXT_TLSV1_2: &[u8; 8] = b"TLSv1.2\0"; +pub const SSL_TXT_TLSV1_3: &[u8; 8] = b"TLSv1.3\0"; +pub const SSL_TXT_ALL: &[u8; 4] = b"ALL\0"; +pub const SSL_TXT_CMPDEF: &[u8; 20] = b"COMPLEMENTOFDEFAULT\0"; +pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_LOAD_SSL_STRINGS: i32 = 0; +pub const OPENSSL_INIT_SSL_DEFAULT: i32 = 0; +pub const SSL_SIGN_RSA_PSS_SHA256: i32 = 2052; +pub const SSL_SIGN_RSA_PSS_SHA384: i32 = 2053; +pub const SSL_SIGN_RSA_PSS_SHA512: i32 = 2054; +pub const SSL_CURVE_SECP256R1: i32 = 23; +pub const SSL_CURVE_SECP384R1: i32 = 24; +pub const SSL_CURVE_SECP521R1: i32 = 25; +pub const SSL_CURVE_X25519: i32 = 29; +pub const SSL_CURVE_X25519_KYBER768_DRAFT00: i32 = 25497; +pub const TLSEXT_nid_unknown: i32 = 16777216; +pub const SSL_R_APP_DATA_IN_HANDSHAKE: i32 = 100; +pub const SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT: i32 = 101; +pub const SSL_R_BAD_ALERT: i32 = 102; +pub const SSL_R_BAD_CHANGE_CIPHER_SPEC: i32 = 103; +pub const SSL_R_BAD_DATA_RETURNED_BY_CALLBACK: i32 = 104; +pub const SSL_R_BAD_DH_P_LENGTH: i32 = 105; +pub const SSL_R_BAD_DIGEST_LENGTH: i32 = 106; +pub const SSL_R_BAD_ECC_CERT: i32 = 107; +pub const SSL_R_BAD_ECPOINT: i32 = 108; +pub const SSL_R_BAD_HANDSHAKE_RECORD: i32 = 109; +pub const SSL_R_BAD_HELLO_REQUEST: i32 = 110; +pub const SSL_R_BAD_LENGTH: i32 = 111; +pub const SSL_R_BAD_PACKET_LENGTH: i32 = 112; +pub const SSL_R_BAD_RSA_ENCRYPT: i32 = 113; +pub const SSL_R_BAD_SIGNATURE: i32 = 114; +pub const SSL_R_BAD_SRTP_MKI_VALUE: i32 = 115; +pub const SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST: i32 = 116; +pub const SSL_R_BAD_SSL_FILETYPE: i32 = 117; +pub const SSL_R_BAD_WRITE_RETRY: i32 = 118; +pub const SSL_R_BIO_NOT_SET: i32 = 119; +pub const SSL_R_BN_LIB: i32 = 120; +pub const SSL_R_BUFFER_TOO_SMALL: i32 = 121; +pub const SSL_R_CA_DN_LENGTH_MISMATCH: i32 = 122; +pub const SSL_R_CA_DN_TOO_LONG: i32 = 123; +pub const SSL_R_CCS_RECEIVED_EARLY: i32 = 124; +pub const SSL_R_CERTIFICATE_VERIFY_FAILED: i32 = 125; +pub const SSL_R_CERT_CB_ERROR: i32 = 126; +pub const SSL_R_CERT_LENGTH_MISMATCH: i32 = 127; +pub const SSL_R_CHANNEL_ID_NOT_P256: i32 = 128; +pub const SSL_R_CHANNEL_ID_SIGNATURE_INVALID: i32 = 129; +pub const SSL_R_CIPHER_OR_HASH_UNAVAILABLE: i32 = 130; +pub const SSL_R_CLIENTHELLO_PARSE_FAILED: i32 = 131; +pub const SSL_R_CLIENTHELLO_TLSEXT: i32 = 132; +pub const SSL_R_CONNECTION_REJECTED: i32 = 133; +pub const SSL_R_CONNECTION_TYPE_NOT_SET: i32 = 134; +pub const SSL_R_CUSTOM_EXTENSION_ERROR: i32 = 135; +pub const SSL_R_DATA_LENGTH_TOO_LONG: i32 = 136; +pub const SSL_R_DECODE_ERROR: i32 = 137; +pub const SSL_R_DECRYPTION_FAILED: i32 = 138; +pub const SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC: i32 = 139; +pub const SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG: i32 = 140; +pub const SSL_R_DH_P_TOO_LONG: i32 = 141; +pub const SSL_R_DIGEST_CHECK_FAILED: i32 = 142; +pub const SSL_R_DTLS_MESSAGE_TOO_BIG: i32 = 143; +pub const SSL_R_ECC_CERT_NOT_FOR_SIGNING: i32 = 144; +pub const SSL_R_EMS_STATE_INCONSISTENT: i32 = 145; +pub const SSL_R_ENCRYPTED_LENGTH_TOO_LONG: i32 = 146; +pub const SSL_R_ERROR_ADDING_EXTENSION: i32 = 147; +pub const SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST: i32 = 148; +pub const SSL_R_ERROR_PARSING_EXTENSION: i32 = 149; +pub const SSL_R_EXCESSIVE_MESSAGE_SIZE: i32 = 150; +pub const SSL_R_EXTRA_DATA_IN_MESSAGE: i32 = 151; +pub const SSL_R_FRAGMENT_MISMATCH: i32 = 152; +pub const SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION: i32 = 153; +pub const SSL_R_HANDSHAKE_FAILURE_ON_CLIENT_HELLO: i32 = 154; +pub const SSL_R_HTTPS_PROXY_REQUEST: i32 = 155; +pub const SSL_R_HTTP_REQUEST: i32 = 156; +pub const SSL_R_INAPPROPRIATE_FALLBACK: i32 = 157; +pub const SSL_R_INVALID_COMMAND: i32 = 158; +pub const SSL_R_INVALID_MESSAGE: i32 = 159; +pub const SSL_R_INVALID_SSL_SESSION: i32 = 160; +pub const SSL_R_INVALID_TICKET_KEYS_LENGTH: i32 = 161; +pub const SSL_R_LENGTH_MISMATCH: i32 = 162; +pub const SSL_R_MISSING_EXTENSION: i32 = 164; +pub const SSL_R_MISSING_RSA_CERTIFICATE: i32 = 165; +pub const SSL_R_MISSING_TMP_DH_KEY: i32 = 166; +pub const SSL_R_MISSING_TMP_ECDH_KEY: i32 = 167; +pub const SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS: i32 = 168; +pub const SSL_R_MTU_TOO_SMALL: i32 = 169; +pub const SSL_R_NEGOTIATED_BOTH_NPN_AND_ALPN: i32 = 170; +pub const SSL_R_NESTED_GROUP: i32 = 171; +pub const SSL_R_NO_CERTIFICATES_RETURNED: i32 = 172; +pub const SSL_R_NO_CERTIFICATE_ASSIGNED: i32 = 173; +pub const SSL_R_NO_CERTIFICATE_SET: i32 = 174; +pub const SSL_R_NO_CIPHERS_AVAILABLE: i32 = 175; +pub const SSL_R_NO_CIPHERS_PASSED: i32 = 176; +pub const SSL_R_NO_CIPHER_MATCH: i32 = 177; +pub const SSL_R_NO_COMPRESSION_SPECIFIED: i32 = 178; +pub const SSL_R_NO_METHOD_SPECIFIED: i32 = 179; +pub const SSL_R_NO_PRIVATE_KEY_ASSIGNED: i32 = 181; +pub const SSL_R_NO_RENEGOTIATION: i32 = 182; +pub const SSL_R_NO_REQUIRED_DIGEST: i32 = 183; +pub const SSL_R_NO_SHARED_CIPHER: i32 = 184; +pub const SSL_R_NULL_SSL_CTX: i32 = 185; +pub const SSL_R_NULL_SSL_METHOD_PASSED: i32 = 186; +pub const SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED: i32 = 187; +pub const SSL_R_OLD_SESSION_VERSION_NOT_RETURNED: i32 = 188; +pub const SSL_R_OUTPUT_ALIASES_INPUT: i32 = 189; +pub const SSL_R_PARSE_TLSEXT: i32 = 190; +pub const SSL_R_PATH_TOO_LONG: i32 = 191; +pub const SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE: i32 = 192; +pub const SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: i32 = 193; +pub const SSL_R_PROTOCOL_IS_SHUTDOWN: i32 = 194; +pub const SSL_R_PSK_IDENTITY_NOT_FOUND: i32 = 195; +pub const SSL_R_PSK_NO_CLIENT_CB: i32 = 196; +pub const SSL_R_PSK_NO_SERVER_CB: i32 = 197; +pub const SSL_R_READ_TIMEOUT_EXPIRED: i32 = 198; +pub const SSL_R_RECORD_LENGTH_MISMATCH: i32 = 199; +pub const SSL_R_RECORD_TOO_LARGE: i32 = 200; +pub const SSL_R_RENEGOTIATION_ENCODING_ERR: i32 = 201; +pub const SSL_R_RENEGOTIATION_MISMATCH: i32 = 202; +pub const SSL_R_REQUIRED_CIPHER_MISSING: i32 = 203; +pub const SSL_R_RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION: i32 = 204; +pub const SSL_R_RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION: i32 = 205; +pub const SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING: i32 = 206; +pub const SSL_R_SERVERHELLO_TLSEXT: i32 = 207; +pub const SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED: i32 = 208; +pub const SSL_R_SESSION_MAY_NOT_BE_CREATED: i32 = 209; +pub const SSL_R_SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER: i32 = 210; +pub const SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES: i32 = 211; +pub const SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE: i32 = 212; +pub const SSL_R_SSL3_EXT_INVALID_SERVERNAME: i32 = 213; +pub const SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION: i32 = 214; +pub const SSL_R_SSL_HANDSHAKE_FAILURE: i32 = 215; +pub const SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG: i32 = 216; +pub const SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST: i32 = 217; +pub const SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG: i32 = 218; +pub const SSL_R_TOO_MANY_EMPTY_FRAGMENTS: i32 = 219; +pub const SSL_R_TOO_MANY_WARNING_ALERTS: i32 = 220; +pub const SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS: i32 = 221; +pub const SSL_R_UNEXPECTED_EXTENSION: i32 = 222; +pub const SSL_R_UNEXPECTED_MESSAGE: i32 = 223; +pub const SSL_R_UNEXPECTED_OPERATOR_IN_GROUP: i32 = 224; +pub const SSL_R_UNEXPECTED_RECORD: i32 = 225; +pub const SSL_R_UNINITIALIZED: i32 = 226; +pub const SSL_R_UNKNOWN_ALERT_TYPE: i32 = 227; +pub const SSL_R_UNKNOWN_CERTIFICATE_TYPE: i32 = 228; +pub const SSL_R_UNKNOWN_CIPHER_RETURNED: i32 = 229; +pub const SSL_R_UNKNOWN_CIPHER_TYPE: i32 = 230; +pub const SSL_R_UNKNOWN_DIGEST: i32 = 231; +pub const SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE: i32 = 232; +pub const SSL_R_UNKNOWN_PROTOCOL: i32 = 233; +pub const SSL_R_UNKNOWN_SSL_VERSION: i32 = 234; +pub const SSL_R_UNKNOWN_STATE: i32 = 235; +pub const SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: i32 = 236; +pub const SSL_R_UNSUPPORTED_CIPHER: i32 = 237; +pub const SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM: i32 = 238; +pub const SSL_R_UNSUPPORTED_ELLIPTIC_CURVE: i32 = 239; +pub const SSL_R_UNSUPPORTED_PROTOCOL: i32 = 240; +pub const SSL_R_WRONG_CERTIFICATE_TYPE: i32 = 241; +pub const SSL_R_WRONG_CIPHER_RETURNED: i32 = 242; +pub const SSL_R_WRONG_CURVE: i32 = 243; +pub const SSL_R_WRONG_MESSAGE_TYPE: i32 = 244; +pub const SSL_R_WRONG_SIGNATURE_TYPE: i32 = 245; +pub const SSL_R_WRONG_SSL_VERSION: i32 = 246; +pub const SSL_R_WRONG_VERSION_NUMBER: i32 = 247; +pub const SSL_R_X509_LIB: i32 = 248; +pub const SSL_R_X509_VERIFICATION_SETUP_PROBLEMS: i32 = 249; +pub const SSL_R_SHUTDOWN_WHILE_IN_INIT: i32 = 250; +pub const SSL_R_INVALID_OUTER_RECORD_TYPE: i32 = 251; +pub const SSL_R_UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY: i32 = 252; +pub const SSL_R_NO_COMMON_SIGNATURE_ALGORITHMS: i32 = 253; +pub const SSL_R_DOWNGRADE_DETECTED: i32 = 254; +pub const SSL_R_EXCESS_HANDSHAKE_DATA: i32 = 255; +pub const SSL_R_INVALID_COMPRESSION_LIST: i32 = 256; +pub const SSL_R_DUPLICATE_EXTENSION: i32 = 257; +pub const SSL_R_MISSING_KEY_SHARE: i32 = 258; +pub const SSL_R_INVALID_ALPN_PROTOCOL: i32 = 259; +pub const SSL_R_TOO_MANY_KEY_UPDATES: i32 = 260; +pub const SSL_R_BLOCK_CIPHER_PAD_IS_WRONG: i32 = 261; +pub const SSL_R_NO_CIPHERS_SPECIFIED: i32 = 262; +pub const SSL_R_RENEGOTIATION_EMS_MISMATCH: i32 = 263; +pub const SSL_R_DUPLICATE_KEY_SHARE: i32 = 264; +pub const SSL_R_NO_GROUPS_SPECIFIED: i32 = 265; +pub const SSL_R_NO_SHARED_GROUP: i32 = 266; +pub const SSL_R_PRE_SHARED_KEY_MUST_BE_LAST: i32 = 267; +pub const SSL_R_OLD_SESSION_PRF_HASH_MISMATCH: i32 = 268; +pub const SSL_R_INVALID_SCT_LIST: i32 = 269; +pub const SSL_R_TOO_MUCH_SKIPPED_EARLY_DATA: i32 = 270; +pub const SSL_R_PSK_IDENTITY_BINDER_COUNT_MISMATCH: i32 = 271; +pub const SSL_R_CANNOT_PARSE_LEAF_CERT: i32 = 272; +pub const SSL_R_SERVER_CERT_CHANGED: i32 = 273; +pub const SSL_R_CERTIFICATE_AND_PRIVATE_KEY_MISMATCH: i32 = 274; +pub const SSL_R_CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD: i32 = 275; +pub const SSL_R_TICKET_ENCRYPTION_FAILED: i32 = 276; +pub const SSL_R_ALPN_MISMATCH_ON_EARLY_DATA: i32 = 277; +pub const SSL_R_WRONG_VERSION_ON_EARLY_DATA: i32 = 278; +pub const SSL_R_UNEXPECTED_EXTENSION_ON_EARLY_DATA: i32 = 279; +pub const SSL_R_NO_SUPPORTED_VERSIONS_ENABLED: i32 = 280; +pub const SSL_R_EMPTY_HELLO_RETRY_REQUEST: i32 = 282; +pub const SSL_R_EARLY_DATA_NOT_IN_USE: i32 = 283; +pub const SSL_R_HANDSHAKE_NOT_COMPLETE: i32 = 284; +pub const SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI: i32 = 285; +pub const SSL_R_SERVER_ECHOED_INVALID_SESSION_ID: i32 = 286; +pub const SSL_R_PRIVATE_KEY_OPERATION_FAILED: i32 = 287; +pub const SSL_R_SECOND_SERVERHELLO_VERSION_MISMATCH: i32 = 288; +pub const SSL_R_OCSP_CB_ERROR: i32 = 289; +pub const SSL_R_SSL_SESSION_ID_TOO_LONG: i32 = 290; +pub const SSL_R_APPLICATION_DATA_ON_SHUTDOWN: i32 = 291; +pub const SSL_R_CERT_DECOMPRESSION_FAILED: i32 = 292; +pub const SSL_R_UNCOMPRESSED_CERT_TOO_LARGE: i32 = 293; +pub const SSL_R_UNKNOWN_CERT_COMPRESSION_ALG: i32 = 294; +pub const SSL_R_INVALID_SIGNATURE_ALGORITHM: i32 = 295; +pub const SSL_R_DUPLICATE_SIGNATURE_ALGORITHM: i32 = 296; +pub const SSL_R_TLS13_DOWNGRADE: i32 = 297; +pub const SSL_R_QUIC_INTERNAL_ERROR: i32 = 298; +pub const SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED: i32 = 299; +pub const SSL_R_TOO_MUCH_READ_EARLY_DATA: i32 = 300; +pub const SSL_R_INVALID_DELEGATED_CREDENTIAL: i32 = 301; +pub const SSL_R_KEY_USAGE_BIT_INCORRECT: i32 = 302; +pub const SSL_R_INCONSISTENT_CLIENT_HELLO: i32 = 303; +pub const SSL_R_CIPHER_MISMATCH_ON_EARLY_DATA: i32 = 304; +pub const SSL_R_QUIC_TRANSPORT_PARAMETERS_MISCONFIGURED: i32 = 305; +pub const SSL_R_UNEXPECTED_COMPATIBILITY_MODE: i32 = 306; +pub const SSL_R_NO_APPLICATION_PROTOCOL: i32 = 307; +pub const SSL_R_NEGOTIATED_ALPS_WITHOUT_ALPN: i32 = 308; +pub const SSL_R_ALPS_MISMATCH_ON_EARLY_DATA: i32 = 309; +pub const SSL_R_ECH_SERVER_CONFIG_AND_PRIVATE_KEY_MISMATCH: i32 = 310; +pub const SSL_R_ECH_SERVER_CONFIG_UNSUPPORTED_EXTENSION: i32 = 311; +pub const SSL_R_UNSUPPORTED_ECH_SERVER_CONFIG: i32 = 312; +pub const SSL_R_ECH_SERVER_WOULD_HAVE_NO_RETRY_CONFIGS: i32 = 313; +pub const SSL_R_INVALID_CLIENT_HELLO_INNER: i32 = 314; +pub const SSL_R_INVALID_ALPN_PROTOCOL_LIST: i32 = 315; +pub const SSL_R_COULD_NOT_PARSE_HINTS: i32 = 316; +pub const SSL_R_INVALID_ECH_PUBLIC_NAME: i32 = 317; +pub const SSL_R_INVALID_ECH_CONFIG_LIST: i32 = 318; +pub const SSL_R_ECH_REJECTED: i32 = 319; +pub const SSL_R_INVALID_OUTER_EXTENSION: i32 = 320; +pub const SSL_R_INCONSISTENT_ECH_NEGOTIATION: i32 = 321; +pub const SSL_R_INVALID_ALPS_CODEPOINT: i32 = 322; +pub const SSL_R_NO_MATCHING_ISSUER: i32 = 323; +pub const SSL_R_INVALID_SPAKE2PLUSV1_VALUE: i32 = 324; +pub const SSL_R_PAKE_EXHAUSTED: i32 = 325; +pub const SSL_R_PEER_PAKE_MISMATCH: i32 = 326; +pub const SSL_R_UNSUPPORTED_CREDENTIAL_LIST: i32 = 327; +pub const SSL_R_INVALID_TRUST_ANCHOR_LIST: i32 = 328; +pub const SSL_R_INVALID_CERTIFICATE_PROPERTY_LIST: i32 = 329; +pub const SSL_R_DUPLICATE_GROUP: i32 = 330; +pub const SSL_R_INVALID_PSK_FOR_CONNECTION: i32 = 331; +pub const SSL_R_NO_SUPPORTED_PSK_MODE: i32 = 332; +pub const SSL_R_INVALID_CERT_TYPES_LIST: i32 = 333; +pub const SSL_R_UNSUPPORTED_CERTIFICATE: i32 = 334; +pub const SSL_R_MISSING_KEY: i32 = 335; +pub const SSL_R_INVALID_RAW_PUBLIC_KEY: i32 = 336; +pub const SSL_R_SSLV3_ALERT_CLOSE_NOTIFY: i32 = 1000; +pub const SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE: i32 = 1010; +pub const SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: i32 = 1020; +pub const SSL_R_TLSV1_ALERT_DECRYPTION_FAILED: i32 = 1021; +pub const SSL_R_TLSV1_ALERT_RECORD_OVERFLOW: i32 = 1022; +pub const SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: i32 = 1030; +pub const SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE: i32 = 1040; +pub const SSL_R_SSLV3_ALERT_NO_CERTIFICATE: i32 = 1041; +pub const SSL_R_SSLV3_ALERT_BAD_CERTIFICATE: i32 = 1042; +pub const SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE: i32 = 1043; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED: i32 = 1044; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED: i32 = 1045; +pub const SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN: i32 = 1046; +pub const SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER: i32 = 1047; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_CA: i32 = 1048; +pub const SSL_R_TLSV1_ALERT_ACCESS_DENIED: i32 = 1049; +pub const SSL_R_TLSV1_ALERT_DECODE_ERROR: i32 = 1050; +pub const SSL_R_TLSV1_ALERT_DECRYPT_ERROR: i32 = 1051; +pub const SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION: i32 = 1060; +pub const SSL_R_TLSV1_ALERT_PROTOCOL_VERSION: i32 = 1070; +pub const SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY: i32 = 1071; +pub const SSL_R_TLSV1_ALERT_INTERNAL_ERROR: i32 = 1080; +pub const SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK: i32 = 1086; +pub const SSL_R_TLSV1_ALERT_USER_CANCELLED: i32 = 1090; +pub const SSL_R_TLSV1_ALERT_NO_RENEGOTIATION: i32 = 1100; +pub const SSL_R_TLSV1_ALERT_UNSUPPORTED_EXTENSION: i32 = 1110; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_UNOBTAINABLE: i32 = 1111; +pub const SSL_R_TLSV1_ALERT_UNRECOGNIZED_NAME: i32 = 1112; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE: i32 = 1113; +pub const SSL_R_TLSV1_ALERT_BAD_CERTIFICATE_HASH_VALUE: i32 = 1114; +pub const SSL_R_TLSV1_ALERT_UNKNOWN_PSK_IDENTITY: i32 = 1115; +pub const SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED: i32 = 1116; +pub const SSL_R_TLSV1_ALERT_NO_APPLICATION_PROTOCOL: i32 = 1120; +pub const SSL_R_TLSV1_ALERT_ECH_REQUIRED: i32 = 1121; +pub const TRUST_TOKEN_MAX_PRIVATE_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_MAX_PUBLIC_KEY_SIZE: i32 = 512; +pub const TRUST_TOKEN_R_KEYGEN_FAILURE: i32 = 100; +pub const TRUST_TOKEN_R_BUFFER_TOO_SMALL: i32 = 101; +pub const TRUST_TOKEN_R_OVER_BATCHSIZE: i32 = 102; +pub const TRUST_TOKEN_R_DECODE_ERROR: i32 = 103; +pub const TRUST_TOKEN_R_SRR_SIGNATURE_ERROR: i32 = 104; +pub const TRUST_TOKEN_R_DECODE_FAILURE: i32 = 105; +pub const TRUST_TOKEN_R_INVALID_METADATA: i32 = 106; +pub const TRUST_TOKEN_R_TOO_MANY_KEYS: i32 = 107; +pub const TRUST_TOKEN_R_NO_KEYS_CONFIGURED: i32 = 108; +pub const TRUST_TOKEN_R_INVALID_KEY_ID: i32 = 109; +pub const TRUST_TOKEN_R_INVALID_TOKEN: i32 = 110; +pub const TRUST_TOKEN_R_BAD_VALIDITY_CHECK: i32 = 111; +pub const TRUST_TOKEN_R_NO_SRR_KEY_CONFIGURED: i32 = 112; +pub const TRUST_TOKEN_R_INVALID_METADATA_KEY: i32 = 113; +pub const TRUST_TOKEN_R_INVALID_PROOF: i32 = 114; +pub const CRL_REASON_NONE: i32 = -1; +pub const CRL_REASON_UNSPECIFIED: i32 = 0; +pub const CRL_REASON_KEY_COMPROMISE: i32 = 1; +pub const CRL_REASON_CA_COMPROMISE: i32 = 2; +pub const CRL_REASON_AFFILIATION_CHANGED: i32 = 3; +pub const CRL_REASON_SUPERSEDED: i32 = 4; +pub const CRL_REASON_CESSATION_OF_OPERATION: i32 = 5; +pub const CRL_REASON_CERTIFICATE_HOLD: i32 = 6; +pub const CRL_REASON_REMOVE_FROM_CRL: i32 = 8; +pub const CRL_REASON_PRIVILEGE_WITHDRAWN: i32 = 9; +pub const CRL_REASON_AA_COMPROMISE: i32 = 10; +pub const KU_DIGITAL_SIGNATURE: i32 = 128; +pub const KU_NON_REPUDIATION: i32 = 64; +pub const KU_KEY_ENCIPHERMENT: i32 = 32; +pub const KU_DATA_ENCIPHERMENT: i32 = 16; +pub const KU_KEY_AGREEMENT: i32 = 8; +pub const KU_KEY_CERT_SIGN: i32 = 4; +pub const KU_CRL_SIGN: i32 = 2; +pub const KU_ENCIPHER_ONLY: i32 = 1; +pub const KU_DECIPHER_ONLY: i32 = 32768; +pub type time_t = ::core::ffi::c_long; +pub type suseconds_t = ::core::ffi::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::core::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::core::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::core::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::core::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type ossl_ssize_t = isize; +pub type CBS_ASN1_TAG = u32; +pub type CRYPTO_THREADID = ::core::ffi::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_null_st { + _unused: [u8; 0], +} +pub type ASN1_NULL = asn1_null_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_must_be_null_st { + _unused: [u8; 0], +} +pub type CRYPTO_MUST_BE_NULL = crypto_must_be_null_st; +pub type ASN1_BOOLEAN = ::core::ffi::c_int; +pub type ASN1_ITEM = ASN1_ITEM_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_object_st { + _unused: [u8; 0], +} +pub type ASN1_OBJECT = asn1_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_pctx_st { + _unused: [u8; 0], +} +pub type ASN1_PCTX = asn1_pctx_st; +pub type ASN1_BIT_STRING = asn1_string_st; +pub type ASN1_BMPSTRING = asn1_string_st; +pub type ASN1_ENUMERATED = asn1_string_st; +pub type ASN1_GENERALIZEDTIME = asn1_string_st; +pub type ASN1_GENERALSTRING = asn1_string_st; +pub type ASN1_IA5STRING = asn1_string_st; +pub type ASN1_INTEGER = asn1_string_st; +pub type ASN1_OCTET_STRING = asn1_string_st; +pub type ASN1_PRINTABLESTRING = asn1_string_st; +pub type ASN1_STRING = asn1_string_st; +pub type ASN1_T61STRING = asn1_string_st; +pub type ASN1_TIME = asn1_string_st; +pub type ASN1_UNIVERSALSTRING = asn1_string_st; +pub type ASN1_UTCTIME = asn1_string_st; +pub type ASN1_UTF8STRING = asn1_string_st; +pub type ASN1_VISIBLESTRING = asn1_string_st; +pub type ASN1_TYPE = asn1_type_st; +pub type AUTHORITY_KEYID = AUTHORITY_KEYID_st; +pub type BASIC_CONSTRAINTS = BASIC_CONSTRAINTS_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_ContentInfo_st { + _unused: [u8; 0], +} +pub type CMS_ContentInfo = CMS_ContentInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CMS_SignerInfo_st { + _unused: [u8; 0], +} +pub type CMS_SignerInfo = CMS_SignerInfo_st; +pub type DIST_POINT = DIST_POINT_st; +pub type DSA_SIG = DSA_SIG_st; +pub type GENERAL_NAME = GENERAL_NAME_st; +pub type ISSUING_DIST_POINT = ISSUING_DIST_POINT_st; +pub type NAME_CONSTRAINTS = NAME_CONSTRAINTS_st; +pub type NETSCAPE_SPKAC = Netscape_spkac_st; +pub type NETSCAPE_SPKI = Netscape_spki_st; +pub type RIPEMD160_CTX = RIPEMD160state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_VERIFY_PARAM_st { + _unused: [u8; 0], +} +pub type X509_VERIFY_PARAM = X509_VERIFY_PARAM_st; +pub type X509_ALGOR = X509_algor_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_crl_st { + _unused: [u8; 0], +} +pub type X509_CRL = X509_crl_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_extension_st { + _unused: [u8; 0], +} +pub type X509_EXTENSION = X509_extension_st; +pub type X509_INFO = X509_info_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_entry_st { + _unused: [u8; 0], +} +pub type X509_NAME_ENTRY = X509_name_entry_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_name_st { + _unused: [u8; 0], +} +pub type X509_NAME = X509_name_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_pubkey_st { + _unused: [u8; 0], +} +pub type X509_PUBKEY = X509_pubkey_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_req_st { + _unused: [u8; 0], +} +pub type X509_REQ = X509_req_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_sig_st { + _unused: [u8; 0], +} +pub type X509_SIG = X509_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_ctx { + _unused: [u8; 0], +} +pub type BN_CTX = bignum_ctx; +pub type BIGNUM = bignum_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_method_st { + _unused: [u8; 0], +} +pub type BIO_METHOD = bio_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bio_st { + _unused: [u8; 0], +} +pub type BIO = bio_st; +pub type BLAKE2B_CTX = blake2b_state_st; +pub type BN_GENCB = bn_gencb_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_mont_ctx_st { + _unused: [u8; 0], +} +pub type BN_MONT_CTX = bn_mont_ctx_st; +pub type BUF_MEM = buf_mem_st; +pub type CBB = cbb_st; +pub type CBS = cbs_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cmac_ctx_st { + _unused: [u8; 0], +} +pub type CMAC_CTX = cmac_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_st { + _unused: [u8; 0], +} +pub type CONF = conf_st; +pub type CONF_VALUE = conf_value_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_pool_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER_POOL = crypto_buffer_pool_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_buffer_st { + _unused: [u8; 0], +} +pub type CRYPTO_BUFFER = crypto_buffer_st; +pub type CRYPTO_IVEC = crypto_ivec_st; +pub type CRYPTO_IOVEC = crypto_iovec_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ctr_drbg_state_st { + _unused: [u8; 0], +} +pub type CTR_DRBG_STATE = ctr_drbg_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dh_st { + _unused: [u8; 0], +} +pub type DH = dh_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct dsa_st { + _unused: [u8; 0], +} +pub type DSA = dsa_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_group_st { + _unused: [u8; 0], +} +pub type EC_GROUP = ec_group_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_key_st { + _unused: [u8; 0], +} +pub type EC_KEY = ec_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_point_st { + _unused: [u8; 0], +} +pub type EC_POINT = ec_point_st; +pub type ECDSA_METHOD = ecdsa_method_st; +pub type ECDSA_SIG = ecdsa_sig_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct engine_st { + _unused: [u8; 0], +} +pub type ENGINE = engine_st; +pub type EVP_MD_CTX = env_md_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct env_md_st { + _unused: [u8; 0], +} +pub type EVP_MD = env_md_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_aead_st { + _unused: [u8; 0], +} +pub type EVP_AEAD = evp_aead_st; +pub type EVP_AEAD_CTX = evp_aead_ctx_st; +pub type EVP_CIPHER_CTX = evp_cipher_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_st { + _unused: [u8; 0], +} +pub type EVP_CIPHER = evp_cipher_st; +pub type EVP_ENCODE_CTX = evp_encode_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_aead_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_AEAD = evp_hpke_aead_st; +pub type EVP_HPKE_CTX = evp_hpke_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kdf_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KDF = evp_hpke_kdf_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_kem_st { + _unused: [u8; 0], +} +pub type EVP_HPKE_KEM = evp_hpke_kem_st; +pub type EVP_HPKE_KEY = evp_hpke_key_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_kem_st { + _unused: [u8; 0], +} +pub type EVP_KEM = evp_kem_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_alg_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_ALG = evp_pkey_alg_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_ctx_st { + _unused: [u8; 0], +} +pub type EVP_PKEY_CTX = evp_pkey_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_pkey_st { + _unused: [u8; 0], +} +pub type EVP_PKEY = evp_pkey_st; +pub type HMAC_CTX = hmac_ctx_st; +pub type MD4_CTX = md4_state_st; +pub type MD5_CTX = md5_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_init_settings_st { + _unused: [u8; 0], +} +pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_lib_ctx_st { + _unused: [u8; 0], +} +pub type OSSL_LIB_CTX = ossl_lib_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ossl_param_st { + _unused: [u8; 0], +} +pub type OSSL_PARAM = ossl_param_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs12_st { + _unused: [u8; 0], +} +pub type PKCS12 = pkcs12_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pkcs8_priv_key_info_st { + _unused: [u8; 0], +} +pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st; +pub type X509_PKEY = private_key_st; +pub type RAND_METHOD = rand_meth_st; +pub type RC4_KEY = rc4_key_st; +pub type RSA_METHOD = rsa_meth_st; +pub type RSA_PSS_PARAMS = rsa_pss_params_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_st { + _unused: [u8; 0], +} +pub type RSA = rsa_st; +pub type SHA256_CTX = sha256_state_st; +pub type SHA512_CTX = sha512_state_st; +pub type SHA_CTX = sha_state_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct spake2_ctx_st { + _unused: [u8; 0], +} +pub type SPAKE2_CTX = spake2_ctx_st; +pub type SRTP_PROTECTION_PROFILE = srtp_protection_profile_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_cipher_st { + _unused: [u8; 0], +} +pub type SSL_CIPHER = ssl_cipher_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_credential_st { + _unused: [u8; 0], +} +pub type SSL_CREDENTIAL = ssl_credential_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CTX = ssl_ctx_st; +pub type SSL_CLIENT_HELLO = ssl_early_callback_ctx; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ech_keys_st { + _unused: [u8; 0], +} +pub type SSL_ECH_KEYS = ssl_ech_keys_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_method_st { + _unused: [u8; 0], +} +pub type SSL_METHOD = ssl_method_st; +pub type SSL_PRIVATE_KEY_METHOD = ssl_private_key_method_st; +pub type SSL_QUIC_METHOD = ssl_quic_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_session_st { + _unused: [u8; 0], +} +pub type SSL_SESSION = ssl_session_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_st { + _unused: [u8; 0], +} +pub type SSL = ssl_st; +pub type SSL_TICKET_AEAD_METHOD = ssl_ticket_aead_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct st_ERR_FNS { + _unused: [u8; 0], +} +pub type ERR_FNS = st_ERR_FNS; +pub type TRUST_TOKEN = trust_token_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_client_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_CLIENT = trust_token_client_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_issuer_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_ISSUER = trust_token_issuer_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_method_st { + _unused: [u8; 0], +} +pub type TRUST_TOKEN_METHOD = trust_token_method_st; +pub type X509V3_CTX = v3_ext_ctx; +pub type X509V3_EXT_METHOD = v3_ext_method; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_attributes_st { + _unused: [u8; 0], +} +pub type X509_ATTRIBUTE = x509_attributes_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP = x509_lookup_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_lookup_method_st { + _unused: [u8; 0], +} +pub type X509_LOOKUP_METHOD = x509_lookup_method_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_object_st { + _unused: [u8; 0], +} +pub type X509_OBJECT = x509_object_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_purpose_st { + _unused: [u8; 0], +} +pub type X509_PURPOSE = x509_purpose_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_revoked_st { + _unused: [u8; 0], +} +pub type X509_REVOKED = x509_revoked_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_st { + _unused: [u8; 0], +} +pub type X509 = x509_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_ctx_st { + _unused: [u8; 0], +} +pub type X509_STORE_CTX = x509_store_ctx_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct x509_store_st { + _unused: [u8; 0], +} +pub type X509_STORE = x509_store_st; +pub type OPENSSL_BLOCK = *mut ::core::ffi::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct aes_key_st { + pub rd_key: [u32; 60usize], + pub rounds: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of aes_key_st"][::core::mem::size_of::() - 244usize]; + ["Alignment of aes_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: aes_key_st::rd_key"][::core::mem::offset_of!(aes_key_st, rd_key) - 0usize]; + ["Offset of field: aes_key_st::rounds"][::core::mem::offset_of!(aes_key_st, rounds) - 240usize]; +}; +pub type AES_KEY = aes_key_st; +unsafe extern "C" { + pub fn AES_set_encrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_set_decrypt_key( + key: *const u8, + bits: ::core::ffi::c_uint, + aeskey: *mut AES_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY); +} +unsafe extern "C" { + pub fn AES_ctr128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + ecount_buf: *mut u8, + num: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn AES_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const AES_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_ofb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_cfb128_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + key: *const AES_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn AES_wrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key( + key: *const AES_KEY, + iv: *const u8, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_wrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn AES_unwrap_key_padded( + key: *const AES_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::core::ffi::c_int, + pub tm_min: ::core::ffi::c_int, + pub tm_hour: ::core::ffi::c_int, + pub tm_mday: ::core::ffi::c_int, + pub tm_mon: ::core::ffi::c_int, + pub tm_year: ::core::ffi::c_int, + pub tm_wday: ::core::ffi::c_int, + pub tm_yday: ::core::ffi::c_int, + pub tm_isdst: ::core::ffi::c_int, + pub tm_gmtoff: ::core::ffi::c_long, + pub tm_zone: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::core::mem::size_of::() - 56usize]; + ["Alignment of tm"][::core::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::core::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::core::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::core::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::core::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::core::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::core::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::core::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::core::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::core::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::core::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::core::mem::offset_of!(tm, tm_zone) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + _unused: [u8; 0], +} +pub type FILE = _IO_FILE; +pub type va_list = __builtin_va_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct buf_mem_st { + pub length: usize, + pub data: *mut ::core::ffi::c_char, + pub max: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of buf_mem_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of buf_mem_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: buf_mem_st::length"][::core::mem::offset_of!(buf_mem_st, length) - 0usize]; + ["Offset of field: buf_mem_st::data"][::core::mem::offset_of!(buf_mem_st, data) - 8usize]; + ["Offset of field: buf_mem_st::max"][::core::mem::offset_of!(buf_mem_st, max) - 16usize]; +}; +unsafe extern "C" { + pub fn BUF_MEM_new() -> *mut BUF_MEM; +} +unsafe extern "C" { + pub fn BUF_MEM_free(buf: *mut BUF_MEM); +} +unsafe extern "C" { + pub fn BUF_MEM_reserve(buf: *mut BUF_MEM, cap: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_MEM_grow(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_grow_clean(buf: *mut BUF_MEM, len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_MEM_append( + buf: *mut BUF_MEM, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BUF_strdup(str_: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_strnlen(str_: *const ::core::ffi::c_char, max_len: usize) -> usize; +} +unsafe extern "C" { + pub fn BUF_strndup(str_: *const ::core::ffi::c_char, size: usize) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BUF_memdup(data: *const ::core::ffi::c_void, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BUF_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn BUF_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "ERR_GET_LIB__extern"] + pub fn ERR_GET_LIB(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_GET_REASON__extern"] + pub fn ERR_GET_REASON(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "ERR_equals__extern"] + pub fn ERR_equals( + packed_error: u32, + lib: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_get_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error() -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_peek_last_error_line_data( + file: *mut *const ::core::ffi::c_char, + line: *mut ::core::ffi::c_int, + data: *mut *const ::core::ffi::c_char, + flags: *mut ::core::ffi::c_int, + ) -> u32; +} +unsafe extern "C" { + pub fn ERR_error_string_n( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + len: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_lib_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_reason_symbol_name(packed_error: u32) -> *const ::core::ffi::c_char; +} +pub type ERR_print_errors_callback_t = ::core::option::Option< + unsafe extern "C" fn( + str_: *const ::core::ffi::c_char, + len: usize, + ctx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn ERR_print_errors_cb( + callback: ERR_print_errors_callback_t, + ctx: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ERR_print_errors_fp(file: *mut FILE); +} +unsafe extern "C" { + pub fn ERR_clear_error(); +} +unsafe extern "C" { + pub fn ERR_set_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_pop_to_mark() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_get_next_error_library() -> ::core::ffi::c_int; +} +pub const ERR_LIB_NONE: _bindgen_ty_1 = 1; +pub const ERR_LIB_SYS: _bindgen_ty_1 = 2; +pub const ERR_LIB_BN: _bindgen_ty_1 = 3; +pub const ERR_LIB_RSA: _bindgen_ty_1 = 4; +pub const ERR_LIB_DH: _bindgen_ty_1 = 5; +pub const ERR_LIB_EVP: _bindgen_ty_1 = 6; +pub const ERR_LIB_BUF: _bindgen_ty_1 = 7; +pub const ERR_LIB_OBJ: _bindgen_ty_1 = 8; +pub const ERR_LIB_PEM: _bindgen_ty_1 = 9; +pub const ERR_LIB_DSA: _bindgen_ty_1 = 10; +pub const ERR_LIB_X509: _bindgen_ty_1 = 11; +pub const ERR_LIB_ASN1: _bindgen_ty_1 = 12; +pub const ERR_LIB_CONF: _bindgen_ty_1 = 13; +pub const ERR_LIB_CRYPTO: _bindgen_ty_1 = 14; +pub const ERR_LIB_EC: _bindgen_ty_1 = 15; +pub const ERR_LIB_SSL: _bindgen_ty_1 = 16; +pub const ERR_LIB_BIO: _bindgen_ty_1 = 17; +pub const ERR_LIB_PKCS7: _bindgen_ty_1 = 18; +pub const ERR_LIB_PKCS8: _bindgen_ty_1 = 19; +pub const ERR_LIB_X509V3: _bindgen_ty_1 = 20; +pub const ERR_LIB_RAND: _bindgen_ty_1 = 21; +pub const ERR_LIB_ENGINE: _bindgen_ty_1 = 22; +pub const ERR_LIB_OCSP: _bindgen_ty_1 = 23; +pub const ERR_LIB_UI: _bindgen_ty_1 = 24; +pub const ERR_LIB_COMP: _bindgen_ty_1 = 25; +pub const ERR_LIB_ECDSA: _bindgen_ty_1 = 26; +pub const ERR_LIB_ECDH: _bindgen_ty_1 = 27; +pub const ERR_LIB_HMAC: _bindgen_ty_1 = 28; +pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29; +pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30; +pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31; +pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32; +pub const ERR_LIB_CMS: _bindgen_ty_1 = 33; +pub const ERR_LIB_USER: _bindgen_ty_1 = 34; +pub const ERR_NUM_LIBS: _bindgen_ty_1 = 35; +pub type _bindgen_ty_1 = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn ERR_load_BIO_strings(); +} +unsafe extern "C" { + pub fn ERR_load_ERR_strings(); +} +unsafe extern "C" { + pub fn ERR_load_crypto_strings(); +} +unsafe extern "C" { + pub fn ERR_load_RAND_strings(); +} +unsafe extern "C" { + pub fn ERR_free_strings(); +} +unsafe extern "C" { + pub fn ERR_remove_state(pid: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ERR_remove_thread_state(tid: *const CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn ERR_func_error_string(packed_error: u32) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn ERR_error_string( + packed_error: u32, + buf: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "ERR_GET_FUNC__extern"] + pub fn ERR_GET_FUNC(packed_error: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_clear_system_error(); +} +unsafe extern "C" { + pub fn ERR_put_error( + library: ::core::ffi::c_int, + unused: ::core::ffi::c_int, + reason: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn ERR_add_error_data(count: ::core::ffi::c_uint, ...); +} +unsafe extern "C" { + pub fn ERR_add_error_dataf(format: *const ::core::ffi::c_char, ...); +} +unsafe extern "C" { + pub fn ERR_set_error_data(data: *mut ::core::ffi::c_char, flags: ::core::ffi::c_int); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ex_data_st { + _unused: [u8; 0], +} +pub type CRYPTO_EX_DATA = crypto_ex_data_st; +pub type CRYPTO_EX_free = ::core::option::Option< + unsafe extern "C" fn( + parent: *mut ::core::ffi::c_void, + ptr: *mut ::core::ffi::c_void, + ad: *mut CRYPTO_EX_DATA, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ), +>; +unsafe extern "C" { + pub fn CRYPTO_cleanup_all_ex_data(); +} +pub type CRYPTO_EX_dup = ::core::option::Option< + unsafe extern "C" fn( + to: *mut CRYPTO_EX_DATA, + from: *const CRYPTO_EX_DATA, + from_d: *mut *mut ::core::ffi::c_void, + index: ::core::ffi::c_int, + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type CRYPTO_EX_unused = ::core::ffi::c_int; +pub type OPENSSL_sk_free_func = + ::core::option::Option; +pub type OPENSSL_sk_copy_func = ::core::option::Option< + unsafe extern "C" fn(ptr: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + a: *const *const ::core::ffi::c_void, + b: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_free_func = ::core::option::Option< + unsafe extern "C" fn(arg1: OPENSSL_sk_free_func, arg2: *mut ::core::ffi::c_void), +>; +pub type OPENSSL_sk_call_copy_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_copy_func, + arg2: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void, +>; +pub type OPENSSL_sk_call_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_cmp_func, + arg2: *const ::core::ffi::c_void, + arg3: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type OPENSSL_sk_call_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: OPENSSL_sk_delete_if_func, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st { + _unused: [u8; 0], +} +pub type OPENSSL_STACK = stack_st; +unsafe extern "C" { + pub fn OPENSSL_sk_new(comp: OPENSSL_sk_cmp_func) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_zero(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set( + sk: *mut OPENSSL_STACK, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_insert( + sk: *mut OPENSSL_STACK, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete(sk: *mut OPENSSL_STACK, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_ptr( + sk: *mut OPENSSL_STACK, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_delete_if( + sk: *mut OPENSSL_STACK, + call_func: OPENSSL_sk_call_delete_if_func, + func: OPENSSL_sk_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_find( + sk: *const OPENSSL_STACK, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + call_cmp_func: OPENSSL_sk_call_cmp_func, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_shift(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_sk_dup(sk: *const OPENSSL_STACK) -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort(sk: *mut OPENSSL_STACK, call_cmp_func: OPENSSL_sk_call_cmp_func); +} +unsafe extern "C" { + pub fn OPENSSL_sk_sort_and_dedup( + sk: *mut OPENSSL_STACK, + call_cmp_func: OPENSSL_sk_call_cmp_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn OPENSSL_sk_is_sorted(sk: *const OPENSSL_STACK) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_sk_set_cmp_func( + sk: *mut OPENSSL_STACK, + comp: OPENSSL_sk_cmp_func, + ) -> OPENSSL_sk_cmp_func; +} +unsafe extern "C" { + pub fn OPENSSL_sk_deep_copy( + sk: *const OPENSSL_STACK, + call_copy_func: OPENSSL_sk_call_copy_func, + copy_func: OPENSSL_sk_copy_func, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ) -> *mut OPENSSL_STACK; +} +pub type _STACK = OPENSSL_STACK; +unsafe extern "C" { + pub fn sk_new_null() -> *mut OPENSSL_STACK; +} +unsafe extern "C" { + pub fn sk_num(sk: *const OPENSSL_STACK) -> usize; +} +unsafe extern "C" { + pub fn sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_free(sk: *mut OPENSSL_STACK); +} +unsafe extern "C" { + pub fn sk_push(sk: *mut OPENSSL_STACK, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + pub fn sk_pop(sk: *mut OPENSSL_STACK) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn sk_pop_free_ex( + sk: *mut OPENSSL_STACK, + call_free_func: OPENSSL_sk_call_free_func, + free_func: OPENSSL_sk_free_func, + ); +} +unsafe extern "C" { + pub fn sk_pop_free(sk: *mut OPENSSL_STACK, free_func: OPENSSL_sk_free_func); +} +pub type OPENSSL_STRING = *mut ::core::ffi::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_void { + _unused: [u8; 0], +} +pub type sk_void_free_func = + ::core::option::Option; +pub type sk_void_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void, +>; +pub type sk_void_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_void, + arg2: *const *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +pub type sk_void_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_void_call_free_func__extern"] + pub fn sk_void_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_void_call_copy_func__extern"] + pub fn sk_void_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_call_cmp_func__extern"] + pub fn sk_void_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_call_delete_if_func__extern"] + pub fn sk_void_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_new__extern"] + pub fn sk_void_new(comp: sk_void_cmp_func) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_new_null__extern"] + pub fn sk_void_new_null() -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_num__extern"] + pub fn sk_void_num(sk: *const stack_st_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_zero__extern"] + pub fn sk_void_zero(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_value__extern"] + pub fn sk_void_value(sk: *const stack_st_void, i: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_set__extern"] + pub fn sk_void_set( + sk: *mut stack_st_void, + i: usize, + p: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_free__extern"] + pub fn sk_void_free(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_pop_free__extern"] + pub fn sk_void_pop_free(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_insert__extern"] + pub fn sk_void_insert( + sk: *mut stack_st_void, + p: *mut ::core::ffi::c_void, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_delete__extern"] + pub fn sk_void_delete(sk: *mut stack_st_void, where_: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_ptr__extern"] + pub fn sk_void_delete_ptr( + sk: *mut stack_st_void, + p: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_delete_if__extern"] + pub fn sk_void_delete_if( + sk: *mut stack_st_void, + func: sk_void_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_void_find__extern"] + pub fn sk_void_find( + sk: *const stack_st_void, + out_index: *mut usize, + p: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_shift__extern"] + pub fn sk_void_shift(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_push__extern"] + pub fn sk_void_push(sk: *mut stack_st_void, p: *mut ::core::ffi::c_void) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_void_pop__extern"] + pub fn sk_void_pop(sk: *mut stack_st_void) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_void_dup__extern"] + pub fn sk_void_dup(sk: *const stack_st_void) -> *mut stack_st_void; +} +unsafe extern "C" { + #[link_name = "sk_void_sort__extern"] + pub fn sk_void_sort(sk: *mut stack_st_void); +} +unsafe extern "C" { + #[link_name = "sk_void_sort_and_dedup__extern"] + pub fn sk_void_sort_and_dedup(sk: *mut stack_st_void, free_func: sk_void_free_func); +} +unsafe extern "C" { + #[link_name = "sk_void_is_sorted__extern"] + pub fn sk_void_is_sorted(sk: *const stack_st_void) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_void_set_cmp_func__extern"] + pub fn sk_void_set_cmp_func(sk: *mut stack_st_void, comp: sk_void_cmp_func) + -> sk_void_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_void_deep_copy__extern"] + pub fn sk_void_deep_copy( + sk: *const stack_st_void, + copy_func: sk_void_copy_func, + free_func: sk_void_free_func, + ) -> *mut stack_st_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_OPENSSL_STRING { + _unused: [u8; 0], +} +pub type sk_OPENSSL_STRING_free_func = + ::core::option::Option; +pub type sk_OPENSSL_STRING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char, +>; +pub type sk_OPENSSL_STRING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ::core::ffi::c_char, + arg2: *const *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +pub type sk_OPENSSL_STRING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_char, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_free_func__extern"] + pub fn sk_OPENSSL_STRING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_copy_func__extern"] + pub fn sk_OPENSSL_STRING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_call_delete_if_func__extern"] + pub fn sk_OPENSSL_STRING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new__extern"] + pub fn sk_OPENSSL_STRING_new(comp: sk_OPENSSL_STRING_cmp_func) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_new_null__extern"] + pub fn sk_OPENSSL_STRING_new_null() -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_num__extern"] + pub fn sk_OPENSSL_STRING_num(sk: *const stack_st_OPENSSL_STRING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_zero__extern"] + pub fn sk_OPENSSL_STRING_zero(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_value__extern"] + pub fn sk_OPENSSL_STRING_value( + sk: *const stack_st_OPENSSL_STRING, + i: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set__extern"] + pub fn sk_OPENSSL_STRING_set( + sk: *mut stack_st_OPENSSL_STRING, + i: usize, + p: *mut ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_free__extern"] + pub fn sk_OPENSSL_STRING_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop_free__extern"] + pub fn sk_OPENSSL_STRING_pop_free( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_insert__extern"] + pub fn sk_OPENSSL_STRING_insert( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete__extern"] + pub fn sk_OPENSSL_STRING_delete( + sk: *mut stack_st_OPENSSL_STRING, + where_: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_ptr__extern"] + pub fn sk_OPENSSL_STRING_delete_ptr( + sk: *mut stack_st_OPENSSL_STRING, + p: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_delete_if__extern"] + pub fn sk_OPENSSL_STRING_delete_if( + sk: *mut stack_st_OPENSSL_STRING, + func: sk_OPENSSL_STRING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_find__extern"] + pub fn sk_OPENSSL_STRING_find( + sk: *const stack_st_OPENSSL_STRING, + out_index: *mut usize, + p: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_shift__extern"] + pub fn sk_OPENSSL_STRING_shift(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_push__extern"] + pub fn sk_OPENSSL_STRING_push( + sk: *mut stack_st_OPENSSL_STRING, + p: *mut ::core::ffi::c_char, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_pop__extern"] + pub fn sk_OPENSSL_STRING_pop(sk: *mut stack_st_OPENSSL_STRING) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_dup__extern"] + pub fn sk_OPENSSL_STRING_dup( + sk: *const stack_st_OPENSSL_STRING, + ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort__extern"] + pub fn sk_OPENSSL_STRING_sort(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_sort_and_dedup__extern"] + pub fn sk_OPENSSL_STRING_sort_and_dedup( + sk: *mut stack_st_OPENSSL_STRING, + free_func: sk_OPENSSL_STRING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_is_sorted__extern"] + pub fn sk_OPENSSL_STRING_is_sorted(sk: *const stack_st_OPENSSL_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_set_cmp_func__extern"] + pub fn sk_OPENSSL_STRING_set_cmp_func( + sk: *mut stack_st_OPENSSL_STRING, + comp: sk_OPENSSL_STRING_cmp_func, + ) -> sk_OPENSSL_STRING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_OPENSSL_STRING_deep_copy__extern"] + pub fn sk_OPENSSL_STRING_deep_copy( + sk: *const stack_st_OPENSSL_STRING, + copy_func: sk_OPENSSL_STRING_copy_func, + free_func: sk_OPENSSL_STRING_free_func, + ) -> *mut stack_st_OPENSSL_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_BIO { + _unused: [u8; 0], +} +pub type sk_BIO_free_func = ::core::option::Option; +pub type sk_BIO_copy_func = + ::core::option::Option *mut BIO>; +pub type sk_BIO_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const BIO, arg2: *const *const BIO) -> ::core::ffi::c_int, +>; +pub type sk_BIO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_BIO_call_free_func__extern"] + pub fn sk_BIO_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_copy_func__extern"] + pub fn sk_BIO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_cmp_func__extern"] + pub fn sk_BIO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_call_delete_if_func__extern"] + pub fn sk_BIO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new__extern"] + pub fn sk_BIO_new(comp: sk_BIO_cmp_func) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_new_null__extern"] + pub fn sk_BIO_new_null() -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_num__extern"] + pub fn sk_BIO_num(sk: *const stack_st_BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_zero__extern"] + pub fn sk_BIO_zero(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_value__extern"] + pub fn sk_BIO_value(sk: *const stack_st_BIO, i: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set__extern"] + pub fn sk_BIO_set(sk: *mut stack_st_BIO, i: usize, p: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_free__extern"] + pub fn sk_BIO_free(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop_free__extern"] + pub fn sk_BIO_pop_free(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_insert__extern"] + pub fn sk_BIO_insert(sk: *mut stack_st_BIO, p: *mut BIO, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete__extern"] + pub fn sk_BIO_delete(sk: *mut stack_st_BIO, where_: usize) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_ptr__extern"] + pub fn sk_BIO_delete_ptr(sk: *mut stack_st_BIO, p: *const BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_delete_if__extern"] + pub fn sk_BIO_delete_if( + sk: *mut stack_st_BIO, + func: sk_BIO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_BIO_find__extern"] + pub fn sk_BIO_find( + sk: *const stack_st_BIO, + out_index: *mut usize, + p: *const BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_shift__extern"] + pub fn sk_BIO_shift(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_push__extern"] + pub fn sk_BIO_push(sk: *mut stack_st_BIO, p: *mut BIO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_BIO_pop__extern"] + pub fn sk_BIO_pop(sk: *mut stack_st_BIO) -> *mut BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_dup__extern"] + pub fn sk_BIO_dup(sk: *const stack_st_BIO) -> *mut stack_st_BIO; +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort__extern"] + pub fn sk_BIO_sort(sk: *mut stack_st_BIO); +} +unsafe extern "C" { + #[link_name = "sk_BIO_sort_and_dedup__extern"] + pub fn sk_BIO_sort_and_dedup(sk: *mut stack_st_BIO, free_func: sk_BIO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_BIO_is_sorted__extern"] + pub fn sk_BIO_is_sorted(sk: *const stack_st_BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_BIO_set_cmp_func__extern"] + pub fn sk_BIO_set_cmp_func(sk: *mut stack_st_BIO, comp: sk_BIO_cmp_func) -> sk_BIO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_BIO_deep_copy__extern"] + pub fn sk_BIO_deep_copy( + sk: *const stack_st_BIO, + copy_func: sk_BIO_copy_func, + free_func: sk_BIO_free_func, + ) -> *mut stack_st_BIO; +} +unsafe extern "C" { + pub fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_free(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vfree(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_up_ref(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read( + bio: *mut BIO, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_gets( + bio: *mut BIO, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_ex( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + out_written: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_all( + bio: *mut BIO, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_puts(bio: *mut BIO, buf: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_flush(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + parg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_ptr_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BIO_int_ctrl( + bp: *mut BIO, + cmd: ::core::ffi::c_int, + larg: ::core::ffi::c_long, + iarg: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_reset(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_eof(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_clear_flags(bio: *mut BIO, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_test_flags(bio: *const BIO, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_read(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_write(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_retry(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_should_io_special(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_retry_reason(bio: *const BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_retry_reason(bio: *mut BIO, reason: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_set_retry_read(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_retry_write(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_get_retry_flags(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_clear_retry_flags(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_method_type(bio: *const BIO) -> ::core::ffi::c_int; +} +pub type BIO_info_cb = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn BIO_callback_ctrl( + bio: *mut BIO, + cmd: ::core::ffi::c_int, + fp: BIO_info_cb, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_pending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_wpending(bio: *const BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_set_close(bio: *mut BIO, close_flag: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_number_read(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_number_written(bio: *const BIO) -> u64; +} +unsafe extern "C" { + pub fn BIO_push(bio: *mut BIO, appended_bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_pop(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_next(bio: *mut BIO) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_find_type(bio: *mut BIO, type_: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_copy_next_retry(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_printf(bio: *mut BIO, format: *const ::core::ffi::c_char, ...) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_indent( + bio: *mut BIO, + indent: ::core::ffi::c_uint, + max_indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_hexdump( + bio: *mut BIO, + data: *const u8, + len: usize, + indent: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ERR_print_errors(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_read_asn1( + bio: *mut BIO, + out: *mut *mut u8, + out_len: *mut usize, + max_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_mem() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_mem_buf(buf: *const ::core::ffi::c_void, len: ossl_ssize_t) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_mem_contents( + bio: *const BIO, + out_contents: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_mem_data( + bio: *mut BIO, + contents: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_get_mem_ptr(bio: *mut BIO, out: *mut *mut BUF_MEM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_buf( + bio: *mut BIO, + b: *mut BUF_MEM, + take_ownership: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_mem_eof_return( + bio: *mut BIO, + eof_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_fd() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_fd(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_fd( + bio: *mut BIO, + fd: ::core::ffi::c_int, + close_flag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_fd(bio: *mut BIO, out_fd: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_s_file() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_file( + filename: *const ::core::ffi::c_char, + mode: *const ::core::ffi::c_char, + ) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_new_fp(file: *mut FILE, flags: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_get_fp(bio: *mut BIO, out_file: *mut *mut FILE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_fp( + bio: *mut BIO, + file: *mut FILE, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_read_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_write_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_append_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_rw_filename( + bio: *mut BIO, + filename: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_tell(bio: *mut BIO) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_seek(bio: *mut BIO, offset: ::core::ffi::c_long) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn BIO_s_socket() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_socket(fd: ::core::ffi::c_int, close_flag: ::core::ffi::c_int) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_s_connect() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_new_connect(host_and_optional_port: *const ::core::ffi::c_char) -> *mut BIO; +} +unsafe extern "C" { + pub fn BIO_set_conn_hostname( + bio: *mut BIO, + host_and_optional_port: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_port( + bio: *mut BIO, + port_str: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_conn_int_port( + bio: *mut BIO, + port: *const ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_nbio(bio: *mut BIO, on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_do_connect(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_new_bio_pair( + out1: *mut *mut BIO, + writebuf1: usize, + out2: *mut *mut BIO, + writebuf2: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_read_request(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_ctrl_get_write_guarantee(bio: *mut BIO) -> usize; +} +unsafe extern "C" { + pub fn BIO_shutdown_wr(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_new_index() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_new( + type_: ::core::ffi::c_int, + name: *const ::core::ffi::c_char, + ) -> *mut BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_meth_free(method: *mut BIO_METHOD); +} +unsafe extern "C" { + pub fn BIO_meth_set_create( + method: *mut BIO_METHOD, + create_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_destroy( + method: *mut BIO_METHOD, + destroy_func: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut BIO) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write_ex( + method: *mut BIO_METHOD, + write_ex_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: usize, + arg4: *mut usize, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_write( + method: *mut BIO_METHOD, + write_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_read( + method: *mut BIO_METHOD, + read_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_gets( + method: *mut BIO_METHOD, + gets_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *mut ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_ctrl( + method: *mut BIO_METHOD, + ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_long, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_callback_ctrl( + method: *mut BIO_METHOD, + callback_ctrl_func: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: ::core::ffi::c_int, + arg3: BIO_info_cb, + ) -> ::core::ffi::c_long, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_data(bio: *mut BIO, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn BIO_get_data(bio: *mut BIO) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_set_init(bio: *mut BIO, init: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_init(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_ex_data( + bio: *mut BIO, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_get_ex_data(bio: *const BIO, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BIO_free_all(bio: *mut BIO); +} +pub type bio_info_cb = BIO_info_cb; +unsafe extern "C" { + pub fn BIO_f_base64() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_retry_special(bio: *mut BIO); +} +unsafe extern "C" { + pub fn BIO_set_write_buffer_size( + bio: *mut BIO, + buffer_size: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_set_shutdown(bio: *mut BIO, shutdown: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BIO_get_shutdown(bio: *mut BIO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_set_puts( + method: *mut BIO_METHOD, + puts: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut BIO, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_meth_get_write( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_read( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_gets( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *mut ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_puts( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_long, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_long, + >; +} +unsafe extern "C" { + pub fn BIO_meth_get_create( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_destroy( + method: *const BIO_METHOD, + ) -> ::core::option::Option ::core::ffi::c_int>; +} +unsafe extern "C" { + pub fn BIO_meth_get_callback_ctrl( + method: *const BIO_METHOD, + ) -> ::core::option::Option< + unsafe extern "C" fn( + method: *mut BIO, + arg1: ::core::ffi::c_int, + arg2: BIO_info_cb, + ) -> ::core::ffi::c_long, + >; +} +pub type BN_ULONG = u64; +unsafe extern "C" { + pub fn BN_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_init(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_clear_free(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_dup(src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_copy(dest: *mut BIGNUM, src: *const BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_clear(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_value_one() -> *const BIGNUM; +} +unsafe extern "C" { + pub fn BN_num_bits(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_num_bytes(bn: *const BIGNUM) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn BN_zero(bn: *mut BIGNUM); +} +unsafe extern "C" { + pub fn BN_one(bn: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_word(bn: *mut BIGNUM, value: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_u64(bn: *mut BIGNUM, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_negative(bn: *mut BIGNUM, sign: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn BN_is_negative(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2bin(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_lebin2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_bn2le_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2bin_padded(out: *mut u8, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2cbb_padded(out: *mut CBB, len: usize, in_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2hex(bn: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_hex2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2dec(a: *const BIGNUM) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn BN_dec2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_asc2bn(outp: *mut *mut BIGNUM, in_: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print(bio: *mut BIO, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_print_fp(fp: *mut FILE, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_get_word(bn: *const BIGNUM) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_get_u64(bn: *const BIGNUM, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_parse_asn1_unsigned(cbs: *mut CBS, ret: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_marshal_asn1(cbb: *mut CBB, bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_CTX_new() -> *mut BN_CTX; +} +unsafe extern "C" { + pub fn BN_CTX_free(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_start(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_CTX_get(ctx: *mut BN_CTX) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_CTX_end(ctx: *mut BN_CTX); +} +unsafe extern "C" { + pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_uadd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_add_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_usub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sub_word(a: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mul_word(bn: *mut BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div( + quotient: *mut BIGNUM, + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_div_word(numerator: *mut BIGNUM, divisor: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_sqrt( + out_sqrt: *mut BIGNUM, + in_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_cmp_word(a: *const BIGNUM, b: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_equal_consttime(a: *const BIGNUM, b: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_abs_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_zero(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_one(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_word(bn: *const BIGNUM, w: BN_ULONG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_odd(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_pow2(a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_set_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_clear_bit(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_bit_set(a: *const BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mask_bits(a: *mut BIGNUM, n: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_count_low_zero_bits(bn: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_word(a: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; +} +unsafe extern "C" { + pub fn BN_mod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod_pow2(r: *mut BIGNUM, a: *const BIGNUM, e: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_nnmod( + rem: *mut BIGNUM, + numerator: *const BIGNUM, + divisor: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_add_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sub_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqr( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + n: ::core::ffi::c_int, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_lshift1_quick( + r: *mut BIGNUM, + a: *const BIGNUM, + m: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_sqrt( + in_: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand( + rnd: *mut BIGNUM, + bits: ::core::ffi::c_int, + top: ::core::ffi::c_int, + bottom: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_rand_range_ex( + r: *mut BIGNUM, + min_inclusive: BN_ULONG, + max_exclusive: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_pseudo_rand_range(rnd: *mut BIGNUM, range: *const BIGNUM) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bn_gencb_st { + pub arg: *mut ::core::ffi::c_void, + pub callback: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut bn_gencb_st, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bn_gencb_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of bn_gencb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bn_gencb_st::arg"][::core::mem::offset_of!(bn_gencb_st, arg) - 0usize]; + ["Offset of field: bn_gencb_st::callback"] + [::core::mem::offset_of!(bn_gencb_st, callback) - 8usize]; +}; +unsafe extern "C" { + pub fn BN_GENCB_new() -> *mut BN_GENCB; +} +unsafe extern "C" { + pub fn BN_GENCB_free(callback: *mut BN_GENCB); +} +unsafe extern "C" { + pub fn BN_GENCB_set( + callback: *mut BN_GENCB, + f: ::core::option::Option< + unsafe extern "C" fn( + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + arg1: *mut BN_GENCB, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn BN_GENCB_call( + callback: *mut BN_GENCB, + event: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_GENCB_get_arg(callback: *const BN_GENCB) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn BN_generate_prime_ex( + ret: *mut BIGNUM, + bits: ::core::ffi::c_int, + safe: ::core::ffi::c_int, + add: *const BIGNUM, + rem: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +pub const bn_primality_result_t_bn_probably_prime: bn_primality_result_t = 0; +pub const bn_primality_result_t_bn_composite: bn_primality_result_t = 1; +pub const bn_primality_result_t_bn_non_prime_power_composite: bn_primality_result_t = 2; +pub type bn_primality_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn BN_enhanced_miller_rabin_primality_test( + out_result: *mut bn_primality_result_t, + w: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_primality_test( + is_probably_prime: *mut ::core::ffi::c_int, + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_fasttest_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + do_trial_division: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_is_prime_ex( + candidate: *const BIGNUM, + checks: ::core::ffi::c_int, + ctx: *mut BN_CTX, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_gcd( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse( + out: *mut BIGNUM, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_inverse_blinded( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_inverse_odd( + out: *mut BIGNUM, + out_no_inverse: *mut ::core::ffi::c_int, + a: *const BIGNUM, + n: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_for_modulus(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new_consttime(mod_: *const BIGNUM, ctx: *mut BN_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_free(mont: *mut BN_MONT_CTX); +} +unsafe extern "C" { + pub fn BN_MONT_CTX_copy(to: *mut BN_MONT_CTX, from: *const BN_MONT_CTX) -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_to_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_from_montgomery( + ret: *mut BIGNUM, + a: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_mul_montgomery( + r: *mut BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + mont: *const BN_MONT_CTX, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont( + r: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_consttime( + rr: *mut BIGNUM, + a: *const BIGNUM, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2mpi(in_: *const BIGNUM, out: *mut u8) -> usize; +} +unsafe extern "C" { + pub fn BN_mpi2bn(in_: *const u8, len: usize, out: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_mod_exp_mont_word( + r: *mut BIGNUM, + a: BN_ULONG, + p: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_mod_exp2_mont( + r: *mut BIGNUM, + a1: *const BIGNUM, + p1: *const BIGNUM, + a2: *const BIGNUM, + p2: *const BIGNUM, + m: *const BIGNUM, + ctx: *mut BN_CTX, + mont: *const BN_MONT_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_new() -> *mut BN_MONT_CTX; +} +unsafe extern "C" { + pub fn BN_MONT_CTX_set( + mont: *mut BN_MONT_CTX, + mod_: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2binpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_bn2lebinpad( + in_: *const BIGNUM, + out: *mut u8, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_secure_new() -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_le2bn(in_: *const u8, len: usize, ret: *mut BIGNUM) -> *mut BIGNUM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bignum_st { + pub d: *mut BN_ULONG, + pub width: ::core::ffi::c_int, + pub dmax: ::core::ffi::c_int, + pub neg: ::core::ffi::c_int, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bignum_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of bignum_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: bignum_st::d"][::core::mem::offset_of!(bignum_st, d) - 0usize]; + ["Offset of field: bignum_st::width"][::core::mem::offset_of!(bignum_st, width) - 8usize]; + ["Offset of field: bignum_st::dmax"][::core::mem::offset_of!(bignum_st, dmax) - 12usize]; + ["Offset of field: bignum_st::neg"][::core::mem::offset_of!(bignum_st, neg) - 16usize]; + ["Offset of field: bignum_st::flags"][::core::mem::offset_of!(bignum_st, flags) - 20usize]; +}; +unsafe extern "C" { + pub fn BN_num_bits_word(l: BN_ULONG) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn ASN1_tag2bit(tag: ::core::ffi::c_int) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_tag2str(tag: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +pub type d2i_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut *mut ::core::ffi::c_void, + arg2: *mut *const ::core::ffi::c_uchar, + arg3: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type i2d_of_void = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_void, + arg2: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int, +>; +pub type ASN1_ITEM_EXP = ASN1_ITEM; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_VALUE_st { + _unused: [u8; 0], +} +pub type ASN1_VALUE = ASN1_VALUE_st; +unsafe extern "C" { + pub fn ASN1_item_new(it: *const ASN1_ITEM) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_free(val: *mut ASN1_VALUE, it: *const ASN1_ITEM); +} +unsafe extern "C" { + pub fn ASN1_item_d2i( + out: *mut *mut ASN1_VALUE, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + it: *const ASN1_ITEM, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + pub fn ASN1_item_i2d( + val: *mut ASN1_VALUE, + outp: *mut *mut ::core::ffi::c_uchar, + it: *const ASN1_ITEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_dup( + it: *const ASN1_ITEM, + x: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_fp( + it: *const ASN1_ITEM, + in_: *mut FILE, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_d2i_bio( + it: *const ASN1_ITEM, + in_: *mut BIO, + out: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_fp( + it: *const ASN1_ITEM, + out: *mut FILE, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_i2d_bio( + it: *const ASN1_ITEM, + out: *mut BIO, + in_: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_unpack( + oct: *const ASN1_STRING, + it: *const ASN1_ITEM, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_item_pack( + obj: *mut ::core::ffi::c_void, + it: *const ASN1_ITEM, + out: *mut *mut ASN1_STRING, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_BOOLEAN( + out: *mut ASN1_BOOLEAN, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> ASN1_BOOLEAN; +} +unsafe extern "C" { + pub fn i2d_ASN1_BOOLEAN( + a: ASN1_BOOLEAN, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_TBOOLEAN_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_FBOOLEAN_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct asn1_string_st { + pub length: ::core::ffi::c_int, + pub type_: ::core::ffi::c_int, + pub data: *mut ::core::ffi::c_uchar, + pub flags: ::core::ffi::c_long, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_string_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of asn1_string_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_string_st::length"] + [::core::mem::offset_of!(asn1_string_st, length) - 0usize]; + ["Offset of field: asn1_string_st::type_"] + [::core::mem::offset_of!(asn1_string_st, type_) - 4usize]; + ["Offset of field: asn1_string_st::data"] + [::core::mem::offset_of!(asn1_string_st, data) - 8usize]; + ["Offset of field: asn1_string_st::flags"] + [::core::mem::offset_of!(asn1_string_st, flags) - 16usize]; +}; +unsafe extern "C" { + pub fn ASN1_STRING_type_new(type_: ::core::ffi::c_int) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn ASN1_STRING_copy(dst: *mut ASN1_STRING, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_dup(str_: *const ASN1_STRING) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_type(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get0_data(str_: *const ASN1_STRING) -> *const ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_data(str_: *mut ASN1_STRING) -> *mut ::core::ffi::c_uchar; +} +unsafe extern "C" { + pub fn ASN1_STRING_length(str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_cmp(a: *const ASN1_STRING, b: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set( + str_: *mut ASN1_STRING, + data: *const ::core::ffi::c_void, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set0( + str_: *mut ASN1_STRING, + data: *mut ::core::ffi::c_void, + len: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_new() -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_new() -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_new() -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_new() -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn ASN1_T61STRING_new() -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_new() -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_new() -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_new() -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn ASN1_BMPSTRING_free(str_: *mut ASN1_BMPSTRING); +} +unsafe extern "C" { + pub fn ASN1_GENERALSTRING_free(str_: *mut ASN1_GENERALSTRING); +} +unsafe extern "C" { + pub fn ASN1_IA5STRING_free(str_: *mut ASN1_IA5STRING); +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_free(str_: *mut ASN1_OCTET_STRING); +} +unsafe extern "C" { + pub fn ASN1_PRINTABLESTRING_free(str_: *mut ASN1_PRINTABLESTRING); +} +unsafe extern "C" { + pub fn ASN1_T61STRING_free(str_: *mut ASN1_T61STRING); +} +unsafe extern "C" { + pub fn ASN1_UNIVERSALSTRING_free(str_: *mut ASN1_UNIVERSALSTRING); +} +unsafe extern "C" { + pub fn ASN1_UTF8STRING_free(str_: *mut ASN1_UTF8STRING); +} +unsafe extern "C" { + pub fn ASN1_VISIBLESTRING_free(str_: *mut ASN1_VISIBLESTRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BMPSTRING( + out: *mut *mut ASN1_BMPSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BMPSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALSTRING( + out: *mut *mut ASN1_GENERALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_IA5STRING( + out: *mut *mut ASN1_IA5STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_IA5STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_OCTET_STRING( + out: *mut *mut ASN1_OCTET_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_PRINTABLESTRING( + out: *mut *mut ASN1_PRINTABLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_PRINTABLESTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_T61STRING( + out: *mut *mut ASN1_T61STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_T61STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UNIVERSALSTRING( + out: *mut *mut ASN1_UNIVERSALSTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UNIVERSALSTRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_UTF8STRING( + out: *mut *mut ASN1_UTF8STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTF8STRING; +} +unsafe extern "C" { + pub fn d2i_ASN1_VISIBLESTRING( + out: *mut *mut ASN1_VISIBLESTRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_VISIBLESTRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BMPSTRING(in_: *const ASN1_BMPSTRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALSTRING( + in_: *const ASN1_GENERALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_IA5STRING(in_: *const ASN1_IA5STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_OCTET_STRING( + in_: *const ASN1_OCTET_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_PRINTABLESTRING( + in_: *const ASN1_PRINTABLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_T61STRING(in_: *const ASN1_T61STRING, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UNIVERSALSTRING( + in_: *const ASN1_UNIVERSALSTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTF8STRING( + in_: *const ASN1_UTF8STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ASN1_VISIBLESTRING( + in_: *const ASN1_VISIBLESTRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BMPSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_GENERALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_IA5STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_OCTET_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_PRINTABLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_T61STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UNIVERSALSTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_UTF8STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub static ASN1_VISIBLESTRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_dup(a: *const ASN1_OCTET_STRING) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_cmp( + a: *const ASN1_OCTET_STRING, + b: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_OCTET_STRING_set( + str_: *mut ASN1_OCTET_STRING, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_to_UTF8( + out: *mut *mut ::core::ffi::c_uchar, + in_: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_copy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_mbstring_ncopy( + out: *mut *mut ASN1_STRING, + in_: *const u8, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + mask: ::core::ffi::c_ulong, + minsize: ossl_ssize_t, + maxsize: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_by_NID( + out: *mut *mut ASN1_STRING, + in_: *const ::core::ffi::c_uchar, + len: ossl_ssize_t, + inform: ::core::ffi::c_int, + nid: ::core::ffi::c_int, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_add( + nid: ::core::ffi::c_int, + minsize: ::core::ffi::c_long, + maxsize: ::core::ffi::c_long, + mask: ::core::ffi::c_ulong, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DIRECTORYSTRING_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DIRECTORYSTRING( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DIRECTORYSTRING(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_new() -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn DISPLAYTEXT_free(str_: *mut ASN1_STRING); +} +unsafe extern "C" { + pub fn d2i_DISPLAYTEXT( + out: *mut *mut ASN1_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn i2d_DISPLAYTEXT(in_: *const ASN1_STRING, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_new() -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_free(str_: *mut ASN1_BIT_STRING); +} +unsafe extern "C" { + pub fn d2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2d_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_BIT_STRING( + out: *mut *mut ASN1_BIT_STRING, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn i2c_ASN1_BIT_STRING( + in_: *const ASN1_BIT_STRING, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_BIT_STRING_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_unused_bits(str_: *const ASN1_BIT_STRING) -> u8; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set1( + str_: *mut ASN1_BIT_STRING, + data: *const u8, + length: usize, + unused_bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_set_bit( + str_: *mut ASN1_BIT_STRING, + n: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_get_bit( + str_: *const ASN1_BIT_STRING, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_check( + str_: *const ASN1_BIT_STRING, + flags: *const ::core::ffi::c_uchar, + flags_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_INTEGER { + _unused: [u8; 0], +} +pub type sk_ASN1_INTEGER_free_func = + ::core::option::Option; +pub type sk_ASN1_INTEGER_copy_func = + ::core::option::Option *mut ASN1_INTEGER>; +pub type sk_ASN1_INTEGER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_INTEGER, + arg2: *const *const ASN1_INTEGER, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_INTEGER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_INTEGER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_free_func__extern"] + pub fn sk_ASN1_INTEGER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_copy_func__extern"] + pub fn sk_ASN1_INTEGER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_call_delete_if_func__extern"] + pub fn sk_ASN1_INTEGER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new__extern"] + pub fn sk_ASN1_INTEGER_new(comp: sk_ASN1_INTEGER_cmp_func) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_new_null__extern"] + pub fn sk_ASN1_INTEGER_new_null() -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_num__extern"] + pub fn sk_ASN1_INTEGER_num(sk: *const stack_st_ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_zero__extern"] + pub fn sk_ASN1_INTEGER_zero(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_value__extern"] + pub fn sk_ASN1_INTEGER_value(sk: *const stack_st_ASN1_INTEGER, i: usize) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set__extern"] + pub fn sk_ASN1_INTEGER_set( + sk: *mut stack_st_ASN1_INTEGER, + i: usize, + p: *mut ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_free__extern"] + pub fn sk_ASN1_INTEGER_free(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop_free__extern"] + pub fn sk_ASN1_INTEGER_pop_free( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_insert__extern"] + pub fn sk_ASN1_INTEGER_insert( + sk: *mut stack_st_ASN1_INTEGER, + p: *mut ASN1_INTEGER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete__extern"] + pub fn sk_ASN1_INTEGER_delete( + sk: *mut stack_st_ASN1_INTEGER, + where_: usize, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_ptr__extern"] + pub fn sk_ASN1_INTEGER_delete_ptr( + sk: *mut stack_st_ASN1_INTEGER, + p: *const ASN1_INTEGER, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_delete_if__extern"] + pub fn sk_ASN1_INTEGER_delete_if( + sk: *mut stack_st_ASN1_INTEGER, + func: sk_ASN1_INTEGER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_find__extern"] + pub fn sk_ASN1_INTEGER_find( + sk: *const stack_st_ASN1_INTEGER, + out_index: *mut usize, + p: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_shift__extern"] + pub fn sk_ASN1_INTEGER_shift(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_push__extern"] + pub fn sk_ASN1_INTEGER_push(sk: *mut stack_st_ASN1_INTEGER, p: *mut ASN1_INTEGER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_pop__extern"] + pub fn sk_ASN1_INTEGER_pop(sk: *mut stack_st_ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_dup__extern"] + pub fn sk_ASN1_INTEGER_dup(sk: *const stack_st_ASN1_INTEGER) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort__extern"] + pub fn sk_ASN1_INTEGER_sort(sk: *mut stack_st_ASN1_INTEGER); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_sort_and_dedup__extern"] + pub fn sk_ASN1_INTEGER_sort_and_dedup( + sk: *mut stack_st_ASN1_INTEGER, + free_func: sk_ASN1_INTEGER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_is_sorted__extern"] + pub fn sk_ASN1_INTEGER_is_sorted(sk: *const stack_st_ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_set_cmp_func__extern"] + pub fn sk_ASN1_INTEGER_set_cmp_func( + sk: *mut stack_st_ASN1_INTEGER, + comp: sk_ASN1_INTEGER_cmp_func, + ) -> sk_ASN1_INTEGER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_INTEGER_deep_copy__extern"] + pub fn sk_ASN1_INTEGER_deep_copy( + sk: *const stack_st_ASN1_INTEGER, + copy_func: sk_ASN1_INTEGER_copy_func, + free_func: sk_ASN1_INTEGER_free_func, + ) -> *mut stack_st_ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_new() -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_free(str_: *mut ASN1_INTEGER); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_dup(x: *const ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn d2i_ASN1_INTEGER( + out: *mut *mut ASN1_INTEGER, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2d_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_INTEGER( + in_: *mut *mut ASN1_INTEGER, + outp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2c_ASN1_INTEGER(in_: *const ASN1_INTEGER, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_INTEGER_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_uint64(out: *mut ASN1_INTEGER, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set_int64(out: *mut ASN1_INTEGER, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_uint64(out: *mut u64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get_int64(out: *mut i64, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_cmp(x: *const ASN1_INTEGER, y: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_new() -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_free(str_: *mut ASN1_ENUMERATED); +} +unsafe extern "C" { + pub fn d2i_ASN1_ENUMERATED( + out: *mut *mut ASN1_ENUMERATED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn i2d_ASN1_ENUMERATED( + in_: *const ASN1_ENUMERATED, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ENUMERATED_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_uint64(out: *mut ASN1_ENUMERATED, v: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set_int64(out: *mut ASN1_ENUMERATED, v: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_uint64( + out: *mut u64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get_int64( + out: *mut i64, + a: *const ASN1_ENUMERATED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BN_to_ASN1_ENUMERATED( + bn: *const BIGNUM, + ai: *mut ASN1_ENUMERATED, + ) -> *mut ASN1_ENUMERATED; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_new() -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_free(str_: *mut ASN1_UTCTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_UTCTIME( + out: *mut *mut ASN1_UTCTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_UTCTIME(in_: *const ASN1_UTCTIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_UTCTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_check(a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set(s: *mut ASN1_UTCTIME, posix_time: i64) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_adj( + s: *mut ASN1_UTCTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_UTCTIME; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_set_string( + s: *mut ASN1_UTCTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_new() -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_free(str_: *mut ASN1_GENERALIZEDTIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_GENERALIZEDTIME( + out: *mut *mut ASN1_GENERALIZEDTIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_GENERALIZEDTIME( + in_: *const ASN1_GENERALIZEDTIME, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_GENERALIZEDTIME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_check(a: *const ASN1_GENERALIZEDTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_adj( + s: *mut ASN1_GENERALIZEDTIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_set_string( + s: *mut ASN1_GENERALIZEDTIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_new() -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_free(str_: *mut ASN1_TIME); +} +unsafe extern "C" { + pub fn d2i_ASN1_TIME( + out: *mut *mut ASN1_TIME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn i2d_ASN1_TIME(in_: *const ASN1_TIME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_diff( + out_days: *mut ::core::ffi::c_int, + out_seconds: *mut ::core::ffi::c_int, + from: *const ASN1_TIME, + to: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_posix(s: *mut ASN1_TIME, posix_time: i64) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set(s: *mut ASN1_TIME, time: time_t) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_adj( + s: *mut ASN1_TIME, + posix_time: i64, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_generalizedtime( + t: *const ASN1_TIME, + out: *mut *mut ASN1_GENERALIZEDTIME, + ) -> *mut ASN1_GENERALIZEDTIME; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_set_string_X509( + s: *mut ASN1_TIME, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_time_t(t: *const ASN1_TIME, out: *mut time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix(t: *const ASN1_TIME, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_to_posix_nonstandard(t: *const ASN1_TIME, out: *mut i64) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_NULL_new() -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn ASN1_NULL_free(null: *mut ASN1_NULL); +} +unsafe extern "C" { + pub fn d2i_ASN1_NULL( + out: *mut *mut ASN1_NULL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_NULL; +} +unsafe extern "C" { + pub fn i2d_ASN1_NULL(in_: *const ASN1_NULL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_NULL_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_OBJECT { + _unused: [u8; 0], +} +pub type sk_ASN1_OBJECT_free_func = + ::core::option::Option; +pub type sk_ASN1_OBJECT_copy_func = + ::core::option::Option *mut ASN1_OBJECT>; +pub type sk_ASN1_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_OBJECT, + arg2: *const *const ASN1_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_free_func__extern"] + pub fn sk_ASN1_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_copy_func__extern"] + pub fn sk_ASN1_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_call_delete_if_func__extern"] + pub fn sk_ASN1_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new__extern"] + pub fn sk_ASN1_OBJECT_new(comp: sk_ASN1_OBJECT_cmp_func) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_new_null__extern"] + pub fn sk_ASN1_OBJECT_new_null() -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_num__extern"] + pub fn sk_ASN1_OBJECT_num(sk: *const stack_st_ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_zero__extern"] + pub fn sk_ASN1_OBJECT_zero(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_value__extern"] + pub fn sk_ASN1_OBJECT_value(sk: *const stack_st_ASN1_OBJECT, i: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set__extern"] + pub fn sk_ASN1_OBJECT_set( + sk: *mut stack_st_ASN1_OBJECT, + i: usize, + p: *mut ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_free__extern"] + pub fn sk_ASN1_OBJECT_free(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop_free__extern"] + pub fn sk_ASN1_OBJECT_pop_free( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_insert__extern"] + pub fn sk_ASN1_OBJECT_insert( + sk: *mut stack_st_ASN1_OBJECT, + p: *mut ASN1_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete__extern"] + pub fn sk_ASN1_OBJECT_delete(sk: *mut stack_st_ASN1_OBJECT, where_: usize) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_ptr__extern"] + pub fn sk_ASN1_OBJECT_delete_ptr( + sk: *mut stack_st_ASN1_OBJECT, + p: *const ASN1_OBJECT, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_delete_if__extern"] + pub fn sk_ASN1_OBJECT_delete_if( + sk: *mut stack_st_ASN1_OBJECT, + func: sk_ASN1_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_find__extern"] + pub fn sk_ASN1_OBJECT_find( + sk: *const stack_st_ASN1_OBJECT, + out_index: *mut usize, + p: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_shift__extern"] + pub fn sk_ASN1_OBJECT_shift(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_push__extern"] + pub fn sk_ASN1_OBJECT_push(sk: *mut stack_st_ASN1_OBJECT, p: *mut ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_pop__extern"] + pub fn sk_ASN1_OBJECT_pop(sk: *mut stack_st_ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_dup__extern"] + pub fn sk_ASN1_OBJECT_dup(sk: *const stack_st_ASN1_OBJECT) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort__extern"] + pub fn sk_ASN1_OBJECT_sort(sk: *mut stack_st_ASN1_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_sort_and_dedup__extern"] + pub fn sk_ASN1_OBJECT_sort_and_dedup( + sk: *mut stack_st_ASN1_OBJECT, + free_func: sk_ASN1_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_is_sorted__extern"] + pub fn sk_ASN1_OBJECT_is_sorted(sk: *const stack_st_ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_set_cmp_func__extern"] + pub fn sk_ASN1_OBJECT_set_cmp_func( + sk: *mut stack_st_ASN1_OBJECT, + comp: sk_ASN1_OBJECT_cmp_func, + ) -> sk_ASN1_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_OBJECT_deep_copy__extern"] + pub fn sk_ASN1_OBJECT_deep_copy( + sk: *const stack_st_ASN1_OBJECT, + copy_func: sk_ASN1_OBJECT_copy_func, + free_func: sk_ASN1_OBJECT_free_func, + ) -> *mut stack_st_ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_create( + nid: ::core::ffi::c_int, + data: *const u8, + len: usize, + sn: *const ::core::ffi::c_char, + ln: *const ::core::ffi::c_char, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn ASN1_OBJECT_free(a: *mut ASN1_OBJECT); +} +unsafe extern "C" { + pub fn d2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn i2d_ASN1_OBJECT(in_: *const ASN1_OBJECT, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn c2i_ASN1_OBJECT( + out: *mut *mut ASN1_OBJECT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub static ASN1_OBJECT_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct asn1_type_st { + pub type_: ::core::ffi::c_int, + pub value: asn1_type_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union asn1_type_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub boolean: ASN1_BOOLEAN, + pub asn1_string: *mut ASN1_STRING, + pub object: *mut ASN1_OBJECT, + pub integer: *mut ASN1_INTEGER, + pub enumerated: *mut ASN1_ENUMERATED, + pub bit_string: *mut ASN1_BIT_STRING, + pub octet_string: *mut ASN1_OCTET_STRING, + pub printablestring: *mut ASN1_PRINTABLESTRING, + pub t61string: *mut ASN1_T61STRING, + pub ia5string: *mut ASN1_IA5STRING, + pub generalstring: *mut ASN1_GENERALSTRING, + pub bmpstring: *mut ASN1_BMPSTRING, + pub universalstring: *mut ASN1_UNIVERSALSTRING, + pub utctime: *mut ASN1_UTCTIME, + pub generalizedtime: *mut ASN1_GENERALIZEDTIME, + pub visiblestring: *mut ASN1_VISIBLESTRING, + pub utf8string: *mut ASN1_UTF8STRING, + pub set: *mut ASN1_STRING, + pub sequence: *mut ASN1_STRING, + pub asn1_value: *mut ASN1_VALUE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of asn1_type_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::boolean"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, boolean) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::object"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, object) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::integer"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, integer) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::enumerated"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, enumerated) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bit_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bit_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::octet_string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, octet_string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::printablestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, printablestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::t61string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, t61string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::ia5string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, ia5string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::bmpstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, bmpstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::universalstring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, universalstring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utctime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utctime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::generalizedtime"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, generalizedtime) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::visiblestring"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, visiblestring) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::utf8string"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, utf8string) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::set"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, set) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::sequence"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, sequence) - 0usize]; + ["Offset of field: asn1_type_st__bindgen_ty_1::asn1_value"] + [::core::mem::offset_of!(asn1_type_st__bindgen_ty_1, asn1_value) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of asn1_type_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of asn1_type_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: asn1_type_st::type_"][::core::mem::offset_of!(asn1_type_st, type_) - 0usize]; + ["Offset of field: asn1_type_st::value"][::core::mem::offset_of!(asn1_type_st, value) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_TYPE { + _unused: [u8; 0], +} +pub type sk_ASN1_TYPE_free_func = + ::core::option::Option; +pub type sk_ASN1_TYPE_copy_func = + ::core::option::Option *mut ASN1_TYPE>; +pub type sk_ASN1_TYPE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_TYPE, + arg2: *const *const ASN1_TYPE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_TYPE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_TYPE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_free_func__extern"] + pub fn sk_ASN1_TYPE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_copy_func__extern"] + pub fn sk_ASN1_TYPE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_cmp_func__extern"] + pub fn sk_ASN1_TYPE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_call_delete_if_func__extern"] + pub fn sk_ASN1_TYPE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new__extern"] + pub fn sk_ASN1_TYPE_new(comp: sk_ASN1_TYPE_cmp_func) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_new_null__extern"] + pub fn sk_ASN1_TYPE_new_null() -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_num__extern"] + pub fn sk_ASN1_TYPE_num(sk: *const stack_st_ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_zero__extern"] + pub fn sk_ASN1_TYPE_zero(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_value__extern"] + pub fn sk_ASN1_TYPE_value(sk: *const stack_st_ASN1_TYPE, i: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set__extern"] + pub fn sk_ASN1_TYPE_set( + sk: *mut stack_st_ASN1_TYPE, + i: usize, + p: *mut ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_free__extern"] + pub fn sk_ASN1_TYPE_free(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop_free__extern"] + pub fn sk_ASN1_TYPE_pop_free(sk: *mut stack_st_ASN1_TYPE, free_func: sk_ASN1_TYPE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_insert__extern"] + pub fn sk_ASN1_TYPE_insert( + sk: *mut stack_st_ASN1_TYPE, + p: *mut ASN1_TYPE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete__extern"] + pub fn sk_ASN1_TYPE_delete(sk: *mut stack_st_ASN1_TYPE, where_: usize) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_ptr__extern"] + pub fn sk_ASN1_TYPE_delete_ptr( + sk: *mut stack_st_ASN1_TYPE, + p: *const ASN1_TYPE, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_delete_if__extern"] + pub fn sk_ASN1_TYPE_delete_if( + sk: *mut stack_st_ASN1_TYPE, + func: sk_ASN1_TYPE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_find__extern"] + pub fn sk_ASN1_TYPE_find( + sk: *const stack_st_ASN1_TYPE, + out_index: *mut usize, + p: *const ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_shift__extern"] + pub fn sk_ASN1_TYPE_shift(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_push__extern"] + pub fn sk_ASN1_TYPE_push(sk: *mut stack_st_ASN1_TYPE, p: *mut ASN1_TYPE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_pop__extern"] + pub fn sk_ASN1_TYPE_pop(sk: *mut stack_st_ASN1_TYPE) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_dup__extern"] + pub fn sk_ASN1_TYPE_dup(sk: *const stack_st_ASN1_TYPE) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort__extern"] + pub fn sk_ASN1_TYPE_sort(sk: *mut stack_st_ASN1_TYPE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_sort_and_dedup__extern"] + pub fn sk_ASN1_TYPE_sort_and_dedup( + sk: *mut stack_st_ASN1_TYPE, + free_func: sk_ASN1_TYPE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_is_sorted__extern"] + pub fn sk_ASN1_TYPE_is_sorted(sk: *const stack_st_ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_set_cmp_func__extern"] + pub fn sk_ASN1_TYPE_set_cmp_func( + sk: *mut stack_st_ASN1_TYPE, + comp: sk_ASN1_TYPE_cmp_func, + ) -> sk_ASN1_TYPE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_TYPE_deep_copy__extern"] + pub fn sk_ASN1_TYPE_deep_copy( + sk: *const stack_st_ASN1_TYPE, + copy_func: sk_ASN1_TYPE_copy_func, + free_func: sk_ASN1_TYPE_free_func, + ) -> *mut stack_st_ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn ASN1_TYPE_free(a: *mut ASN1_TYPE); +} +unsafe extern "C" { + pub fn d2i_ASN1_TYPE( + out: *mut *mut ASN1_TYPE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn i2d_ASN1_TYPE(in_: *const ASN1_TYPE, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub static ASN1_ANY_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_set( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn ASN1_TYPE_set1( + a: *mut ASN1_TYPE, + type_: ::core::ffi::c_int, + value: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TYPE_cmp(a: *const ASN1_TYPE, b: *const ASN1_TYPE) -> ::core::ffi::c_int; +} +pub type ASN1_SEQUENCE_ANY = stack_st_ASN1_TYPE; +unsafe extern "C" { + pub fn d2i_ASN1_SEQUENCE_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SEQUENCE_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ASN1_SET_ANY( + out: *mut *mut ASN1_SEQUENCE_ANY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ASN1_SEQUENCE_ANY; +} +unsafe extern "C" { + pub fn i2d_ASN1_SET_ANY( + in_: *const ASN1_SEQUENCE_ANY, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_UTCTIME_print(out: *mut BIO, a: *const ASN1_UTCTIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_GENERALIZEDTIME_print( + out: *mut BIO, + a: *const ASN1_GENERALIZEDTIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_TIME_print(out: *mut BIO, a: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print(out: *mut BIO, str_: *const ASN1_STRING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex( + out: *mut BIO, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_print_ex_fp( + fp: *mut FILE, + str_: *const ASN1_STRING, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_INTEGER(bp: *mut BIO, a: *const ASN1_INTEGER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_ENUMERATED(bp: *mut BIO, a: *const ASN1_ENUMERATED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_OBJECT(bp: *mut BIO, a: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2a_ASN1_STRING( + bp: *mut BIO, + a: *const ASN1_STRING, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2t_ASN1_OBJECT( + buf: *mut ::core::ffi::c_char, + buf_len: ::core::ffi::c_int, + a: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_get_object( + inp: *mut *const ::core::ffi::c_uchar, + out_length: *mut ::core::ffi::c_long, + out_tag: *mut ::core::ffi::c_int, + out_class: *mut ::core::ffi::c_int, + max_len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_put_object( + outp: *mut *mut ::core::ffi::c_uchar, + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + xclass: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn ASN1_put_eoc(outp: *mut *mut ::core::ffi::c_uchar) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_object_size( + constructed: ::core::ffi::c_int, + length: ::core::ffi::c_int, + tag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_BIT_STRING_num_bytes( + str_: *const ASN1_BIT_STRING, + out: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask(mask: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn ASN1_STRING_set_default_mask_asc(p: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_STRING_get_default_mask() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn ASN1_STRING_TABLE_cleanup(); +} +unsafe extern "C" { + pub fn ASN1_INTEGER_set(a: *mut ASN1_INTEGER, v: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_set( + a: *mut ASN1_ENUMERATED, + v: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_INTEGER_get(a: *const ASN1_INTEGER) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::core::ffi::c_long; +} +pub type ASN1_TEMPLATE = ASN1_TEMPLATE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TLC_st { + _unused: [u8; 0], +} +pub type ASN1_TLC = ASN1_TLC_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_TEMPLATE_st { + pub flags: u32, + pub tag: ::core::ffi::c_int, + pub offset: ::core::ffi::c_ulong, + pub field_name: *const ::core::ffi::c_char, + pub item: *const ASN1_ITEM_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_TEMPLATE_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_TEMPLATE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::flags"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, flags) - 0usize]; + ["Offset of field: ASN1_TEMPLATE_st::tag"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, tag) - 4usize]; + ["Offset of field: ASN1_TEMPLATE_st::offset"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, offset) - 8usize]; + ["Offset of field: ASN1_TEMPLATE_st::field_name"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, field_name) - 16usize]; + ["Offset of field: ASN1_TEMPLATE_st::item"] + [::core::mem::offset_of!(ASN1_TEMPLATE_st, item) - 24usize]; +}; +pub type ASN1_ADB_TABLE = ASN1_ADB_TABLE_st; +pub type ASN1_ADB = ASN1_ADB_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_st { + pub flags: u32, + pub offset: ::core::ffi::c_ulong, + pub unused: *mut CRYPTO_MUST_BE_NULL, + pub tbl: *const ASN1_ADB_TABLE, + pub tblcount: ::core::ffi::c_long, + pub default_tt: *const ASN1_TEMPLATE, + pub null_tt: *const ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of ASN1_ADB_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_st::flags"][::core::mem::offset_of!(ASN1_ADB_st, flags) - 0usize]; + ["Offset of field: ASN1_ADB_st::offset"][::core::mem::offset_of!(ASN1_ADB_st, offset) - 8usize]; + ["Offset of field: ASN1_ADB_st::unused"] + [::core::mem::offset_of!(ASN1_ADB_st, unused) - 16usize]; + ["Offset of field: ASN1_ADB_st::tbl"][::core::mem::offset_of!(ASN1_ADB_st, tbl) - 24usize]; + ["Offset of field: ASN1_ADB_st::tblcount"] + [::core::mem::offset_of!(ASN1_ADB_st, tblcount) - 32usize]; + ["Offset of field: ASN1_ADB_st::default_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, default_tt) - 40usize]; + ["Offset of field: ASN1_ADB_st::null_tt"] + [::core::mem::offset_of!(ASN1_ADB_st, null_tt) - 48usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ADB_TABLE_st { + pub value: ::core::ffi::c_int, + pub tt: ASN1_TEMPLATE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ADB_TABLE_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ASN1_ADB_TABLE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ADB_TABLE_st::value"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, value) - 0usize]; + ["Offset of field: ASN1_ADB_TABLE_st::tt"] + [::core::mem::offset_of!(ASN1_ADB_TABLE_st, tt) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_ITEM_st { + pub itype: ::core::ffi::c_char, + pub utype: ::core::ffi::c_int, + pub templates: *const ASN1_TEMPLATE, + pub tcount: ::core::ffi::c_long, + pub funcs: *const ::core::ffi::c_void, + pub size: ::core::ffi::c_long, + pub sname: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_ITEM_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ASN1_ITEM_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_ITEM_st::itype"][::core::mem::offset_of!(ASN1_ITEM_st, itype) - 0usize]; + ["Offset of field: ASN1_ITEM_st::utype"][::core::mem::offset_of!(ASN1_ITEM_st, utype) - 4usize]; + ["Offset of field: ASN1_ITEM_st::templates"] + [::core::mem::offset_of!(ASN1_ITEM_st, templates) - 8usize]; + ["Offset of field: ASN1_ITEM_st::tcount"] + [::core::mem::offset_of!(ASN1_ITEM_st, tcount) - 16usize]; + ["Offset of field: ASN1_ITEM_st::funcs"] + [::core::mem::offset_of!(ASN1_ITEM_st, funcs) - 24usize]; + ["Offset of field: ASN1_ITEM_st::size"][::core::mem::offset_of!(ASN1_ITEM_st, size) - 32usize]; + ["Offset of field: ASN1_ITEM_st::sname"] + [::core::mem::offset_of!(ASN1_ITEM_st, sname) - 40usize]; +}; +pub type ASN1_aux_cb = ::core::option::Option< + unsafe extern "C" fn( + operation: ::core::ffi::c_int, + in_: *mut *mut ASN1_VALUE, + it: *const ASN1_ITEM, + exarg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ASN1_AUX_st { + pub app_data: *mut ::core::ffi::c_void, + pub flags: u32, + pub ref_offset: ::core::ffi::c_int, + pub asn1_cb: ASN1_aux_cb, + pub enc_offset: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ASN1_AUX_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ASN1_AUX_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ASN1_AUX_st::app_data"] + [::core::mem::offset_of!(ASN1_AUX_st, app_data) - 0usize]; + ["Offset of field: ASN1_AUX_st::flags"][::core::mem::offset_of!(ASN1_AUX_st, flags) - 8usize]; + ["Offset of field: ASN1_AUX_st::ref_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, ref_offset) - 12usize]; + ["Offset of field: ASN1_AUX_st::asn1_cb"] + [::core::mem::offset_of!(ASN1_AUX_st, asn1_cb) - 16usize]; + ["Offset of field: ASN1_AUX_st::enc_offset"] + [::core::mem::offset_of!(ASN1_AUX_st, enc_offset) - 24usize]; +}; +pub type ASN1_AUX = ASN1_AUX_st; +unsafe extern "C" { + pub static ASN1_SEQUENCE_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ASN1_VALUE { + _unused: [u8; 0], +} +pub type sk_ASN1_VALUE_free_func = + ::core::option::Option; +pub type sk_ASN1_VALUE_copy_func = + ::core::option::Option *mut ASN1_VALUE>; +pub type sk_ASN1_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ASN1_VALUE, + arg2: *const *const ASN1_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_ASN1_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ASN1_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_free_func__extern"] + pub fn sk_ASN1_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_copy_func__extern"] + pub fn sk_ASN1_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_cmp_func__extern"] + pub fn sk_ASN1_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_call_delete_if_func__extern"] + pub fn sk_ASN1_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new__extern"] + pub fn sk_ASN1_VALUE_new(comp: sk_ASN1_VALUE_cmp_func) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_new_null__extern"] + pub fn sk_ASN1_VALUE_new_null() -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_num__extern"] + pub fn sk_ASN1_VALUE_num(sk: *const stack_st_ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_zero__extern"] + pub fn sk_ASN1_VALUE_zero(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_value__extern"] + pub fn sk_ASN1_VALUE_value(sk: *const stack_st_ASN1_VALUE, i: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set__extern"] + pub fn sk_ASN1_VALUE_set( + sk: *mut stack_st_ASN1_VALUE, + i: usize, + p: *mut ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_free__extern"] + pub fn sk_ASN1_VALUE_free(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop_free__extern"] + pub fn sk_ASN1_VALUE_pop_free(sk: *mut stack_st_ASN1_VALUE, free_func: sk_ASN1_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_insert__extern"] + pub fn sk_ASN1_VALUE_insert( + sk: *mut stack_st_ASN1_VALUE, + p: *mut ASN1_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete__extern"] + pub fn sk_ASN1_VALUE_delete(sk: *mut stack_st_ASN1_VALUE, where_: usize) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_ptr__extern"] + pub fn sk_ASN1_VALUE_delete_ptr( + sk: *mut stack_st_ASN1_VALUE, + p: *const ASN1_VALUE, + ) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_delete_if__extern"] + pub fn sk_ASN1_VALUE_delete_if( + sk: *mut stack_st_ASN1_VALUE, + func: sk_ASN1_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_find__extern"] + pub fn sk_ASN1_VALUE_find( + sk: *const stack_st_ASN1_VALUE, + out_index: *mut usize, + p: *const ASN1_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_shift__extern"] + pub fn sk_ASN1_VALUE_shift(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_push__extern"] + pub fn sk_ASN1_VALUE_push(sk: *mut stack_st_ASN1_VALUE, p: *mut ASN1_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_pop__extern"] + pub fn sk_ASN1_VALUE_pop(sk: *mut stack_st_ASN1_VALUE) -> *mut ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_dup__extern"] + pub fn sk_ASN1_VALUE_dup(sk: *const stack_st_ASN1_VALUE) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort__extern"] + pub fn sk_ASN1_VALUE_sort(sk: *mut stack_st_ASN1_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_sort_and_dedup__extern"] + pub fn sk_ASN1_VALUE_sort_and_dedup( + sk: *mut stack_st_ASN1_VALUE, + free_func: sk_ASN1_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_is_sorted__extern"] + pub fn sk_ASN1_VALUE_is_sorted(sk: *const stack_st_ASN1_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_set_cmp_func__extern"] + pub fn sk_ASN1_VALUE_set_cmp_func( + sk: *mut stack_st_ASN1_VALUE, + comp: sk_ASN1_VALUE_cmp_func, + ) -> sk_ASN1_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ASN1_VALUE_deep_copy__extern"] + pub fn sk_ASN1_VALUE_deep_copy( + sk: *const stack_st_ASN1_VALUE, + copy_func: sk_ASN1_VALUE_copy_func, + free_func: sk_ASN1_VALUE_free_func, + ) -> *mut stack_st_ASN1_VALUE; +} +unsafe extern "C" { + pub fn EVP_EncodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_EncodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodedLength(out_len: *mut usize, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBase64( + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_new() -> *mut EVP_ENCODE_CTX; +} +unsafe extern "C" { + pub fn EVP_ENCODE_CTX_free(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_EncodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ); +} +unsafe extern "C" { + pub fn EVP_EncodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn EVP_DecodeInit(ctx: *mut EVP_ENCODE_CTX); +} +unsafe extern "C" { + pub fn EVP_DecodeUpdate( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeFinal( + ctx: *mut EVP_ENCODE_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecodeBlock(dst: *mut u8, src: *const u8, src_len: usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_encode_ctx_st { + pub data_used: ::core::ffi::c_uint, + pub data: [u8; 48usize], + pub eof_seen: ::core::ffi::c_char, + pub error_encountered: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_encode_ctx_st"][::core::mem::size_of::() - 56usize]; + ["Alignment of evp_encode_ctx_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: evp_encode_ctx_st::data_used"] + [::core::mem::offset_of!(evp_encode_ctx_st, data_used) - 0usize]; + ["Offset of field: evp_encode_ctx_st::data"] + [::core::mem::offset_of!(evp_encode_ctx_st, data) - 4usize]; + ["Offset of field: evp_encode_ctx_st::eof_seen"] + [::core::mem::offset_of!(evp_encode_ctx_st, eof_seen) - 52usize]; + ["Offset of field: evp_encode_ctx_st::error_encountered"] + [::core::mem::offset_of!(evp_encode_ctx_st, error_encountered) - 53usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct blake2b_state_st { + pub h: [u64; 8usize], + pub t_low: u64, + pub t_high: u32, + pub block_used: u32, + pub block: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of blake2b_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of blake2b_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: blake2b_state_st::h"][::core::mem::offset_of!(blake2b_state_st, h) - 0usize]; + ["Offset of field: blake2b_state_st::t_low"] + [::core::mem::offset_of!(blake2b_state_st, t_low) - 64usize]; + ["Offset of field: blake2b_state_st::t_high"] + [::core::mem::offset_of!(blake2b_state_st, t_high) - 72usize]; + ["Offset of field: blake2b_state_st::block_used"] + [::core::mem::offset_of!(blake2b_state_st, block_used) - 76usize]; + ["Offset of field: blake2b_state_st::block"] + [::core::mem::offset_of!(blake2b_state_st, block) - 80usize]; +}; +unsafe extern "C" { + pub fn BLAKE2B256_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B256_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B256(data: *const u8, len: usize, out: *mut u8); +} +unsafe extern "C" { + pub fn BLAKE2B512_Init(b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512_Update(b2b: *mut BLAKE2B_CTX, data: *const ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn BLAKE2B512_Final(out: *mut u8, b2b: *mut BLAKE2B_CTX); +} +unsafe extern "C" { + pub fn BLAKE2B512(data: *const u8, len: usize, out: *mut u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bf_key_st { + pub P: [u32; 18usize], + pub S: [u32; 1024usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bf_key_st"][::core::mem::size_of::() - 4168usize]; + ["Alignment of bf_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: bf_key_st::P"][::core::mem::offset_of!(bf_key_st, P) - 0usize]; + ["Offset of field: bf_key_st::S"][::core::mem::offset_of!(bf_key_st, S) - 72usize]; +}; +pub type BF_KEY = bf_key_st; +unsafe extern "C" { + pub fn BF_set_key(key: *mut BF_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn BF_encrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_decrypt(data: *mut u32, key: *const BF_KEY); +} +unsafe extern "C" { + pub fn BF_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const BF_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn BF_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const BF_KEY, + ivec: *mut u8, + enc: ::core::ffi::c_int, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbs_st { + pub data: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbs_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of cbs_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbs_st::data"][::core::mem::offset_of!(cbs_st, data) - 0usize]; + ["Offset of field: cbs_st::len"][::core::mem::offset_of!(cbs_st, len) - 8usize]; +}; +unsafe extern "C" { + #[link_name = "CBS_init__extern"] + pub fn CBS_init(cbs: *mut CBS, data: *const u8, len: usize); +} +unsafe extern "C" { + pub fn CBS_skip(cbs: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "CBS_data__extern"] + pub fn CBS_data(cbs: *const CBS) -> *const u8; +} +unsafe extern "C" { + #[link_name = "CBS_len__extern"] + pub fn CBS_len(cbs: *const CBS) -> usize; +} +unsafe extern "C" { + pub fn CBS_stow( + cbs: *const CBS, + out_ptr: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_strdup( + cbs: *const CBS, + out_ptr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_contains_zero_byte(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_mem_equal(cbs: *const CBS, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16le(cbs: *mut CBS, out: *mut u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u32le(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u48(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64le(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_last_u8(cbs: *mut CBS, out: *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_bytes(cbs: *mut CBS, out: *mut CBS, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_copy_bytes(cbs: *mut CBS, out: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u8_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u16_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u24_length_prefixed(cbs: *mut CBS, out: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first(cbs: *mut CBS, out: *mut CBS, c: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_until_first_not_of( + cbs: *mut CBS, + out: *mut CBS, + chars: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_u64_decimal(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + tag_value: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_peek_any_asn1_tag(cbs: *const CBS) -> CBS_ASN1_TAG; +} +unsafe extern "C" { + pub fn CBS_peek_asn1_tag(cbs: *const CBS, tag_value: CBS_ASN1_TAG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_any_ber_asn1_element( + cbs: *mut CBS, + out: *mut CBS, + out_tag: *mut CBS_ASN1_TAG, + out_header_len: *mut usize, + out_ber_found: *mut ::core::ffi::c_int, + out_indefinite: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64(cbs: *mut CBS, out: *mut u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_uint64_with_tag( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64(cbs: *mut CBS, out: *mut i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_int64_with_tag( + cbs: *mut CBS, + out: *mut i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_asn1_bool(cbs: *mut CBS, out: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_octet_string( + cbs: *mut CBS, + out: *mut CBS, + out_present: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_uint64( + cbs: *mut CBS, + out: *mut u64, + tag: CBS_ASN1_TAG, + default_value: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_optional_asn1_bool( + cbs: *mut CBS, + out: *mut ::core::ffi::c_int, + tag: CBS_ASN1_TAG, + default_value: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_bitstring(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_bitstring_has_bit( + cbs: *const CBS, + bit: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_integer( + cbs: *const CBS, + out_is_negative: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_unsigned_asn1_integer(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_is_valid_asn1_relative_oid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_asn1_relative_oid_to_text(cbs: *const CBS) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CBS_parse_generalized_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_parse_utc_time( + cbs: *const CBS, + out_tm: *mut tm, + allow_timezone_offset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_buffer_st { + pub buf: *mut u8, + pub len: usize, + pub cap: usize, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_buffer_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_buffer_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_buffer_st::buf"][::core::mem::offset_of!(cbb_buffer_st, buf) - 0usize]; + ["Offset of field: cbb_buffer_st::len"][::core::mem::offset_of!(cbb_buffer_st, len) - 8usize]; + ["Offset of field: cbb_buffer_st::cap"][::core::mem::offset_of!(cbb_buffer_st, cap) - 16usize]; +}; +impl cbb_buffer_st { + #[inline] + pub fn can_resize(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_can_resize(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn can_resize_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_can_resize_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_error(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + can_resize: ::core::ffi::c_uint, + error: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let can_resize: u32 = unsafe { ::core::mem::transmute(can_resize) }; + can_resize as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let error: u32 = unsafe { ::core::mem::transmute(error) }; + error as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cbb_child_st { + pub base: *mut cbb_buffer_st, + pub offset: usize, + pub pending_len_len: u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u16; 3usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_child_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of cbb_child_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_child_st::base"][::core::mem::offset_of!(cbb_child_st, base) - 0usize]; + ["Offset of field: cbb_child_st::offset"] + [::core::mem::offset_of!(cbb_child_st, offset) - 8usize]; + ["Offset of field: cbb_child_st::pending_len_len"] + [::core::mem::offset_of!(cbb_child_st, pending_len_len) - 16usize]; +}; +impl cbb_child_st { + #[inline] + pub fn pending_is_asn1(&self) -> ::core::ffi::c_uint { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pending_is_asn1(&mut self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pending_is_asn1_raw(this: *const Self) -> ::core::ffi::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pending_is_asn1_raw(this: *mut Self, val: ::core::ffi::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pending_is_asn1: ::core::ffi::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pending_is_asn1: u32 = unsafe { ::core::mem::transmute(pending_is_asn1) }; + pending_is_asn1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cbb_st { + pub child: *mut CBB, + pub is_child: ::core::ffi::c_char, + pub u: cbb_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cbb_st__bindgen_ty_1 { + pub base: cbb_buffer_st, + pub child: cbb_child_st, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st__bindgen_ty_1"][::core::mem::size_of::() - 32usize]; + ["Alignment of cbb_st__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st__bindgen_ty_1::base"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, base) - 0usize]; + ["Offset of field: cbb_st__bindgen_ty_1::child"] + [::core::mem::offset_of!(cbb_st__bindgen_ty_1, child) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cbb_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of cbb_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: cbb_st::child"][::core::mem::offset_of!(cbb_st, child) - 0usize]; + ["Offset of field: cbb_st::is_child"][::core::mem::offset_of!(cbb_st, is_child) - 8usize]; + ["Offset of field: cbb_st::u"][::core::mem::offset_of!(cbb_st, u) - 16usize]; +}; +unsafe extern "C" { + pub fn CBB_zero(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_init(cbb: *mut CBB, initial_capacity: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_init_fixed(cbb: *mut CBB, buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_cleanup(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_finish( + cbb: *mut CBB, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_data(cbb: *const CBB) -> *mut u8; +} +unsafe extern "C" { + pub fn CBB_len(cbb: *const CBB) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_u8_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24_length_prefixed(cbb: *mut CBB, out_contents: *mut CBB) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1( + cbb: *mut CBB, + out_contents: *mut CBB, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_bytes(cbb: *mut CBB, data: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_zeros(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_space(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_reserve(cbb: *mut CBB, out_data: *mut *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_did_write(cbb: *mut CBB, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u8(cbb: *mut CBB, value: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u16le(cbb: *mut CBB, value: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u24(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u32le(cbb: *mut CBB, value: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_u64le(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_discard(cbb: *mut CBB, len: usize); +} +unsafe extern "C" { + pub fn CBB_discard_child(cbb: *mut CBB); +} +unsafe extern "C" { + pub fn CBB_add_asn1_element( + cbb: *mut CBB, + tag: CBS_ASN1_TAG, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_uint64_with_tag( + cbb: *mut CBB, + value: u64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64(cbb: *mut CBB, value: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_int64_with_tag( + cbb: *mut CBB, + value: i64, + tag: CBS_ASN1_TAG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_octet_string( + cbb: *mut CBB, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_bool(cbb: *mut CBB, value: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_relative_oid_from_text( + cbb: *mut CBB, + text: *const ::core::ffi::c_char, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_asn1_oid_component(cbb: *mut CBB, value: u64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_flush_asn1_set_of(cbb: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf8(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_latin1(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_ucs2_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBS_get_utf32_be(cbs: *mut CBS, out: *mut u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_get_utf8_len(u: u32) -> usize; +} +unsafe extern "C" { + pub fn CBB_add_utf8(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_latin1(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_ucs2_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CBB_add_utf32_be(cbb: *mut CBB, u: u32) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cast_key_st { + pub data: [u32; 32usize], + pub short_key: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cast_key_st"][::core::mem::size_of::() - 132usize]; + ["Alignment of cast_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: cast_key_st::data"][::core::mem::offset_of!(cast_key_st, data) - 0usize]; + ["Offset of field: cast_key_st::short_key"] + [::core::mem::offset_of!(cast_key_st, short_key) - 128usize]; +}; +pub type CAST_KEY = cast_key_st; +unsafe extern "C" { + pub fn CAST_set_key(key: *mut CAST_KEY, len: usize, data: *const u8); +} +unsafe extern "C" { + pub fn CAST_ecb_encrypt( + in_: *const u8, + out: *mut u8, + key: *const CAST_KEY, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_encrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_decrypt(data: *mut u32, key: *const CAST_KEY); +} +unsafe extern "C" { + pub fn CAST_cbc_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + ks: *const CAST_KEY, + iv: *mut u8, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CAST_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: usize, + schedule: *const CAST_KEY, + ivec: *mut u8, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn CRYPTO_chacha_20( + out: *mut u8, + in_: *const u8, + in_len: usize, + key: *const u8, + nonce: *const u8, + counter: u32, + ); +} +unsafe extern "C" { + pub fn EVP_rc4() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_enc_null() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_rc2_40_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_get_cipherbynid(nid: ::core::ffi::c_int) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_init(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cleanup(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_copy( + out: *mut EVP_CIPHER_CTX, + in_: *const EVP_CIPHER_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_reset(ctx: *mut EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit_ex( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + impl_: *mut ENGINE, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdateAAD( + ctx: *mut EVP_CIPHER_CTX, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex2( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_next_update(ctx: *const EVP_CIPHER_CTX, in_len: usize) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_max_final(ctx: *const EVP_CIPHER_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_cipher(ctx: *const EVP_CIPHER_CTX) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_nid(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_encrypting(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_get_app_data(ctx: *const EVP_CIPHER_CTX) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_app_data(ctx: *mut EVP_CIPHER_CTX, data: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_flags(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_mode(ctx: *const EVP_CIPHER_CTX) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_ctrl( + ctx: *mut EVP_CIPHER_CTX, + command: ::core::ffi::c_int, + arg: ::core::ffi::c_int, + ptr: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_padding( + ctx: *mut EVP_CIPHER_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_key_length( + ctx: *mut EVP_CIPHER_CTX, + key_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_nid(cipher: *const EVP_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EVP_CIPHER_flags(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_CIPHER_mode(cipher: *const EVP_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn EVP_BytesToKey( + type_: *const EVP_CIPHER, + md: *const EVP_MD, + salt: *const u8, + data: *const u8, + data_len: usize, + count: ::core::ffi::c_uint, + key: *mut u8, + iv: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + enc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptInit( + ctx: *mut EVP_CIPHER_CTX, + cipher: *const EVP_CIPHER, + key: *const u8, + iv: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptUpdate( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + in_: *const u8, + in_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CipherFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_EncryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DecryptFinal_ex( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Cipher( + ctx: *mut EVP_CIPHER_CTX, + out: *mut u8, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_cipher_alias( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_cipherbyname(name: *const ::core::ffi::c_char) -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ctr() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_gcm() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_ofb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_des_ede3_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_128_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb128() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_192_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_aes_256_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_bf_cfb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_ecb() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_cast5_cbc() -> *const EVP_CIPHER; +} +unsafe extern "C" { + pub fn EVP_CIPHER_CTX_set_flags(ctx: *const EVP_CIPHER_CTX, flags: u32); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_ctx_st { + pub cipher: *const EVP_CIPHER, + pub app_data: *mut ::core::ffi::c_void, + pub cipher_data: *mut ::core::ffi::c_void, + pub key_len: ::core::ffi::c_uint, + pub encrypt: ::core::ffi::c_int, + pub flags: u32, + pub oiv: [u8; 16usize], + pub iv: [u8; 16usize], + pub buf: [u8; 32usize], + pub buf_len: ::core::ffi::c_int, + pub num: ::core::ffi::c_uint, + pub final_used: ::core::ffi::c_int, + pub final_: [u8; 32usize], + pub poisoned: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_ctx_st"][::core::mem::size_of::() - 152usize]; + ["Alignment of evp_cipher_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_ctx_st::app_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, app_data) - 8usize]; + ["Offset of field: evp_cipher_ctx_st::cipher_data"] + [::core::mem::offset_of!(evp_cipher_ctx_st, cipher_data) - 16usize]; + ["Offset of field: evp_cipher_ctx_st::key_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, key_len) - 24usize]; + ["Offset of field: evp_cipher_ctx_st::encrypt"] + [::core::mem::offset_of!(evp_cipher_ctx_st, encrypt) - 28usize]; + ["Offset of field: evp_cipher_ctx_st::flags"] + [::core::mem::offset_of!(evp_cipher_ctx_st, flags) - 32usize]; + ["Offset of field: evp_cipher_ctx_st::oiv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, oiv) - 36usize]; + ["Offset of field: evp_cipher_ctx_st::iv"] + [::core::mem::offset_of!(evp_cipher_ctx_st, iv) - 52usize]; + ["Offset of field: evp_cipher_ctx_st::buf"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf) - 68usize]; + ["Offset of field: evp_cipher_ctx_st::buf_len"] + [::core::mem::offset_of!(evp_cipher_ctx_st, buf_len) - 100usize]; + ["Offset of field: evp_cipher_ctx_st::num"] + [::core::mem::offset_of!(evp_cipher_ctx_st, num) - 104usize]; + ["Offset of field: evp_cipher_ctx_st::final_used"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_used) - 108usize]; + ["Offset of field: evp_cipher_ctx_st::final_"] + [::core::mem::offset_of!(evp_cipher_ctx_st, final_) - 112usize]; + ["Offset of field: evp_cipher_ctx_st::poisoned"] + [::core::mem::offset_of!(evp_cipher_ctx_st, poisoned) - 144usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_cipher_info_st { + pub cipher: *const EVP_CIPHER, + pub iv: [::core::ffi::c_uchar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_cipher_info_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of evp_cipher_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_cipher_info_st::cipher"] + [::core::mem::offset_of!(evp_cipher_info_st, cipher) - 0usize]; + ["Offset of field: evp_cipher_info_st::iv"] + [::core::mem::offset_of!(evp_cipher_info_st, iv) - 8usize]; +}; +pub type EVP_CIPHER_INFO = evp_cipher_info_st; +unsafe extern "C" { + pub fn AES_CMAC( + out: *mut u8, + key: *const u8, + key_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_CTX_new() -> *mut CMAC_CTX; +} +unsafe extern "C" { + pub fn CMAC_CTX_free(ctx: *mut CMAC_CTX); +} +unsafe extern "C" { + pub fn CMAC_CTX_copy(out: *mut CMAC_CTX, in_: *const CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Init( + ctx: *mut CMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + cipher: *const EVP_CIPHER, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Reset(ctx: *mut CMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Update(ctx: *mut CMAC_CTX, in_: *const u8, in_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CMAC_Final(ctx: *mut CMAC_CTX, out: *mut u8, out_len: *mut usize) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct conf_value_st { + pub section: *mut ::core::ffi::c_char, + pub name: *mut ::core::ffi::c_char, + pub value: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of conf_value_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of conf_value_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: conf_value_st::section"] + [::core::mem::offset_of!(conf_value_st, section) - 0usize]; + ["Offset of field: conf_value_st::name"][::core::mem::offset_of!(conf_value_st, name) - 8usize]; + ["Offset of field: conf_value_st::value"] + [::core::mem::offset_of!(conf_value_st, value) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CONF_VALUE { + _unused: [u8; 0], +} +pub type sk_CONF_VALUE_free_func = + ::core::option::Option; +pub type sk_CONF_VALUE_copy_func = + ::core::option::Option *mut CONF_VALUE>; +pub type sk_CONF_VALUE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CONF_VALUE, + arg2: *const *const CONF_VALUE, + ) -> ::core::ffi::c_int, +>; +pub type sk_CONF_VALUE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CONF_VALUE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_free_func__extern"] + pub fn sk_CONF_VALUE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_copy_func__extern"] + pub fn sk_CONF_VALUE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_cmp_func__extern"] + pub fn sk_CONF_VALUE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_call_delete_if_func__extern"] + pub fn sk_CONF_VALUE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new__extern"] + pub fn sk_CONF_VALUE_new(comp: sk_CONF_VALUE_cmp_func) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_new_null__extern"] + pub fn sk_CONF_VALUE_new_null() -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_num__extern"] + pub fn sk_CONF_VALUE_num(sk: *const stack_st_CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_zero__extern"] + pub fn sk_CONF_VALUE_zero(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_value__extern"] + pub fn sk_CONF_VALUE_value(sk: *const stack_st_CONF_VALUE, i: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set__extern"] + pub fn sk_CONF_VALUE_set( + sk: *mut stack_st_CONF_VALUE, + i: usize, + p: *mut CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_free__extern"] + pub fn sk_CONF_VALUE_free(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop_free__extern"] + pub fn sk_CONF_VALUE_pop_free(sk: *mut stack_st_CONF_VALUE, free_func: sk_CONF_VALUE_free_func); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_insert__extern"] + pub fn sk_CONF_VALUE_insert( + sk: *mut stack_st_CONF_VALUE, + p: *mut CONF_VALUE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete__extern"] + pub fn sk_CONF_VALUE_delete(sk: *mut stack_st_CONF_VALUE, where_: usize) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_ptr__extern"] + pub fn sk_CONF_VALUE_delete_ptr( + sk: *mut stack_st_CONF_VALUE, + p: *const CONF_VALUE, + ) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_delete_if__extern"] + pub fn sk_CONF_VALUE_delete_if( + sk: *mut stack_st_CONF_VALUE, + func: sk_CONF_VALUE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_find__extern"] + pub fn sk_CONF_VALUE_find( + sk: *const stack_st_CONF_VALUE, + out_index: *mut usize, + p: *const CONF_VALUE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_shift__extern"] + pub fn sk_CONF_VALUE_shift(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_push__extern"] + pub fn sk_CONF_VALUE_push(sk: *mut stack_st_CONF_VALUE, p: *mut CONF_VALUE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_pop__extern"] + pub fn sk_CONF_VALUE_pop(sk: *mut stack_st_CONF_VALUE) -> *mut CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_dup__extern"] + pub fn sk_CONF_VALUE_dup(sk: *const stack_st_CONF_VALUE) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort__extern"] + pub fn sk_CONF_VALUE_sort(sk: *mut stack_st_CONF_VALUE); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_sort_and_dedup__extern"] + pub fn sk_CONF_VALUE_sort_and_dedup( + sk: *mut stack_st_CONF_VALUE, + free_func: sk_CONF_VALUE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_is_sorted__extern"] + pub fn sk_CONF_VALUE_is_sorted(sk: *const stack_st_CONF_VALUE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_set_cmp_func__extern"] + pub fn sk_CONF_VALUE_set_cmp_func( + sk: *mut stack_st_CONF_VALUE, + comp: sk_CONF_VALUE_cmp_func, + ) -> sk_CONF_VALUE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CONF_VALUE_deep_copy__extern"] + pub fn sk_CONF_VALUE_deep_copy( + sk: *const stack_st_CONF_VALUE, + copy_func: sk_CONF_VALUE_copy_func, + free_func: sk_CONF_VALUE_free_func, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_new(method: *mut ::core::ffi::c_void) -> *mut CONF; +} +unsafe extern "C" { + pub fn NCONF_free(conf: *mut CONF); +} +unsafe extern "C" { + pub fn NCONF_load( + conf: *mut CONF, + filename: *const ::core::ffi::c_char, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_load_bio( + conf: *mut CONF, + bio: *mut BIO, + out_error_line: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NCONF_get_section( + conf: *const CONF, + section: *const ::core::ffi::c_char, + ) -> *const stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn NCONF_get_string( + conf: *const CONF, + section: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CONF_modules_load_file( + filename: *const ::core::ffi::c_char, + appname: *const ::core::ffi::c_char, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CONF_modules_unload(all: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn CONF_modules_free(); +} +unsafe extern "C" { + pub fn OPENSSL_config(config_name: *const ::core::ffi::c_char); +} +unsafe extern "C" { + pub fn OPENSSL_no_config(); +} +unsafe extern "C" { + pub fn SHA224_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Init(sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Update( + sha: *mut SHA256_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256_Final(out: *mut u8, sha: *mut SHA256_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA256_Transform(sha: *mut SHA256_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SHA256_TransformBlocks(state: *mut u32, data: *const u8, num_blocks: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha256_state_st { + pub h: [u32; 8usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, + pub md_len: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha256_state_st"][::core::mem::size_of::() - 112usize]; + ["Alignment of sha256_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha256_state_st::h"][::core::mem::offset_of!(sha256_state_st, h) - 0usize]; + ["Offset of field: sha256_state_st::Nl"] + [::core::mem::offset_of!(sha256_state_st, Nl) - 32usize]; + ["Offset of field: sha256_state_st::Nh"] + [::core::mem::offset_of!(sha256_state_st, Nh) - 36usize]; + ["Offset of field: sha256_state_st::data"] + [::core::mem::offset_of!(sha256_state_st, data) - 40usize]; + ["Offset of field: sha256_state_st::num"] + [::core::mem::offset_of!(sha256_state_st, num) - 104usize]; + ["Offset of field: sha256_state_st::md_len"] + [::core::mem::offset_of!(sha256_state_st, md_len) - 108usize]; +}; +unsafe extern "C" { + pub fn SHA384_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA384(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_Transform(sha: *mut SHA512_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha512_state_st { + pub h: [u64; 8usize], + pub num: u16, + pub md_len: u16, + pub bytes_so_far_high: u32, + pub bytes_so_far_low: u64, + pub p: [u8; 128usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha512_state_st"][::core::mem::size_of::() - 208usize]; + ["Alignment of sha512_state_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: sha512_state_st::h"][::core::mem::offset_of!(sha512_state_st, h) - 0usize]; + ["Offset of field: sha512_state_st::num"] + [::core::mem::offset_of!(sha512_state_st, num) - 64usize]; + ["Offset of field: sha512_state_st::md_len"] + [::core::mem::offset_of!(sha512_state_st, md_len) - 66usize]; + ["Offset of field: sha512_state_st::bytes_so_far_high"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_high) - 68usize]; + ["Offset of field: sha512_state_st::bytes_so_far_low"] + [::core::mem::offset_of!(sha512_state_st, bytes_so_far_low) - 72usize]; + ["Offset of field: sha512_state_st::p"][::core::mem::offset_of!(sha512_state_st, p) - 80usize]; +}; +unsafe extern "C" { + pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_256(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA512_224_Init(sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Update( + sha: *mut SHA512_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA512_224(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Init(sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Update( + sha: *mut SHA_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1_Final(out: *mut u8, sha: *mut SHA_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SHA1(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn SHA1_Transform(sha: *mut SHA_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sha_state_st { + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1, + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sha_state_st__bindgen_ty_1 { + pub h: [u32; 5usize], + pub __bindgen_anon_1: sha_state_st__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sha_state_st__bindgen_ty_1__bindgen_ty_1 { + pub h0: u32, + pub h1: u32, + pub h2: u32, + pub h3: u32, + pub h4: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h0"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h0) - 0usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h1"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h1) - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h2"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h2) - 8usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h3"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h3) - 12usize]; + ["Offset of field: sha_state_st__bindgen_ty_1__bindgen_ty_1::h4"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1__bindgen_ty_1, h4) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st__bindgen_ty_1"] + [::core::mem::size_of::() - 20usize]; + ["Alignment of sha_state_st__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st__bindgen_ty_1::h"] + [::core::mem::offset_of!(sha_state_st__bindgen_ty_1, h) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sha_state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of sha_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: sha_state_st::Nl"][::core::mem::offset_of!(sha_state_st, Nl) - 20usize]; + ["Offset of field: sha_state_st::Nh"][::core::mem::offset_of!(sha_state_st, Nh) - 24usize]; + ["Offset of field: sha_state_st::data"][::core::mem::offset_of!(sha_state_st, data) - 28usize]; + ["Offset of field: sha_state_st::num"][::core::mem::offset_of!(sha_state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_fips_186_2_prf(out: *mut u8, out_len: usize, xkey: *const u8); +} +unsafe extern "C" { + pub fn OPENSSL_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_zalloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_calloc(num: usize, size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_free(ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn OPENSSL_cleanse(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_memcmp( + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_hash32(ptr: *const ::core::ffi::c_void, len: usize) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strhash(s: *const ::core::ffi::c_char) -> u32; +} +unsafe extern "C" { + pub fn OPENSSL_strdup(s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_strnlen(s: *const ::core::ffi::c_char, len: usize) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_isalpha(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isxdigit(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_fromxdigit(out: *mut u8, c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isalnum(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_tolower(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_isspace(c: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strcasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strncasecmp( + a: *const ::core::ffi::c_char, + b: *const ::core::ffi::c_char, + n: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_snprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_vsnprintf( + buf: *mut ::core::ffi::c_char, + n: usize, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_vasprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + args: *mut __va_list_tag, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_asprintf( + str_: *mut *mut ::core::ffi::c_char, + format: *const ::core::ffi::c_char, + ... + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_strndup( + str_: *const ::core::ffi::c_char, + size: usize, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OPENSSL_memdup( + data: *const ::core::ffi::c_void, + size: usize, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_strlcpy( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_strlcat( + dst: *mut ::core::ffi::c_char, + src: *const ::core::ffi::c_char, + dst_size: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_malloc( + size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_realloc( + ptr: *mut ::core::ffi::c_void, + new_size: usize, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn CRYPTO_free( + ptr: *mut ::core::ffi::c_void, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn OPENSSL_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_init(size: usize, min_size: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_malloc_initialized() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_secure_used() -> usize; +} +unsafe extern "C" { + pub fn OPENSSL_secure_malloc(size: usize) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OPENSSL_secure_clear_free(ptr: *mut ::core::ffi::c_void, len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_num_locks() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_set_locking_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_add_lock_callback( + func: ::core::option::Option< + unsafe extern "C" fn( + num: *mut ::core::ffi::c_int, + amount: ::core::ffi::c_int, + lock_num: ::core::ffi::c_int, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_locking_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_lock_name(lock_num: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_callback( + threadid_func: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_numeric(id: *mut CRYPTO_THREADID, val: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_set_pointer(id: *mut CRYPTO_THREADID, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn CRYPTO_THREADID_current(id: *mut CRYPTO_THREADID); +} +unsafe extern "C" { + pub fn CRYPTO_set_id_callback( + func: ::core::option::Option ::core::ffi::c_ulong>, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock { + pub references: ::core::ffi::c_int, + pub data: *mut CRYPTO_dynlock_value, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CRYPTO_dynlock"][::core::mem::size_of::() - 16usize]; + ["Alignment of CRYPTO_dynlock"][::core::mem::align_of::() - 8usize]; + ["Offset of field: CRYPTO_dynlock::references"] + [::core::mem::offset_of!(CRYPTO_dynlock, references) - 0usize]; + ["Offset of field: CRYPTO_dynlock::data"] + [::core::mem::offset_of!(CRYPTO_dynlock, data) - 8usize]; +}; +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_create_callback( + dyn_create_function: ::core::option::Option< + unsafe extern "C" fn( + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_lock_callback( + dyn_lock_function: ::core::option::Option< + unsafe extern "C" fn( + mode: ::core::ffi::c_int, + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_set_dynlock_destroy_callback( + dyn_destroy_function: ::core::option::Option< + unsafe extern "C" fn( + l: *mut CRYPTO_dynlock_value, + file: *const ::core::ffi::c_char, + line: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_create_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> *mut CRYPTO_dynlock_value, + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_lock_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: *mut CRYPTO_dynlock_value, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_get_dynlock_destroy_callback() -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_dynlock_value, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ), + >; +} +unsafe extern "C" { + pub fn CRYPTO_is_confidential_build() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_has_asm() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_self_test_all() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BORINGSSL_integrity_test() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_pre_sandbox_init(); +} +unsafe extern "C" { + pub fn FIPS_mode() -> ::core::ffi::c_int; +} +pub const fips_counter_t_fips_counter_evp_aes_128_gcm: fips_counter_t = 0; +pub const fips_counter_t_fips_counter_evp_aes_256_gcm: fips_counter_t = 1; +pub const fips_counter_t_fips_counter_evp_aes_128_ctr: fips_counter_t = 2; +pub const fips_counter_t_fips_counter_evp_aes_256_ctr: fips_counter_t = 3; +pub const fips_counter_t_fips_counter_max: fips_counter_t = 3; +pub type fips_counter_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn FIPS_read_counter(counter: fips_counter_t) -> usize; +} +unsafe extern "C" { + pub fn OpenSSL_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay_version(which: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSLeay() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn OpenSSL_version_num() -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn CRYPTO_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_malloc_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_load_builtin_engines(); +} +unsafe extern "C" { + pub fn ENGINE_register_all_complete() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_cleanup(); +} +unsafe extern "C" { + pub fn OPENSSL_load_builtin_modules(); +} +unsafe extern "C" { + pub fn OPENSSL_init_crypto( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OPENSSL_cleanup(); +} +unsafe extern "C" { + pub fn FIPS_mode_set(on: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn FIPS_module_name() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn FIPS_module_hash() -> *const u8; +} +unsafe extern "C" { + pub fn FIPS_version() -> u32; +} +unsafe extern "C" { + pub fn FIPS_query_algorithm_status(algorithm: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_library_init(); +} +unsafe extern "C" { + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_new_df( + entropy: *const u8, + entropy_len: usize, + nonce: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +unsafe extern "C" { + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_reseed_ex( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + entropy_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} +unsafe extern "C" { + pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn X25519( + out_shared_key: *mut u8, + private_key: *const u8, + peer_public_value: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X25519_public_from_private(out_public_value: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn ED25519_keypair(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn ED25519_sign( + out_sig: *mut u8, + message: *const u8, + message_len: usize, + private_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_verify( + message: *const u8, + message_len: usize, + signature: *const u8, + public_key: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ED25519_keypair_from_seed( + out_public_key: *mut u8, + out_private_key: *mut u8, + seed: *const u8, + ); +} +pub const spake2_role_t_spake2_role_alice: spake2_role_t = 0; +pub const spake2_role_t_spake2_role_bob: spake2_role_t = 1; +pub type spake2_role_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SPAKE2_CTX_new( + my_role: spake2_role_t, + my_name: *const u8, + my_name_len: usize, + their_name: *const u8, + their_name_len: usize, + ) -> *mut SPAKE2_CTX; +} +unsafe extern "C" { + pub fn SPAKE2_CTX_free(ctx: *mut SPAKE2_CTX); +} +unsafe extern "C" { + pub fn SPAKE2_generate_msg( + ctx: *mut SPAKE2_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + password: *const u8, + password_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SPAKE2_process_msg( + ctx: *mut SPAKE2_CTX, + out_key: *mut u8, + out_key_len: *mut usize, + max_out_key_len: usize, + their_msg: *const u8, + their_msg_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_cblock_st { + pub bytes: [u8; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_cblock_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of DES_cblock_st"][::core::mem::align_of::() - 1usize]; + ["Offset of field: DES_cblock_st::bytes"] + [::core::mem::offset_of!(DES_cblock_st, bytes) - 0usize]; +}; +pub type DES_cblock = DES_cblock_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DES_ks { + pub subkeys: [[u32; 2usize]; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DES_ks"][::core::mem::size_of::() - 128usize]; + ["Alignment of DES_ks"][::core::mem::align_of::() - 4usize]; + ["Offset of field: DES_ks::subkeys"][::core::mem::offset_of!(DES_ks, subkeys) - 0usize]; +}; +pub type DES_key_schedule = DES_ks; +unsafe extern "C" { + pub fn DES_set_key(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_set_odd_parity(key: *mut DES_cblock); +} +unsafe extern "C" { + pub fn DES_ecb_encrypt( + in_: *const DES_cblock, + out: *mut DES_cblock, + schedule: *const DES_key_schedule, + is_encrypt: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ncbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + schedule: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ecb3_encrypt( + input: *const DES_cblock, + output: *mut DES_cblock, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ks3: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede2_cbc_encrypt( + in_: *const u8, + out: *mut u8, + len: usize, + ks1: *const DES_key_schedule, + ks2: *const DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_set_key_unchecked(key: *const DES_cblock, schedule: *mut DES_key_schedule); +} +unsafe extern "C" { + pub fn DES_ede3_cfb64_encrypt( + in_: *const u8, + out: *mut u8, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + num: *mut ::core::ffi::c_int, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DES_ede3_cfb_encrypt( + in_: *const u8, + out: *mut u8, + numbits: ::core::ffi::c_int, + length: ::core::ffi::c_long, + ks1: *mut DES_key_schedule, + ks2: *mut DES_key_schedule, + ks3: *mut DES_key_schedule, + ivec: *mut DES_cblock, + enc: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn DH_new() -> *mut DH; +} +unsafe extern "C" { + pub fn DH_free(dh: *mut DH); +} +unsafe extern "C" { + pub fn DH_up_ref(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_bits(dh: *const DH) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DH_size(dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pub_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_priv_key(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_p(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_q(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_g(dh: *const DH) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DH_get0_key( + dh: *const DH, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_key( + dh: *mut DH, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get0_pqg( + dh: *const DH, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DH_set0_pqg( + dh: *mut DH, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_set_length(dh: *mut DH, priv_length: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_get_rfc7919_2048() -> *mut DH; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_1536(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_2048(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_3072(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_4096(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_6144(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn BN_get_rfc3526_prime_8192(ret: *mut BIGNUM) -> *mut BIGNUM; +} +unsafe extern "C" { + pub fn DH_generate_parameters_ex( + dh: *mut DH, + prime_bits: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_key(dh: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_padded( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key_hashed( + dh: *mut DH, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + peers_key: *const BIGNUM, + digest: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check(dh: *const DH, out_flags: *mut ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_check_pub_key( + dh: *const DH, + pub_key: *const BIGNUM, + out_flags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DHparams_dup(dh: *const DH) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_parse_parameters(cbs: *mut CBS) -> *mut DH; +} +unsafe extern "C" { + pub fn DH_marshal_parameters(cbb: *mut CBB, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_generate_parameters( + prime_len: ::core::ffi::c_int, + generator: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_DHparams( + ret: *mut *mut DH, + inp: *mut *const ::core::ffi::c_uchar, + len: ::core::ffi::c_long, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn i2d_DHparams(in_: *const DH, outp: *mut *mut ::core::ffi::c_uchar) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DH_compute_key( + out: *mut u8, + peers_key: *const BIGNUM, + dh: *mut DH, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_md4() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha512_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_224() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_384() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_sha3_512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b256() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_blake2b512() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_md5_sha1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_ripemd160() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbynid(nid: ::core::ffi::c_int) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_get_digestbyobj(obj: *const ASN1_OBJECT) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_init(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanup(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_cleanse(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy_ex(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_move(out: *mut EVP_MD_CTX, in_: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_MD_CTX_reset(ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + engine: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal_ex( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestFinal( + ctx: *mut EVP_MD_CTX, + md_out: *mut u8, + out_size: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_Digest( + data: *const ::core::ffi::c_void, + len: usize, + md_out: *mut u8, + md_out_size: *mut ::core::ffi::c_uint, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_type(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_block_size(md: *const EVP_MD) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_get0_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_md(ctx: *const EVP_MD_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_block_size(ctx: *const EVP_MD_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_type(ctx: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_pkey_ctx(ctx: *const EVP_MD_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm(cbs: *mut CBS) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_parse_digest_algorithm_nid(cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm(cbb: *mut CBB, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_marshal_digest_algorithm_no_params( + cbb: *mut CBB, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_copy(out: *mut EVP_MD_CTX, in_: *const EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_add_digest(digest: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_get_digestbyname(name: *const ::core::ffi::c_char) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_dss1() -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); +} +unsafe extern "C" { + pub fn EVP_DigestFinalXOF(ctx: *mut EVP_MD_CTX, out: *mut u8, len: usize) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_meth_get_flags(md: *const EVP_MD) -> u32; +} +unsafe extern "C" { + pub fn EVP_MD_CTX_set_flags(ctx: *mut EVP_MD_CTX, flags: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EVP_MD_nid(md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_fetch( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + ) -> *mut EVP_MD; +} +unsafe extern "C" { + pub fn EVP_MD_up_ref(md: *mut EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_MD_free(md: *mut EVP_MD); +} +unsafe extern "C" { + pub fn EVP_Q_digest( + libctx: *mut OSSL_LIB_CTX, + name: *const ::core::ffi::c_char, + propq: *const ::core::ffi::c_char, + in_: *const ::core::ffi::c_void, + in_len: usize, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_md_pctx_ops { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct env_md_ctx_st { + pub __bindgen_anon_1: env_md_ctx_st__bindgen_ty_1, + pub digest: *const EVP_MD, + pub pctx: *mut EVP_PKEY_CTX, + pub pctx_ops: *const evp_md_pctx_ops, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union env_md_ctx_st__bindgen_ty_1 { + pub md_data: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of env_md_ctx_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::md_data"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, md_data) - 0usize]; + ["Offset of field: env_md_ctx_st__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(env_md_ctx_st__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of env_md_ctx_st"][::core::mem::size_of::() - 264usize]; + ["Alignment of env_md_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: env_md_ctx_st::digest"] + [::core::mem::offset_of!(env_md_ctx_st, digest) - 240usize]; + ["Offset of field: env_md_ctx_st::pctx"] + [::core::mem::offset_of!(env_md_ctx_st, pctx) - 248usize]; + ["Offset of field: env_md_ctx_st::pctx_ops"] + [::core::mem::offset_of!(env_md_ctx_st, pctx_ops) - 256usize]; +}; +unsafe extern "C" { + pub fn DSA_new() -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_free(dsa: *mut DSA); +} +unsafe extern "C" { + pub fn DSA_up_ref(dsa: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_bits(dsa: *const DSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn DSA_get0_pub_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_priv_key(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_p(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_q(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_g(dsa: *const DSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn DSA_get0_key( + dsa: *const DSA, + out_pub_key: *mut *const BIGNUM, + out_priv_key: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_get0_pqg( + dsa: *const DSA, + out_p: *mut *const BIGNUM, + out_q: *mut *const BIGNUM, + out_g: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn DSA_set0_key( + dsa: *mut DSA, + pub_key: *mut BIGNUM, + priv_key: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set0_pqg( + dsa: *mut DSA, + p: *mut BIGNUM, + q: *mut BIGNUM, + g: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters_ex( + dsa: *mut DSA, + bits: ::core::ffi::c_uint, + seed: *const u8, + seed_len: usize, + out_counter: *mut ::core::ffi::c_int, + out_h: *mut ::core::ffi::c_ulong, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSAparams_dup(dsa: *const DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_generate_key(dsa: *mut DSA) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DSA_SIG_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DSA_SIG_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of DSA_SIG_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DSA_SIG_st::r"][::core::mem::offset_of!(DSA_SIG_st, r) - 0usize]; + ["Offset of field: DSA_SIG_st::s"][::core::mem::offset_of!(DSA_SIG_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn DSA_SIG_new() -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_free(sig: *mut DSA_SIG); +} +unsafe extern "C" { + pub fn DSA_SIG_get0(sig: *const DSA_SIG, out_r: *mut *const BIGNUM, out_s: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn DSA_SIG_set0(sig: *mut DSA_SIG, r: *mut BIGNUM, s: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_sign(digest: *const u8, digest_len: usize, dsa: *const DSA) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_do_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const DSA_SIG, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out_sig: *mut u8, + out_siglen: *mut ::core::ffi::c_uint, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_check_signature( + out_valid: *mut ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + dsa: *const DSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_size(dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_SIG_parse(cbs: *mut CBS) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn DSA_SIG_marshal(cbb: *mut CBB, sig: *const DSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_public_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_public_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_private_key(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_private_key(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_parse_parameters(cbs: *mut CBS) -> *mut DSA; +} +unsafe extern "C" { + pub fn DSA_marshal_parameters(cbb: *mut CBB, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_dup_DH(dsa: *const DSA) -> *mut DH; +} +unsafe extern "C" { + pub fn DSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_set_ex_data( + dsa: *mut DSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_get_ex_data(dsa: *const DSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn d2i_DSA_SIG( + out_sig: *mut *mut DSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA_SIG; +} +unsafe extern "C" { + pub fn i2d_DSA_SIG(in_: *const DSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPublicKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPublicKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSAparams( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_DSAparams(in_: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DSA_generate_parameters( + bits: ::core::ffi::c_int, + seed: *mut ::core::ffi::c_uchar, + seed_len: ::core::ffi::c_int, + counter_ret: *mut ::core::ffi::c_int, + h_ret: *mut ::core::ffi::c_ulong, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + ), + >, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum point_conversion_form_t { + POINT_CONVERSION_COMPRESSED = 2, + POINT_CONVERSION_UNCOMPRESSED = 4, + POINT_CONVERSION_HYBRID = 6, +} +unsafe extern "C" { + pub fn EC_group_p224() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p256() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p384() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_group_p521() -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_cmp( + a: *const EC_GROUP, + b: *const EC_GROUP, + ignored: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_generator(group: *const EC_GROUP) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_GROUP_get0_order(group: *const EC_GROUP) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_GROUP_order_bits(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_cofactor( + group: *const EC_GROUP, + cofactor: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_GFp( + group: *const EC_GROUP, + out_p: *mut BIGNUM, + out_a: *mut BIGNUM, + out_b: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_curve_name(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_curve_nid2nist(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn EC_curve_nist2nid(name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn EC_POINT_copy(dest: *mut EC_POINT, src: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dup(src: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT; +} +unsafe extern "C" { + pub fn EC_POINT_set_to_infinity( + group: *const EC_GROUP, + point: *mut EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_at_infinity( + group: *const EC_GROUP, + point: *const EC_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_is_on_curve( + group: *const EC_GROUP, + point: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_cmp( + group: *const EC_GROUP, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_get_affine_coordinates( + group: *const EC_GROUP, + point: *const EC_POINT, + x: *mut BIGNUM, + y: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_affine_coordinates( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_point2oct( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + buf: *mut u8, + max_out: usize, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2buf( + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_point2cbb( + out: *mut CBB, + group: *const EC_GROUP, + point: *const EC_POINT, + form: point_conversion_form_t, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_oct2point( + group: *const EC_GROUP, + point: *mut EC_POINT, + buf: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_set_compressed_coordinates_GFp( + group: *const EC_GROUP, + point: *mut EC_POINT, + x: *const BIGNUM, + y_bit: ::core::ffi::c_int, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_add( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + b: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_dbl( + group: *const EC_GROUP, + r: *mut EC_POINT, + a: *const EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_invert( + group: *const EC_GROUP, + a: *mut EC_POINT, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_POINT_mul( + group: *const EC_GROUP, + r: *mut EC_POINT, + n: *const BIGNUM, + q: *const EC_POINT, + m: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_hash_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p256_xmd_sha256_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_encode_to_curve_p384_xmd_sha384_sswu( + group: *const EC_GROUP, + out: *mut EC_POINT, + dst: *const u8, + dst_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_free(group: *mut EC_GROUP); +} +unsafe extern "C" { + pub fn EC_GROUP_dup(group: *const EC_GROUP) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_new_curve_GFp( + p: *const BIGNUM, + a: *const BIGNUM, + b: *const BIGNUM, + ctx: *mut BN_CTX, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_GROUP_set_generator( + group: *mut EC_GROUP, + generator: *const EC_POINT, + order: *const BIGNUM, + cofactor: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_get_order( + group: *const EC_GROUP, + order: *mut BIGNUM, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_asn1_flag(group: *mut EC_GROUP, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ec_method_st { + _unused: [u8; 0], +} +pub type EC_METHOD = ec_method_st; +unsafe extern "C" { + pub fn EC_GROUP_method_of(group: *const EC_GROUP) -> *const EC_METHOD; +} +unsafe extern "C" { + pub fn EC_METHOD_get_field_type(meth: *const EC_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_GROUP_set_point_conversion_form(group: *mut EC_GROUP, form: point_conversion_form_t); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EC_builtin_curve { + pub nid: ::core::ffi::c_int, + pub comment: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EC_builtin_curve"][::core::mem::size_of::() - 16usize]; + ["Alignment of EC_builtin_curve"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EC_builtin_curve::nid"] + [::core::mem::offset_of!(EC_builtin_curve, nid) - 0usize]; + ["Offset of field: EC_builtin_curve::comment"] + [::core::mem::offset_of!(EC_builtin_curve, comment) - 8usize]; +}; +unsafe extern "C" { + pub fn EC_get_builtin_curves(out_curves: *mut EC_builtin_curve, max_num_curves: usize) + -> usize; +} +unsafe extern "C" { + pub fn EC_POINT_clear_free(point: *mut EC_POINT); +} +unsafe extern "C" { + pub fn ENGINE_new() -> *mut ENGINE; +} +unsafe extern "C" { + pub fn ENGINE_free(engine: *mut ENGINE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_set_RSA_method( + engine: *mut ENGINE, + method: *const RSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_RSA_method(engine: *const ENGINE) -> *mut RSA_METHOD; +} +unsafe extern "C" { + pub fn ENGINE_set_ECDSA_method( + engine: *mut ENGINE, + method: *const ECDSA_METHOD, + method_size: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ENGINE_get_ECDSA_method(engine: *const ENGINE) -> *mut ECDSA_METHOD; +} +unsafe extern "C" { + pub fn METHOD_ref(method: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn METHOD_unref(method: *mut ::core::ffi::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct openssl_method_common_st { + pub references: ::core::ffi::c_int, + pub is_static: ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of openssl_method_common_st"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of openssl_method_common_st"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: openssl_method_common_st::references"] + [::core::mem::offset_of!(openssl_method_common_st, references) - 0usize]; + ["Offset of field: openssl_method_common_st::is_static"] + [::core::mem::offset_of!(openssl_method_common_st, is_static) - 4usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_new() -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_method(engine: *const ENGINE) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_new_by_curve_name(nid: ::core::ffi::c_int) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_free(key: *mut EC_KEY); +} +unsafe extern "C" { + pub fn EC_KEY_dup(src: *const EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_is_opaque(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn EC_KEY_set_private_key(key: *mut EC_KEY, priv_: *const BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key(key: *mut EC_KEY, pub_: *const EC_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_enc_flags(key: *const EC_KEY) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn EC_KEY_set_enc_flags(key: *mut EC_KEY, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn EC_KEY_get_conv_form(key: *const EC_KEY) -> point_conversion_form_t; +} +unsafe extern "C" { + pub fn EC_KEY_set_conv_form(key: *mut EC_KEY, cform: point_conversion_form_t); +} +unsafe extern "C" { + pub fn EC_KEY_check_key(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_check_fips(key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_public_key_affine_coordinates( + key: *mut EC_KEY, + x: *const BIGNUM, + y: *const BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_oct2key( + key: *mut EC_KEY, + in_: *const u8, + len: usize, + ctx: *mut BN_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_key2buf( + key: *const EC_KEY, + form: point_conversion_form_t, + out_buf: *mut *mut u8, + ctx: *mut BN_CTX, + ) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_oct2priv(key: *mut EC_KEY, in_: *const u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_priv2oct(key: *const EC_KEY, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_priv2buf(key: *const EC_KEY, out_buf: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_generate_key_fips(key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_derive_from_secret( + group: *const EC_GROUP, + secret: *const u8, + secret_len: usize, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_parse_private_key(cbs: *mut CBS, group: *const EC_GROUP) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_private_key( + cbb: *mut CBB, + key: *const EC_KEY, + enc_flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_curve_name(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_marshal_curve_name(cbb: *mut CBB, group: *const EC_GROUP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_parse_parameters(cbs: *mut CBS) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_set_ex_data( + r: *mut EC_KEY, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EC_KEY_get_ex_data( + r: *const EC_KEY, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_method_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: + ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + eckey: *mut EC_KEY, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_method_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of ecdsa_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_method_st::common"] + [::core::mem::offset_of!(ecdsa_method_st, common) - 0usize]; + ["Offset of field: ecdsa_method_st::app_data"] + [::core::mem::offset_of!(ecdsa_method_st, app_data) - 8usize]; + ["Offset of field: ecdsa_method_st::init"] + [::core::mem::offset_of!(ecdsa_method_st, init) - 16usize]; + ["Offset of field: ecdsa_method_st::finish"] + [::core::mem::offset_of!(ecdsa_method_st, finish) - 24usize]; + ["Offset of field: ecdsa_method_st::sign"] + [::core::mem::offset_of!(ecdsa_method_st, sign) - 32usize]; + ["Offset of field: ecdsa_method_st::flags"] + [::core::mem::offset_of!(ecdsa_method_st, flags) - 40usize]; +}; +unsafe extern "C" { + pub fn EC_KEY_set_asn1_flag(key: *mut EC_KEY, flag: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECPKParameters( + out: *mut *mut EC_GROUP, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_GROUP; +} +unsafe extern "C" { + pub fn i2d_ECPKParameters(group: *const EC_GROUP, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_ECParameters( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2d_ECParameters(key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn o2i_ECPublicKey( + out_key: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn i2o_ECPublicKey( + key: *const EC_KEY, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key( + out: *mut ::core::ffi::c_void, + outlen: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + kdf: ::core::option::Option< + unsafe extern "C" fn( + in_: *const ::core::ffi::c_void, + inlen: usize, + out: *mut ::core::ffi::c_void, + outlen: *mut usize, + ) -> *mut ::core::ffi::c_void, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDH_compute_key_fips( + out: *mut u8, + out_len: usize, + pub_key: *const EC_POINT, + priv_key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_sign( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *mut u8, + sig_len: *mut ::core::ffi::c_uint, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify( + type_: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size(key: *const EC_KEY) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ecdsa_sig_st { + pub r: *mut BIGNUM, + pub s: *mut BIGNUM, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ecdsa_sig_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ecdsa_sig_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ecdsa_sig_st::r"][::core::mem::offset_of!(ecdsa_sig_st, r) - 0usize]; + ["Offset of field: ecdsa_sig_st::s"][::core::mem::offset_of!(ecdsa_sig_st, s) - 8usize]; +}; +unsafe extern "C" { + pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_r(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0_s(sig: *const ECDSA_SIG) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn ECDSA_SIG_get0( + sig: *const ECDSA_SIG, + out_r: *mut *const BIGNUM, + out_s: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn ECDSA_SIG_set0( + sig: *mut ECDSA_SIG, + r: *mut BIGNUM, + s: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_do_sign( + digest: *const u8, + digest_len: usize, + key: *const EC_KEY, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_do_verify( + digest: *const u8, + digest_len: usize, + sig: *const ECDSA_SIG, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_parse(cbs: *mut CBS) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_from_bytes(in_: *const u8, in_len: usize) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn ECDSA_SIG_marshal(cbb: *mut CBB, sig: *const ECDSA_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + sig: *const ECDSA_SIG, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_SIG_max_len(order_len: usize) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_p1363( + digest: *const u8, + digest_len: usize, + sig: *mut u8, + out_sig_len: *mut usize, + max_sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_verify_p1363( + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + key: *const EC_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ECDSA_size_p1363(key: *const EC_KEY) -> usize; +} +unsafe extern "C" { + pub fn ECDSA_sign_with_nonce_and_leak_private_key_for_testing( + digest: *const u8, + digest_len: usize, + eckey: *const EC_KEY, + nonce: *const u8, + nonce_len: usize, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn d2i_ECDSA_SIG( + out: *mut *mut ECDSA_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ECDSA_SIG; +} +unsafe extern "C" { + pub fn i2d_ECDSA_SIG(sig: *const ECDSA_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_192_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_chacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_xchacha20_poly1305() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_ctr_hmac_sha256() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_siv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_randnonce() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_bluetooth_8() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_ccm_matter() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_has_aes_hardware() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_eax() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_AEAD_key_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_nonce_length(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_overhead(aead: *const EVP_AEAD) -> usize; +} +unsafe extern "C" { + pub fn EVP_AEAD_max_tag_len(aead: *const EVP_AEAD) -> usize; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union evp_aead_ctx_st_state { + pub opaque: [u8; 560usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st_state"][::core::mem::size_of::() - 560usize]; + ["Alignment of evp_aead_ctx_st_state"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st_state::opaque"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, opaque) - 0usize]; + ["Offset of field: evp_aead_ctx_st_state::alignment"] + [::core::mem::offset_of!(evp_aead_ctx_st_state, alignment) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_aead_ctx_st { + pub aead: *const EVP_AEAD, + pub state: evp_aead_ctx_st_state, + pub tag_len: u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_aead_ctx_st"][::core::mem::size_of::() - 576usize]; + ["Alignment of evp_aead_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_aead_ctx_st::aead"] + [::core::mem::offset_of!(evp_aead_ctx_st, aead) - 0usize]; + ["Offset of field: evp_aead_ctx_st::state"] + [::core::mem::offset_of!(evp_aead_ctx_st, state) - 8usize]; + ["Offset of field: evp_aead_ctx_st::tag_len"] + [::core::mem::offset_of!(evp_aead_ctx_st, tag_len) - 568usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_zero(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_new( + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + ) -> *mut EVP_AEAD_CTX; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_free(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_cleanup(ctx: *mut EVP_AEAD_CTX); +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_seal_scatter( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + extra_in: *const u8, + extra_in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_open_gather( + ctx: *const EVP_AEAD_CTX, + out: *mut u8, + nonce: *const u8, + nonce_len: usize, + in_: *const u8, + in_len: usize, + in_tag: *const u8, + in_tag_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_ivec_st { + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_ivec_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of crypto_ivec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_ivec_st::in_"][::core::mem::offset_of!(crypto_ivec_st, in_) - 0usize]; + ["Offset of field: crypto_ivec_st::len"][::core::mem::offset_of!(crypto_ivec_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct crypto_iovec_st { + pub out: *mut u8, + pub in_: *const u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of crypto_iovec_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of crypto_iovec_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: crypto_iovec_st::out"] + [::core::mem::offset_of!(crypto_iovec_st, out) - 0usize]; + ["Offset of field: crypto_iovec_st::in_"] + [::core::mem::offset_of!(crypto_iovec_st, in_) - 8usize]; + ["Offset of field: crypto_iovec_st::len"] + [::core::mem::offset_of!(crypto_iovec_st, len) - 16usize]; +}; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_sealv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_tag: *mut u8, + out_tag_len: *mut usize, + max_out_tag_len: usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + out_total_bytes: *mut usize, + nonce: *const u8, + nonce_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_openv_detached( + ctx: *const EVP_AEAD_CTX, + iovec: *const CRYPTO_IOVEC, + num_iovec: usize, + nonce: *const u8, + nonce_len: usize, + in_tag: *const u8, + in_tag_len: usize, + aadvec: *const CRYPTO_IVEC, + num_aadvec: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_aead(ctx: *const EVP_AEAD_CTX) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_cbc_sha256_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_des_ede3_cbc_sha1_tls_implicit_iv() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls12() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_128_gcm_tls13() -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_aead_aes_256_gcm_tls13() -> *const EVP_AEAD; +} +pub const evp_aead_direction_t_evp_aead_open: evp_aead_direction_t = 0; +pub const evp_aead_direction_t_evp_aead_seal: evp_aead_direction_t = 1; +pub type evp_aead_direction_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn EVP_AEAD_CTX_init_with_direction( + ctx: *mut EVP_AEAD_CTX, + aead: *const EVP_AEAD, + key: *const u8, + key_len: usize, + tag_len: usize, + dir: evp_aead_direction_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_get_iv( + ctx: *const EVP_AEAD_CTX, + out_iv: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_AEAD_CTX_tag_len( + ctx: *const EVP_AEAD_CTX, + out_tag_len: *mut usize, + in_len: usize, + extra_in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_free(pkey: *mut EVP_PKEY); +} +unsafe extern "C" { + pub fn EVP_PKEY_up_ref(pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_dup_ref(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_is_opaque(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_missing_parameters(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_parameters_eq(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_size(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_bits(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_public(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_has_private(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_copy_public(pkey: *const EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p224() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ec_p521() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_x25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ed25519() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_44() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_65() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_dsa_87() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_768() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_ml_kem_1024() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_xwing() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_dsa() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha256() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha384() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_pkey_rsa_pss_sha512() -> *const EVP_PKEY_ALG; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_RSA(pkey: *const EVP_PKEY) -> *mut RSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, key: *mut DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DSA(pkey: *const EVP_PKEY) -> *mut DSA; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, key: *mut EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_EC_KEY(pkey: *const EVP_PKEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, key: *mut DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_DH(pkey: *const EVP_PKEY) -> *mut DH; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_subject_public_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_public_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_public_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_key_info( + in_: *const u8, + len: usize, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_parse_private_key(cbs: *mut CBS) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_marshal_private_key(cbb: *mut CBB, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_private_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_private_seed( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_from_raw_public_key( + alg: *const EVP_PKEY_ALG, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_private_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_private_seed( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_raw_public_key( + pkey: *const EVP_PKEY, + out: *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_generate_from_alg(alg: *const EVP_PKEY_ALG) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_DigestSignInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSignFinal( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestSign( + ctx: *mut EVP_MD_CTX, + out_sig: *mut u8, + out_sig_len: *mut usize, + data: *const u8, + data_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyInit( + ctx: *mut EVP_MD_CTX, + pctx: *mut *mut EVP_PKEY_CTX, + type_: *const EVP_MD, + e: *mut ENGINE, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_DigestVerify( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_SignFinal( + ctx: *const EVP_MD_CTX, + sig: *mut u8, + out_sig_len: *mut ::core::ffi::c_uint, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit_ex( + ctx: *mut EVP_MD_CTX, + type_: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyInit(ctx: *mut EVP_MD_CTX, type_: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyUpdate( + ctx: *mut EVP_MD_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_VerifyFinal( + ctx: *mut EVP_MD_CTX, + sig: *const u8, + sig_len: usize, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_public( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_private( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_print_params( + out: *mut BIO, + pkey: *const EVP_PKEY, + indent: ::core::ffi::c_int, + pctx: *mut ASN1_PCTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + digest: *const EVP_MD, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS5_PBKDF2_HMAC_SHA1( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + iterations: u32, + key_len: usize, + out_key: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_validate_scrypt_params( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PBE_scrypt( + password: *const ::core::ffi::c_char, + password_len: usize, + salt: *const u8, + salt_len: usize, + N: u64, + r: u64, + p: u64, + max_mem: usize, + out_key: *mut u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new(pkey: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_new_id(id: ::core::ffi::c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_dup(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY_CTX; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_pkey(ctx: *mut EVP_PKEY_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_sign( + ctx: *mut EVP_PKEY_CTX, + sig: *mut u8, + sig_len: *mut usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify( + ctx: *mut EVP_PKEY_CTX, + sig: *const u8, + sig_len: usize, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decrypt( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_verify_recover( + ctx: *mut EVP_PKEY_CTX, + out: *mut u8, + out_len: *mut usize, + sig: *const u8, + siglen: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive_set_peer( + ctx: *mut EVP_PKEY_CTX, + peer: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_derive( + ctx: *mut EVP_PKEY_CTX, + key: *mut u8, + out_key_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_keygen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen_init(ctx: *mut EVP_PKEY_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_paramgen( + ctx: *mut EVP_PKEY_CTX, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_encapsulate( + ctx: *mut EVP_PKEY_CTX, + out_ciphertext: *mut u8, + out_ciphertext_len: *mut usize, + out_secret: *mut u8, + out_secret_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate_init( + ctx: *mut EVP_PKEY_CTX, + params: *const OSSL_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_decapsulate( + ctx: *mut EVP_PKEY_CTX, + out_secret: *mut u8, + out_secret_len: *mut usize, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_signature_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_signature_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_signature_context_string( + ctx: *mut EVP_PKEY_CTX, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_RSA_gen(bits: ::core::ffi::c_uint) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_padding( + ctx: *mut EVP_PKEY_CTX, + out_padding: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_pss_saltlen( + ctx: *mut EVP_PKEY_CTX, + out_salt_len: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_bits( + ctx: *mut EVP_PKEY_CTX, + bits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_keygen_pubexp( + ctx: *mut EVP_PKEY_CTX, + e: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_oaep_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get_rsa_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + out_md: *mut *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + label: *mut u8, + label_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_get0_rsa_oaep_label( + ctx: *mut EVP_PKEY_CTX, + out_label: *mut *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_curve_nid(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get_ec_point_conv_form(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid( + ctx: *mut EVP_PKEY_CTX, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dh_pad( + ctx: *mut EVP_PKEY_CTX, + pad: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_768() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_ml_kem_1024() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_kem_xwing() -> *const EVP_KEM; +} +unsafe extern "C" { + pub fn EVP_KEM_ciphertext_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_secret_len(kem: *const EVP_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_KEM_encap( + kem: *const EVP_KEM, + out_ciphertext: *mut u8, + ciphertext_len: usize, + out_secret: *mut u8, + secret_len: usize, + peer_key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_KEM_decap( + kem: *const EVP_KEM, + out_secret: *mut u8, + secret_len: usize, + ciphertext: *const u8, + ciphertext_len: usize, + key: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get0(pkey: *const EVP_PKEY) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn OpenSSL_add_all_algorithms(); +} +unsafe extern "C" { + pub fn OPENSSL_add_all_algorithms_conf(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_ciphers(); +} +unsafe extern "C" { + pub fn OpenSSL_add_all_digests(); +} +unsafe extern "C" { + pub fn EVP_cleanup(); +} +unsafe extern "C" { + pub fn EVP_default_properties_is_fips_enabled(libctx: *mut OSSL_LIB_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_CIPHER_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + cipher: *const EVP_CIPHER, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_sorted( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all( + callback: ::core::option::Option< + unsafe extern "C" fn( + md: *const EVP_MD, + name: *const ::core::ffi::c_char, + unused: *const ::core::ffi::c_char, + arg: *mut ::core::ffi::c_void, + ), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn EVP_MD_do_all_provided( + libctx: *mut OSSL_LIB_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn(md: *mut EVP_MD, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn i2d_PrivateKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PublicKey(key: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PrivateKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_AutoPrivateKey( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PublicKey( + type_: ::core::ffi::c_int, + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_ec_param_enc( + ctx: *mut EVP_PKEY_CTX, + encoding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set_type(pkey: *mut EVP_PKEY, type_: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_set1_tls_encodedpoint( + pkey: *mut EVP_PKEY, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_get1_tls_encodedpoint(pkey: *const EVP_PKEY, out_ptr: *mut *mut u8) -> usize; +} +unsafe extern "C" { + pub fn EVP_PKEY_base_id(pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen( + ctx: *mut EVP_PKEY_CTX, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY(pkey: *const EVP_PKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PUBKEY( + out: *mut *mut EVP_PKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY(rsa: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY(dsa: *const DSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY( + out: *mut *mut DSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY(ec_key: *const EC_KEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY( + out: *mut *mut EC_KEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_bits( + ctx: *mut EVP_PKEY_CTX, + nbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_dsa_paramgen_q_bits( + ctx: *mut EVP_PKEY_CTX, + qbits: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_assign( + pkey: *mut EVP_PKEY, + type_: ::core::ffi::c_int, + key: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_type(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_private_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_new_raw_public_key( + type_: ::core::ffi::c_int, + unused: *mut ENGINE, + in_: *const u8, + len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_cmp_parameters(a: *const EVP_PKEY, b: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_extract( + out_key: *mut u8, + out_len: *mut usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HKDF_expand( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + prk: *const u8, + prk_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC( + evp_md: *const EVP_MD, + key: *const ::core::ffi::c_void, + key_len: usize, + data: *const u8, + data_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> *mut u8; +} +unsafe extern "C" { + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_new() -> *mut HMAC_CTX; +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_cleanse(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init_ex( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: usize, + md: *const EVP_MD, + impl_: *mut ENGINE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const u8, data_len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_Final( + ctx: *mut HMAC_CTX, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize; +} +unsafe extern "C" { + pub fn HMAC_CTX_get_md(ctx: *const HMAC_CTX) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX); +} +unsafe extern "C" { + pub fn HMAC_Init( + ctx: *mut HMAC_CTX, + key: *const ::core::ffi::c_void, + key_len: ::core::ffi::c_int, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hmac_ctx_st { + pub md: *const EVP_MD, + pub md_ctx: EVP_MD_CTX, + pub i_ctx: EVP_MD_CTX, + pub o_ctx: EVP_MD_CTX, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hmac_ctx_st"][::core::mem::size_of::() - 800usize]; + ["Alignment of hmac_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: hmac_ctx_st::md"][::core::mem::offset_of!(hmac_ctx_st, md) - 0usize]; + ["Offset of field: hmac_ctx_st::md_ctx"][::core::mem::offset_of!(hmac_ctx_st, md_ctx) - 8usize]; + ["Offset of field: hmac_ctx_st::i_ctx"][::core::mem::offset_of!(hmac_ctx_st, i_ctx) - 272usize]; + ["Offset of field: hmac_ctx_st::o_ctx"][::core::mem::offset_of!(hmac_ctx_st, o_ctx) - 536usize]; +}; +unsafe extern "C" { + pub fn EVP_hpke_x25519_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_p256_hkdf_sha256() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_xwing() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem768() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_hpke_mlkem1024() -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_id(kem: *const EVP_HPKE_KEM) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_public_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_private_key_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEM_enc_len(kem: *const EVP_HPKE_KEM) -> usize; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha256() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_hpke_hkdf_sha384() -> *const EVP_HPKE_KDF; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_id(kdf: *const EVP_HPKE_KDF) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_KDF_hkdf_md(kdf: *const EVP_HPKE_KDF) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_128_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_aes_256_gcm() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_hpke_chacha20_poly1305() -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_id(aead: *const EVP_HPKE_AEAD) -> u16; +} +unsafe extern "C" { + pub fn EVP_HPKE_AEAD_aead(aead: *const EVP_HPKE_AEAD) -> *const EVP_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_zero(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_cleanup(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_new() -> *mut EVP_HPKE_KEY; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_free(key: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_copy( + dst: *mut EVP_HPKE_KEY, + src: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_move(out: *mut EVP_HPKE_KEY, in_: *mut EVP_HPKE_KEY); +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_init( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + priv_key: *const u8, + priv_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_generate( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_derive( + key: *mut EVP_HPKE_KEY, + kem: *const EVP_HPKE_KEM, + ikm: *const u8, + ikm_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_kem(key: *const EVP_HPKE_KEY) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_public_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_KEY_private_key( + key: *const EVP_HPKE_KEY, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_zero(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_cleanup(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_new() -> *mut EVP_HPKE_CTX; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_free(ctx: *mut EVP_HPKE_CTX); +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + kem: *const EVP_HPKE_KEM, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_sender_with_seed_for_testing( + ctx: *mut EVP_HPKE_CTX, + out_enc: *mut u8, + out_enc_len: *mut usize, + max_enc: usize, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + peer_public_key: *const u8, + peer_public_key_len: usize, + info: *const u8, + info_len: usize, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_setup_auth_recipient( + ctx: *mut EVP_HPKE_CTX, + key: *const EVP_HPKE_KEY, + kdf: *const EVP_HPKE_KDF, + aead: *const EVP_HPKE_AEAD, + enc: *const u8, + enc_len: usize, + info: *const u8, + info_len: usize, + peer_public_key: *const u8, + peer_public_key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_open( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_seal( + ctx: *mut EVP_HPKE_CTX, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ad: *const u8, + ad_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_export( + ctx: *const EVP_HPKE_CTX, + out: *mut u8, + secret_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_max_overhead(ctx: *const EVP_HPKE_CTX) -> usize; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kem(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KEM; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_aead(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_AEAD; +} +unsafe extern "C" { + pub fn EVP_HPKE_CTX_kdf(ctx: *const EVP_HPKE_CTX) -> *const EVP_HPKE_KDF; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct evp_hpke_ctx_st { + pub kem: *const EVP_HPKE_KEM, + pub aead: *const EVP_HPKE_AEAD, + pub kdf: *const EVP_HPKE_KDF, + pub aead_ctx: EVP_AEAD_CTX, + pub base_nonce: [u8; 24usize], + pub exporter_secret: [u8; 64usize], + pub seq: u64, + pub is_sender: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_ctx_st"][::core::mem::size_of::() - 704usize]; + ["Alignment of evp_hpke_ctx_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kem"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kem) - 0usize]; + ["Offset of field: evp_hpke_ctx_st::aead"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead) - 8usize]; + ["Offset of field: evp_hpke_ctx_st::kdf"] + [::core::mem::offset_of!(evp_hpke_ctx_st, kdf) - 16usize]; + ["Offset of field: evp_hpke_ctx_st::aead_ctx"] + [::core::mem::offset_of!(evp_hpke_ctx_st, aead_ctx) - 24usize]; + ["Offset of field: evp_hpke_ctx_st::base_nonce"] + [::core::mem::offset_of!(evp_hpke_ctx_st, base_nonce) - 600usize]; + ["Offset of field: evp_hpke_ctx_st::exporter_secret"] + [::core::mem::offset_of!(evp_hpke_ctx_st, exporter_secret) - 624usize]; + ["Offset of field: evp_hpke_ctx_st::seq"] + [::core::mem::offset_of!(evp_hpke_ctx_st, seq) - 688usize]; + ["Offset of field: evp_hpke_ctx_st::is_sender"] + [::core::mem::offset_of!(evp_hpke_ctx_st, is_sender) - 696usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct evp_hpke_key_st { + pub kem: *const EVP_HPKE_KEM, + pub private_key: [u8; 64usize], + pub public_key: [u8; 1568usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of evp_hpke_key_st"][::core::mem::size_of::() - 1640usize]; + ["Alignment of evp_hpke_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: evp_hpke_key_st::kem"] + [::core::mem::offset_of!(evp_hpke_key_st, kem) - 0usize]; + ["Offset of field: evp_hpke_key_st::private_key"] + [::core::mem::offset_of!(evp_hpke_key_st, private_key) - 8usize]; + ["Offset of field: evp_hpke_key_st::public_key"] + [::core::mem::offset_of!(evp_hpke_key_st, public_key) - 72usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_private_key { + pub opaque: [u8; 1808usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_private_key"][::core::mem::size_of::() - 1808usize]; + ["Alignment of HRSS_private_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_private_key::opaque"] + [::core::mem::offset_of!(HRSS_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct HRSS_public_key { + pub opaque: [u8; 1424usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of HRSS_public_key"][::core::mem::size_of::() - 1424usize]; + ["Alignment of HRSS_public_key"][::core::mem::align_of::() - 1usize]; + ["Offset of field: HRSS_public_key::opaque"] + [::core::mem::offset_of!(HRSS_public_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn HRSS_generate_key( + out_pub: *mut HRSS_public_key, + out_priv: *mut HRSS_private_key, + input: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_encap( + out_ciphertext: *mut u8, + out_shared_key: *mut u8, + in_pub: *const HRSS_public_key, + in_: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_decap( + out_shared_key: *mut u8, + in_priv: *const HRSS_private_key, + ciphertext: *const u8, + ciphertext_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn HRSS_marshal_public_key(out: *mut u8, in_pub: *const HRSS_public_key); +} +unsafe extern "C" { + pub fn HRSS_parse_public_key(out: *mut HRSS_public_key, in_: *const u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Init(md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Update( + md4: *mut MD4_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4_Final(out: *mut u8, md4: *mut MD4_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD4(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD4_Transform(md4: *mut MD4_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md4_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md4_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md4_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md4_state_st::h"][::core::mem::offset_of!(md4_state_st, h) - 0usize]; + ["Offset of field: md4_state_st::Nl"][::core::mem::offset_of!(md4_state_st, Nl) - 16usize]; + ["Offset of field: md4_state_st::Nh"][::core::mem::offset_of!(md4_state_st, Nh) - 20usize]; + ["Offset of field: md4_state_st::data"][::core::mem::offset_of!(md4_state_st, data) - 24usize]; + ["Offset of field: md4_state_st::num"][::core::mem::offset_of!(md4_state_st, num) - 88usize]; +}; +unsafe extern "C" { + pub fn MD5_Init(md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Update( + md5: *mut MD5_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MD5(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct md5_state_st { + pub h: [u32; 4usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of md5_state_st"][::core::mem::size_of::() - 92usize]; + ["Alignment of md5_state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: md5_state_st::h"][::core::mem::offset_of!(md5_state_st, h) - 0usize]; + ["Offset of field: md5_state_st::Nl"][::core::mem::offset_of!(md5_state_st, Nl) - 16usize]; + ["Offset of field: md5_state_st::Nh"][::core::mem::offset_of!(md5_state_st, Nh) - 20usize]; + ["Offset of field: md5_state_st::data"][::core::mem::offset_of!(md5_state_st, data) - 24usize]; + ["Offset of field: md5_state_st::num"][::core::mem::offset_of!(md5_state_st, num) - 88usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_private_key { + pub opaque: MLDSA65_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_private_key__bindgen_ty_1 { + pub bytes: [u8; 23680usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_private_key"][::core::mem::size_of::() - 23680usize]; + ["Alignment of MLDSA65_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_private_key::opaque"] + [::core::mem::offset_of!(MLDSA65_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_public_key { + pub opaque: MLDSA65_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_public_key__bindgen_ty_1 { + pub bytes: [u8; 6240usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_public_key"][::core::mem::size_of::() - 6240usize]; + ["Alignment of MLDSA65_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA65_public_key::opaque"] + [::core::mem::offset_of!(MLDSA65_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA65_prehash { + pub opaque: MLDSA65_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA65_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA65_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA65_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA65_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA65_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA65_prehash::opaque"] + [::core::mem::offset_of!(MLDSA65_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA65_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_private_key_from_seed( + out_private_key: *mut MLDSA65_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_public_from_private( + out_public_key: *mut MLDSA65_public_key, + private_key: *const MLDSA65_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_init( + out_state: *mut MLDSA65_prehash, + public_key: *const MLDSA65_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_prehash_update( + inout_state: *mut MLDSA65_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA65_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA65_prehash); +} +unsafe extern "C" { + pub fn MLDSA65_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA65_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_verify_message_representative( + public_key: *const MLDSA65_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA65_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA65_parse_public_key( + public_key: *mut MLDSA65_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_private_key { + pub opaque: MLDSA87_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_private_key__bindgen_ty_1 { + pub bytes: [u8; 31872usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_private_key"][::core::mem::size_of::() - 31872usize]; + ["Alignment of MLDSA87_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_private_key::opaque"] + [::core::mem::offset_of!(MLDSA87_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_public_key { + pub opaque: MLDSA87_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_public_key__bindgen_ty_1 { + pub bytes: [u8; 8288usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_public_key"][::core::mem::size_of::() - 8288usize]; + ["Alignment of MLDSA87_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA87_public_key::opaque"] + [::core::mem::offset_of!(MLDSA87_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA87_prehash { + pub opaque: MLDSA87_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA87_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA87_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA87_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA87_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA87_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA87_prehash::opaque"] + [::core::mem::offset_of!(MLDSA87_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA87_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_private_key_from_seed( + out_private_key: *mut MLDSA87_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_public_from_private( + out_public_key: *mut MLDSA87_public_key, + private_key: *const MLDSA87_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_init( + out_state: *mut MLDSA87_prehash, + public_key: *const MLDSA87_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_prehash_update( + inout_state: *mut MLDSA87_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA87_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA87_prehash); +} +unsafe extern "C" { + pub fn MLDSA87_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA87_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_verify_message_representative( + public_key: *const MLDSA87_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA87_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA87_parse_public_key( + public_key: *mut MLDSA87_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_private_key { + pub opaque: MLDSA44_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_private_key__bindgen_ty_1 { + pub bytes: [u8; 16512usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_private_key"][::core::mem::size_of::() - 16512usize]; + ["Alignment of MLDSA44_private_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_private_key::opaque"] + [::core::mem::offset_of!(MLDSA44_private_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_public_key { + pub opaque: MLDSA44_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_public_key__bindgen_ty_1 { + pub bytes: [u8; 4192usize], + pub alignment: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_public_key"][::core::mem::size_of::() - 4192usize]; + ["Alignment of MLDSA44_public_key"][::core::mem::align_of::() - 4usize]; + ["Offset of field: MLDSA44_public_key::opaque"] + [::core::mem::offset_of!(MLDSA44_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLDSA44_prehash { + pub opaque: MLDSA44_prehash__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLDSA44_prehash__bindgen_ty_1 { + pub bytes: [u8; 240usize], + pub alignment: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLDSA44_prehash__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLDSA44_prehash__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLDSA44_prehash"][::core::mem::size_of::() - 240usize]; + ["Alignment of MLDSA44_prehash"][::core::mem::align_of::() - 8usize]; + ["Offset of field: MLDSA44_prehash::opaque"] + [::core::mem::offset_of!(MLDSA44_prehash, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLDSA44_generate_key( + out_encoded_public_key: *mut u8, + out_seed: *mut u8, + out_private_key: *mut MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_private_key_from_seed( + out_private_key: *mut MLDSA44_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_public_from_private( + out_public_key: *mut MLDSA44_public_key, + private_key: *const MLDSA44_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_sign( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_init( + out_state: *mut MLDSA44_prehash, + public_key: *const MLDSA44_public_key, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_prehash_update( + inout_state: *mut MLDSA44_prehash, + msg: *const u8, + msg_len: usize, + ); +} +unsafe extern "C" { + pub fn MLDSA44_prehash_finalize(out_msg_rep: *mut u8, inout_state: *mut MLDSA44_prehash); +} +unsafe extern "C" { + pub fn MLDSA44_sign_message_representative( + out_encoded_signature: *mut u8, + private_key: *const MLDSA44_private_key, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_verify_message_representative( + public_key: *const MLDSA44_public_key, + signature: *const u8, + signature_len: usize, + msg_rep: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_marshal_public_key( + out: *mut CBB, + public_key: *const MLDSA44_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLDSA44_parse_public_key( + public_key: *mut MLDSA44_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_public_key { + pub opaque: MLKEM768_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_public_key__bindgen_ty_1 { + pub bytes: [u8; 6208usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_public_key"][::core::mem::size_of::() - 6208usize]; + ["Alignment of MLKEM768_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_public_key::opaque"] + [::core::mem::offset_of!(MLKEM768_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM768_private_key { + pub opaque: MLKEM768_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM768_private_key__bindgen_ty_1 { + pub bytes: [u8; 7776usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM768_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM768_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM768_private_key"][::core::mem::size_of::() - 7776usize]; + ["Alignment of MLKEM768_private_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM768_private_key::opaque"] + [::core::mem::offset_of!(MLKEM768_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM768_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_private_key_from_seed( + out_private_key: *mut MLKEM768_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_public_from_private( + out_public_key: *mut MLKEM768_public_key, + private_key: *const MLKEM768_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM768_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM768_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM768_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM768_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM768_parse_public_key( + out_public_key: *mut MLKEM768_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_public_key { + pub opaque: MLKEM1024_public_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_public_key__bindgen_ty_1 { + pub bytes: [u8; 10304usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_public_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_public_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_public_key"][::core::mem::size_of::() - 10304usize]; + ["Alignment of MLKEM1024_public_key"][::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_public_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_public_key, opaque) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct MLKEM1024_private_key { + pub opaque: MLKEM1024_private_key__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union MLKEM1024_private_key__bindgen_ty_1 { + pub bytes: [u8; 12384usize], + pub alignment: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key__bindgen_ty_1"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::bytes"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, bytes) - 0usize]; + ["Offset of field: MLKEM1024_private_key__bindgen_ty_1::alignment"] + [::core::mem::offset_of!(MLKEM1024_private_key__bindgen_ty_1, alignment) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MLKEM1024_private_key"][::core::mem::size_of::() - 12384usize]; + ["Alignment of MLKEM1024_private_key"] + [::core::mem::align_of::() - 2usize]; + ["Offset of field: MLKEM1024_private_key::opaque"] + [::core::mem::offset_of!(MLKEM1024_private_key, opaque) - 0usize]; +}; +unsafe extern "C" { + pub fn MLKEM1024_generate_key( + out_encoded_public_key: *mut u8, + optional_out_seed: *mut u8, + out_private_key: *mut MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_private_key_from_seed( + out_private_key: *mut MLKEM1024_private_key, + seed: *const u8, + seed_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_public_from_private( + out_public_key: *mut MLKEM1024_public_key, + private_key: *const MLKEM1024_private_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_encap( + out_ciphertext: *mut u8, + out_shared_secret: *mut u8, + public_key: *const MLKEM1024_public_key, + ); +} +unsafe extern "C" { + pub fn MLKEM1024_decap( + out_shared_secret: *mut u8, + ciphertext: *const u8, + ciphertext_len: usize, + private_key: *const MLKEM1024_private_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_marshal_public_key( + out: *mut CBB, + public_key: *const MLKEM1024_public_key, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn MLKEM1024_parse_public_key( + out_public_key: *mut MLKEM1024_public_key, + in_: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_dup(obj: *const ASN1_OBJECT) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_cmp(a: *const ASN1_OBJECT, b: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_get0_data(obj: *const ASN1_OBJECT) -> *const u8; +} +unsafe extern "C" { + pub fn OBJ_length(obj: *const ASN1_OBJECT) -> usize; +} +unsafe extern "C" { + pub fn OBJ_obj2nid(obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_cbs2nid(cbs: *const CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_sn2nid(short_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_ln2nid(long_name: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2nid(s: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_nid2obj(nid: ::core::ffi::c_int) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_get_undef() -> *const ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_nid2sn(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2ln(nid: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn OBJ_nid2cbb(out: *mut CBB, nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_txt2obj( + s: *const ::core::ffi::c_char, + dont_search_names: ::core::ffi::c_int, + ) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn OBJ_obj2txt( + out: *mut ::core::ffi::c_char, + out_len: ::core::ffi::c_int, + obj: *const ASN1_OBJECT, + always_return_oid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_create( + oid: *const ::core::ffi::c_char, + short_name: *const ::core::ffi::c_char, + long_name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_algs( + sign_nid: ::core::ffi::c_int, + out_digest_nid: *mut ::core::ffi::c_int, + out_pkey_nid: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OBJ_find_sigid_by_algs( + out_sign_nid: *mut ::core::ffi::c_int, + digest_nid: ::core::ffi::c_int, + pkey_nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct obj_name_st { + pub type_: ::core::ffi::c_int, + pub alias: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub data: *const ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of obj_name_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of obj_name_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: obj_name_st::type_"][::core::mem::offset_of!(obj_name_st, type_) - 0usize]; + ["Offset of field: obj_name_st::alias"][::core::mem::offset_of!(obj_name_st, alias) - 4usize]; + ["Offset of field: obj_name_st::name"][::core::mem::offset_of!(obj_name_st, name) - 8usize]; + ["Offset of field: obj_name_st::data"][::core::mem::offset_of!(obj_name_st, data) - 16usize]; +}; +pub type OBJ_NAME = obj_name_st; +unsafe extern "C" { + pub fn OBJ_NAME_do_all_sorted( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_NAME_do_all( + type_: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(arg1: *const OBJ_NAME, arg: *mut ::core::ffi::c_void), + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn OBJ_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_CRYPTO_BUFFER { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_CRL { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn PKCS7_get_raw_certificates( + out_certs: *mut stack_st_CRYPTO_BUFFER, + cbs: *mut CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_certificates( + out_certs: *mut stack_st_X509, + cbs: *mut CBS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_raw_certificates( + out: *mut CBB, + certs: *const stack_st_CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_certificates( + out: *mut CBB, + certs: *const stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_CRLs(out_crls: *mut stack_st_X509_CRL, cbs: *mut CBS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_bundle_CRLs(out: *mut CBB, crls: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_certificates( + out_certs: *mut stack_st_X509, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_get_PEM_CRLs( + out_crls: *mut stack_st_X509_CRL, + pem_bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGNED { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGNED"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGNED"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGNED::cert"][::core::mem::offset_of!(PKCS7_SIGNED, cert) - 0usize]; + ["Offset of field: PKCS7_SIGNED::crl"][::core::mem::offset_of!(PKCS7_SIGNED, crl) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PKCS7_SIGN_ENVELOPE { + pub cert: *mut stack_st_X509, + pub crl: *mut stack_st_X509_CRL, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7_SIGN_ENVELOPE"][::core::mem::size_of::() - 16usize]; + ["Alignment of PKCS7_SIGN_ENVELOPE"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::cert"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, cert) - 0usize]; + ["Offset of field: PKCS7_SIGN_ENVELOPE::crl"] + [::core::mem::offset_of!(PKCS7_SIGN_ENVELOPE, crl) - 8usize]; +}; +pub type PKCS7_ENVELOPE = ::core::ffi::c_void; +pub type PKCS7_DIGEST = ::core::ffi::c_void; +pub type PKCS7_ENCRYPT = ::core::ffi::c_void; +pub type PKCS7_SIGNER_INFO = ::core::ffi::c_void; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PKCS7 { + pub ber_bytes: *mut u8, + pub ber_len: usize, + pub type_: *mut ASN1_OBJECT, + pub d: PKCS7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union PKCS7__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub data: *mut ASN1_OCTET_STRING, + pub sign: *mut PKCS7_SIGNED, + pub enveloped: *mut PKCS7_ENVELOPE, + pub signed_and_enveloped: *mut PKCS7_SIGN_ENVELOPE, + pub digest: *mut PKCS7_DIGEST, + pub encrypted: *mut PKCS7_ENCRYPT, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; + ["Alignment of PKCS7__bindgen_ty_1"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::data"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, data) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::sign"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, sign) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::signed_and_enveloped"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, signed_and_enveloped) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::digest"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, digest) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::encrypted"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, encrypted) - 0usize]; + ["Offset of field: PKCS7__bindgen_ty_1::other"] + [::core::mem::offset_of!(PKCS7__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PKCS7"][::core::mem::size_of::() - 32usize]; + ["Alignment of PKCS7"][::core::mem::align_of::() - 8usize]; + ["Offset of field: PKCS7::ber_bytes"][::core::mem::offset_of!(PKCS7, ber_bytes) - 0usize]; + ["Offset of field: PKCS7::ber_len"][::core::mem::offset_of!(PKCS7, ber_len) - 8usize]; + ["Offset of field: PKCS7::type_"][::core::mem::offset_of!(PKCS7, type_) - 16usize]; + ["Offset of field: PKCS7::d"][::core::mem::offset_of!(PKCS7, d) - 24usize]; +}; +unsafe extern "C" { + pub fn d2i_PKCS7(out: *mut *mut PKCS7, inp: *mut *const u8, len: usize) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn d2i_PKCS7_bio(bio: *mut BIO, out: *mut *mut PKCS7) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn i2d_PKCS7(p7: *const PKCS7, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS7_bio(bio: *mut BIO, p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_free(p7: *mut PKCS7); +} +unsafe extern "C" { + pub fn PKCS7_type_is_data(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_digest(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_encrypted(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_enveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signed(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_type_is_signedAndEnveloped(p7: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS7_sign( + sign_cert: *mut X509, + pkey: *mut EVP_PKEY, + certs: *mut stack_st_X509, + data: *mut BIO, + flags: ::core::ffi::c_int, + ) -> *mut PKCS7; +} +pub type sk_CRYPTO_BUFFER_free_func = + ::core::option::Option; +pub type sk_CRYPTO_BUFFER_copy_func = + ::core::option::Option *mut CRYPTO_BUFFER>; +pub type sk_CRYPTO_BUFFER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const CRYPTO_BUFFER, + arg2: *const *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int, +>; +pub type sk_CRYPTO_BUFFER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut CRYPTO_BUFFER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_free_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_copy_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_call_delete_if_func__extern"] + pub fn sk_CRYPTO_BUFFER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new__extern"] + pub fn sk_CRYPTO_BUFFER_new(comp: sk_CRYPTO_BUFFER_cmp_func) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_new_null__extern"] + pub fn sk_CRYPTO_BUFFER_new_null() -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_num__extern"] + pub fn sk_CRYPTO_BUFFER_num(sk: *const stack_st_CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_zero__extern"] + pub fn sk_CRYPTO_BUFFER_zero(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_value__extern"] + pub fn sk_CRYPTO_BUFFER_value( + sk: *const stack_st_CRYPTO_BUFFER, + i: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set__extern"] + pub fn sk_CRYPTO_BUFFER_set( + sk: *mut stack_st_CRYPTO_BUFFER, + i: usize, + p: *mut CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_free__extern"] + pub fn sk_CRYPTO_BUFFER_free(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop_free__extern"] + pub fn sk_CRYPTO_BUFFER_pop_free( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_insert__extern"] + pub fn sk_CRYPTO_BUFFER_insert( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *mut CRYPTO_BUFFER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete__extern"] + pub fn sk_CRYPTO_BUFFER_delete( + sk: *mut stack_st_CRYPTO_BUFFER, + where_: usize, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_ptr__extern"] + pub fn sk_CRYPTO_BUFFER_delete_ptr( + sk: *mut stack_st_CRYPTO_BUFFER, + p: *const CRYPTO_BUFFER, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_delete_if__extern"] + pub fn sk_CRYPTO_BUFFER_delete_if( + sk: *mut stack_st_CRYPTO_BUFFER, + func: sk_CRYPTO_BUFFER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_find__extern"] + pub fn sk_CRYPTO_BUFFER_find( + sk: *const stack_st_CRYPTO_BUFFER, + out_index: *mut usize, + p: *const CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_shift__extern"] + pub fn sk_CRYPTO_BUFFER_shift(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_push__extern"] + pub fn sk_CRYPTO_BUFFER_push(sk: *mut stack_st_CRYPTO_BUFFER, p: *mut CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_pop__extern"] + pub fn sk_CRYPTO_BUFFER_pop(sk: *mut stack_st_CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_dup__extern"] + pub fn sk_CRYPTO_BUFFER_dup(sk: *const stack_st_CRYPTO_BUFFER) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort__extern"] + pub fn sk_CRYPTO_BUFFER_sort(sk: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_sort_and_dedup__extern"] + pub fn sk_CRYPTO_BUFFER_sort_and_dedup( + sk: *mut stack_st_CRYPTO_BUFFER, + free_func: sk_CRYPTO_BUFFER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_is_sorted__extern"] + pub fn sk_CRYPTO_BUFFER_is_sorted(sk: *const stack_st_CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_set_cmp_func__extern"] + pub fn sk_CRYPTO_BUFFER_set_cmp_func( + sk: *mut stack_st_CRYPTO_BUFFER, + comp: sk_CRYPTO_BUFFER_cmp_func, + ) -> sk_CRYPTO_BUFFER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_CRYPTO_BUFFER_deep_copy__extern"] + pub fn sk_CRYPTO_BUFFER_deep_copy( + sk: *const stack_st_CRYPTO_BUFFER, + copy_func: sk_CRYPTO_BUFFER_copy_func, + free_func: sk_CRYPTO_BUFFER_free_func, + ) -> *mut stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_free(pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_POOL_up_ref(pool: *mut CRYPTO_BUFFER_POOL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_alloc(out_data: *mut *mut u8, len: usize) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_CBS( + cbs: *const CBS, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_new_from_static_data_unsafe( + data: *const u8, + len: usize, + pool: *mut CRYPTO_BUFFER_POOL, + ) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_free(buf: *mut CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_up_ref(buf: *mut CRYPTO_BUFFER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_dup_ref(buf: *const CRYPTO_BUFFER) -> *mut CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_data(buf: *const CRYPTO_BUFFER) -> *const u8; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_len(buf: *const CRYPTO_BUFFER) -> usize; +} +unsafe extern "C" { + pub fn CRYPTO_BUFFER_init_CBS(buf: *const CRYPTO_BUFFER, out: *mut CBS); +} +unsafe extern "C" { + pub fn RSA_new_public_key(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new() -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_method(engine: *const ENGINE) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_free(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_up_ref(rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_bits(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_get0_n(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_e(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_d(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_p(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_q(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmp1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_dmq1(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_iqmp(rsa: *const RSA) -> *const BIGNUM; +} +unsafe extern "C" { + pub fn RSA_get0_key( + rsa: *const RSA, + out_n: *mut *const BIGNUM, + out_e: *mut *const BIGNUM, + out_d: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_get0_factors(rsa: *const RSA, out_p: *mut *const BIGNUM, out_q: *mut *const BIGNUM); +} +unsafe extern "C" { + pub fn RSA_get0_crt_params( + rsa: *const RSA, + out_dmp1: *mut *const BIGNUM, + out_dmq1: *mut *const BIGNUM, + out_iqmp: *mut *const BIGNUM, + ); +} +unsafe extern "C" { + pub fn RSA_set0_key( + rsa: *mut RSA, + n: *mut BIGNUM, + e: *mut BIGNUM, + d: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_factors(rsa: *mut RSA, p: *mut BIGNUM, q: *mut BIGNUM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set0_crt_params( + rsa: *mut RSA, + dmp1: *mut BIGNUM, + dmq1: *mut BIGNUM, + iqmp: *mut BIGNUM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_ex( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + e: *const BIGNUM, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_generate_key_fips( + rsa: *mut RSA, + bits: ::core::ffi::c_int, + cb: *mut BN_GENCB, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_encrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_decrypt( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_pss_mgf1( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_sign_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify( + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + sig: *const u8, + sig_len: usize, + rsa: *mut RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_pss_mgf1( + rsa: *mut RSA, + digest: *const u8, + digest_len: usize, + md: *const EVP_MD, + mgf1_md: *const EVP_MD, + salt_len: ::core::ffi::c_int, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_raw( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_encrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_decrypt( + flen: usize, + from: *const u8, + to: *mut u8, + rsa: *mut RSA, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_size(rsa: *const RSA) -> ::core::ffi::c_uint; +} +unsafe extern "C" { + pub fn RSA_is_opaque(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSAPublicKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSAPrivateKey_dup(rsa: *const RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_check_key(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_check_fips(key: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS_mgf1( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS_mgf1( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + mgf1Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP_mgf1( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + md: *const EVP_MD, + mgf1md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_add_pkcs1_prefix( + out_msg: *mut *mut u8, + out_msg_len: *mut usize, + is_alloced: *mut ::core::ffi::c_int, + hash_nid: ::core::ffi::c_int, + digest: *const u8, + digest_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_public_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_public_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_public_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_public_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_parse_private_key(cbs: *mut CBS) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_private_key_from_bytes(in_: *const u8, in_len: usize) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_marshal_private_key(cbb: *mut CBB, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_private_key_to_bytes( + out_bytes: *mut *mut u8, + out_len: *mut usize, + rsa: *const RSA, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_crt( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_no_e(n: *const BIGNUM, d: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_public_key_large_e(n: *const BIGNUM, e: *const BIGNUM) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_new_private_key_large_e( + n: *const BIGNUM, + e: *const BIGNUM, + d: *const BIGNUM, + p: *const BIGNUM, + q: *const BIGNUM, + dmp1: *const BIGNUM, + dmq1: *const BIGNUM, + iqmp: *const BIGNUM, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn RSA_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_set_ex_data( + rsa: *mut RSA, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get_ex_data(rsa: *const RSA, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn RSA_flags(rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_test_flags(rsa: *const RSA, flags: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_on(rsa: *mut RSA, ctx: *mut BN_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_blinding_off(rsa: *mut RSA); +} +unsafe extern "C" { + pub fn RSA_generate_key( + bits: ::core::ffi::c_int, + e: u64, + callback: *mut ::core::ffi::c_void, + cb_arg: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey( + out: *mut *mut RSA, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey(in_: *const RSA, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_PSS( + rsa: *const RSA, + EM: *mut u8, + mHash: *const u8, + Hash: *const EVP_MD, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_verify_PKCS1_PSS( + rsa: *const RSA, + mHash: *const u8, + Hash: *const EVP_MD, + EM: *const u8, + sLen: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_padding_add_PKCS1_OAEP( + to: *mut u8, + to_len: usize, + from: *const u8, + from_len: usize, + param: *const u8, + param_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_print( + bio: *mut BIO, + rsa: *const RSA, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RSA_get0_pss_params(rsa: *const RSA) -> *const RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_new_method_no_e(engine: *const ENGINE, n: *const BIGNUM) -> *mut RSA; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_meth_st { + pub common: openssl_method_common_st, + pub app_data: *mut ::core::ffi::c_void, + pub init: ::core::option::Option ::core::ffi::c_int>, + pub finish: ::core::option::Option ::core::ffi::c_int>, + pub sign: ::core::option::Option< + unsafe extern "C" fn( + type_: ::core::ffi::c_int, + m: *const u8, + m_length: ::core::ffi::c_uint, + sigret: *mut u8, + siglen: *mut ::core::ffi::c_uint, + rsa: *const RSA, + ) -> ::core::ffi::c_int, + >, + pub sign_raw: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out_len: *mut usize, + out: *mut u8, + max_out: usize, + in_: *const u8, + in_len: usize, + padding: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub private_transform: ::core::option::Option< + unsafe extern "C" fn( + rsa: *mut RSA, + out: *mut u8, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flags: ::core::ffi::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_meth_st"][::core::mem::size_of::() - 72usize]; + ["Alignment of rsa_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_meth_st::common"][::core::mem::offset_of!(rsa_meth_st, common) - 0usize]; + ["Offset of field: rsa_meth_st::app_data"] + [::core::mem::offset_of!(rsa_meth_st, app_data) - 8usize]; + ["Offset of field: rsa_meth_st::init"][::core::mem::offset_of!(rsa_meth_st, init) - 16usize]; + ["Offset of field: rsa_meth_st::finish"] + [::core::mem::offset_of!(rsa_meth_st, finish) - 24usize]; + ["Offset of field: rsa_meth_st::sign"][::core::mem::offset_of!(rsa_meth_st, sign) - 32usize]; + ["Offset of field: rsa_meth_st::sign_raw"] + [::core::mem::offset_of!(rsa_meth_st, sign_raw) - 40usize]; + ["Offset of field: rsa_meth_st::decrypt"] + [::core::mem::offset_of!(rsa_meth_st, decrypt) - 48usize]; + ["Offset of field: rsa_meth_st::private_transform"] + [::core::mem::offset_of!(rsa_meth_st, private_transform) - 56usize]; + ["Offset of field: rsa_meth_st::flags"][::core::mem::offset_of!(rsa_meth_st, flags) - 64usize]; +}; +pub type sk_X509_free_func = ::core::option::Option; +pub type sk_X509_copy_func = + ::core::option::Option *mut X509>; +pub type sk_X509_cmp_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const *const X509, arg2: *const *const X509) -> ::core::ffi::c_int, +>; +pub type sk_X509_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_call_free_func__extern"] + pub fn sk_X509_call_free_func(free_func: OPENSSL_sk_free_func, ptr: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + #[link_name = "sk_X509_call_copy_func__extern"] + pub fn sk_X509_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_cmp_func__extern"] + pub fn sk_X509_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_call_delete_if_func__extern"] + pub fn sk_X509_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_new__extern"] + pub fn sk_X509_new(comp: sk_X509_cmp_func) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_new_null__extern"] + pub fn sk_X509_new_null() -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_num__extern"] + pub fn sk_X509_num(sk: *const stack_st_X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_zero__extern"] + pub fn sk_X509_zero(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_value__extern"] + pub fn sk_X509_value(sk: *const stack_st_X509, i: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_set__extern"] + pub fn sk_X509_set(sk: *mut stack_st_X509, i: usize, p: *mut X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_free__extern"] + pub fn sk_X509_free(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_pop_free__extern"] + pub fn sk_X509_pop_free(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_insert__extern"] + pub fn sk_X509_insert(sk: *mut stack_st_X509, p: *mut X509, where_: usize) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete__extern"] + pub fn sk_X509_delete(sk: *mut stack_st_X509, where_: usize) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_ptr__extern"] + pub fn sk_X509_delete_ptr(sk: *mut stack_st_X509, p: *const X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_delete_if__extern"] + pub fn sk_X509_delete_if( + sk: *mut stack_st_X509, + func: sk_X509_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_find__extern"] + pub fn sk_X509_find( + sk: *const stack_st_X509, + out_index: *mut usize, + p: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_shift__extern"] + pub fn sk_X509_shift(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_push__extern"] + pub fn sk_X509_push(sk: *mut stack_st_X509, p: *mut X509) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_pop__extern"] + pub fn sk_X509_pop(sk: *mut stack_st_X509) -> *mut X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_dup__extern"] + pub fn sk_X509_dup(sk: *const stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + #[link_name = "sk_X509_sort__extern"] + pub fn sk_X509_sort(sk: *mut stack_st_X509); +} +unsafe extern "C" { + #[link_name = "sk_X509_sort_and_dedup__extern"] + pub fn sk_X509_sort_and_dedup(sk: *mut stack_st_X509, free_func: sk_X509_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_is_sorted__extern"] + pub fn sk_X509_is_sorted(sk: *const stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_set_cmp_func__extern"] + pub fn sk_X509_set_cmp_func(sk: *mut stack_st_X509, comp: sk_X509_cmp_func) + -> sk_X509_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_deep_copy__extern"] + pub fn sk_X509_deep_copy( + sk: *const stack_st_X509, + copy_func: sk_X509_copy_func, + free_func: sk_X509_free_func, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub static X509_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_up_ref(x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_dup_ref(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_chain_up_ref(chain: *mut stack_st_X509) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_dup(x509: *const X509) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_free(x509: *mut X509); +} +unsafe extern "C" { + pub fn d2i_X509( + out: *mut *mut X509, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_with_algorithms( + buf: *mut CRYPTO_BUFFER, + algs: *const *const EVP_PKEY_ALG, + num_algs: usize, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_parse_from_buffer(buf: *mut CRYPTO_BUFFER) -> *mut X509; +} +unsafe extern "C" { + pub fn i2d_X509(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_version(x509: *const X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get0_serialNumber(x509: *const X509) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_get0_notBefore(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get0_notAfter(x509: *const X509) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_issuer_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_subject_name(x509: *const X509) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_get_X509_PUBKEY(x509: *const X509) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get_pubkey(x509: *const X509) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_get0_pubkey_bitstr(x509: *const X509) -> *mut ASN1_BIT_STRING; +} +unsafe extern "C" { + pub fn X509_check_private_key(x509: *const X509, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get0_uids( + x509: *const X509, + out_issuer_uid: *mut *const ASN1_BIT_STRING, + out_subject_uid: *mut *const ASN1_BIT_STRING, + ); +} +unsafe extern "C" { + pub fn X509_get_extension_flags(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_pathlen(x509: *mut X509) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_get_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_extended_key_usage(x509: *mut X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get0_subject_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get0_authority_key_id(x509: *mut X509) -> *const ASN1_OCTET_STRING; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_NAME { + _unused: [u8; 0], +} +pub type sk_GENERAL_NAME_free_func = + ::core::option::Option; +pub type sk_GENERAL_NAME_copy_func = + ::core::option::Option *mut GENERAL_NAME>; +pub type sk_GENERAL_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_NAME, + arg2: *const *const GENERAL_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_free_func__extern"] + pub fn sk_GENERAL_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_copy_func__extern"] + pub fn sk_GENERAL_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_cmp_func__extern"] + pub fn sk_GENERAL_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_call_delete_if_func__extern"] + pub fn sk_GENERAL_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new__extern"] + pub fn sk_GENERAL_NAME_new(comp: sk_GENERAL_NAME_cmp_func) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_new_null__extern"] + pub fn sk_GENERAL_NAME_new_null() -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_num__extern"] + pub fn sk_GENERAL_NAME_num(sk: *const stack_st_GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_zero__extern"] + pub fn sk_GENERAL_NAME_zero(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_value__extern"] + pub fn sk_GENERAL_NAME_value(sk: *const stack_st_GENERAL_NAME, i: usize) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set__extern"] + pub fn sk_GENERAL_NAME_set( + sk: *mut stack_st_GENERAL_NAME, + i: usize, + p: *mut GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_free__extern"] + pub fn sk_GENERAL_NAME_free(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop_free__extern"] + pub fn sk_GENERAL_NAME_pop_free( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_insert__extern"] + pub fn sk_GENERAL_NAME_insert( + sk: *mut stack_st_GENERAL_NAME, + p: *mut GENERAL_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete__extern"] + pub fn sk_GENERAL_NAME_delete( + sk: *mut stack_st_GENERAL_NAME, + where_: usize, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_ptr__extern"] + pub fn sk_GENERAL_NAME_delete_ptr( + sk: *mut stack_st_GENERAL_NAME, + p: *const GENERAL_NAME, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_delete_if__extern"] + pub fn sk_GENERAL_NAME_delete_if( + sk: *mut stack_st_GENERAL_NAME, + func: sk_GENERAL_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_find__extern"] + pub fn sk_GENERAL_NAME_find( + sk: *const stack_st_GENERAL_NAME, + out_index: *mut usize, + p: *const GENERAL_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_shift__extern"] + pub fn sk_GENERAL_NAME_shift(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_push__extern"] + pub fn sk_GENERAL_NAME_push(sk: *mut stack_st_GENERAL_NAME, p: *mut GENERAL_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_pop__extern"] + pub fn sk_GENERAL_NAME_pop(sk: *mut stack_st_GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_dup__extern"] + pub fn sk_GENERAL_NAME_dup(sk: *const stack_st_GENERAL_NAME) -> *mut stack_st_GENERAL_NAME; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort__extern"] + pub fn sk_GENERAL_NAME_sort(sk: *mut stack_st_GENERAL_NAME); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_sort_and_dedup__extern"] + pub fn sk_GENERAL_NAME_sort_and_dedup( + sk: *mut stack_st_GENERAL_NAME, + free_func: sk_GENERAL_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_is_sorted__extern"] + pub fn sk_GENERAL_NAME_is_sorted(sk: *const stack_st_GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_set_cmp_func__extern"] + pub fn sk_GENERAL_NAME_set_cmp_func( + sk: *mut stack_st_GENERAL_NAME, + comp: sk_GENERAL_NAME_cmp_func, + ) -> sk_GENERAL_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_NAME_deep_copy__extern"] + pub fn sk_GENERAL_NAME_deep_copy( + sk: *const stack_st_GENERAL_NAME, + copy_func: sk_GENERAL_NAME_copy_func, + free_func: sk_GENERAL_NAME_free_func, + ) -> *mut stack_st_GENERAL_NAME; +} +pub type GENERAL_NAMES = stack_st_GENERAL_NAME; +unsafe extern "C" { + pub fn X509_get0_authority_issuer(x509: *mut X509) -> *const GENERAL_NAMES; +} +unsafe extern "C" { + pub fn X509_get0_authority_serial(x509: *mut X509) -> *const ASN1_INTEGER; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_EXTENSION { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn X509_get0_extensions(x509: *const X509) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_count(x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_NID( + x: *const X509, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_OBJ( + x: *const X509, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext_by_critical( + x: *const X509, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ext(x: *const X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_get_ext_d2i( + x509: *const X509, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_get0_tbs_sigalg(x509: *const X509) -> *const X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_get0_signature( + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + x509: *const X509, + ); +} +unsafe extern "C" { + pub fn X509_get_signature_nid(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_tbs(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify(x509: *const X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get1_email(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_get1_ocsp(x509: *const X509) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_email_free(sk: *mut stack_st_OPENSSL_STRING); +} +unsafe extern "C" { + pub fn X509_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_new() -> *mut X509; +} +unsafe extern "C" { + pub fn X509_set_version(x509: *mut X509, version: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_serialNumber( + x509: *mut X509, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_getm_notBefore(x509: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_getm_notAfter(x: *mut X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_issuer_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_subject_name(x509: *mut X509, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_pubkey(x509: *mut X509, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_delete_ext(x: *mut X509, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_add_ext( + x: *mut X509, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_ext_i2d( + x: *mut X509, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign(x509: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_sign_ctx(x509: *mut X509, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_tbs(x509: *mut X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_algo(x509: *mut X509, algo: *const X509_ALGOR) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set1_signature_value( + x509: *mut X509, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_AUX(x509: *const X509, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_AUX( + x509: *mut *mut X509, + inp: *mut *const u8, + length: ::core::ffi::c_long, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_alias_set1( + x509: *mut X509, + name: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_keyid_set1(x509: *mut X509, id: *const u8, len: ossl_ssize_t) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_alias_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_keyid_get0(x509: *const X509, out_len: *mut ::core::ffi::c_int) -> *const u8; +} +unsafe extern "C" { + pub fn X509_add1_trust_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_add1_reject_object(x509: *mut X509, obj: *const ASN1_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_trust_clear(x509: *mut X509); +} +unsafe extern "C" { + pub fn X509_reject_clear(x509: *mut X509); +} +pub type sk_X509_CRL_free_func = ::core::option::Option; +pub type sk_X509_CRL_copy_func = + ::core::option::Option *mut X509_CRL>; +pub type sk_X509_CRL_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_CRL, + arg2: *const *const X509_CRL, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_CRL_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut X509_CRL, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_free_func__extern"] + pub fn sk_X509_CRL_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_copy_func__extern"] + pub fn sk_X509_CRL_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_cmp_func__extern"] + pub fn sk_X509_CRL_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_call_delete_if_func__extern"] + pub fn sk_X509_CRL_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new__extern"] + pub fn sk_X509_CRL_new(comp: sk_X509_CRL_cmp_func) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_new_null__extern"] + pub fn sk_X509_CRL_new_null() -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_num__extern"] + pub fn sk_X509_CRL_num(sk: *const stack_st_X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_zero__extern"] + pub fn sk_X509_CRL_zero(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_value__extern"] + pub fn sk_X509_CRL_value(sk: *const stack_st_X509_CRL, i: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set__extern"] + pub fn sk_X509_CRL_set(sk: *mut stack_st_X509_CRL, i: usize, p: *mut X509_CRL) + -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_free__extern"] + pub fn sk_X509_CRL_free(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop_free__extern"] + pub fn sk_X509_CRL_pop_free(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_insert__extern"] + pub fn sk_X509_CRL_insert(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete__extern"] + pub fn sk_X509_CRL_delete(sk: *mut stack_st_X509_CRL, where_: usize) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_ptr__extern"] + pub fn sk_X509_CRL_delete_ptr(sk: *mut stack_st_X509_CRL, p: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_delete_if__extern"] + pub fn sk_X509_CRL_delete_if( + sk: *mut stack_st_X509_CRL, + func: sk_X509_CRL_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_find__extern"] + pub fn sk_X509_CRL_find( + sk: *const stack_st_X509_CRL, + out_index: *mut usize, + p: *const X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_shift__extern"] + pub fn sk_X509_CRL_shift(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_push__extern"] + pub fn sk_X509_CRL_push(sk: *mut stack_st_X509_CRL, p: *mut X509_CRL) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_pop__extern"] + pub fn sk_X509_CRL_pop(sk: *mut stack_st_X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_dup__extern"] + pub fn sk_X509_CRL_dup(sk: *const stack_st_X509_CRL) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort__extern"] + pub fn sk_X509_CRL_sort(sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_sort_and_dedup__extern"] + pub fn sk_X509_CRL_sort_and_dedup(sk: *mut stack_st_X509_CRL, free_func: sk_X509_CRL_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_is_sorted__extern"] + pub fn sk_X509_CRL_is_sorted(sk: *const stack_st_X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_set_cmp_func__extern"] + pub fn sk_X509_CRL_set_cmp_func( + sk: *mut stack_st_X509_CRL, + comp: sk_X509_CRL_cmp_func, + ) -> sk_X509_CRL_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_CRL_deep_copy__extern"] + pub fn sk_X509_CRL_deep_copy( + sk: *const stack_st_X509_CRL, + copy_func: sk_X509_CRL_copy_func, + free_func: sk_X509_CRL_free_func, + ) -> *mut stack_st_X509_CRL; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_REVOKED { + _unused: [u8; 0], +} +pub type sk_X509_REVOKED_free_func = + ::core::option::Option; +pub type sk_X509_REVOKED_copy_func = + ::core::option::Option *mut X509_REVOKED>; +pub type sk_X509_REVOKED_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_REVOKED, + arg2: *const *const X509_REVOKED, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_REVOKED_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_REVOKED, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_free_func__extern"] + pub fn sk_X509_REVOKED_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_copy_func__extern"] + pub fn sk_X509_REVOKED_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_cmp_func__extern"] + pub fn sk_X509_REVOKED_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_call_delete_if_func__extern"] + pub fn sk_X509_REVOKED_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new__extern"] + pub fn sk_X509_REVOKED_new(comp: sk_X509_REVOKED_cmp_func) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_new_null__extern"] + pub fn sk_X509_REVOKED_new_null() -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_num__extern"] + pub fn sk_X509_REVOKED_num(sk: *const stack_st_X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_zero__extern"] + pub fn sk_X509_REVOKED_zero(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_value__extern"] + pub fn sk_X509_REVOKED_value(sk: *const stack_st_X509_REVOKED, i: usize) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set__extern"] + pub fn sk_X509_REVOKED_set( + sk: *mut stack_st_X509_REVOKED, + i: usize, + p: *mut X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_free__extern"] + pub fn sk_X509_REVOKED_free(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop_free__extern"] + pub fn sk_X509_REVOKED_pop_free( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_insert__extern"] + pub fn sk_X509_REVOKED_insert( + sk: *mut stack_st_X509_REVOKED, + p: *mut X509_REVOKED, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete__extern"] + pub fn sk_X509_REVOKED_delete( + sk: *mut stack_st_X509_REVOKED, + where_: usize, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_ptr__extern"] + pub fn sk_X509_REVOKED_delete_ptr( + sk: *mut stack_st_X509_REVOKED, + p: *const X509_REVOKED, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_delete_if__extern"] + pub fn sk_X509_REVOKED_delete_if( + sk: *mut stack_st_X509_REVOKED, + func: sk_X509_REVOKED_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_find__extern"] + pub fn sk_X509_REVOKED_find( + sk: *const stack_st_X509_REVOKED, + out_index: *mut usize, + p: *const X509_REVOKED, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_shift__extern"] + pub fn sk_X509_REVOKED_shift(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_push__extern"] + pub fn sk_X509_REVOKED_push(sk: *mut stack_st_X509_REVOKED, p: *mut X509_REVOKED) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_pop__extern"] + pub fn sk_X509_REVOKED_pop(sk: *mut stack_st_X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_dup__extern"] + pub fn sk_X509_REVOKED_dup(sk: *const stack_st_X509_REVOKED) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort__extern"] + pub fn sk_X509_REVOKED_sort(sk: *mut stack_st_X509_REVOKED); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_sort_and_dedup__extern"] + pub fn sk_X509_REVOKED_sort_and_dedup( + sk: *mut stack_st_X509_REVOKED, + free_func: sk_X509_REVOKED_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_is_sorted__extern"] + pub fn sk_X509_REVOKED_is_sorted(sk: *const stack_st_X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_set_cmp_func__extern"] + pub fn sk_X509_REVOKED_set_cmp_func( + sk: *mut stack_st_X509_REVOKED, + comp: sk_X509_REVOKED_cmp_func, + ) -> sk_X509_REVOKED_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_REVOKED_deep_copy__extern"] + pub fn sk_X509_REVOKED_deep_copy( + sk: *const stack_st_X509_REVOKED, + copy_func: sk_X509_REVOKED_copy_func, + free_func: sk_X509_REVOKED_free_func, + ) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_up_ref(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_dup(crl: *const X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_free(crl: *mut X509_CRL); +} +unsafe extern "C" { + pub fn d2i_X509_CRL( + out: *mut *mut X509_CRL, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn i2d_X509_CRL(crl: *const X509_CRL, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_match(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_version(crl: *const X509_CRL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_CRL_get0_lastUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_nextUpdate(crl: *const X509_CRL) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_issuer(crl: *const X509_CRL) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_serial( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get0_by_cert( + crl: *mut X509_CRL, + out: *mut *mut X509_REVOKED, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_REVOKED(crl: *mut X509_CRL) -> *mut stack_st_X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_CRL_get0_extensions(crl: *const X509_CRL) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_count(x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_NID( + x: *const X509_CRL, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_OBJ( + x: *const X509_CRL, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_by_critical( + x: *const X509_CRL, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext(x: *const X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_get_ext_d2i( + crl: *const X509_CRL, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_CRL_get0_signature( + crl: *const X509_CRL, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_CRL_get_signature_nid(crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_tbs( + crl: *const X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_verify(crl: *const X509_CRL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_new() -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_CRL_set_version( + crl: *mut X509_CRL, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set_issuer_name( + crl: *mut X509_CRL, + name: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_lastUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_nextUpdate(crl: *mut X509_CRL, tm: *const ASN1_TIME) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add0_revoked(crl: *mut X509_CRL, rev: *mut X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sort(crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_delete_ext(x: *mut X509_CRL, loc: ::core::ffi::c_int) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_CRL_add_ext( + x: *mut X509_CRL, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_add1_ext_i2d( + x: *mut X509_CRL, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign( + crl: *mut X509_CRL, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_sign_ctx(crl: *mut X509_CRL, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_CRL_tbs( + crl: *mut X509_CRL, + outp: *mut *mut ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_algo( + crl: *mut X509_CRL, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_set1_signature_value( + crl: *mut X509_CRL, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_new() -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_free(rev: *mut X509_REVOKED); +} +unsafe extern "C" { + pub fn d2i_X509_REVOKED( + out: *mut *mut X509_REVOKED, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn i2d_X509_REVOKED(alg: *const X509_REVOKED, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_dup(rev: *const X509_REVOKED) -> *mut X509_REVOKED; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_serialNumber(revoked: *const X509_REVOKED) -> *const ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_serialNumber( + revoked: *mut X509_REVOKED, + serial: *const ASN1_INTEGER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_revocationDate(revoked: *const X509_REVOKED) -> *const ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_REVOKED_set_revocationDate( + revoked: *mut X509_REVOKED, + tm: *const ASN1_TIME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get0_extensions(r: *const X509_REVOKED) -> *const stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_count(x: *const X509_REVOKED) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_NID( + x: *const X509_REVOKED, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_OBJ( + x: *const X509_REVOKED, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_by_critical( + x: *const X509_REVOKED, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext( + x: *const X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_delete_ext( + x: *mut X509_REVOKED, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REVOKED_add_ext( + x: *mut X509_REVOKED, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REVOKED_get_ext_d2i( + revoked: *const X509_REVOKED, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_REVOKED_add1_ext_i2d( + x: *mut X509_REVOKED, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_dup(req: *const X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_free(req: *mut X509_REQ); +} +unsafe extern "C" { + pub fn d2i_X509_REQ( + out: *mut *mut X509_REQ, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn i2d_X509_REQ(req: *const X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_version(req: *const X509_REQ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_REQ_get0_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_get_pubkey(req: *const X509_REQ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_REQ_check_private_key( + req: *const X509_REQ, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_count(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr(req: *const X509_REQ, loc: ::core::ffi::c_int) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_NID( + req: *const X509_REQ, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_attr_by_OBJ( + req: *const X509_REQ, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_extension_nid(nid: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get_extensions(req: *const X509_REQ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_REQ_get0_signature( + req: *const X509_REQ, + out_sig: *mut *const ASN1_BIT_STRING, + out_alg: *mut *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_REQ_get_signature_nid(req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_verify(req: *const X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_get1_email(req: *const X509_REQ) -> *mut stack_st_OPENSSL_STRING; +} +unsafe extern "C" { + pub fn X509_REQ_new() -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn X509_REQ_set_version( + req: *mut X509_REQ, + version: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_subject_name( + req: *mut X509_REQ, + name: *mut X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_delete_attr(req: *mut X509_REQ, loc: ::core::ffi::c_int) + -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr( + req: *mut X509_REQ, + attr: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_OBJ( + req: *mut X509_REQ, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_NID( + req: *mut X509_REQ, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add1_attr_by_txt( + req: *mut X509_REQ, + attrname: *const ::core::ffi::c_char, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions_nid( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_add_extensions( + req: *mut X509_REQ, + exts: *const stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign( + req: *mut X509_REQ, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_sign_ctx(req: *mut X509_REQ, ctx: *mut EVP_MD_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_re_X509_REQ_tbs(req: *mut X509_REQ, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_algo( + req: *mut X509_REQ, + algo: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_set1_signature_value( + req: *mut X509_REQ, + sig: *const u8, + sig_len: usize, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME_ENTRY { + _unused: [u8; 0], +} +pub type sk_X509_NAME_ENTRY_free_func = + ::core::option::Option; +pub type sk_X509_NAME_ENTRY_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY, +>; +pub type sk_X509_NAME_ENTRY_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME_ENTRY, + arg2: *const *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_ENTRY_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME_ENTRY, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_free_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_copy_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_call_delete_if_func__extern"] + pub fn sk_X509_NAME_ENTRY_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new__extern"] + pub fn sk_X509_NAME_ENTRY_new( + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_new_null__extern"] + pub fn sk_X509_NAME_ENTRY_new_null() -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_num__extern"] + pub fn sk_X509_NAME_ENTRY_num(sk: *const stack_st_X509_NAME_ENTRY) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_zero__extern"] + pub fn sk_X509_NAME_ENTRY_zero(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_value__extern"] + pub fn sk_X509_NAME_ENTRY_value( + sk: *const stack_st_X509_NAME_ENTRY, + i: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set__extern"] + pub fn sk_X509_NAME_ENTRY_set( + sk: *mut stack_st_X509_NAME_ENTRY, + i: usize, + p: *mut X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_free__extern"] + pub fn sk_X509_NAME_ENTRY_free(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop_free__extern"] + pub fn sk_X509_NAME_ENTRY_pop_free( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_insert__extern"] + pub fn sk_X509_NAME_ENTRY_insert( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete__extern"] + pub fn sk_X509_NAME_ENTRY_delete( + sk: *mut stack_st_X509_NAME_ENTRY, + where_: usize, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_ptr__extern"] + pub fn sk_X509_NAME_ENTRY_delete_ptr( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *const X509_NAME_ENTRY, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_delete_if__extern"] + pub fn sk_X509_NAME_ENTRY_delete_if( + sk: *mut stack_st_X509_NAME_ENTRY, + func: sk_X509_NAME_ENTRY_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_find__extern"] + pub fn sk_X509_NAME_ENTRY_find( + sk: *const stack_st_X509_NAME_ENTRY, + out_index: *mut usize, + p: *const X509_NAME_ENTRY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_shift__extern"] + pub fn sk_X509_NAME_ENTRY_shift(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_push__extern"] + pub fn sk_X509_NAME_ENTRY_push( + sk: *mut stack_st_X509_NAME_ENTRY, + p: *mut X509_NAME_ENTRY, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_pop__extern"] + pub fn sk_X509_NAME_ENTRY_pop(sk: *mut stack_st_X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_dup__extern"] + pub fn sk_X509_NAME_ENTRY_dup( + sk: *const stack_st_X509_NAME_ENTRY, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort__extern"] + pub fn sk_X509_NAME_ENTRY_sort(sk: *mut stack_st_X509_NAME_ENTRY); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_sort_and_dedup__extern"] + pub fn sk_X509_NAME_ENTRY_sort_and_dedup( + sk: *mut stack_st_X509_NAME_ENTRY, + free_func: sk_X509_NAME_ENTRY_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_is_sorted__extern"] + pub fn sk_X509_NAME_ENTRY_is_sorted(sk: *const stack_st_X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_set_cmp_func__extern"] + pub fn sk_X509_NAME_ENTRY_set_cmp_func( + sk: *mut stack_st_X509_NAME_ENTRY, + comp: sk_X509_NAME_ENTRY_cmp_func, + ) -> sk_X509_NAME_ENTRY_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_ENTRY_deep_copy__extern"] + pub fn sk_X509_NAME_ENTRY_deep_copy( + sk: *const stack_st_X509_NAME_ENTRY, + copy_func: sk_X509_NAME_ENTRY_copy_func, + free_func: sk_X509_NAME_ENTRY_free_func, + ) -> *mut stack_st_X509_NAME_ENTRY; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_NAME { + _unused: [u8; 0], +} +pub type sk_X509_NAME_free_func = + ::core::option::Option; +pub type sk_X509_NAME_copy_func = + ::core::option::Option *mut X509_NAME>; +pub type sk_X509_NAME_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_NAME, + arg2: *const *const X509_NAME, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_NAME_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_NAME, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_free_func__extern"] + pub fn sk_X509_NAME_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_copy_func__extern"] + pub fn sk_X509_NAME_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_cmp_func__extern"] + pub fn sk_X509_NAME_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_call_delete_if_func__extern"] + pub fn sk_X509_NAME_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new__extern"] + pub fn sk_X509_NAME_new(comp: sk_X509_NAME_cmp_func) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_new_null__extern"] + pub fn sk_X509_NAME_new_null() -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_num__extern"] + pub fn sk_X509_NAME_num(sk: *const stack_st_X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_zero__extern"] + pub fn sk_X509_NAME_zero(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_value__extern"] + pub fn sk_X509_NAME_value(sk: *const stack_st_X509_NAME, i: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set__extern"] + pub fn sk_X509_NAME_set( + sk: *mut stack_st_X509_NAME, + i: usize, + p: *mut X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_free__extern"] + pub fn sk_X509_NAME_free(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop_free__extern"] + pub fn sk_X509_NAME_pop_free(sk: *mut stack_st_X509_NAME, free_func: sk_X509_NAME_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_insert__extern"] + pub fn sk_X509_NAME_insert( + sk: *mut stack_st_X509_NAME, + p: *mut X509_NAME, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete__extern"] + pub fn sk_X509_NAME_delete(sk: *mut stack_st_X509_NAME, where_: usize) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_ptr__extern"] + pub fn sk_X509_NAME_delete_ptr( + sk: *mut stack_st_X509_NAME, + p: *const X509_NAME, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_delete_if__extern"] + pub fn sk_X509_NAME_delete_if( + sk: *mut stack_st_X509_NAME, + func: sk_X509_NAME_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_find__extern"] + pub fn sk_X509_NAME_find( + sk: *const stack_st_X509_NAME, + out_index: *mut usize, + p: *const X509_NAME, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_shift__extern"] + pub fn sk_X509_NAME_shift(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_push__extern"] + pub fn sk_X509_NAME_push(sk: *mut stack_st_X509_NAME, p: *mut X509_NAME) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_pop__extern"] + pub fn sk_X509_NAME_pop(sk: *mut stack_st_X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_dup__extern"] + pub fn sk_X509_NAME_dup(sk: *const stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort__extern"] + pub fn sk_X509_NAME_sort(sk: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_sort_and_dedup__extern"] + pub fn sk_X509_NAME_sort_and_dedup( + sk: *mut stack_st_X509_NAME, + free_func: sk_X509_NAME_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_is_sorted__extern"] + pub fn sk_X509_NAME_is_sorted(sk: *const stack_st_X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_set_cmp_func__extern"] + pub fn sk_X509_NAME_set_cmp_func( + sk: *mut stack_st_X509_NAME, + comp: sk_X509_NAME_cmp_func, + ) -> sk_X509_NAME_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_NAME_deep_copy__extern"] + pub fn sk_X509_NAME_deep_copy( + sk: *const stack_st_X509_NAME, + copy_func: sk_X509_NAME_copy_func, + free_func: sk_X509_NAME_free_func, + ) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub static X509_NAME_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_NAME_new() -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_free(name: *mut X509_NAME); +} +unsafe extern "C" { + pub fn d2i_X509_NAME( + out: *mut *mut X509_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn i2d_X509_NAME(in_: *const X509_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_dup(name: *const X509_NAME) -> *mut X509_NAME; +} +unsafe extern "C" { + pub fn X509_NAME_cmp(a: *const X509_NAME, b: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get0_der( + name: *const X509_NAME, + out_der: *mut *const u8, + out_der_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_set(xn: *mut *mut X509_NAME, name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_entry_count(name: *const X509_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_index_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_entry( + name: *const X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_delete_entry( + name: *mut X509_NAME, + loc: ::core::ffi::c_int, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry( + name: *mut X509_NAME, + entry: *const X509_NAME_ENTRY, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_OBJ( + name: *mut X509_NAME, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_NID( + name: *mut X509_NAME, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_add_entry_by_txt( + name: *mut X509_NAME, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + loc: ::core::ffi::c_int, + set: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_new() -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_free(entry: *mut X509_NAME_ENTRY); +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_dup(entry: *const X509_NAME_ENTRY) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_object(entry: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_object( + entry: *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_get_data(entry: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set_data( + entry: *mut X509_NAME_ENTRY, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_set(entry: *const X509_NAME_ENTRY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_OBJ( + out: *mut *mut X509_NAME_ENTRY, + obj: *const ASN1_OBJECT, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_NID( + out: *mut *mut X509_NAME_ENTRY, + nid: ::core::ffi::c_int, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_NAME_ENTRY_create_by_txt( + out: *mut *mut X509_NAME_ENTRY, + field: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const u8, + len: ossl_ssize_t, + ) -> *mut X509_NAME_ENTRY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_new() -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_free(key: *mut X509_PUBKEY); +} +unsafe extern "C" { + pub fn d2i_X509_PUBKEY( + out: *mut *mut X509_PUBKEY, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_PUBKEY; +} +unsafe extern "C" { + pub fn i2d_X509_PUBKEY(key: *const X509_PUBKEY, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set(x: *mut *mut X509_PUBKEY, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get(key: *const X509_PUBKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn X509_PUBKEY_set0_param( + pub_: *mut X509_PUBKEY, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + key: *mut u8, + key_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_param( + out_obj: *mut *mut ASN1_OBJECT, + out_key: *mut *const u8, + out_key_len: *mut ::core::ffi::c_int, + out_alg: *mut *mut X509_ALGOR, + pub_: *mut X509_PUBKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PUBKEY_get0_public_key(pub_: *const X509_PUBKEY) -> *const ASN1_BIT_STRING; +} +unsafe extern "C" { + pub static X509_EXTENSION_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_EXTENSION_new() -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_free(ex: *mut X509_EXTENSION); +} +unsafe extern "C" { + pub fn d2i_X509_EXTENSION( + out: *mut *mut X509_EXTENSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSION(ex: *const X509_EXTENSION, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_dup(ex: *const X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_NID( + ex: *mut *mut X509_EXTENSION, + nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_create_by_OBJ( + ex: *mut *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + crit: ::core::ffi::c_int, + data: *const ASN1_OCTET_STRING, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_object(ex: *const X509_EXTENSION) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_data(ne: *const X509_EXTENSION) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_EXTENSION_get_critical(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_object( + ex: *mut X509_EXTENSION, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_critical( + ex: *mut X509_EXTENSION, + crit: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_EXTENSION_set_data( + ex: *mut X509_EXTENSION, + data: *const ASN1_OCTET_STRING, + ) -> ::core::ffi::c_int; +} +pub type sk_X509_EXTENSION_free_func = + ::core::option::Option; +pub type sk_X509_EXTENSION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_EXTENSION) -> *mut X509_EXTENSION, +>; +pub type sk_X509_EXTENSION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_EXTENSION, + arg2: *const *const X509_EXTENSION, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_EXTENSION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_EXTENSION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_free_func__extern"] + pub fn sk_X509_EXTENSION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_copy_func__extern"] + pub fn sk_X509_EXTENSION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_cmp_func__extern"] + pub fn sk_X509_EXTENSION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_call_delete_if_func__extern"] + pub fn sk_X509_EXTENSION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new__extern"] + pub fn sk_X509_EXTENSION_new(comp: sk_X509_EXTENSION_cmp_func) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_new_null__extern"] + pub fn sk_X509_EXTENSION_new_null() -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_num__extern"] + pub fn sk_X509_EXTENSION_num(sk: *const stack_st_X509_EXTENSION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_zero__extern"] + pub fn sk_X509_EXTENSION_zero(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_value__extern"] + pub fn sk_X509_EXTENSION_value( + sk: *const stack_st_X509_EXTENSION, + i: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set__extern"] + pub fn sk_X509_EXTENSION_set( + sk: *mut stack_st_X509_EXTENSION, + i: usize, + p: *mut X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_free__extern"] + pub fn sk_X509_EXTENSION_free(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop_free__extern"] + pub fn sk_X509_EXTENSION_pop_free( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_insert__extern"] + pub fn sk_X509_EXTENSION_insert( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete__extern"] + pub fn sk_X509_EXTENSION_delete( + sk: *mut stack_st_X509_EXTENSION, + where_: usize, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_ptr__extern"] + pub fn sk_X509_EXTENSION_delete_ptr( + sk: *mut stack_st_X509_EXTENSION, + p: *const X509_EXTENSION, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_delete_if__extern"] + pub fn sk_X509_EXTENSION_delete_if( + sk: *mut stack_st_X509_EXTENSION, + func: sk_X509_EXTENSION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_find__extern"] + pub fn sk_X509_EXTENSION_find( + sk: *const stack_st_X509_EXTENSION, + out_index: *mut usize, + p: *const X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_shift__extern"] + pub fn sk_X509_EXTENSION_shift(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_push__extern"] + pub fn sk_X509_EXTENSION_push( + sk: *mut stack_st_X509_EXTENSION, + p: *mut X509_EXTENSION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_pop__extern"] + pub fn sk_X509_EXTENSION_pop(sk: *mut stack_st_X509_EXTENSION) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_dup__extern"] + pub fn sk_X509_EXTENSION_dup( + sk: *const stack_st_X509_EXTENSION, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort__extern"] + pub fn sk_X509_EXTENSION_sort(sk: *mut stack_st_X509_EXTENSION); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_sort_and_dedup__extern"] + pub fn sk_X509_EXTENSION_sort_and_dedup( + sk: *mut stack_st_X509_EXTENSION, + free_func: sk_X509_EXTENSION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_is_sorted__extern"] + pub fn sk_X509_EXTENSION_is_sorted(sk: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_set_cmp_func__extern"] + pub fn sk_X509_EXTENSION_set_cmp_func( + sk: *mut stack_st_X509_EXTENSION, + comp: sk_X509_EXTENSION_cmp_func, + ) -> sk_X509_EXTENSION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_EXTENSION_deep_copy__extern"] + pub fn sk_X509_EXTENSION_deep_copy( + sk: *const stack_st_X509_EXTENSION, + copy_func: sk_X509_EXTENSION_copy_func, + free_func: sk_X509_EXTENSION_free_func, + ) -> *mut stack_st_X509_EXTENSION; +} +pub type X509_EXTENSIONS = stack_st_X509_EXTENSION; +unsafe extern "C" { + pub fn d2i_X509_EXTENSIONS( + out: *mut *mut X509_EXTENSIONS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_EXTENSIONS; +} +unsafe extern "C" { + pub fn i2d_X509_EXTENSIONS( + alg: *const X509_EXTENSIONS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_count(x: *const stack_st_X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_NID( + x: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_OBJ( + x: *const stack_st_X509_EXTENSION, + obj: *const ASN1_OBJECT, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext_by_critical( + x: *const stack_st_X509_EXTENSION, + crit: ::core::ffi::c_int, + lastpos: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509v3_get_ext( + x: *const stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_delete_ext( + x: *mut stack_st_X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509v3_add_ext( + x: *mut *mut stack_st_X509_EXTENSION, + ex: *const X509_EXTENSION, + loc: ::core::ffi::c_int, + ) -> *mut stack_st_X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_d2i(ext: *const X509_EXTENSION) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_get_d2i( + extensions: *const stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + out_critical: *mut ::core::ffi::c_int, + out_idx: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509V3_EXT_free( + nid: ::core::ffi::c_int, + ext_data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_i2d( + ext_nid: ::core::ffi::c_int, + crit: ::core::ffi::c_int, + ext_struc: *mut ::core::ffi::c_void, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_add1_i2d( + x: *mut *mut stack_st_X509_EXTENSION, + nid: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + crit: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct BASIC_CONSTRAINTS_st { + pub ca: ASN1_BOOLEAN, + pub pathlen: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BASIC_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of BASIC_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::ca"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, ca) - 0usize]; + ["Offset of field: BASIC_CONSTRAINTS_st::pathlen"] + [::core::mem::offset_of!(BASIC_CONSTRAINTS_st, pathlen) - 8usize]; +}; +unsafe extern "C" { + pub static BASIC_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_new() -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn BASIC_CONSTRAINTS_free(bcons: *mut BASIC_CONSTRAINTS); +} +unsafe extern "C" { + pub fn d2i_BASIC_CONSTRAINTS( + out: *mut *mut BASIC_CONSTRAINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut BASIC_CONSTRAINTS; +} +unsafe extern "C" { + pub fn i2d_BASIC_CONSTRAINTS( + bcons: *const BASIC_CONSTRAINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +pub type EXTENDED_KEY_USAGE = stack_st_ASN1_OBJECT; +unsafe extern "C" { + pub static EXTENDED_KEY_USAGE_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_new() -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn EXTENDED_KEY_USAGE_free(eku: *mut EXTENDED_KEY_USAGE); +} +unsafe extern "C" { + pub fn d2i_EXTENDED_KEY_USAGE( + out: *mut *mut EXTENDED_KEY_USAGE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut EXTENDED_KEY_USAGE; +} +unsafe extern "C" { + pub fn i2d_EXTENDED_KEY_USAGE( + eku: *const EXTENDED_KEY_USAGE, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct otherName_st { + pub type_id: *mut ASN1_OBJECT, + pub value: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of otherName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of otherName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: otherName_st::type_id"] + [::core::mem::offset_of!(otherName_st, type_id) - 0usize]; + ["Offset of field: otherName_st::value"][::core::mem::offset_of!(otherName_st, value) - 8usize]; +}; +pub type OTHERNAME = otherName_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct EDIPartyName_st { + pub nameAssigner: *mut ASN1_STRING, + pub partyName: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of EDIPartyName_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of EDIPartyName_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: EDIPartyName_st::nameAssigner"] + [::core::mem::offset_of!(EDIPartyName_st, nameAssigner) - 0usize]; + ["Offset of field: EDIPartyName_st::partyName"] + [::core::mem::offset_of!(EDIPartyName_st, partyName) - 8usize]; +}; +pub type EDIPARTYNAME = EDIPartyName_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GENERAL_NAME_st { + pub type_: ::core::ffi::c_int, + pub d: GENERAL_NAME_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union GENERAL_NAME_st__bindgen_ty_1 { + pub ptr: *mut ::core::ffi::c_char, + pub otherName: *mut OTHERNAME, + pub rfc822Name: *mut ASN1_IA5STRING, + pub dNSName: *mut ASN1_IA5STRING, + pub x400Address: *mut ASN1_STRING, + pub directoryName: *mut X509_NAME, + pub ediPartyName: *mut EDIPARTYNAME, + pub uniformResourceIdentifier: *mut ASN1_IA5STRING, + pub iPAddress: *mut ASN1_OCTET_STRING, + pub registeredID: *mut ASN1_OBJECT, + pub ip: *mut ASN1_OCTET_STRING, + pub dirn: *mut X509_NAME, + pub ia5: *mut ASN1_IA5STRING, + pub rid: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of GENERAL_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ptr"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ptr) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::otherName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, otherName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rfc822Name"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rfc822Name) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dNSName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dNSName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::x400Address"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, x400Address) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::directoryName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, directoryName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ediPartyName"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ediPartyName) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::uniformResourceIdentifier"][::core::mem::offset_of!( + GENERAL_NAME_st__bindgen_ty_1, + uniformResourceIdentifier + ) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::iPAddress"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, iPAddress) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::registeredID"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, registeredID) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ip"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ip) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::dirn"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, dirn) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::ia5"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, ia5) - 0usize]; + ["Offset of field: GENERAL_NAME_st__bindgen_ty_1::rid"] + [::core::mem::offset_of!(GENERAL_NAME_st__bindgen_ty_1, rid) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_NAME_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of GENERAL_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_NAME_st::type_"] + [::core::mem::offset_of!(GENERAL_NAME_st, type_) - 0usize]; + ["Offset of field: GENERAL_NAME_st::d"][::core::mem::offset_of!(GENERAL_NAME_st, d) - 8usize]; +}; +unsafe extern "C" { + pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAME_free(gen_: *mut GENERAL_NAME); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAME( + out: *mut *mut GENERAL_NAME, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAME(in_: *const GENERAL_NAME, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_dup(gen_: *const GENERAL_NAME) -> *mut GENERAL_NAME; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_new() -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn GENERAL_NAMES_free(gens: *mut GENERAL_NAMES); +} +unsafe extern "C" { + pub fn d2i_GENERAL_NAMES( + out: *mut *mut GENERAL_NAMES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut GENERAL_NAMES; +} +unsafe extern "C" { + pub fn i2d_GENERAL_NAMES(in_: *const GENERAL_NAMES, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn OTHERNAME_new() -> *mut OTHERNAME; +} +unsafe extern "C" { + pub fn OTHERNAME_free(name: *mut OTHERNAME); +} +unsafe extern "C" { + pub fn EDIPARTYNAME_new() -> *mut EDIPARTYNAME; +} +unsafe extern "C" { + pub fn EDIPARTYNAME_free(name: *mut EDIPARTYNAME); +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_value( + gen_: *mut GENERAL_NAME, + type_: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_value( + gen_: *const GENERAL_NAME, + out_type: *mut ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn GENERAL_NAME_set0_othername( + gen_: *mut GENERAL_NAME, + oid: *mut ASN1_OBJECT, + value: *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_get0_otherName( + gen_: *const GENERAL_NAME, + out_oid: *mut *mut ASN1_OBJECT, + out_value: *mut *mut ASN1_TYPE, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AUTHORITY_KEYID_st { + pub keyid: *mut ASN1_OCTET_STRING, + pub issuer: *mut GENERAL_NAMES, + pub serial: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AUTHORITY_KEYID_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of AUTHORITY_KEYID_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::keyid"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, keyid) - 0usize]; + ["Offset of field: AUTHORITY_KEYID_st::issuer"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, issuer) - 8usize]; + ["Offset of field: AUTHORITY_KEYID_st::serial"] + [::core::mem::offset_of!(AUTHORITY_KEYID_st, serial) - 16usize]; +}; +unsafe extern "C" { + pub static AUTHORITY_KEYID_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_new() -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_KEYID( + out: *mut *mut AUTHORITY_KEYID, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_KEYID; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_KEYID( + akid: *const AUTHORITY_KEYID, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GENERAL_SUBTREE_st { + pub base: *mut GENERAL_NAME, + pub minimum: *mut ASN1_INTEGER, + pub maximum: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of GENERAL_SUBTREE_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of GENERAL_SUBTREE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::base"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, base) - 0usize]; + ["Offset of field: GENERAL_SUBTREE_st::minimum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, minimum) - 8usize]; + ["Offset of field: GENERAL_SUBTREE_st::maximum"] + [::core::mem::offset_of!(GENERAL_SUBTREE_st, maximum) - 16usize]; +}; +pub type GENERAL_SUBTREE = GENERAL_SUBTREE_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_GENERAL_SUBTREE { + _unused: [u8; 0], +} +pub type sk_GENERAL_SUBTREE_free_func = + ::core::option::Option; +pub type sk_GENERAL_SUBTREE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE, +>; +pub type sk_GENERAL_SUBTREE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const GENERAL_SUBTREE, + arg2: *const *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int, +>; +pub type sk_GENERAL_SUBTREE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut GENERAL_SUBTREE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_free_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_copy_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_call_delete_if_func__extern"] + pub fn sk_GENERAL_SUBTREE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new__extern"] + pub fn sk_GENERAL_SUBTREE_new( + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_new_null__extern"] + pub fn sk_GENERAL_SUBTREE_new_null() -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_num__extern"] + pub fn sk_GENERAL_SUBTREE_num(sk: *const stack_st_GENERAL_SUBTREE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_zero__extern"] + pub fn sk_GENERAL_SUBTREE_zero(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_value__extern"] + pub fn sk_GENERAL_SUBTREE_value( + sk: *const stack_st_GENERAL_SUBTREE, + i: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set__extern"] + pub fn sk_GENERAL_SUBTREE_set( + sk: *mut stack_st_GENERAL_SUBTREE, + i: usize, + p: *mut GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_free__extern"] + pub fn sk_GENERAL_SUBTREE_free(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop_free__extern"] + pub fn sk_GENERAL_SUBTREE_pop_free( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_insert__extern"] + pub fn sk_GENERAL_SUBTREE_insert( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete__extern"] + pub fn sk_GENERAL_SUBTREE_delete( + sk: *mut stack_st_GENERAL_SUBTREE, + where_: usize, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_ptr__extern"] + pub fn sk_GENERAL_SUBTREE_delete_ptr( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *const GENERAL_SUBTREE, + ) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_delete_if__extern"] + pub fn sk_GENERAL_SUBTREE_delete_if( + sk: *mut stack_st_GENERAL_SUBTREE, + func: sk_GENERAL_SUBTREE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_find__extern"] + pub fn sk_GENERAL_SUBTREE_find( + sk: *const stack_st_GENERAL_SUBTREE, + out_index: *mut usize, + p: *const GENERAL_SUBTREE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_shift__extern"] + pub fn sk_GENERAL_SUBTREE_shift(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_push__extern"] + pub fn sk_GENERAL_SUBTREE_push( + sk: *mut stack_st_GENERAL_SUBTREE, + p: *mut GENERAL_SUBTREE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_pop__extern"] + pub fn sk_GENERAL_SUBTREE_pop(sk: *mut stack_st_GENERAL_SUBTREE) -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_dup__extern"] + pub fn sk_GENERAL_SUBTREE_dup( + sk: *const stack_st_GENERAL_SUBTREE, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort__extern"] + pub fn sk_GENERAL_SUBTREE_sort(sk: *mut stack_st_GENERAL_SUBTREE); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_sort_and_dedup__extern"] + pub fn sk_GENERAL_SUBTREE_sort_and_dedup( + sk: *mut stack_st_GENERAL_SUBTREE, + free_func: sk_GENERAL_SUBTREE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_is_sorted__extern"] + pub fn sk_GENERAL_SUBTREE_is_sorted(sk: *const stack_st_GENERAL_SUBTREE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_set_cmp_func__extern"] + pub fn sk_GENERAL_SUBTREE_set_cmp_func( + sk: *mut stack_st_GENERAL_SUBTREE, + comp: sk_GENERAL_SUBTREE_cmp_func, + ) -> sk_GENERAL_SUBTREE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_GENERAL_SUBTREE_deep_copy__extern"] + pub fn sk_GENERAL_SUBTREE_deep_copy( + sk: *const stack_st_GENERAL_SUBTREE, + copy_func: sk_GENERAL_SUBTREE_copy_func, + free_func: sk_GENERAL_SUBTREE_free_func, + ) -> *mut stack_st_GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_new() -> *mut GENERAL_SUBTREE; +} +unsafe extern "C" { + pub fn GENERAL_SUBTREE_free(subtree: *mut GENERAL_SUBTREE); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NAME_CONSTRAINTS_st { + pub permittedSubtrees: *mut stack_st_GENERAL_SUBTREE, + pub excludedSubtrees: *mut stack_st_GENERAL_SUBTREE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NAME_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NAME_CONSTRAINTS_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NAME_CONSTRAINTS_st::permittedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, permittedSubtrees) - 0usize]; + ["Offset of field: NAME_CONSTRAINTS_st::excludedSubtrees"] + [::core::mem::offset_of!(NAME_CONSTRAINTS_st, excludedSubtrees) - 8usize]; +}; +unsafe extern "C" { + pub static NAME_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_new() -> *mut NAME_CONSTRAINTS; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_free(ncons: *mut NAME_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ACCESS_DESCRIPTION_st { + pub method: *mut ASN1_OBJECT, + pub location: *mut GENERAL_NAME, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ACCESS_DESCRIPTION_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of ACCESS_DESCRIPTION_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::method"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, method) - 0usize]; + ["Offset of field: ACCESS_DESCRIPTION_st::location"] + [::core::mem::offset_of!(ACCESS_DESCRIPTION_st, location) - 8usize]; +}; +pub type ACCESS_DESCRIPTION = ACCESS_DESCRIPTION_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_ACCESS_DESCRIPTION { + _unused: [u8; 0], +} +pub type sk_ACCESS_DESCRIPTION_free_func = + ::core::option::Option; +pub type sk_ACCESS_DESCRIPTION_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const ACCESS_DESCRIPTION) -> *mut ACCESS_DESCRIPTION, +>; +pub type sk_ACCESS_DESCRIPTION_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const ACCESS_DESCRIPTION, + arg2: *const *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int, +>; +pub type sk_ACCESS_DESCRIPTION_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ACCESS_DESCRIPTION, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_free_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_copy_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_call_delete_if_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new__extern"] + pub fn sk_ACCESS_DESCRIPTION_new( + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_new_null__extern"] + pub fn sk_ACCESS_DESCRIPTION_new_null() -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_num__extern"] + pub fn sk_ACCESS_DESCRIPTION_num(sk: *const stack_st_ACCESS_DESCRIPTION) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_zero__extern"] + pub fn sk_ACCESS_DESCRIPTION_zero(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_value__extern"] + pub fn sk_ACCESS_DESCRIPTION_value( + sk: *const stack_st_ACCESS_DESCRIPTION, + i: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set__extern"] + pub fn sk_ACCESS_DESCRIPTION_set( + sk: *mut stack_st_ACCESS_DESCRIPTION, + i: usize, + p: *mut ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_free(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop_free__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop_free( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_insert__extern"] + pub fn sk_ACCESS_DESCRIPTION_insert( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete( + sk: *mut stack_st_ACCESS_DESCRIPTION, + where_: usize, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_ptr__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_ptr( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *const ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_delete_if__extern"] + pub fn sk_ACCESS_DESCRIPTION_delete_if( + sk: *mut stack_st_ACCESS_DESCRIPTION, + func: sk_ACCESS_DESCRIPTION_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_find__extern"] + pub fn sk_ACCESS_DESCRIPTION_find( + sk: *const stack_st_ACCESS_DESCRIPTION, + out_index: *mut usize, + p: *const ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_shift__extern"] + pub fn sk_ACCESS_DESCRIPTION_shift( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_push__extern"] + pub fn sk_ACCESS_DESCRIPTION_push( + sk: *mut stack_st_ACCESS_DESCRIPTION, + p: *mut ACCESS_DESCRIPTION, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_pop__extern"] + pub fn sk_ACCESS_DESCRIPTION_pop( + sk: *mut stack_st_ACCESS_DESCRIPTION, + ) -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_dup__extern"] + pub fn sk_ACCESS_DESCRIPTION_dup( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort(sk: *mut stack_st_ACCESS_DESCRIPTION); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_sort_and_dedup__extern"] + pub fn sk_ACCESS_DESCRIPTION_sort_and_dedup( + sk: *mut stack_st_ACCESS_DESCRIPTION, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_is_sorted__extern"] + pub fn sk_ACCESS_DESCRIPTION_is_sorted( + sk: *const stack_st_ACCESS_DESCRIPTION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_set_cmp_func__extern"] + pub fn sk_ACCESS_DESCRIPTION_set_cmp_func( + sk: *mut stack_st_ACCESS_DESCRIPTION, + comp: sk_ACCESS_DESCRIPTION_cmp_func, + ) -> sk_ACCESS_DESCRIPTION_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_ACCESS_DESCRIPTION_deep_copy__extern"] + pub fn sk_ACCESS_DESCRIPTION_deep_copy( + sk: *const stack_st_ACCESS_DESCRIPTION, + copy_func: sk_ACCESS_DESCRIPTION_copy_func, + free_func: sk_ACCESS_DESCRIPTION_free_func, + ) -> *mut stack_st_ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_new() -> *mut ACCESS_DESCRIPTION; +} +unsafe extern "C" { + pub fn ACCESS_DESCRIPTION_free(desc: *mut ACCESS_DESCRIPTION); +} +pub type AUTHORITY_INFO_ACCESS = stack_st_ACCESS_DESCRIPTION; +unsafe extern "C" { + pub static AUTHORITY_INFO_ACCESS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_new() -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn AUTHORITY_INFO_ACCESS_free(aia: *mut AUTHORITY_INFO_ACCESS); +} +unsafe extern "C" { + pub fn d2i_AUTHORITY_INFO_ACCESS( + out: *mut *mut AUTHORITY_INFO_ACCESS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut AUTHORITY_INFO_ACCESS; +} +unsafe extern "C" { + pub fn i2d_AUTHORITY_INFO_ACCESS( + aia: *const AUTHORITY_INFO_ACCESS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIST_POINT_NAME_st { + pub type_: ::core::ffi::c_int, + pub name: DIST_POINT_NAME_st__bindgen_ty_1, + pub dpname: *mut X509_NAME, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union DIST_POINT_NAME_st__bindgen_ty_1 { + pub fullname: *mut GENERAL_NAMES, + pub relativename: *mut stack_st_X509_NAME_ENTRY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of DIST_POINT_NAME_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::fullname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, fullname) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st__bindgen_ty_1::relativename"] + [::core::mem::offset_of!(DIST_POINT_NAME_st__bindgen_ty_1, relativename) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_NAME_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_NAME_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::type_"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, type_) - 0usize]; + ["Offset of field: DIST_POINT_NAME_st::name"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, name) - 8usize]; + ["Offset of field: DIST_POINT_NAME_st::dpname"] + [::core::mem::offset_of!(DIST_POINT_NAME_st, dpname) - 16usize]; +}; +pub type DIST_POINT_NAME = DIST_POINT_NAME_st; +unsafe extern "C" { + pub fn DIST_POINT_NAME_new() -> *mut DIST_POINT_NAME; +} +unsafe extern "C" { + pub fn DIST_POINT_NAME_free(name: *mut DIST_POINT_NAME); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub reasons: *mut ASN1_BIT_STRING, + pub CRLissuer: *mut GENERAL_NAMES, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DIST_POINT_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of DIST_POINT_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: DIST_POINT_st::reasons"] + [::core::mem::offset_of!(DIST_POINT_st, reasons) - 8usize]; + ["Offset of field: DIST_POINT_st::CRLissuer"] + [::core::mem::offset_of!(DIST_POINT_st, CRLissuer) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_DIST_POINT { + _unused: [u8; 0], +} +pub type sk_DIST_POINT_free_func = + ::core::option::Option; +pub type sk_DIST_POINT_copy_func = + ::core::option::Option *mut DIST_POINT>; +pub type sk_DIST_POINT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const DIST_POINT, + arg2: *const *const DIST_POINT, + ) -> ::core::ffi::c_int, +>; +pub type sk_DIST_POINT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut DIST_POINT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_free_func__extern"] + pub fn sk_DIST_POINT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_copy_func__extern"] + pub fn sk_DIST_POINT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_cmp_func__extern"] + pub fn sk_DIST_POINT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_call_delete_if_func__extern"] + pub fn sk_DIST_POINT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new__extern"] + pub fn sk_DIST_POINT_new(comp: sk_DIST_POINT_cmp_func) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_new_null__extern"] + pub fn sk_DIST_POINT_new_null() -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_num__extern"] + pub fn sk_DIST_POINT_num(sk: *const stack_st_DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_zero__extern"] + pub fn sk_DIST_POINT_zero(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_value__extern"] + pub fn sk_DIST_POINT_value(sk: *const stack_st_DIST_POINT, i: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set__extern"] + pub fn sk_DIST_POINT_set( + sk: *mut stack_st_DIST_POINT, + i: usize, + p: *mut DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_free__extern"] + pub fn sk_DIST_POINT_free(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop_free__extern"] + pub fn sk_DIST_POINT_pop_free(sk: *mut stack_st_DIST_POINT, free_func: sk_DIST_POINT_free_func); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_insert__extern"] + pub fn sk_DIST_POINT_insert( + sk: *mut stack_st_DIST_POINT, + p: *mut DIST_POINT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete__extern"] + pub fn sk_DIST_POINT_delete(sk: *mut stack_st_DIST_POINT, where_: usize) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_ptr__extern"] + pub fn sk_DIST_POINT_delete_ptr( + sk: *mut stack_st_DIST_POINT, + p: *const DIST_POINT, + ) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_delete_if__extern"] + pub fn sk_DIST_POINT_delete_if( + sk: *mut stack_st_DIST_POINT, + func: sk_DIST_POINT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_find__extern"] + pub fn sk_DIST_POINT_find( + sk: *const stack_st_DIST_POINT, + out_index: *mut usize, + p: *const DIST_POINT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_shift__extern"] + pub fn sk_DIST_POINT_shift(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_push__extern"] + pub fn sk_DIST_POINT_push(sk: *mut stack_st_DIST_POINT, p: *mut DIST_POINT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_pop__extern"] + pub fn sk_DIST_POINT_pop(sk: *mut stack_st_DIST_POINT) -> *mut DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_dup__extern"] + pub fn sk_DIST_POINT_dup(sk: *const stack_st_DIST_POINT) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort__extern"] + pub fn sk_DIST_POINT_sort(sk: *mut stack_st_DIST_POINT); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_sort_and_dedup__extern"] + pub fn sk_DIST_POINT_sort_and_dedup( + sk: *mut stack_st_DIST_POINT, + free_func: sk_DIST_POINT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_is_sorted__extern"] + pub fn sk_DIST_POINT_is_sorted(sk: *const stack_st_DIST_POINT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_set_cmp_func__extern"] + pub fn sk_DIST_POINT_set_cmp_func( + sk: *mut stack_st_DIST_POINT, + comp: sk_DIST_POINT_cmp_func, + ) -> sk_DIST_POINT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_DIST_POINT_deep_copy__extern"] + pub fn sk_DIST_POINT_deep_copy( + sk: *const stack_st_DIST_POINT, + copy_func: sk_DIST_POINT_copy_func, + free_func: sk_DIST_POINT_free_func, + ) -> *mut stack_st_DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_new() -> *mut DIST_POINT; +} +unsafe extern "C" { + pub fn DIST_POINT_free(dp: *mut DIST_POINT); +} +pub type CRL_DIST_POINTS = stack_st_DIST_POINT; +unsafe extern "C" { + pub static CRL_DIST_POINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_new() -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn CRL_DIST_POINTS_free(crldp: *mut CRL_DIST_POINTS); +} +unsafe extern "C" { + pub fn d2i_CRL_DIST_POINTS( + out: *mut *mut CRL_DIST_POINTS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CRL_DIST_POINTS; +} +unsafe extern "C" { + pub fn i2d_CRL_DIST_POINTS( + crldp: *const CRL_DIST_POINTS, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ISSUING_DIST_POINT_st { + pub distpoint: *mut DIST_POINT_NAME, + pub onlyuser: ASN1_BOOLEAN, + pub onlyCA: ASN1_BOOLEAN, + pub onlysomereasons: *mut ASN1_BIT_STRING, + pub indirectCRL: ASN1_BOOLEAN, + pub onlyattr: ASN1_BOOLEAN, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ISSUING_DIST_POINT_st"][::core::mem::size_of::() - 32usize]; + ["Alignment of ISSUING_DIST_POINT_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::distpoint"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, distpoint) - 0usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyuser"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyuser) - 8usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyCA"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyCA) - 12usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlysomereasons"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlysomereasons) - 16usize]; + ["Offset of field: ISSUING_DIST_POINT_st::indirectCRL"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, indirectCRL) - 24usize]; + ["Offset of field: ISSUING_DIST_POINT_st::onlyattr"] + [::core::mem::offset_of!(ISSUING_DIST_POINT_st, onlyattr) - 28usize]; +}; +unsafe extern "C" { + pub static ISSUING_DIST_POINT_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_new() -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn ISSUING_DIST_POINT_free(idp: *mut ISSUING_DIST_POINT); +} +unsafe extern "C" { + pub fn d2i_ISSUING_DIST_POINT( + out: *mut *mut ISSUING_DIST_POINT, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ISSUING_DIST_POINT; +} +unsafe extern "C" { + pub fn i2d_ISSUING_DIST_POINT( + idp: *const ISSUING_DIST_POINT, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct NOTICEREF_st { + pub organization: *mut ASN1_STRING, + pub noticenos: *mut stack_st_ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of NOTICEREF_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of NOTICEREF_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: NOTICEREF_st::organization"] + [::core::mem::offset_of!(NOTICEREF_st, organization) - 0usize]; + ["Offset of field: NOTICEREF_st::noticenos"] + [::core::mem::offset_of!(NOTICEREF_st, noticenos) - 8usize]; +}; +pub type NOTICEREF = NOTICEREF_st; +unsafe extern "C" { + pub fn NOTICEREF_new() -> *mut NOTICEREF; +} +unsafe extern "C" { + pub fn NOTICEREF_free(ref_: *mut NOTICEREF); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USERNOTICE_st { + pub noticeref: *mut NOTICEREF, + pub exptext: *mut ASN1_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of USERNOTICE_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of USERNOTICE_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: USERNOTICE_st::noticeref"] + [::core::mem::offset_of!(USERNOTICE_st, noticeref) - 0usize]; + ["Offset of field: USERNOTICE_st::exptext"] + [::core::mem::offset_of!(USERNOTICE_st, exptext) - 8usize]; +}; +pub type USERNOTICE = USERNOTICE_st; +unsafe extern "C" { + pub fn USERNOTICE_new() -> *mut USERNOTICE; +} +unsafe extern "C" { + pub fn USERNOTICE_free(notice: *mut USERNOTICE); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct POLICYQUALINFO_st { + pub pqualid: *mut ASN1_OBJECT, + pub d: POLICYQUALINFO_st__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union POLICYQUALINFO_st__bindgen_ty_1 { + pub cpsuri: *mut ASN1_IA5STRING, + pub usernotice: *mut USERNOTICE, + pub other: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::size_of::() - 8usize]; + ["Alignment of POLICYQUALINFO_st__bindgen_ty_1"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::cpsuri"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, cpsuri) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::usernotice"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, usernotice) - 0usize]; + ["Offset of field: POLICYQUALINFO_st__bindgen_ty_1::other"] + [::core::mem::offset_of!(POLICYQUALINFO_st__bindgen_ty_1, other) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYQUALINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYQUALINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYQUALINFO_st::pqualid"] + [::core::mem::offset_of!(POLICYQUALINFO_st, pqualid) - 0usize]; + ["Offset of field: POLICYQUALINFO_st::d"] + [::core::mem::offset_of!(POLICYQUALINFO_st, d) - 8usize]; +}; +pub type POLICYQUALINFO = POLICYQUALINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYQUALINFO { + _unused: [u8; 0], +} +pub type sk_POLICYQUALINFO_free_func = + ::core::option::Option; +pub type sk_POLICYQUALINFO_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICYQUALINFO) -> *mut POLICYQUALINFO, +>; +pub type sk_POLICYQUALINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYQUALINFO, + arg2: *const *const POLICYQUALINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYQUALINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYQUALINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_free_func__extern"] + pub fn sk_POLICYQUALINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_copy_func__extern"] + pub fn sk_POLICYQUALINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_call_delete_if_func__extern"] + pub fn sk_POLICYQUALINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new__extern"] + pub fn sk_POLICYQUALINFO_new(comp: sk_POLICYQUALINFO_cmp_func) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_new_null__extern"] + pub fn sk_POLICYQUALINFO_new_null() -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_num__extern"] + pub fn sk_POLICYQUALINFO_num(sk: *const stack_st_POLICYQUALINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_zero__extern"] + pub fn sk_POLICYQUALINFO_zero(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_value__extern"] + pub fn sk_POLICYQUALINFO_value( + sk: *const stack_st_POLICYQUALINFO, + i: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set__extern"] + pub fn sk_POLICYQUALINFO_set( + sk: *mut stack_st_POLICYQUALINFO, + i: usize, + p: *mut POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_free__extern"] + pub fn sk_POLICYQUALINFO_free(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop_free__extern"] + pub fn sk_POLICYQUALINFO_pop_free( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_insert__extern"] + pub fn sk_POLICYQUALINFO_insert( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete__extern"] + pub fn sk_POLICYQUALINFO_delete( + sk: *mut stack_st_POLICYQUALINFO, + where_: usize, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_ptr__extern"] + pub fn sk_POLICYQUALINFO_delete_ptr( + sk: *mut stack_st_POLICYQUALINFO, + p: *const POLICYQUALINFO, + ) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_delete_if__extern"] + pub fn sk_POLICYQUALINFO_delete_if( + sk: *mut stack_st_POLICYQUALINFO, + func: sk_POLICYQUALINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_find__extern"] + pub fn sk_POLICYQUALINFO_find( + sk: *const stack_st_POLICYQUALINFO, + out_index: *mut usize, + p: *const POLICYQUALINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_shift__extern"] + pub fn sk_POLICYQUALINFO_shift(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_push__extern"] + pub fn sk_POLICYQUALINFO_push( + sk: *mut stack_st_POLICYQUALINFO, + p: *mut POLICYQUALINFO, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_pop__extern"] + pub fn sk_POLICYQUALINFO_pop(sk: *mut stack_st_POLICYQUALINFO) -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_dup__extern"] + pub fn sk_POLICYQUALINFO_dup( + sk: *const stack_st_POLICYQUALINFO, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort__extern"] + pub fn sk_POLICYQUALINFO_sort(sk: *mut stack_st_POLICYQUALINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_sort_and_dedup__extern"] + pub fn sk_POLICYQUALINFO_sort_and_dedup( + sk: *mut stack_st_POLICYQUALINFO, + free_func: sk_POLICYQUALINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_is_sorted__extern"] + pub fn sk_POLICYQUALINFO_is_sorted(sk: *const stack_st_POLICYQUALINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_set_cmp_func__extern"] + pub fn sk_POLICYQUALINFO_set_cmp_func( + sk: *mut stack_st_POLICYQUALINFO, + comp: sk_POLICYQUALINFO_cmp_func, + ) -> sk_POLICYQUALINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYQUALINFO_deep_copy__extern"] + pub fn sk_POLICYQUALINFO_deep_copy( + sk: *const stack_st_POLICYQUALINFO, + copy_func: sk_POLICYQUALINFO_copy_func, + free_func: sk_POLICYQUALINFO_free_func, + ) -> *mut stack_st_POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_new() -> *mut POLICYQUALINFO; +} +unsafe extern "C" { + pub fn POLICYQUALINFO_free(info: *mut POLICYQUALINFO); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICYINFO_st { + pub policyid: *mut ASN1_OBJECT, + pub qualifiers: *mut stack_st_POLICYQUALINFO, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICYINFO_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICYINFO_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICYINFO_st::policyid"] + [::core::mem::offset_of!(POLICYINFO_st, policyid) - 0usize]; + ["Offset of field: POLICYINFO_st::qualifiers"] + [::core::mem::offset_of!(POLICYINFO_st, qualifiers) - 8usize]; +}; +pub type POLICYINFO = POLICYINFO_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICYINFO { + _unused: [u8; 0], +} +pub type sk_POLICYINFO_free_func = + ::core::option::Option; +pub type sk_POLICYINFO_copy_func = + ::core::option::Option *mut POLICYINFO>; +pub type sk_POLICYINFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICYINFO, + arg2: *const *const POLICYINFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICYINFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICYINFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_free_func__extern"] + pub fn sk_POLICYINFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_copy_func__extern"] + pub fn sk_POLICYINFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_cmp_func__extern"] + pub fn sk_POLICYINFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_call_delete_if_func__extern"] + pub fn sk_POLICYINFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new__extern"] + pub fn sk_POLICYINFO_new(comp: sk_POLICYINFO_cmp_func) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_new_null__extern"] + pub fn sk_POLICYINFO_new_null() -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_num__extern"] + pub fn sk_POLICYINFO_num(sk: *const stack_st_POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_zero__extern"] + pub fn sk_POLICYINFO_zero(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_value__extern"] + pub fn sk_POLICYINFO_value(sk: *const stack_st_POLICYINFO, i: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set__extern"] + pub fn sk_POLICYINFO_set( + sk: *mut stack_st_POLICYINFO, + i: usize, + p: *mut POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_free__extern"] + pub fn sk_POLICYINFO_free(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop_free__extern"] + pub fn sk_POLICYINFO_pop_free(sk: *mut stack_st_POLICYINFO, free_func: sk_POLICYINFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_insert__extern"] + pub fn sk_POLICYINFO_insert( + sk: *mut stack_st_POLICYINFO, + p: *mut POLICYINFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete__extern"] + pub fn sk_POLICYINFO_delete(sk: *mut stack_st_POLICYINFO, where_: usize) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_ptr__extern"] + pub fn sk_POLICYINFO_delete_ptr( + sk: *mut stack_st_POLICYINFO, + p: *const POLICYINFO, + ) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_delete_if__extern"] + pub fn sk_POLICYINFO_delete_if( + sk: *mut stack_st_POLICYINFO, + func: sk_POLICYINFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_find__extern"] + pub fn sk_POLICYINFO_find( + sk: *const stack_st_POLICYINFO, + out_index: *mut usize, + p: *const POLICYINFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_shift__extern"] + pub fn sk_POLICYINFO_shift(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_push__extern"] + pub fn sk_POLICYINFO_push(sk: *mut stack_st_POLICYINFO, p: *mut POLICYINFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_pop__extern"] + pub fn sk_POLICYINFO_pop(sk: *mut stack_st_POLICYINFO) -> *mut POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_dup__extern"] + pub fn sk_POLICYINFO_dup(sk: *const stack_st_POLICYINFO) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort__extern"] + pub fn sk_POLICYINFO_sort(sk: *mut stack_st_POLICYINFO); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_sort_and_dedup__extern"] + pub fn sk_POLICYINFO_sort_and_dedup( + sk: *mut stack_st_POLICYINFO, + free_func: sk_POLICYINFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_is_sorted__extern"] + pub fn sk_POLICYINFO_is_sorted(sk: *const stack_st_POLICYINFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_set_cmp_func__extern"] + pub fn sk_POLICYINFO_set_cmp_func( + sk: *mut stack_st_POLICYINFO, + comp: sk_POLICYINFO_cmp_func, + ) -> sk_POLICYINFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICYINFO_deep_copy__extern"] + pub fn sk_POLICYINFO_deep_copy( + sk: *const stack_st_POLICYINFO, + copy_func: sk_POLICYINFO_copy_func, + free_func: sk_POLICYINFO_free_func, + ) -> *mut stack_st_POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_new() -> *mut POLICYINFO; +} +unsafe extern "C" { + pub fn POLICYINFO_free(info: *mut POLICYINFO); +} +pub type CERTIFICATEPOLICIES = stack_st_POLICYINFO; +unsafe extern "C" { + pub static CERTIFICATEPOLICIES_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_new() -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn CERTIFICATEPOLICIES_free(policies: *mut CERTIFICATEPOLICIES); +} +unsafe extern "C" { + pub fn d2i_CERTIFICATEPOLICIES( + out: *mut *mut CERTIFICATEPOLICIES, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut CERTIFICATEPOLICIES; +} +unsafe extern "C" { + pub fn i2d_CERTIFICATEPOLICIES( + policies: *const CERTIFICATEPOLICIES, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_MAPPING_st { + pub issuerDomainPolicy: *mut ASN1_OBJECT, + pub subjectDomainPolicy: *mut ASN1_OBJECT, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_MAPPING_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_MAPPING_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_MAPPING_st::issuerDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, issuerDomainPolicy) - 0usize]; + ["Offset of field: POLICY_MAPPING_st::subjectDomainPolicy"] + [::core::mem::offset_of!(POLICY_MAPPING_st, subjectDomainPolicy) - 8usize]; +}; +pub type POLICY_MAPPING = POLICY_MAPPING_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_POLICY_MAPPING { + _unused: [u8; 0], +} +pub type sk_POLICY_MAPPING_free_func = + ::core::option::Option; +pub type sk_POLICY_MAPPING_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const POLICY_MAPPING) -> *mut POLICY_MAPPING, +>; +pub type sk_POLICY_MAPPING_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const POLICY_MAPPING, + arg2: *const *const POLICY_MAPPING, + ) -> ::core::ffi::c_int, +>; +pub type sk_POLICY_MAPPING_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut POLICY_MAPPING, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_free_func__extern"] + pub fn sk_POLICY_MAPPING_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_copy_func__extern"] + pub fn sk_POLICY_MAPPING_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_call_delete_if_func__extern"] + pub fn sk_POLICY_MAPPING_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new__extern"] + pub fn sk_POLICY_MAPPING_new(comp: sk_POLICY_MAPPING_cmp_func) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_new_null__extern"] + pub fn sk_POLICY_MAPPING_new_null() -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_num__extern"] + pub fn sk_POLICY_MAPPING_num(sk: *const stack_st_POLICY_MAPPING) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_zero__extern"] + pub fn sk_POLICY_MAPPING_zero(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_value__extern"] + pub fn sk_POLICY_MAPPING_value( + sk: *const stack_st_POLICY_MAPPING, + i: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set__extern"] + pub fn sk_POLICY_MAPPING_set( + sk: *mut stack_st_POLICY_MAPPING, + i: usize, + p: *mut POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_free__extern"] + pub fn sk_POLICY_MAPPING_free(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop_free__extern"] + pub fn sk_POLICY_MAPPING_pop_free( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_insert__extern"] + pub fn sk_POLICY_MAPPING_insert( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete__extern"] + pub fn sk_POLICY_MAPPING_delete( + sk: *mut stack_st_POLICY_MAPPING, + where_: usize, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_ptr__extern"] + pub fn sk_POLICY_MAPPING_delete_ptr( + sk: *mut stack_st_POLICY_MAPPING, + p: *const POLICY_MAPPING, + ) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_delete_if__extern"] + pub fn sk_POLICY_MAPPING_delete_if( + sk: *mut stack_st_POLICY_MAPPING, + func: sk_POLICY_MAPPING_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_find__extern"] + pub fn sk_POLICY_MAPPING_find( + sk: *const stack_st_POLICY_MAPPING, + out_index: *mut usize, + p: *const POLICY_MAPPING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_shift__extern"] + pub fn sk_POLICY_MAPPING_shift(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_push__extern"] + pub fn sk_POLICY_MAPPING_push( + sk: *mut stack_st_POLICY_MAPPING, + p: *mut POLICY_MAPPING, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_pop__extern"] + pub fn sk_POLICY_MAPPING_pop(sk: *mut stack_st_POLICY_MAPPING) -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_dup__extern"] + pub fn sk_POLICY_MAPPING_dup( + sk: *const stack_st_POLICY_MAPPING, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort__extern"] + pub fn sk_POLICY_MAPPING_sort(sk: *mut stack_st_POLICY_MAPPING); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_sort_and_dedup__extern"] + pub fn sk_POLICY_MAPPING_sort_and_dedup( + sk: *mut stack_st_POLICY_MAPPING, + free_func: sk_POLICY_MAPPING_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_is_sorted__extern"] + pub fn sk_POLICY_MAPPING_is_sorted(sk: *const stack_st_POLICY_MAPPING) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_set_cmp_func__extern"] + pub fn sk_POLICY_MAPPING_set_cmp_func( + sk: *mut stack_st_POLICY_MAPPING, + comp: sk_POLICY_MAPPING_cmp_func, + ) -> sk_POLICY_MAPPING_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_POLICY_MAPPING_deep_copy__extern"] + pub fn sk_POLICY_MAPPING_deep_copy( + sk: *const stack_st_POLICY_MAPPING, + copy_func: sk_POLICY_MAPPING_copy_func, + free_func: sk_POLICY_MAPPING_free_func, + ) -> *mut stack_st_POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_new() -> *mut POLICY_MAPPING; +} +unsafe extern "C" { + pub fn POLICY_MAPPING_free(mapping: *mut POLICY_MAPPING); +} +pub type POLICY_MAPPINGS = stack_st_POLICY_MAPPING; +unsafe extern "C" { + pub static POLICY_MAPPINGS_it: ASN1_ITEM; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct POLICY_CONSTRAINTS_st { + pub requireExplicitPolicy: *mut ASN1_INTEGER, + pub inhibitPolicyMapping: *mut ASN1_INTEGER, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of POLICY_CONSTRAINTS_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of POLICY_CONSTRAINTS_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::requireExplicitPolicy"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, requireExplicitPolicy) - 0usize]; + ["Offset of field: POLICY_CONSTRAINTS_st::inhibitPolicyMapping"] + [::core::mem::offset_of!(POLICY_CONSTRAINTS_st, inhibitPolicyMapping) - 8usize]; +}; +pub type POLICY_CONSTRAINTS = POLICY_CONSTRAINTS_st; +unsafe extern "C" { + pub static POLICY_CONSTRAINTS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_new() -> *mut POLICY_CONSTRAINTS; +} +unsafe extern "C" { + pub fn POLICY_CONSTRAINTS_free(pcons: *mut POLICY_CONSTRAINTS); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ALGOR { + _unused: [u8; 0], +} +pub type sk_X509_ALGOR_free_func = + ::core::option::Option; +pub type sk_X509_ALGOR_copy_func = + ::core::option::Option *mut X509_ALGOR>; +pub type sk_X509_ALGOR_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ALGOR, + arg2: *const *const X509_ALGOR, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ALGOR_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ALGOR, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_free_func__extern"] + pub fn sk_X509_ALGOR_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_copy_func__extern"] + pub fn sk_X509_ALGOR_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_cmp_func__extern"] + pub fn sk_X509_ALGOR_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_call_delete_if_func__extern"] + pub fn sk_X509_ALGOR_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new__extern"] + pub fn sk_X509_ALGOR_new(comp: sk_X509_ALGOR_cmp_func) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_new_null__extern"] + pub fn sk_X509_ALGOR_new_null() -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_num__extern"] + pub fn sk_X509_ALGOR_num(sk: *const stack_st_X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_zero__extern"] + pub fn sk_X509_ALGOR_zero(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_value__extern"] + pub fn sk_X509_ALGOR_value(sk: *const stack_st_X509_ALGOR, i: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set__extern"] + pub fn sk_X509_ALGOR_set( + sk: *mut stack_st_X509_ALGOR, + i: usize, + p: *mut X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_free__extern"] + pub fn sk_X509_ALGOR_free(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop_free__extern"] + pub fn sk_X509_ALGOR_pop_free(sk: *mut stack_st_X509_ALGOR, free_func: sk_X509_ALGOR_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_insert__extern"] + pub fn sk_X509_ALGOR_insert( + sk: *mut stack_st_X509_ALGOR, + p: *mut X509_ALGOR, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete__extern"] + pub fn sk_X509_ALGOR_delete(sk: *mut stack_st_X509_ALGOR, where_: usize) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_ptr__extern"] + pub fn sk_X509_ALGOR_delete_ptr( + sk: *mut stack_st_X509_ALGOR, + p: *const X509_ALGOR, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_delete_if__extern"] + pub fn sk_X509_ALGOR_delete_if( + sk: *mut stack_st_X509_ALGOR, + func: sk_X509_ALGOR_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_find__extern"] + pub fn sk_X509_ALGOR_find( + sk: *const stack_st_X509_ALGOR, + out_index: *mut usize, + p: *const X509_ALGOR, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_shift__extern"] + pub fn sk_X509_ALGOR_shift(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_push__extern"] + pub fn sk_X509_ALGOR_push(sk: *mut stack_st_X509_ALGOR, p: *mut X509_ALGOR) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_pop__extern"] + pub fn sk_X509_ALGOR_pop(sk: *mut stack_st_X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_dup__extern"] + pub fn sk_X509_ALGOR_dup(sk: *const stack_st_X509_ALGOR) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort__extern"] + pub fn sk_X509_ALGOR_sort(sk: *mut stack_st_X509_ALGOR); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_sort_and_dedup__extern"] + pub fn sk_X509_ALGOR_sort_and_dedup( + sk: *mut stack_st_X509_ALGOR, + free_func: sk_X509_ALGOR_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_is_sorted__extern"] + pub fn sk_X509_ALGOR_is_sorted(sk: *const stack_st_X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_set_cmp_func__extern"] + pub fn sk_X509_ALGOR_set_cmp_func( + sk: *mut stack_st_X509_ALGOR, + comp: sk_X509_ALGOR_cmp_func, + ) -> sk_X509_ALGOR_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ALGOR_deep_copy__extern"] + pub fn sk_X509_ALGOR_deep_copy( + sk: *const stack_st_X509_ALGOR, + copy_func: sk_X509_ALGOR_copy_func, + free_func: sk_X509_ALGOR_free_func, + ) -> *mut stack_st_X509_ALGOR; +} +unsafe extern "C" { + pub static X509_ALGOR_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn X509_ALGOR_new() -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_dup(alg: *const X509_ALGOR) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn X509_ALGOR_copy(dst: *mut X509_ALGOR, src: *const X509_ALGOR) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_free(alg: *mut X509_ALGOR); +} +unsafe extern "C" { + pub fn d2i_X509_ALGOR( + out: *mut *mut X509_ALGOR, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ALGOR; +} +unsafe extern "C" { + pub fn i2d_X509_ALGOR(alg: *const X509_ALGOR, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_set0( + alg: *mut X509_ALGOR, + obj: *mut ASN1_OBJECT, + param_type: ::core::ffi::c_int, + param_value: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_get0( + out_obj: *mut *const ASN1_OBJECT, + out_param_type: *mut ::core::ffi::c_int, + out_param_value: *mut *const ::core::ffi::c_void, + alg: *const X509_ALGOR, + ); +} +unsafe extern "C" { + pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ALGOR_cmp(a: *const X509_ALGOR, b: *const X509_ALGOR) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_ATTRIBUTE { + _unused: [u8; 0], +} +pub type sk_X509_ATTRIBUTE_free_func = + ::core::option::Option; +pub type sk_X509_ATTRIBUTE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE, +>; +pub type sk_X509_ATTRIBUTE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_ATTRIBUTE, + arg2: *const *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_ATTRIBUTE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_ATTRIBUTE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_free_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_copy_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_call_delete_if_func__extern"] + pub fn sk_X509_ATTRIBUTE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new__extern"] + pub fn sk_X509_ATTRIBUTE_new(comp: sk_X509_ATTRIBUTE_cmp_func) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_new_null__extern"] + pub fn sk_X509_ATTRIBUTE_new_null() -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_num__extern"] + pub fn sk_X509_ATTRIBUTE_num(sk: *const stack_st_X509_ATTRIBUTE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_zero__extern"] + pub fn sk_X509_ATTRIBUTE_zero(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_value__extern"] + pub fn sk_X509_ATTRIBUTE_value( + sk: *const stack_st_X509_ATTRIBUTE, + i: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set__extern"] + pub fn sk_X509_ATTRIBUTE_set( + sk: *mut stack_st_X509_ATTRIBUTE, + i: usize, + p: *mut X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_free__extern"] + pub fn sk_X509_ATTRIBUTE_free(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop_free__extern"] + pub fn sk_X509_ATTRIBUTE_pop_free( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_insert__extern"] + pub fn sk_X509_ATTRIBUTE_insert( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete__extern"] + pub fn sk_X509_ATTRIBUTE_delete( + sk: *mut stack_st_X509_ATTRIBUTE, + where_: usize, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_ptr__extern"] + pub fn sk_X509_ATTRIBUTE_delete_ptr( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *const X509_ATTRIBUTE, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_delete_if__extern"] + pub fn sk_X509_ATTRIBUTE_delete_if( + sk: *mut stack_st_X509_ATTRIBUTE, + func: sk_X509_ATTRIBUTE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_find__extern"] + pub fn sk_X509_ATTRIBUTE_find( + sk: *const stack_st_X509_ATTRIBUTE, + out_index: *mut usize, + p: *const X509_ATTRIBUTE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_shift__extern"] + pub fn sk_X509_ATTRIBUTE_shift(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_push__extern"] + pub fn sk_X509_ATTRIBUTE_push( + sk: *mut stack_st_X509_ATTRIBUTE, + p: *mut X509_ATTRIBUTE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_pop__extern"] + pub fn sk_X509_ATTRIBUTE_pop(sk: *mut stack_st_X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_dup__extern"] + pub fn sk_X509_ATTRIBUTE_dup( + sk: *const stack_st_X509_ATTRIBUTE, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort__extern"] + pub fn sk_X509_ATTRIBUTE_sort(sk: *mut stack_st_X509_ATTRIBUTE); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_sort_and_dedup__extern"] + pub fn sk_X509_ATTRIBUTE_sort_and_dedup( + sk: *mut stack_st_X509_ATTRIBUTE, + free_func: sk_X509_ATTRIBUTE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_is_sorted__extern"] + pub fn sk_X509_ATTRIBUTE_is_sorted(sk: *const stack_st_X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_set_cmp_func__extern"] + pub fn sk_X509_ATTRIBUTE_set_cmp_func( + sk: *mut stack_st_X509_ATTRIBUTE, + comp: sk_X509_ATTRIBUTE_cmp_func, + ) -> sk_X509_ATTRIBUTE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_ATTRIBUTE_deep_copy__extern"] + pub fn sk_X509_ATTRIBUTE_deep_copy( + sk: *const stack_st_X509_ATTRIBUTE, + copy_func: sk_X509_ATTRIBUTE_copy_func, + free_func: sk_X509_ATTRIBUTE_free_func, + ) -> *mut stack_st_X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_dup(attr: *const X509_ATTRIBUTE) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_free(attr: *mut X509_ATTRIBUTE); +} +unsafe extern "C" { + pub fn d2i_X509_ATTRIBUTE( + out: *mut *mut X509_ATTRIBUTE, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn i2d_X509_ATTRIBUTE(alg: *const X509_ATTRIBUTE, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create( + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + value: *mut ::core::ffi::c_void, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_NID( + attr: *mut *mut X509_ATTRIBUTE, + nid: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_OBJ( + attr: *mut *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_create_by_txt( + attr: *mut *mut X509_ATTRIBUTE, + attrname: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + bytes: *const ::core::ffi::c_uchar, + len: ::core::ffi::c_int, + ) -> *mut X509_ATTRIBUTE; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_object( + attr: *mut X509_ATTRIBUTE, + obj: *const ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_set1_data( + attr: *mut X509_ATTRIBUTE, + attrtype: ::core::ffi::c_int, + data: *const ::core::ffi::c_void, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_data( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + attrtype: ::core::ffi::c_int, + unused: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_count(attr: *const X509_ATTRIBUTE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_object(attr: *mut X509_ATTRIBUTE) -> *mut ASN1_OBJECT; +} +unsafe extern "C" { + pub fn X509_ATTRIBUTE_get0_type( + attr: *mut X509_ATTRIBUTE, + idx: ::core::ffi::c_int, + ) -> *mut ASN1_TYPE; +} +unsafe extern "C" { + pub fn X509_STORE_new() -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_up_ref(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_free(store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn X509_STORE_add_cert(store: *mut X509_STORE, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_crl(store: *mut X509_STORE, crl: *mut X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_get0_param(store: *mut X509_STORE) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_set1_param( + store: *mut X509_STORE, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_flags( + store: *mut X509_STORE, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_depth( + store: *mut X509_STORE, + depth: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_purpose( + store: *mut X509_STORE, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_set_trust( + store: *mut X509_STORE, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_OBJECT { + _unused: [u8; 0], +} +pub type sk_X509_OBJECT_free_func = + ::core::option::Option; +pub type sk_X509_OBJECT_copy_func = + ::core::option::Option *mut X509_OBJECT>; +pub type sk_X509_OBJECT_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_OBJECT, + arg2: *const *const X509_OBJECT, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_OBJECT_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_OBJECT, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_free_func__extern"] + pub fn sk_X509_OBJECT_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_copy_func__extern"] + pub fn sk_X509_OBJECT_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_cmp_func__extern"] + pub fn sk_X509_OBJECT_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_call_delete_if_func__extern"] + pub fn sk_X509_OBJECT_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new__extern"] + pub fn sk_X509_OBJECT_new(comp: sk_X509_OBJECT_cmp_func) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_new_null__extern"] + pub fn sk_X509_OBJECT_new_null() -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_num__extern"] + pub fn sk_X509_OBJECT_num(sk: *const stack_st_X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_zero__extern"] + pub fn sk_X509_OBJECT_zero(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_value__extern"] + pub fn sk_X509_OBJECT_value(sk: *const stack_st_X509_OBJECT, i: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set__extern"] + pub fn sk_X509_OBJECT_set( + sk: *mut stack_st_X509_OBJECT, + i: usize, + p: *mut X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_free__extern"] + pub fn sk_X509_OBJECT_free(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop_free__extern"] + pub fn sk_X509_OBJECT_pop_free( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_insert__extern"] + pub fn sk_X509_OBJECT_insert( + sk: *mut stack_st_X509_OBJECT, + p: *mut X509_OBJECT, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete__extern"] + pub fn sk_X509_OBJECT_delete(sk: *mut stack_st_X509_OBJECT, where_: usize) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_ptr__extern"] + pub fn sk_X509_OBJECT_delete_ptr( + sk: *mut stack_st_X509_OBJECT, + p: *const X509_OBJECT, + ) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_delete_if__extern"] + pub fn sk_X509_OBJECT_delete_if( + sk: *mut stack_st_X509_OBJECT, + func: sk_X509_OBJECT_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_find__extern"] + pub fn sk_X509_OBJECT_find( + sk: *const stack_st_X509_OBJECT, + out_index: *mut usize, + p: *const X509_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_shift__extern"] + pub fn sk_X509_OBJECT_shift(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_push__extern"] + pub fn sk_X509_OBJECT_push(sk: *mut stack_st_X509_OBJECT, p: *mut X509_OBJECT) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_pop__extern"] + pub fn sk_X509_OBJECT_pop(sk: *mut stack_st_X509_OBJECT) -> *mut X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_dup__extern"] + pub fn sk_X509_OBJECT_dup(sk: *const stack_st_X509_OBJECT) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort__extern"] + pub fn sk_X509_OBJECT_sort(sk: *mut stack_st_X509_OBJECT); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_sort_and_dedup__extern"] + pub fn sk_X509_OBJECT_sort_and_dedup( + sk: *mut stack_st_X509_OBJECT, + free_func: sk_X509_OBJECT_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_is_sorted__extern"] + pub fn sk_X509_OBJECT_is_sorted(sk: *const stack_st_X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_set_cmp_func__extern"] + pub fn sk_X509_OBJECT_set_cmp_func( + sk: *mut stack_st_X509_OBJECT, + comp: sk_X509_OBJECT_cmp_func, + ) -> sk_X509_OBJECT_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_OBJECT_deep_copy__extern"] + pub fn sk_X509_OBJECT_deep_copy( + sk: *const stack_st_X509_OBJECT, + copy_func: sk_X509_OBJECT_copy_func, + free_func: sk_X509_OBJECT_free_func, + ) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_new() -> *mut X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_OBJECT_free(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_OBJECT_get_type(obj: *const X509_OBJECT) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_OBJECT_get0_X509(obj: *const X509_OBJECT) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_get1_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_init( + ctx: *mut X509_STORE_CTX, + store: *mut X509_STORE, + x509: *mut X509, + chain: *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, err: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_verify_cert_error_string(err: ::core::ffi::c_long) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_error_depth(ctx: *const X509_STORE_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_current_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_current_crl(ctx: *const X509_STORE_CTX) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_store(ctx: *const X509_STORE_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_cert(ctx: *const X509_STORE_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_untrusted(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_crls(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509_CRL); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_default( + ctx: *mut X509_STORE_CTX, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_param(ctx: *mut X509_STORE_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set0_param(ctx: *mut X509_STORE_CTX, param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_flags(ctx: *mut X509_STORE_CTX, flags: ::core::ffi::c_ulong); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: time_t, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_time_posix( + ctx: *mut X509_STORE_CTX, + flags: ::core::ffi::c_ulong, + t: i64, + ); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_depth(ctx: *mut X509_STORE_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_purpose( + ctx: *mut X509_STORE_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_trust( + ctx: *mut X509_STORE_CTX, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_new() -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_inherit( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1( + to: *mut X509_VERIFY_PARAM, + from: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_clear_flags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_flags(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_depth(param: *mut X509_VERIFY_PARAM, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_get_depth(param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time(param: *mut X509_VERIFY_PARAM, t: time_t); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_time_posix(param: *mut X509_VERIFY_PARAM, t: i64); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add0_policy( + param: *mut X509_VERIFY_PARAM, + policy: *mut ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_policies( + param: *mut X509_VERIFY_PARAM, + policies: *const stack_st_ASN1_OBJECT, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_add1_host( + param: *mut X509_VERIFY_PARAM, + name: *const ::core::ffi::c_char, + name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_hostflags( + param: *mut X509_VERIFY_PARAM, + flags: ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_email( + param: *mut X509_VERIFY_PARAM, + email: *const ::core::ffi::c_char, + email_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip( + param: *mut X509_VERIFY_PARAM, + ip: *const u8, + ip_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set1_ip_asc( + param: *mut X509_VERIFY_PARAM, + ipasc: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_purpose( + param: *mut X509_VERIFY_PARAM, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_VERIFY_PARAM_set_trust( + param: *mut X509_VERIFY_PARAM, + trust: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_load_locations( + store: *mut X509_STORE, + file: *const ::core::ffi::c_char, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_add_lookup( + store: *mut X509_STORE, + method: *const X509_LOOKUP_METHOD, + ) -> *mut X509_LOOKUP; +} +unsafe extern "C" { + pub fn X509_LOOKUP_hash_dir() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_file() -> *const X509_LOOKUP_METHOD; +} +unsafe extern "C" { + pub fn X509_LOOKUP_load_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_add_dir( + lookup: *mut X509_LOOKUP, + path: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_LOOKUP_ctrl( + lookup: *mut X509_LOOKUP, + cmd: ::core::ffi::c_int, + argc: *const ::core::ffi::c_char, + argl: ::core::ffi::c_long, + ret: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_load_cert_crl_file( + lookup: *mut X509_LOOKUP, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_hash(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_NAME_hash_old(name: *const X509_NAME) -> u32; +} +unsafe extern "C" { + pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_default_cert_area() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_private_dir() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_dir_env() -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_get_default_cert_file_env() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spki_st { + pub spkac: *mut NETSCAPE_SPKAC, + pub sig_algor: *mut X509_ALGOR, + pub signature: *mut ASN1_BIT_STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spki_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of Netscape_spki_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spki_st::spkac"] + [::core::mem::offset_of!(Netscape_spki_st, spkac) - 0usize]; + ["Offset of field: Netscape_spki_st::sig_algor"] + [::core::mem::offset_of!(Netscape_spki_st, sig_algor) - 8usize]; + ["Offset of field: Netscape_spki_st::signature"] + [::core::mem::offset_of!(Netscape_spki_st, signature) - 16usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKI_new() -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_free(spki: *mut NETSCAPE_SPKI); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKI( + out: *mut *mut NETSCAPE_SPKI, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKI(spki: *const NETSCAPE_SPKI, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_verify( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_decode( + str_: *const ::core::ffi::c_char, + len: ossl_ssize_t, + ) -> *mut NETSCAPE_SPKI; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_b64_encode(spki: *mut NETSCAPE_SPKI) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_get_pubkey(spki: *const NETSCAPE_SPKI) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_set_pubkey( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKI_sign( + spki: *mut NETSCAPE_SPKI, + pkey: *mut EVP_PKEY, + md: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Netscape_spkac_st { + pub pubkey: *mut X509_PUBKEY, + pub challenge: *mut ASN1_IA5STRING, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Netscape_spkac_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of Netscape_spkac_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: Netscape_spkac_st::pubkey"] + [::core::mem::offset_of!(Netscape_spkac_st, pubkey) - 0usize]; + ["Offset of field: Netscape_spkac_st::challenge"] + [::core::mem::offset_of!(Netscape_spkac_st, challenge) - 8usize]; +}; +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_new() -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn NETSCAPE_SPKAC_free(spkac: *mut NETSCAPE_SPKAC); +} +unsafe extern "C" { + pub fn d2i_NETSCAPE_SPKAC( + out: *mut *mut NETSCAPE_SPKAC, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut NETSCAPE_SPKAC; +} +unsafe extern "C" { + pub fn i2d_NETSCAPE_SPKAC( + spkac: *const NETSCAPE_SPKAC, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rsa_pss_params_st { + pub hashAlgorithm: *mut X509_ALGOR, + pub maskGenAlgorithm: *mut X509_ALGOR, + pub saltLength: *mut ASN1_INTEGER, + pub trailerField: *mut ASN1_INTEGER, + pub maskHash: *mut X509_ALGOR, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rsa_pss_params_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of rsa_pss_params_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rsa_pss_params_st::hashAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, hashAlgorithm) - 0usize]; + ["Offset of field: rsa_pss_params_st::maskGenAlgorithm"] + [::core::mem::offset_of!(rsa_pss_params_st, maskGenAlgorithm) - 8usize]; + ["Offset of field: rsa_pss_params_st::saltLength"] + [::core::mem::offset_of!(rsa_pss_params_st, saltLength) - 16usize]; + ["Offset of field: rsa_pss_params_st::trailerField"] + [::core::mem::offset_of!(rsa_pss_params_st, trailerField) - 24usize]; + ["Offset of field: rsa_pss_params_st::maskHash"] + [::core::mem::offset_of!(rsa_pss_params_st, maskHash) - 32usize]; +}; +unsafe extern "C" { + pub static RSA_PSS_PARAMS_it: ASN1_ITEM; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_new() -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn RSA_PSS_PARAMS_free(params: *mut RSA_PSS_PARAMS); +} +unsafe extern "C" { + pub fn d2i_RSA_PSS_PARAMS( + out: *mut *mut RSA_PSS_PARAMS, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut RSA_PSS_PARAMS; +} +unsafe extern "C" { + pub fn i2d_RSA_PSS_PARAMS(in_: *const RSA_PSS_PARAMS, outp: *mut *mut u8) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_new() -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_PRIV_KEY_INFO_free(key: *mut PKCS8_PRIV_KEY_INFO); +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO( + out: *mut *mut PKCS8_PRIV_KEY_INFO, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO( + key: *const PKCS8_PRIV_KEY_INFO, + outp: *mut *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn EVP_PKCS82PKEY(p8: *const PKCS8_PRIV_KEY_INFO) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn EVP_PKEY2PKCS8(pkey: *const EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn X509_SIG_new() -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn X509_SIG_free(key: *mut X509_SIG); +} +unsafe extern "C" { + pub fn d2i_X509_SIG( + out: *mut *mut X509_SIG, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn i2d_X509_SIG(sig: *const X509_SIG, outp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_SIG_get0( + sig: *const X509_SIG, + out_alg: *mut *const X509_ALGOR, + out_digest: *mut *const ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_SIG_getm( + sig: *mut X509_SIG, + out_alg: *mut *mut X509_ALGOR, + out_digest: *mut *mut ASN1_OCTET_STRING, + ); +} +unsafe extern "C" { + pub fn X509_print_ex( + bp: *mut BIO, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_ex_fp( + fp: *mut FILE, + x: *const X509, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print(bp: *mut BIO, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_print_fp(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print(bp: *mut BIO, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_print_fp(fp: *mut FILE, x: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_ex( + bp: *mut BIO, + x: *const X509_REQ, + nmflag: ::core::ffi::c_ulong, + cflag: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_print_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex( + out: *mut BIO, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_print( + bp: *mut BIO, + name: *const X509_NAME, + obase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_oneline( + name: *const X509_NAME, + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509_NAME_print_ex_fp( + fp: *mut FILE, + nm: *const X509_NAME, + indent: ::core::ffi::c_int, + flags: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_dump( + bio: *mut BIO, + sig: *const ASN1_STRING, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_signature_print( + bio: *mut BIO, + alg: *const X509_ALGOR, + sig: *const ASN1_STRING, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print( + out: *mut BIO, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_print_fp( + out: *mut FILE, + ext: *const X509_EXTENSION, + flag: ::core::ffi::c_int, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_extensions_print( + out: *mut BIO, + title: *const ::core::ffi::c_char, + exts: *const stack_st_X509_EXTENSION, + flag: ::core::ffi::c_ulong, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn GENERAL_NAME_print(out: *mut BIO, gen_: *const GENERAL_NAME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_pubkey_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_digest( + x509: *const X509, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_digest( + crl: *const X509_CRL, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_REQ_digest( + req: *const X509_REQ, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_digest( + name: *const X509_NAME, + md: *const EVP_MD, + out: *mut u8, + out_len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_bio(bp: *mut BIO, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_bio(bp: *mut BIO, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_bio(bp: *mut BIO, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_bio(bp: *mut BIO, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_bio(bp: *mut BIO, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_bio(bp: *mut BIO, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_DHparams_bio(bp: *mut BIO, dh: *mut *mut DH) -> *mut DH; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_bio(bp: *mut BIO, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_bio(bp: *mut BIO, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_bio(bp: *mut BIO, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_bio(bp: *mut BIO, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_bio(bp: *mut BIO, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_bio(bp: *mut BIO, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_bio(bp: *mut BIO, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_bio(bp: *mut BIO, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_bio( + bp: *mut BIO, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_bio(bp: *mut BIO, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DHparams_bio(bp: *mut BIO, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_bio(bp: *mut BIO, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_X509_fp(fp: *mut FILE, x509: *mut *mut X509) -> *mut X509; +} +unsafe extern "C" { + pub fn d2i_X509_CRL_fp(fp: *mut FILE, crl: *mut *mut X509_CRL) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn d2i_X509_REQ_fp(fp: *mut FILE, req: *mut *mut X509_REQ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn d2i_RSAPrivateKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSAPublicKey_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *mut *mut RSA) -> *mut RSA; +} +unsafe extern "C" { + pub fn d2i_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_DSAPrivateKey_fp(fp: *mut FILE, dsa: *mut *mut DSA) -> *mut DSA; +} +unsafe extern "C" { + pub fn d2i_EC_PUBKEY_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_ECPrivateKey_fp(fp: *mut FILE, eckey: *mut *mut EC_KEY) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn d2i_PKCS8_fp(fp: *mut FILE, p8: *mut *mut X509_SIG) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn d2i_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *mut *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn d2i_PrivateKey_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn d2i_PUBKEY_fp(fp: *mut FILE, a: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_X509_fp(fp: *mut FILE, x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_CRL_fp(fp: *mut FILE, crl: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_X509_REQ_fp(fp: *mut FILE, req: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPrivateKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSAPublicKey_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_RSA_PUBKEY_fp(fp: *mut FILE, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSA_PUBKEY_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_DSAPrivateKey_fp(fp: *mut FILE, dsa: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_EC_PUBKEY_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_ECPrivateKey_fp(fp: *mut FILE, eckey: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_fp(fp: *mut FILE, p8: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8_PRIV_KEY_INFO_fp( + fp: *mut FILE, + p8inf: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKeyInfo_fp(fp: *mut FILE, key: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PrivateKey_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PUBKEY_fp(fp: *mut FILE, pkey: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_find_by_issuer_and_serial( + sk: *const stack_st_X509, + name: *const X509_NAME, + serial: *const ASN1_INTEGER, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_find_by_subject(sk: *const stack_st_X509, name: *const X509_NAME) -> *mut X509; +} +unsafe extern "C" { + pub fn X509_cmp_time(s: *const ASN1_TIME, t: *const time_t) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_time_posix(s: *const ASN1_TIME, t: i64) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_cmp_current_time(s: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_time_adj( + s: *mut ASN1_TIME, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_time_adj_ex( + s: *mut ASN1_TIME, + offset_day: ::core::ffi::c_int, + offset_sec: ::core::ffi::c_long, + t: *const time_t, + ) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_gmtime_adj(s: *mut ASN1_TIME, offset_sec: ::core::ffi::c_long) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_issuer_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_subject_name_cmp(a: *const X509, b: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_cmp(a: *const X509_CRL, b: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_issuer_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_subject_name_hash_old(x509: *const X509) -> u32; +} +unsafe extern "C" { + pub fn X509_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_ex_data( + r: *mut X509, + idx: ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_get_ex_data(r: *mut X509, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_ex_data( + ctx: *mut X509_STORE_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn ASN1_digest( + i2d: i2d_of_void, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_char, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_digest( + it: *const ASN1_ITEM, + type_: *const EVP_MD, + data: *mut ::core::ffi::c_void, + md: *mut ::core::ffi::c_uchar, + len: *mut ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_verify( + it: *const ASN1_ITEM, + algor1: *const X509_ALGOR, + signature: *const ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + data: *mut ::core::ffi::c_void, + pkey: *mut EVP_PKEY, + type_: *const EVP_MD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn ASN1_item_sign_ctx( + it: *const ASN1_ITEM, + algor1: *mut X509_ALGOR, + algor2: *mut X509_ALGOR, + signature: *mut ASN1_BIT_STRING, + asn: *mut ::core::ffi::c_void, + ctx: *mut EVP_MD_CTX, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_supported_extension(ex: *const X509_EXTENSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ca(x509: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_issued(issuer: *const X509, subject: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn NAME_CONSTRAINTS_check( + x509: *const X509, + nc: *const NAME_CONSTRAINTS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_host( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + out_peername: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_email( + x509: *const X509, + chk: *const ::core::ffi::c_char, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip( + x509: *const X509, + chk: *const u8, + chklen: usize, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_ip_asc( + x509: *const X509, + ipasc: *const ::core::ffi::c_char, + flags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_issuer( + out_issuer: *mut *mut X509, + ctx: *mut X509_STORE_CTX, + x509: *const X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_purpose( + x509: *mut X509, + purpose: ::core::ffi::c_int, + ca: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_check_trust( + x509: *mut X509, + id: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_certs( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get1_crls( + ctx: *mut X509_STORE_CTX, + name: *const X509_NAME, + ) -> *mut stack_st_X509_CRL; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_by_subject( + ctx: *mut X509_STORE_CTX, + type_: ::core::ffi::c_int, + name: *const X509_NAME, + ret: *mut X509_OBJECT, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct private_key_st { + pub dec_pkey: *mut EVP_PKEY, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of private_key_st"][::core::mem::size_of::() - 8usize]; + ["Alignment of private_key_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: private_key_st::dec_pkey"] + [::core::mem::offset_of!(private_key_st, dec_pkey) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_info_st { + pub x509: *mut X509, + pub crl: *mut X509_CRL, + pub x_pkey: *mut X509_PKEY, + pub enc_cipher: EVP_CIPHER_INFO, + pub enc_len: ::core::ffi::c_int, + pub enc_data: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_info_st"][::core::mem::size_of::() - 64usize]; + ["Alignment of X509_info_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_info_st::x509"][::core::mem::offset_of!(X509_info_st, x509) - 0usize]; + ["Offset of field: X509_info_st::crl"][::core::mem::offset_of!(X509_info_st, crl) - 8usize]; + ["Offset of field: X509_info_st::x_pkey"] + [::core::mem::offset_of!(X509_info_st, x_pkey) - 16usize]; + ["Offset of field: X509_info_st::enc_cipher"] + [::core::mem::offset_of!(X509_info_st, enc_cipher) - 24usize]; + ["Offset of field: X509_info_st::enc_len"] + [::core::mem::offset_of!(X509_info_st, enc_len) - 48usize]; + ["Offset of field: X509_info_st::enc_data"] + [::core::mem::offset_of!(X509_info_st, enc_data) - 56usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_X509_INFO { + _unused: [u8; 0], +} +pub type sk_X509_INFO_free_func = + ::core::option::Option; +pub type sk_X509_INFO_copy_func = + ::core::option::Option *mut X509_INFO>; +pub type sk_X509_INFO_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const X509_INFO, + arg2: *const *const X509_INFO, + ) -> ::core::ffi::c_int, +>; +pub type sk_X509_INFO_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut X509_INFO, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_free_func__extern"] + pub fn sk_X509_INFO_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_copy_func__extern"] + pub fn sk_X509_INFO_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_cmp_func__extern"] + pub fn sk_X509_INFO_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_call_delete_if_func__extern"] + pub fn sk_X509_INFO_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new__extern"] + pub fn sk_X509_INFO_new(comp: sk_X509_INFO_cmp_func) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_new_null__extern"] + pub fn sk_X509_INFO_new_null() -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_num__extern"] + pub fn sk_X509_INFO_num(sk: *const stack_st_X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_zero__extern"] + pub fn sk_X509_INFO_zero(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_value__extern"] + pub fn sk_X509_INFO_value(sk: *const stack_st_X509_INFO, i: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set__extern"] + pub fn sk_X509_INFO_set( + sk: *mut stack_st_X509_INFO, + i: usize, + p: *mut X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_free__extern"] + pub fn sk_X509_INFO_free(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop_free__extern"] + pub fn sk_X509_INFO_pop_free(sk: *mut stack_st_X509_INFO, free_func: sk_X509_INFO_free_func); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_insert__extern"] + pub fn sk_X509_INFO_insert( + sk: *mut stack_st_X509_INFO, + p: *mut X509_INFO, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete__extern"] + pub fn sk_X509_INFO_delete(sk: *mut stack_st_X509_INFO, where_: usize) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_ptr__extern"] + pub fn sk_X509_INFO_delete_ptr( + sk: *mut stack_st_X509_INFO, + p: *const X509_INFO, + ) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_delete_if__extern"] + pub fn sk_X509_INFO_delete_if( + sk: *mut stack_st_X509_INFO, + func: sk_X509_INFO_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_find__extern"] + pub fn sk_X509_INFO_find( + sk: *const stack_st_X509_INFO, + out_index: *mut usize, + p: *const X509_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_shift__extern"] + pub fn sk_X509_INFO_shift(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_push__extern"] + pub fn sk_X509_INFO_push(sk: *mut stack_st_X509_INFO, p: *mut X509_INFO) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_pop__extern"] + pub fn sk_X509_INFO_pop(sk: *mut stack_st_X509_INFO) -> *mut X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_dup__extern"] + pub fn sk_X509_INFO_dup(sk: *const stack_st_X509_INFO) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort__extern"] + pub fn sk_X509_INFO_sort(sk: *mut stack_st_X509_INFO); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_sort_and_dedup__extern"] + pub fn sk_X509_INFO_sort_and_dedup( + sk: *mut stack_st_X509_INFO, + free_func: sk_X509_INFO_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_is_sorted__extern"] + pub fn sk_X509_INFO_is_sorted(sk: *const stack_st_X509_INFO) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_set_cmp_func__extern"] + pub fn sk_X509_INFO_set_cmp_func( + sk: *mut stack_st_X509_INFO, + comp: sk_X509_INFO_cmp_func, + ) -> sk_X509_INFO_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_X509_INFO_deep_copy__extern"] + pub fn sk_X509_INFO_deep_copy( + sk: *const stack_st_X509_INFO, + copy_func: sk_X509_INFO_copy_func, + free_func: sk_X509_INFO_free_func, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn X509_INFO_free(info: *mut X509_INFO); +} +pub type X509V3_EXT_NEW = + ::core::option::Option *mut ::core::ffi::c_void>; +pub type X509V3_EXT_FREE = + ::core::option::Option; +pub type X509V3_EXT_D2I = ::core::option::Option< + unsafe extern "C" fn( + ext: *mut ::core::ffi::c_void, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2D = ::core::option::Option< + unsafe extern "C" fn(ext: *mut ::core::ffi::c_void, outp: *mut *mut u8) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_I2V = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE, +>; +pub type X509V3_EXT_V2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + values: *const stack_st_CONF_VALUE, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2S = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_char, +>; +pub type X509V3_EXT_S2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +pub type X509V3_EXT_I2R = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ext: *mut ::core::ffi::c_void, + out: *mut BIO, + indent: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, +>; +pub type X509V3_EXT_R2I = ::core::option::Option< + unsafe extern "C" fn( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_method { + pub ext_nid: ::core::ffi::c_int, + pub ext_flags: ::core::ffi::c_int, + pub it: *const ASN1_ITEM_st, + pub ext_new: X509V3_EXT_NEW, + pub ext_free: X509V3_EXT_FREE, + pub d2i: X509V3_EXT_D2I, + pub i2d: X509V3_EXT_I2D, + pub i2s: X509V3_EXT_I2S, + pub s2i: X509V3_EXT_S2I, + pub i2v: X509V3_EXT_I2V, + pub v2i: X509V3_EXT_V2I, + pub i2r: X509V3_EXT_I2R, + pub r2i: X509V3_EXT_R2I, + pub usr_data: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_method"][::core::mem::size_of::() - 104usize]; + ["Alignment of v3_ext_method"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_method::ext_nid"] + [::core::mem::offset_of!(v3_ext_method, ext_nid) - 0usize]; + ["Offset of field: v3_ext_method::ext_flags"] + [::core::mem::offset_of!(v3_ext_method, ext_flags) - 4usize]; + ["Offset of field: v3_ext_method::it"][::core::mem::offset_of!(v3_ext_method, it) - 8usize]; + ["Offset of field: v3_ext_method::ext_new"] + [::core::mem::offset_of!(v3_ext_method, ext_new) - 16usize]; + ["Offset of field: v3_ext_method::ext_free"] + [::core::mem::offset_of!(v3_ext_method, ext_free) - 24usize]; + ["Offset of field: v3_ext_method::d2i"][::core::mem::offset_of!(v3_ext_method, d2i) - 32usize]; + ["Offset of field: v3_ext_method::i2d"][::core::mem::offset_of!(v3_ext_method, i2d) - 40usize]; + ["Offset of field: v3_ext_method::i2s"][::core::mem::offset_of!(v3_ext_method, i2s) - 48usize]; + ["Offset of field: v3_ext_method::s2i"][::core::mem::offset_of!(v3_ext_method, s2i) - 56usize]; + ["Offset of field: v3_ext_method::i2v"][::core::mem::offset_of!(v3_ext_method, i2v) - 64usize]; + ["Offset of field: v3_ext_method::v2i"][::core::mem::offset_of!(v3_ext_method, v2i) - 72usize]; + ["Offset of field: v3_ext_method::i2r"][::core::mem::offset_of!(v3_ext_method, i2r) - 80usize]; + ["Offset of field: v3_ext_method::r2i"][::core::mem::offset_of!(v3_ext_method, r2i) - 88usize]; + ["Offset of field: v3_ext_method::usr_data"] + [::core::mem::offset_of!(v3_ext_method, usr_data) - 96usize]; +}; +unsafe extern "C" { + pub fn X509V3_EXT_get(ext: *const X509_EXTENSION) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_get_nid(nid: ::core::ffi::c_int) -> *const X509V3_EXT_METHOD; +} +unsafe extern "C" { + pub fn X509V3_EXT_add(ext: *mut X509V3_EXT_METHOD) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_alias( + nid_to: ::core::ffi::c_int, + nid_from: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v3_ext_ctx { + pub flags: ::core::ffi::c_int, + pub issuer_cert: *const X509, + pub subject_cert: *const X509, + pub subject_req: *const X509_REQ, + pub crl: *const X509_CRL, + pub db: *const CONF, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of v3_ext_ctx"][::core::mem::size_of::() - 48usize]; + ["Alignment of v3_ext_ctx"][::core::mem::align_of::() - 8usize]; + ["Offset of field: v3_ext_ctx::flags"][::core::mem::offset_of!(v3_ext_ctx, flags) - 0usize]; + ["Offset of field: v3_ext_ctx::issuer_cert"] + [::core::mem::offset_of!(v3_ext_ctx, issuer_cert) - 8usize]; + ["Offset of field: v3_ext_ctx::subject_cert"] + [::core::mem::offset_of!(v3_ext_ctx, subject_cert) - 16usize]; + ["Offset of field: v3_ext_ctx::subject_req"] + [::core::mem::offset_of!(v3_ext_ctx, subject_req) - 24usize]; + ["Offset of field: v3_ext_ctx::crl"][::core::mem::offset_of!(v3_ext_ctx, crl) - 32usize]; + ["Offset of field: v3_ext_ctx::db"][::core::mem::offset_of!(v3_ext_ctx, db) - 40usize]; +}; +unsafe extern "C" { + pub fn X509V3_set_ctx( + ctx: *mut X509V3_CTX, + issuer: *const X509, + subject: *const X509, + req: *const X509_REQ, + crl: *const X509_CRL, + flags: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *const CONF); +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + name: *const ::core::ffi::c_char, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_nconf_nid( + conf: *const CONF, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_conf_nid( + conf: *mut CRYPTO_MUST_BE_NULL, + ctx: *const X509V3_CTX, + ext_nid: ::core::ffi::c_int, + value: *const ::core::ffi::c_char, + ) -> *mut X509_EXTENSION; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf_sk( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + sk: *mut *mut stack_st_X509_EXTENSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + cert: *mut X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_REQ_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + req: *mut X509_REQ, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509V3_EXT_CRL_add_nconf( + conf: *const CONF, + ctx: *const X509V3_CTX, + section: *const ::core::ffi::c_char, + crl: *mut X509_CRL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2s_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + oct: *const ASN1_OCTET_STRING, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_OCTET_STRING( + method: *const X509V3_EXT_METHOD, + ctx: *const X509V3_CTX, + str_: *const ::core::ffi::c_char, + ) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn i2s_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_INTEGER, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn s2i_ASN1_INTEGER( + method: *const X509V3_EXT_METHOD, + value: *const ::core::ffi::c_char, + ) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn i2s_ASN1_ENUMERATED( + method: *const X509V3_EXT_METHOD, + aint: *const ASN1_ENUMERATED, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn X509V3_conf_free(val: *mut CONF_VALUE); +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAME( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAME, + ret: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn i2v_GENERAL_NAMES( + method: *const X509V3_EXT_METHOD, + gen_: *const GENERAL_NAMES, + extlist: *mut stack_st_CONF_VALUE, + ) -> *mut stack_st_CONF_VALUE; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn a2i_IPADDRESS_NC(ipasc: *const ::core::ffi::c_char) -> *mut ASN1_OCTET_STRING; +} +unsafe extern "C" { + pub fn X509_get_notBefore(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_notAfter(x509: *const X509) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_set_notBefore(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_set_notAfter(x509: *mut X509, tm: *const ASN1_TIME) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_CRL_get_lastUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_CRL_get_nextUpdate(crl: *mut X509_CRL) -> *mut ASN1_TIME; +} +unsafe extern "C" { + pub fn X509_get_serialNumber(x509: *mut X509) -> *mut ASN1_INTEGER; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_OBJ( + name: *const X509_NAME, + obj: *const ASN1_OBJECT, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_NAME_get_text_by_NID( + name: *const X509_NAME, + nid: ::core::ffi::c_int, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get0_parent_ctx(ctx: *const X509_STORE_CTX) -> *mut X509_STORE_CTX; +} +unsafe extern "C" { + pub fn X509_OBJECT_free_contents(obj: *mut X509_OBJECT); +} +unsafe extern "C" { + pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); +} +unsafe extern "C" { + pub fn X509V3_add_standard_extensions() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_get_chain(ctx: *const X509_STORE_CTX) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn X509_STORE_CTX_trusted_stack(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +pub type X509_STORE_CTX_verify_cb = ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut X509_STORE_CTX) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn X509_STORE_CTX_set_verify_cb( + ctx: *mut X509_STORE_CTX, + verify_cb: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn X509_STORE_set_verify_cb(store: *mut X509_STORE, verify_cb: X509_STORE_CTX_verify_cb); +} +unsafe extern "C" { + pub fn X509_STORE_CTX_set_chain(ctx: *mut X509_STORE_CTX, sk: *mut stack_st_X509); +} +unsafe extern "C" { + pub fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut stack_st_X509_OBJECT; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_by_sname(sname: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get0(id: ::core::ffi::c_int) -> *const X509_PURPOSE; +} +unsafe extern "C" { + pub fn X509_PURPOSE_get_id(purpose: *const X509_PURPOSE) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct X509_algor_st { + pub algorithm: *mut ASN1_OBJECT, + pub parameter: *mut ASN1_TYPE, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X509_algor_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of X509_algor_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: X509_algor_st::algorithm"] + [::core::mem::offset_of!(X509_algor_st, algorithm) - 0usize]; + ["Offset of field: X509_algor_st::parameter"] + [::core::mem::offset_of!(X509_algor_st, parameter) - 8usize]; +}; +pub type pem_password_cb = ::core::option::Option< + unsafe extern "C" fn( + out: *mut ::core::ffi::c_char, + max_out: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn PEM_def_callback( + buf: *mut ::core::ffi::c_char, + size: ::core::ffi::c_int, + enc: ::core::ffi::c_int, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_AUX(bio: *mut BIO, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_CRL( + bio: *mut BIO, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_X509_REQ( + bio: *mut BIO, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_X509_REQ_NEW(bio: *mut BIO, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS7( + bio: *mut BIO, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS7(bio: *mut BIO, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read_bio( + bio: *mut BIO, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PUBKEY( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_PUBKEY(bio: *mut BIO, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey_nid( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8PrivateKey( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey_nid( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8( + bio: *mut BIO, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8(bio: *mut BIO, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_write_bio_PKCS8_PRIV_KEY_INFO( + bio: *mut BIO, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPrivateKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPrivateKey( + bio: *mut BIO, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSAPublicKey( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSAPublicKey(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_RSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_RSA_PUBKEY(bio: *mut BIO, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAPrivateKey( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAPrivateKey( + bio: *mut BIO, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSA_PUBKEY( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSA_PUBKEY(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DSAparams( + bio: *mut BIO, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_write_bio_DSAparams(bio: *mut BIO, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_ECPrivateKey( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_ECPrivateKey( + bio: *mut BIO, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_EC_PUBKEY( + bio: *mut BIO, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_write_bio_EC_PUBKEY(bio: *mut BIO, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio_DHparams( + bio: *mut BIO, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_write_bio_DHparams(bio: *mut BIO, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_X509( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_read_X509_CRL( + fp: *mut FILE, + out: *mut *mut X509_CRL, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_CRL; +} +unsafe extern "C" { + pub fn PEM_read_X509_AUX( + fp: *mut FILE, + out: *mut *mut X509, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509; +} +unsafe extern "C" { + pub fn PEM_X509_INFO_read( + fp: *mut FILE, + sk: *mut stack_st_X509_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut stack_st_X509_INFO; +} +unsafe extern "C" { + pub fn PEM_read_X509_REQ( + fp: *mut FILE, + out: *mut *mut X509_REQ, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_REQ; +} +unsafe extern "C" { + pub fn PEM_read_PKCS7( + fp: *mut FILE, + out: *mut *mut PKCS7, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS7; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8( + fp: *mut FILE, + out: *mut *mut X509_SIG, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PEM_read_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + out: *mut *mut PKCS8_PRIV_KEY_INFO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PEM_read_RSAPrivateKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSAPublicKey( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_RSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut RSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut RSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAPrivateKey( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSA_PUBKEY( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_DSAparams( + fp: *mut FILE, + out: *mut *mut DSA, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DSA; +} +unsafe extern "C" { + pub fn PEM_read_ECPrivateKey( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_EC_PUBKEY( + fp: *mut FILE, + out: *mut *mut EC_KEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EC_KEY; +} +unsafe extern "C" { + pub fn PEM_read_DHparams( + fp: *mut FILE, + out: *mut *mut DH, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut DH; +} +unsafe extern "C" { + pub fn PEM_read_PrivateKey( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_read_PUBKEY( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_write_X509(fp: *mut FILE, x: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_CRL(fp: *mut FILE, in_: *const X509_CRL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_AUX(fp: *mut FILE, in_: *const X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_X509_REQ_NEW(fp: *mut FILE, in_: *const X509_REQ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS7(fp: *mut FILE, in_: *const PKCS7) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8(fp: *mut FILE, in_: *const X509_SIG) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PKCS8_PRIV_KEY_INFO( + fp: *mut FILE, + in_: *const PKCS8_PRIV_KEY_INFO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPrivateKey( + fp: *mut FILE, + in_: *const RSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSAPublicKey(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_RSA_PUBKEY(fp: *mut FILE, in_: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAPrivateKey( + fp: *mut FILE, + in_: *const DSA, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSA_PUBKEY(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DSAparams(fp: *mut FILE, in_: *const DSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_ECPrivateKey( + fp: *mut FILE, + in_: *const EC_KEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_EC_PUBKEY(fp: *mut FILE, in_: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_DHparams(fp: *mut FILE, in_: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PrivateKey( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_PUBKEY(fp: *mut FILE, in_: *const EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read_bio( + bio: *mut BIO, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_read( + fp: *mut FILE, + out_name: *mut *mut ::core::ffi::c_char, + out_header: *mut *mut ::core::ffi::c_char, + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_bio( + bio: *mut BIO, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write( + fp: *mut FILE, + name: *const ::core::ffi::c_char, + hdr: *const ::core::ffi::c_char, + data: *const u8, + len: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_bytes_read_bio( + out_data: *mut *mut u8, + out_len: *mut ::core::ffi::c_long, + out_name: *mut *mut ::core::ffi::c_char, + expected_name: *const ::core::ffi::c_char, + bio: *mut BIO, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_bio( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_bio( + bio: *mut BIO, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + enc: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS8PrivateKey_nid_fp( + fp: *mut FILE, + in_: *const EVP_PKEY, + nid: ::core::ffi::c_int, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_PKCS8PrivateKey_fp( + fp: *mut FILE, + out: *mut *mut EVP_PKEY, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PEM_ASN1_read_bio( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_read( + d2i: d2i_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + out: *mut *mut ::core::ffi::c_void, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn PEM_ASN1_write_bio( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + bio: *mut BIO, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_ASN1_write( + i2d: i2d_of_void, + name: *const ::core::ffi::c_char, + fp: *mut FILE, + in_: *const ::core::ffi::c_void, + enc: *const EVP_CIPHER, + pass: *const u8, + pass_len: ::core::ffi::c_int, + callback: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_encrypt( + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + p8inf: *mut PKCS8_PRIV_KEY_INFO, + ) -> *mut X509_SIG; +} +unsafe extern "C" { + pub fn PKCS8_marshal_encrypted_private_key( + out: *mut CBB, + pbe_nid: ::core::ffi::c_int, + cipher: *const EVP_CIPHER, + pass: *const ::core::ffi::c_char, + pass_len: usize, + salt: *const u8, + salt_len: usize, + iterations: ::core::ffi::c_int, + pkey: *const EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS8_decrypt( + pkcs8: *mut X509_SIG, + pass: *const ::core::ffi::c_char, + pass_len: ::core::ffi::c_int, + ) -> *mut PKCS8_PRIV_KEY_INFO; +} +unsafe extern "C" { + pub fn PKCS8_parse_encrypted_private_key( + cbs: *mut CBS, + pass: *const ::core::ffi::c_char, + pass_len: usize, + ) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn PKCS12_get_key_and_certs( + out_key: *mut *mut EVP_PKEY, + out_certs: *mut stack_st_X509, + in_: *mut CBS, + password: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_PBE_add(); +} +unsafe extern "C" { + pub fn d2i_PKCS12( + out_p12: *mut *mut PKCS12, + ber_bytes: *mut *const u8, + ber_len: usize, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_bio(bio: *mut BIO, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn d2i_PKCS12_fp(fp: *mut FILE, out_p12: *mut *mut PKCS12) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn i2d_PKCS12(p12: *const PKCS12, out: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_bio(bio: *mut BIO, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_PKCS12_fp(fp: *mut FILE, p12: *const PKCS12) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_parse( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_verify_mac( + p12: *const PKCS12, + password: *const ::core::ffi::c_char, + password_len: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PKCS12_create( + password: *const ::core::ffi::c_char, + name: *const ::core::ffi::c_char, + pkey: *const EVP_PKEY, + cert: *mut X509, + chain: *const stack_st_X509, + key_nid: ::core::ffi::c_int, + cert_nid: ::core::ffi::c_int, + iterations: ::core::ffi::c_int, + mac_iterations: ::core::ffi::c_int, + key_type: ::core::ffi::c_int, + ) -> *mut PKCS12; +} +unsafe extern "C" { + pub fn PKCS12_free(p12: *mut PKCS12); +} +pub type poly1305_state = [u8; 512usize]; +unsafe extern "C" { + pub fn CRYPTO_poly1305_init(state: *mut poly1305_state, key: *const u8); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_update(state: *mut poly1305_state, in_: *const u8, in_len: usize); +} +unsafe extern "C" { + pub fn CRYPTO_poly1305_finish(state: *mut poly1305_state, mac: *mut u8); +} +unsafe extern "C" { + pub fn RAND_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_enable_fork_unsafe_buffering(fd: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_disable_fork_unsafe_buffering(); +} +unsafe extern "C" { + pub fn RAND_get_system_entropy_for_custom_prng(buf: *mut u8, len: usize); +} +unsafe extern "C" { + pub fn RAND_pseudo_bytes(buf: *mut u8, len: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_seed(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn RAND_load_file( + path: *const ::core::ffi::c_char, + num: ::core::ffi::c_long, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_file_name(buf: *mut ::core::ffi::c_char, num: usize) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn RAND_add(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int, entropy: f64); +} +unsafe extern "C" { + pub fn RAND_egd(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_poll() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_status() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RAND_cleanup(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rand_meth_st { + pub seed: ::core::option::Option< + unsafe extern "C" fn(buf: *const ::core::ffi::c_void, num: ::core::ffi::c_int), + >, + pub bytes: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub cleanup: ::core::option::Option, + pub add: ::core::option::Option< + unsafe extern "C" fn( + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + entropy: f64, + ), + >, + pub pseudorand: ::core::option::Option< + unsafe extern "C" fn(buf: *mut u8, num: usize) -> ::core::ffi::c_int, + >, + pub status: ::core::option::Option ::core::ffi::c_int>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rand_meth_st"][::core::mem::size_of::() - 48usize]; + ["Alignment of rand_meth_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: rand_meth_st::seed"][::core::mem::offset_of!(rand_meth_st, seed) - 0usize]; + ["Offset of field: rand_meth_st::bytes"][::core::mem::offset_of!(rand_meth_st, bytes) - 8usize]; + ["Offset of field: rand_meth_st::cleanup"] + [::core::mem::offset_of!(rand_meth_st, cleanup) - 16usize]; + ["Offset of field: rand_meth_st::add"][::core::mem::offset_of!(rand_meth_st, add) - 24usize]; + ["Offset of field: rand_meth_st::pseudorand"] + [::core::mem::offset_of!(rand_meth_st, pseudorand) - 32usize]; + ["Offset of field: rand_meth_st::status"] + [::core::mem::offset_of!(rand_meth_st, status) - 40usize]; +}; +unsafe extern "C" { + pub fn RAND_SSLeay() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_OpenSSL() -> *mut RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_get_rand_method() -> *const RAND_METHOD; +} +unsafe extern "C" { + pub fn RAND_set_rand_method(arg1: *const RAND_METHOD) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rc4_key_st { + pub x: u32, + pub y: u32, + pub data: [u32; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rc4_key_st"][::core::mem::size_of::() - 1032usize]; + ["Alignment of rc4_key_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: rc4_key_st::x"][::core::mem::offset_of!(rc4_key_st, x) - 0usize]; + ["Offset of field: rc4_key_st::y"][::core::mem::offset_of!(rc4_key_st, y) - 4usize]; + ["Offset of field: rc4_key_st::data"][::core::mem::offset_of!(rc4_key_st, data) - 8usize]; +}; +unsafe extern "C" { + pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::core::ffi::c_uint, key: *const u8); +} +unsafe extern "C" { + pub fn RC4(key: *mut RC4_KEY, len: usize, in_: *const u8, out: *mut u8); +} +unsafe extern "C" { + pub fn RC4_options() -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RIPEMD160state_st { + pub h: [u32; 5usize], + pub Nl: u32, + pub Nh: u32, + pub data: [u8; 64usize], + pub num: ::core::ffi::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RIPEMD160state_st"][::core::mem::size_of::() - 96usize]; + ["Alignment of RIPEMD160state_st"][::core::mem::align_of::() - 4usize]; + ["Offset of field: RIPEMD160state_st::h"] + [::core::mem::offset_of!(RIPEMD160state_st, h) - 0usize]; + ["Offset of field: RIPEMD160state_st::Nl"] + [::core::mem::offset_of!(RIPEMD160state_st, Nl) - 20usize]; + ["Offset of field: RIPEMD160state_st::Nh"] + [::core::mem::offset_of!(RIPEMD160state_st, Nh) - 24usize]; + ["Offset of field: RIPEMD160state_st::data"] + [::core::mem::offset_of!(RIPEMD160state_st, data) - 28usize]; + ["Offset of field: RIPEMD160state_st::num"] + [::core::mem::offset_of!(RIPEMD160state_st, num) - 92usize]; +}; +unsafe extern "C" { + pub fn RIPEMD160_Init(ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Update( + ctx: *mut RIPEMD160_CTX, + data: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160_Final(out: *mut u8, ctx: *mut RIPEMD160_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn RIPEMD160(data: *const u8, len: usize, out: *mut u8) -> *mut u8; +} +unsafe extern "C" { + pub fn RIPEMD160_Transform(ctx: *mut RIPEMD160_CTX, block: *const u8); +} +unsafe extern "C" { + pub fn SIPHASH_24(key: *const u64, input: *const u8, input_len: usize) -> u64; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_generate_key(out_public_key: *mut u8, out_private_key: *mut u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_public_from_private(out_public_key: *mut u8, private_key: *const u8); +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_sign( + out_signature: *mut u8, + private_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHAKE_256F_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + msg: *const u8, + msg_len: usize, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_sign( + out_signature: *mut u8, + private_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SLHDSA_SHA2_128S_prehash_warning_nonstandard_verify( + signature: *const u8, + signature_len: usize, + public_key: *const u8, + hashed_msg: *const u8, + hashed_msg_len: usize, + hash_nid: ::core::ffi::c_int, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_with_buffers_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_up_ref(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; +} +unsafe extern "C" { + pub fn SSL_free(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_set_connect_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_set_accept_state(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_is_server(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_quic(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_rbio(ssl: *mut SSL, rbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_set0_wbio(ssl: *mut SSL, wbio: *mut BIO); +} +unsafe extern "C" { + pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; +} +unsafe extern "C" { + pub fn SSL_get_fd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_rfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_wfd(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_fd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_rfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_wfd(ssl: *mut SSL, fd: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_do_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_connect(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_accept(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_read( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peek( + ssl: *mut SSL, + buf: *mut ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_has_pending(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_write( + ssl: *mut SSL, + buf: *const ::core::ffi::c_void, + num: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_key_update(ssl: *mut SSL, request_type: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_shutdown(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quiet_shutdown(ctx: *mut SSL_CTX, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_quiet_shutdown(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quiet_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_quiet_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_error(ssl: *const SSL, ret_code: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_error_description(err: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_mtu(ssl: *mut SSL, mtu: ::core::ffi::c_uint) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_set_initial_timeout_duration(ssl: *mut SSL, duration_ms: u32); +} +unsafe extern "C" { + pub fn DTLSv1_get_timeout(ssl: *const SSL, out: *mut timeval) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn DTLSv1_handle_timeout(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_min_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_proto_version(ctx: *const SSL_CTX) -> u16; +} +unsafe extern "C" { + pub fn SSL_set_min_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_proto_version(ssl: *mut SSL, version: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_min_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_max_proto_version(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_version(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_options(ssl: *mut SSL, options: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_options(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_mode(ctx: *mut SSL_CTX, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_get_mode(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_set_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_clear_mode(ssl: *mut SSL, mode: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_mode(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_x509() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_up_ref(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_dup_ref(cred: *const SSL_CREDENTIAL) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_free(cred: *mut SSL_CREDENTIAL); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_is_complete(cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_private_key( + cred: *mut SSL_CREDENTIAL, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signing_algorithm_prefs( + cred: *mut SSL_CREDENTIAL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_cert_chain( + cred: *mut SSL_CREDENTIAL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_ocsp_response( + cred: *mut SSL_CREDENTIAL, + ocsp: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_certificate_properties( + cred: *mut SSL_CREDENTIAL, + cert_property_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_signed_cert_timestamp_list( + cred: *mut SSL_CREDENTIAL, + sct_list: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_must_match_issuer( + cred: *mut SSL_CREDENTIAL, + match_: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_add1_credential( + ctx: *mut SSL_CTX, + cred: *const SSL_CREDENTIAL, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_credential(ssl: *mut SSL, cred: *const SSL_CREDENTIAL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_certs_clear(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get0_selected_credential(ssl: *const SSL) -> *const SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey(ssl: *mut SSL, pkey: *mut EVP_PKEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_chain(ctx: *mut SSL_CTX, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_chain(ssl: *mut SSL, chain: *mut stack_st_X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add0_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add1_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add0_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add1_chain_cert(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_clear_extra_chain_certs(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_clear_chain_certs(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_set_cert_cb( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_certificate_types(ssl: *const SSL, out_types: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_verify_algorithms(ssl: *const SSL, out_sigalgs: *mut *const u16) -> usize; +} +unsafe extern "C" { + pub fn SSL_get0_peer_delegation_algorithms( + ssl: *const SSL, + out_sigalgs: *mut *const u16, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_extra_chain_certs( + ctx: *const SSL_CTX, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_chain_certs( + ssl: *const SSL, + out_chain: *mut *mut stack_st_X509, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signed_cert_timestamp_list( + ctx: *mut SSL_CTX, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signed_cert_timestamp_list( + ctx: *mut SSL, + list: *const u8, + list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ocsp_response( + ctx: *mut SSL_CTX, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ocsp_response( + ssl: *mut SSL, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_name( + sigalg: u16, + include_curve: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_signature_algorithm_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_key_type(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_digest(sigalg: u16) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_is_signature_algorithm_rsa_pss(sigalg: u16) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_signing_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_signing_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_chain_and_key( + ctx: *mut SSL_CTX, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_chain_and_key( + ssl: *mut SSL, + certs: *const *mut CRYPTO_BUFFER, + num_certs: usize, + privkey: *mut EVP_PKEY, + privkey_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_chain(ctx: *const SSL_CTX) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_chain(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey(ctx: *mut SSL_CTX, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey(ssl: *mut SSL, rsa: *mut RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_ASN1( + ctx: *mut SSL_CTX, + der_len: usize, + der: *const u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_ASN1( + pk: ::core::ffi::c_int, + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_ASN1( + type_: ::core::ffi::c_int, + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_ASN1( + ctx: *mut SSL_CTX, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_ASN1( + ssl: *mut SSL, + der: *const u8, + der_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_RSAPrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_RSAPrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_certificate_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_PrivateKey_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_PrivateKey_file( + ssl: *mut SSL, + file: *const ::core::ffi::c_char, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_use_certificate_chain_file( + ctx: *mut SSL_CTX, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb(ctx: *mut SSL_CTX, cb: pem_password_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb(ctx: *const SSL_CTX) -> pem_password_cb; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_passwd_cb_userdata( + ctx: *mut SSL_CTX, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SSL_CTX) -> *mut ::core::ffi::c_void; +} +pub const ssl_private_key_result_t_ssl_private_key_success: ssl_private_key_result_t = 0; +pub const ssl_private_key_result_t_ssl_private_key_retry: ssl_private_key_result_t = 1; +pub const ssl_private_key_result_t_ssl_private_key_failure: ssl_private_key_result_t = 2; +pub type ssl_private_key_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_private_key_method_st { + pub sign: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + signature_algorithm: u16, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub decrypt: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_private_key_result_t, + >, + pub complete: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ssl_private_key_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_private_key_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_private_key_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_private_key_method_st::sign"] + [::core::mem::offset_of!(ssl_private_key_method_st, sign) - 0usize]; + ["Offset of field: ssl_private_key_method_st::decrypt"] + [::core::mem::offset_of!(ssl_private_key_method_st, decrypt) - 8usize]; + ["Offset of field: ssl_private_key_method_st::complete"] + [::core::mem::offset_of!(ssl_private_key_method_st, complete) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_set_private_key_method(ssl: *mut SSL, key_method: *const SSL_PRIVATE_KEY_METHOD); +} +unsafe extern "C" { + pub fn SSL_CTX_set_private_key_method( + ctx: *mut SSL_CTX, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_private_key_method( + cred: *mut SSL_CREDENTIAL, + key_method: *const SSL_PRIVATE_KEY_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_can_release_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_CIPHER { + _unused: [u8; 0], +} +pub type sk_SSL_CIPHER_free_func = + ::core::option::Option; +pub type sk_SSL_CIPHER_copy_func = + ::core::option::Option *const SSL_CIPHER>; +pub type sk_SSL_CIPHER_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_CIPHER, + arg2: *const *const SSL_CIPHER, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_CIPHER_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SSL_CIPHER, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_free_func__extern"] + pub fn sk_SSL_CIPHER_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_copy_func__extern"] + pub fn sk_SSL_CIPHER_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_cmp_func__extern"] + pub fn sk_SSL_CIPHER_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_call_delete_if_func__extern"] + pub fn sk_SSL_CIPHER_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new__extern"] + pub fn sk_SSL_CIPHER_new(comp: sk_SSL_CIPHER_cmp_func) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_new_null__extern"] + pub fn sk_SSL_CIPHER_new_null() -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_num__extern"] + pub fn sk_SSL_CIPHER_num(sk: *const stack_st_SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_zero__extern"] + pub fn sk_SSL_CIPHER_zero(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_value__extern"] + pub fn sk_SSL_CIPHER_value(sk: *const stack_st_SSL_CIPHER, i: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set__extern"] + pub fn sk_SSL_CIPHER_set( + sk: *mut stack_st_SSL_CIPHER, + i: usize, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_free__extern"] + pub fn sk_SSL_CIPHER_free(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop_free__extern"] + pub fn sk_SSL_CIPHER_pop_free(sk: *mut stack_st_SSL_CIPHER, free_func: sk_SSL_CIPHER_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_insert__extern"] + pub fn sk_SSL_CIPHER_insert( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete__extern"] + pub fn sk_SSL_CIPHER_delete(sk: *mut stack_st_SSL_CIPHER, where_: usize) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_ptr__extern"] + pub fn sk_SSL_CIPHER_delete_ptr( + sk: *mut stack_st_SSL_CIPHER, + p: *const SSL_CIPHER, + ) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_delete_if__extern"] + pub fn sk_SSL_CIPHER_delete_if( + sk: *mut stack_st_SSL_CIPHER, + func: sk_SSL_CIPHER_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_find__extern"] + pub fn sk_SSL_CIPHER_find( + sk: *const stack_st_SSL_CIPHER, + out_index: *mut usize, + p: *const SSL_CIPHER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_shift__extern"] + pub fn sk_SSL_CIPHER_shift(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_push__extern"] + pub fn sk_SSL_CIPHER_push(sk: *mut stack_st_SSL_CIPHER, p: *const SSL_CIPHER) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_pop__extern"] + pub fn sk_SSL_CIPHER_pop(sk: *mut stack_st_SSL_CIPHER) -> *const SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_dup__extern"] + pub fn sk_SSL_CIPHER_dup(sk: *const stack_st_SSL_CIPHER) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort__extern"] + pub fn sk_SSL_CIPHER_sort(sk: *mut stack_st_SSL_CIPHER); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_sort_and_dedup__extern"] + pub fn sk_SSL_CIPHER_sort_and_dedup( + sk: *mut stack_st_SSL_CIPHER, + free_func: sk_SSL_CIPHER_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_is_sorted__extern"] + pub fn sk_SSL_CIPHER_is_sorted(sk: *const stack_st_SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_set_cmp_func__extern"] + pub fn sk_SSL_CIPHER_set_cmp_func( + sk: *mut stack_st_SSL_CIPHER, + comp: sk_SSL_CIPHER_cmp_func, + ) -> sk_SSL_CIPHER_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_CIPHER_deep_copy__extern"] + pub fn sk_SSL_CIPHER_deep_copy( + sk: *const stack_st_SSL_CIPHER, + copy_func: sk_SSL_CIPHER_copy_func, + free_func: sk_SSL_CIPHER_free_func, + ) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_get_cipher_by_value(value: u16) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_protocol_id(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_aead(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_is_block_cipher(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_cipher_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_digest_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_handshake_digest(cipher: *const SSL_CIPHER) -> *const EVP_MD; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_prf_nid(cipher: *const SSL_CIPHER) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_min_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_max_version(cipher: *const SSL_CIPHER) -> u16; +} +unsafe extern "C" { + pub fn SSL_CIPHER_standard_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_kx_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_bits( + cipher: *const SSL_CIPHER, + out_alg_bits: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_all_cipher_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_all_standard_cipher_names( + out: *mut *const ::core::ffi::c_char, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_strict_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cipher_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_strict_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_cipher_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ciphers(ctx: *const SSL_CTX) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_CTX_cipher_in_group(ctx: *const SSL_CTX, i: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ciphers(ssl: *const SSL) -> *mut stack_st_SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_is_init_finished(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_init(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_in_false_start(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get_peer_full_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; +} +unsafe extern "C" { + pub fn SSL_get0_peer_certificates(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_get0_signed_cert_timestamp_list( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ocsp_response(ssl: *const SSL, out: *mut *const u8, out_len: *mut usize); +} +unsafe extern "C" { + pub fn SSL_get_tls_unique( + ssl: *const SSL, + out: *mut u8, + out_len: *mut usize, + max_out: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_extms_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_session_reused(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_secure_renegotiation_support(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_export_keying_material( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + label: *const ::core::ffi::c_char, + label_len: usize, + context: *const u8, + context_len: usize, + use_context: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_new(ctx: *const SSL_CTX) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_SESSION_up_ref(session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_free(session: *mut SSL_SESSION); +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_to_bytes_for_ticket( + in_: *const SSL_SESSION, + out_data: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_from_bytes( + in_: *const u8, + in_len: usize, + ctx: *const SSL_CTX, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_bio_SSL_SESSION( + bio: *mut BIO, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_read_SSL_SESSION( + fp: *mut FILE, + out: *mut *mut SSL_SESSION, + cb: pem_password_cb, + userdata: *mut ::core::ffi::c_void, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn PEM_write_bio_SSL_SESSION(bio: *mut BIO, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn PEM_write_SSL_SESSION(fp: *mut FILE, in_: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_version(session: *const SSL_SESSION) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_protocol_version( + session: *mut SSL_SESSION, + version: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_id( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id( + session: *mut SSL_SESSION, + sid: *const u8, + sid_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_time(session: *const SSL_SESSION) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_timeout(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer(session: *const SSL_SESSION) -> *mut X509; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_certificates( + session: *const SSL_SESSION, + ) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_rpk(session: *const SSL_SESSION) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_signed_cert_timestamp_list( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ocsp_response( + session: *const SSL_SESSION, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_get_master_key( + session: *const SSL_SESSION, + out: *mut u8, + max_out: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_time(session: *mut SSL_SESSION, time: u64) -> u64; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_timeout(session: *mut SSL_SESSION, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_id_context( + session: *const SSL_SESSION, + out_len: *mut ::core::ffi::c_uint, + ) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_SESSION_set1_id_context( + session: *mut SSL_SESSION, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_should_be_single_use(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_ticket(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_ticket( + session: *const SSL_SESSION, + out_ticket: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ticket( + session: *mut SSL_SESSION, + ticket: *const u8, + ticket_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ticket_lifetime_hint(session: *const SSL_SESSION) -> u32; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_cipher(session: *const SSL_SESSION) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_SESSION_has_peer_sha256(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get0_peer_sha256( + session: *const SSL_SESSION, + out_ptr: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_SESSION_is_resumable_across_names(session: *const SSL_SESSION) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_cache_mode( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_session_cache_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_timeout(ctx: *mut SSL_CTX, timeout: u32) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_psk_dhe_timeout(ctx: *mut SSL_CTX, timeout: u32); +} +unsafe extern "C" { + pub fn SSL_CTX_get_timeout(ctx: *const SSL_CTX) -> u32; +} +unsafe extern "C" { + pub fn SSL_CTX_set_session_id_context( + ctx: *mut SSL_CTX, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_session_id_context( + ssl: *mut SSL, + sid_ctx: *const u8, + sid_ctx_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_session_id_context(ssl: *const SSL, out_len: *mut usize) -> *const u8; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_set_cache_size( + ctx: *mut SSL_CTX, + size: ::core::ffi::c_ulong, + ) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_cache_size(ctx: *const SSL_CTX) -> ::core::ffi::c_ulong; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_number(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_add_session(ctx: *mut SSL_CTX, session: *mut SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_remove_session( + ctx: *mut SSL_CTX, + session: *mut SSL_SESSION, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_flush_sessions(ctx: *mut SSL_CTX, time: u64); +} +pub type SSL_new_session_cb = ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, session: *mut SSL_SESSION) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_new_cb(ctx: *mut SSL_CTX, new_session_cb: SSL_new_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_new_cb(ctx: *mut SSL_CTX) -> SSL_new_session_cb; +} +pub type SSL_remove_session_cb = + ::core::option::Option; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_remove_cb(ctx: *mut SSL_CTX, remove_session_cb: SSL_remove_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_remove_cb(ctx: *mut SSL_CTX) -> SSL_remove_session_cb; +} +pub type SSL_get_session_cb = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + id: *const u8, + id_len: ::core::ffi::c_int, + out_copy: *mut ::core::ffi::c_int, + ) -> *mut SSL_SESSION, +>; +unsafe extern "C" { + pub fn SSL_CTX_sess_set_get_cb(ctx: *mut SSL_CTX, get_session_cb: SSL_get_session_cb); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_get_get_cb(ctx: *mut SSL_CTX) -> SSL_get_session_cb; +} +unsafe extern "C" { + pub fn SSL_magic_pending_session_ptr() -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_resumption_across_names_enabled( + ctx: *mut SSL_CTX, + enabled: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_set_resumption_across_names_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + out: *mut ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_keys( + ctx: *mut SSL_CTX, + in_: *const ::core::ffi::c_void, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_ticket_key_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + key_name: *mut u8, + iv: *mut u8, + ctx: *mut EVP_CIPHER_CTX, + hmac_ctx: *mut HMAC_CTX, + encrypt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_success: ssl_ticket_aead_result_t = 0; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_retry: ssl_ticket_aead_result_t = 1; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_ignore_ticket: ssl_ticket_aead_result_t = 2; +pub const ssl_ticket_aead_result_t_ssl_ticket_aead_error: ssl_ticket_aead_result_t = 3; +pub type ssl_ticket_aead_result_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_ticket_aead_method_st { + pub max_overhead: ::core::option::Option usize>, + pub seal: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, + >, + pub open: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut u8, + out_len: *mut usize, + max_out_len: usize, + in_: *const u8, + in_len: usize, + ) -> ssl_ticket_aead_result_t, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_ticket_aead_method_st"] + [::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_ticket_aead_method_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::max_overhead"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, max_overhead) - 0usize]; + ["Offset of field: ssl_ticket_aead_method_st::seal"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, seal) - 8usize]; + ["Offset of field: ssl_ticket_aead_method_st::open"] + [::core::mem::offset_of!(ssl_ticket_aead_method_st, open) - 16usize]; +}; +unsafe extern "C" { + pub fn SSL_CTX_set_ticket_aead_method( + ctx: *mut SSL_CTX, + aead_method: *const SSL_TICKET_AEAD_METHOD, + ); +} +unsafe extern "C" { + pub fn SSL_process_tls13_new_session_ticket( + ssl: *mut SSL, + buf: *const u8, + buf_len: usize, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_CTX_set_num_tickets(ctx: *mut SSL_CTX, num_tickets: usize) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids( + ctx: *mut SSL_CTX, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_group_ids_with_flags( + ctx: *mut SSL_CTX, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_group_ids_with_flags( + ssl: *mut SSL, + group_ids: *const u16, + flags: *const u32, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_group_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_group_name(group_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_group_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups( + ssl: *mut SSL, + groups: *const ::core::ffi::c_int, + num_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_groups_list( + ctx: *mut SSL_CTX, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_groups_list( + ssl: *mut SSL, + groups: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_negotiated_group(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_client_key_shares( + ssl: *mut SSL, + group_ids: *const u16, + num_group_ids: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_server_supported_groups_hint( + ssl: *mut SSL, + server_groups: *const u16, + num_server_groups: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn( + ok: ::core::ffi::c_int, + store_ctx: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >, + ); +} +pub const ssl_verify_result_t_ssl_verify_ok: ssl_verify_result_t = 0; +pub const ssl_verify_result_t_ssl_verify_invalid: ssl_verify_result_t = 1; +pub const ssl_verify_result_t_ssl_verify_retry: ssl_verify_result_t = 2; +pub type ssl_verify_result_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_custom_verify( + ctx: *mut SSL_CTX, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_custom_verify( + ssl: *mut SSL, + mode: ::core::ffi::c_int, + callback: ::core::option::Option< + unsafe extern "C" fn(ssl: *mut SSL, out_alert: *mut u8) -> ssl_verify_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_mode(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_mode(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ctx: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_get_verify_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn( + ssl: ::core::ffi::c_int, + arg1: *mut X509_STORE_CTX, + ) -> ::core::ffi::c_int, + >; +} +unsafe extern "C" { + pub fn SSL_set1_host(ssl: *mut SSL, hostname: *const ::core::ffi::c_char) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_hostflags(ssl: *mut SSL, flags: ::core::ffi::c_uint); +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_verify_depth(ssl: *mut SSL, depth: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_get_verify_depth(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_depth(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_param( + ctx: *mut SSL_CTX, + param: *const X509_VERIFY_PARAM, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_param(ssl: *mut SSL, param: *const X509_VERIFY_PARAM) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get0_param(ctx: *mut SSL_CTX) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; +} +unsafe extern "C" { + pub fn SSL_CTX_set_purpose( + ctx: *mut SSL_CTX, + purpose: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_purpose(ssl: *mut SSL, purpose: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_trust(ctx: *mut SSL_CTX, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_trust(ssl: *mut SSL, trust: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_store(ctx: *mut SSL_CTX, store: *mut X509_STORE); +} +unsafe extern "C" { + pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_load_verify_locations( + ctx: *mut SSL_CTX, + ca_file: *const ::core::ffi::c_char, + ca_dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_verify_result(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_alert_from_verify_result(result: ::core::ffi::c_long) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_cert_verify_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + store_ctx: *mut X509_STORE_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_enable_signed_cert_timestamps(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_signed_cert_timestamps(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_enable_ocsp_stapling(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_CTX_enable_ocsp_stapling(ctx: *mut SSL_CTX); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_verify_cert_store( + ctx: *mut SSL_CTX, + store: *mut X509_STORE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_verify_algorithm_prefs( + ctx: *mut SSL_CTX, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_verify_algorithm_prefs( + ssl: *mut SSL, + prefs: *const u16, + num_prefs: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_client_CA_list(ssl: *mut SSL, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, name_list: *mut stack_st_X509_NAME); +} +unsafe extern "C" { + pub fn SSL_set0_client_CAs(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_set0_CA_names(ssl: *mut SSL, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_CTX_set0_client_CAs(ctx: *mut SSL_CTX, name_list: *mut stack_st_CRYPTO_BUFFER); +} +unsafe extern "C" { + pub fn SSL_get_client_CA_list(ssl: *const SSL) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_get0_server_requested_CAs(ssl: *const SSL) -> *const stack_st_CRYPTO_BUFFER; +} +unsafe extern "C" { + pub fn SSL_CTX_get_client_CA_list(ctx: *const SSL_CTX) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_client_CA(ssl: *mut SSL, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_add_client_CA(ctx: *mut SSL_CTX, x509: *mut X509) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_load_client_CA_file(file: *const ::core::ffi::c_char) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_dup_CA_list(list: *mut stack_st_X509_NAME) -> *mut stack_st_X509_NAME; +} +unsafe extern "C" { + pub fn SSL_add_file_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + file: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_bio_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + bio: *mut BIO, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_trust_anchor_id( + cred: *mut SSL_CREDENTIAL, + id: *const u8, + id_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_requested_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_requested_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_peer_matched_trust_anchor(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_available_trust_anchors( + ssl: *const SSL, + out: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_trust_anchors( + ctx: *mut SSL_CTX, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_trust_anchors( + ssl: *mut SSL, + ids: *const u8, + ids_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_host_name( + ssl: *mut SSL, + name: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_servername( + ssl: *const SSL, + type_: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_servername_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_callback( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_alert: *mut ::core::ffi::c_int, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_servername_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_protos( + ctx: *mut SSL_CTX, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alpn_protos( + ssl: *mut SSL, + protos: *const u8, + protos_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_alpn_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_alpn_selected( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_allow_unknown_alpn_protos(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_add_application_settings( + ssl: *mut SSL, + proto: *const u8, + proto_len: usize, + settings: *const u8, + settings_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_application_settings( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_has_application_settings(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_alps_use_new_codepoint(ssl: *mut SSL, use_new: ::core::ffi::c_int); +} +pub type ssl_cert_compression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut CBB, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +pub type ssl_cert_decompression_func_t = ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut CRYPTO_BUFFER, + uncompressed_len: usize, + in_: *const u8, + in_len: usize, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + pub fn SSL_CTX_add_cert_compression_alg( + ctx: *mut SSL_CTX, + alg_id: u16, + compress: ssl_cert_compression_func_t, + decompress: ssl_cert_decompression_func_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_protos_advertised_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_next_proto_select_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out: *mut *mut u8, + out_len: *mut u8, + in_: *const u8, + in_len: ::core::ffi::c_uint, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + arg: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + pub fn SSL_get0_next_proto_negotiated( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut ::core::ffi::c_uint, + ); +} +unsafe extern "C" { + pub fn SSL_select_next_proto( + out: *mut *mut u8, + out_len: *mut u8, + peer: *const u8, + peer_len: ::core::ffi::c_uint, + supported: *const u8, + supported_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tls_channel_id_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_tls_channel_id_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_tls_channel_id( + ctx: *mut SSL_CTX, + private_key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_tls_channel_id(ssl: *mut SSL, private_key: *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tls_channel_id(ssl: *mut SSL, out: *mut u8, max_out: usize) -> usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct srtp_protection_profile_st { + pub name: *const ::core::ffi::c_char, + pub id: ::core::ffi::c_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of srtp_protection_profile_st"] + [::core::mem::size_of::() - 16usize]; + ["Alignment of srtp_protection_profile_st"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: srtp_protection_profile_st::name"] + [::core::mem::offset_of!(srtp_protection_profile_st, name) - 0usize]; + ["Offset of field: srtp_protection_profile_st::id"] + [::core::mem::offset_of!(srtp_protection_profile_st, id) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SRTP_PROTECTION_PROFILE { + _unused: [u8; 0], +} +pub type sk_SRTP_PROTECTION_PROFILE_free_func = + ::core::option::Option; +pub type sk_SRTP_PROTECTION_PROFILE_copy_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *const SRTP_PROTECTION_PROFILE) -> *const SRTP_PROTECTION_PROFILE, +>; +pub type sk_SRTP_PROTECTION_PROFILE_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SRTP_PROTECTION_PROFILE, + arg2: *const *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int, +>; +pub type sk_SRTP_PROTECTION_PROFILE_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const SRTP_PROTECTION_PROFILE, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_free_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_copy_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_call_delete_if_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new( + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_new_null__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_new_null() -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_num__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_num(sk: *const stack_st_SRTP_PROTECTION_PROFILE) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_zero__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_zero(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_value__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_value( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + i: usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_free(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop_free__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop_free( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_insert__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_insert( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + where_: usize, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_ptr__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_ptr( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_delete_if__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_delete_if( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + func: sk_SRTP_PROTECTION_PROFILE_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_find__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_find( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + out_index: *mut usize, + p: *const SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_shift__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_shift( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_push__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_push( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + p: *const SRTP_PROTECTION_PROFILE, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_pop__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_pop( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + ) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_dup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_dup( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort(sk: *mut stack_st_SRTP_PROTECTION_PROFILE); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_sort_and_dedup__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_sort_and_dedup( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_is_sorted__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_is_sorted( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_set_cmp_func__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_set_cmp_func( + sk: *mut stack_st_SRTP_PROTECTION_PROFILE, + comp: sk_SRTP_PROTECTION_PROFILE_cmp_func, + ) -> sk_SRTP_PROTECTION_PROFILE_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SRTP_PROTECTION_PROFILE_deep_copy__extern"] + pub fn sk_SRTP_PROTECTION_PROFILE_deep_copy( + sk: *const stack_st_SRTP_PROTECTION_PROFILE, + copy_func: sk_SRTP_PROTECTION_PROFILE_copy_func, + free_func: sk_SRTP_PROTECTION_PROFILE_free_func, + ) -> *mut stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CTX_set_srtp_profiles( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_srtp_profiles( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_srtp_profiles(ssl: *const SSL) -> *const stack_st_SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *const SRTP_PROTECTION_PROFILE; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_pre_shared_key( + key: *const u8, + key_len: usize, + id: *const u8, + id_len: usize, + md: *const EVP_MD, + context: *const u8, + context_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_client_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_client_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + hint: *const ::core::ffi::c_char, + identity: *mut ::core::ffi::c_char, + max_identity_len: ::core::ffi::c_uint, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_psk_server_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_psk_server_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + identity: *const ::core::ffi::c_char, + psk: *mut u8, + max_psk_len: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_use_psk_identity_hint( + ctx: *mut SSL_CTX, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_use_psk_identity_hint( + ssl: *mut SSL, + identity_hint: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity_hint(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_psk_identity(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_delegated() -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set1_delegated_credential( + cred: *mut SSL_CREDENTIAL, + dc: *mut CRYPTO_BUFFER, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key(pkey: *mut EVP_PKEY) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_raw_public_key_custom( + pubkey: *mut EVP_PKEY, + method: *const SSL_PRIVATE_KEY_METHOD, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_accepted_peer_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_accepted_peer_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_available_client_cert_types( + ctx: *mut SSL_CTX, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_available_client_cert_types( + ssl: *mut SSL, + values: *const u8, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_cert_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_peer_rpk(ssl: *const SSL) -> *mut EVP_PKEY; +} +unsafe extern "C" { + pub fn SSL_spake2plusv1_register( + out_w0: *mut u8, + out_w1: *mut u8, + out_registration_record: *mut u8, + password: *const u8, + password_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_client( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + error_limit: u32, + w0: *const u8, + w0_len: usize, + w1: *const u8, + w1_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_new_spake2plusv1_server( + context: *const u8, + context_len: usize, + client_identity: *const u8, + client_identity_len: usize, + server_identity: *const u8, + server_identity_len: usize, + rate_limit: u32, + w0: *const u8, + w0_len: usize, + registration_record: *const u8, + registration_record_len: usize, + ) -> *mut SSL_CREDENTIAL; +} +pub const ssl_encryption_level_t_ssl_encryption_initial: ssl_encryption_level_t = 0; +pub const ssl_encryption_level_t_ssl_encryption_early_data: ssl_encryption_level_t = 1; +pub const ssl_encryption_level_t_ssl_encryption_handshake: ssl_encryption_level_t = 2; +pub const ssl_encryption_level_t_ssl_encryption_application: ssl_encryption_level_t = 3; +pub type ssl_encryption_level_t = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_quic_method_st { + pub set_read_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub set_write_secret: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + cipher: *const SSL_CIPHER, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int, + >, + pub add_handshake_data: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int, + >, + pub flush_flight: + ::core::option::Option ::core::ffi::c_int>, + pub send_alert: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + level: ssl_encryption_level_t, + alert: u8, + ) -> ::core::ffi::c_int, + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_quic_method_st"][::core::mem::size_of::() - 40usize]; + ["Alignment of ssl_quic_method_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_quic_method_st::set_read_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_read_secret) - 0usize]; + ["Offset of field: ssl_quic_method_st::set_write_secret"] + [::core::mem::offset_of!(ssl_quic_method_st, set_write_secret) - 8usize]; + ["Offset of field: ssl_quic_method_st::add_handshake_data"] + [::core::mem::offset_of!(ssl_quic_method_st, add_handshake_data) - 16usize]; + ["Offset of field: ssl_quic_method_st::flush_flight"] + [::core::mem::offset_of!(ssl_quic_method_st, flush_flight) - 24usize]; + ["Offset of field: ssl_quic_method_st::send_alert"] + [::core::mem::offset_of!(ssl_quic_method_st, send_alert) - 32usize]; +}; +unsafe extern "C" { + pub fn SSL_quic_max_handshake_flight_len( + ssl: *const SSL, + level: ssl_encryption_level_t, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_quic_read_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_quic_write_level(ssl: *const SSL) -> ssl_encryption_level_t; +} +unsafe extern "C" { + pub fn SSL_provide_quic_data( + ssl: *mut SSL, + level: ssl_encryption_level_t, + data: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_process_quic_post_handshake(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_quic_method( + ctx: *mut SSL_CTX, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_method( + ssl: *mut SSL, + quic_method: *const SSL_QUIC_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_quic_transport_params( + ssl: *mut SSL, + params: *const u8, + params_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_quic_transport_params( + ssl: *const SSL, + out_params: *mut *const u8, + out_params_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_set_quic_use_legacy_codepoint(ssl: *mut SSL, use_legacy: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_quic_early_data_context( + ssl: *mut SSL, + context: *const u8, + context_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_early_data_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_early_data_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_in_early_data(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_early_data_capable(session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_copy_without_early_data(session: *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_early_data_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_reset_early_data_reject(ssl: *mut SSL); +} +unsafe extern "C" { + pub fn SSL_get_ticket_age_skew(ssl: *const SSL) -> i32; +} +pub const ssl_early_data_reason_t_ssl_early_data_unknown: ssl_early_data_reason_t = 0; +pub const ssl_early_data_reason_t_ssl_early_data_disabled: ssl_early_data_reason_t = 1; +pub const ssl_early_data_reason_t_ssl_early_data_accepted: ssl_early_data_reason_t = 2; +pub const ssl_early_data_reason_t_ssl_early_data_protocol_version: ssl_early_data_reason_t = 3; +pub const ssl_early_data_reason_t_ssl_early_data_peer_declined: ssl_early_data_reason_t = 4; +pub const ssl_early_data_reason_t_ssl_early_data_no_session_offered: ssl_early_data_reason_t = 5; +pub const ssl_early_data_reason_t_ssl_early_data_session_not_resumed: ssl_early_data_reason_t = 6; +pub const ssl_early_data_reason_t_ssl_early_data_unsupported_for_session: ssl_early_data_reason_t = + 7; +pub const ssl_early_data_reason_t_ssl_early_data_hello_retry_request: ssl_early_data_reason_t = 8; +pub const ssl_early_data_reason_t_ssl_early_data_alpn_mismatch: ssl_early_data_reason_t = 9; +pub const ssl_early_data_reason_t_ssl_early_data_channel_id: ssl_early_data_reason_t = 10; +pub const ssl_early_data_reason_t_ssl_early_data_ticket_age_skew: ssl_early_data_reason_t = 12; +pub const ssl_early_data_reason_t_ssl_early_data_quic_parameter_mismatch: ssl_early_data_reason_t = + 13; +pub const ssl_early_data_reason_t_ssl_early_data_alps_mismatch: ssl_early_data_reason_t = 14; +pub const ssl_early_data_reason_t_ssl_early_data_reason_max_value: ssl_early_data_reason_t = 14; +pub type ssl_early_data_reason_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_get_early_data_reason(ssl: *const SSL) -> ssl_early_data_reason_t; +} +unsafe extern "C" { + pub fn SSL_early_data_reason_string( + reason: ssl_early_data_reason_t, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_set_enable_ech_grease(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set1_ech_config_list( + ssl: *mut SSL, + ech_config_list: *const u8, + ech_config_list_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get0_ech_name_override( + ssl: *const SSL, + out_name: *mut *const ::core::ffi::c_char, + out_name_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_get0_ech_retry_configs( + ssl: *const SSL, + out_retry_configs: *mut *const u8, + out_retry_configs_len: *mut usize, + ); +} +unsafe extern "C" { + pub fn SSL_marshal_ech_config( + out: *mut *mut u8, + out_len: *mut usize, + config_id: u8, + key: *const EVP_HPKE_KEY, + public_name: *const ::core::ffi::c_char, + max_name_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_new() -> *mut SSL_ECH_KEYS; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_up_ref(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_free(keys: *mut SSL_ECH_KEYS); +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_add( + keys: *mut SSL_ECH_KEYS, + is_retry_config: ::core::ffi::c_int, + ech_config: *const u8, + ech_config_len: usize, + key: *const EVP_HPKE_KEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_has_duplicate_config_id(keys: *const SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ECH_KEYS_marshal_retry_configs( + keys: *const SSL_ECH_KEYS, + out: *mut *mut u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_ech_keys(ctx: *mut SSL_CTX, keys: *mut SSL_ECH_KEYS) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_ech_accepted(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_alert_type_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string_long(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_send_fatal_alert(ssl: *mut SSL, alert: u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_ex_data( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ex_data(ssl: *const SSL, idx: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_set_ex_data( + session: *mut SSL_SESSION, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_data( + session: *const SSL_SESSION, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_SESSION_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_ex_data( + ctx: *mut SSL_CTX, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_data( + ctx: *const SSL_CTX, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CTX_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_set_ex_data( + cred: *mut SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_data( + cred: *const SSL_CREDENTIAL, + idx: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + pub fn SSL_CREDENTIAL_get_ex_new_index( + argl: ::core::ffi::c_long, + argp: *mut ::core::ffi::c_void, + unused: *mut CRYPTO_EX_unused, + dup_unused: CRYPTO_EX_dup, + free_func: CRYPTO_EX_free, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_ivs( + ssl: *const SSL, + out_read_iv: *mut *const u8, + out_write_iv: *mut *const u8, + out_iv_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_key_block_len(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_generate_key_block( + ssl: *const SSL, + out: *mut u8, + out_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_write_sequence(ssl: *const SSL) -> u64; +} +unsafe extern "C" { + pub fn SSL_CTX_set_record_protocol_version( + ctx: *mut SSL_CTX, + version: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_is_dtls_handshake_idle(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_read_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_handshake_write_seq(ssl: *const SSL) -> u32; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_epoch(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_sequence(ssl: *const SSL, epoch: u16) -> u64; +} +unsafe extern "C" { + pub fn SSL_get_dtls_read_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_dtls_write_traffic_secret( + ssl: *const SSL, + out_data: *mut *const u8, + out_len: *mut usize, + epoch: u16, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_capabilities(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_request_handshake_hints( + ssl: *mut SSL, + client_hello: *const u8, + client_hello_len: usize, + capabilities: *const u8, + capabilities_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_serialize_handshake_hints(ssl: *const SSL, out: *mut CBB) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_handshake_hints( + ssl: *mut SSL, + hints: *const u8, + hints_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + is_write: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_msg_callback_arg(ctx: *mut SSL_CTX, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + write_p: ::core::ffi::c_int, + version: ::core::ffi::c_int, + content_type: ::core::ffi::c_int, + buf: *const ::core::ffi::c_void, + len: usize, + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_msg_callback_arg(ssl: *mut SSL, arg: *mut ::core::ffi::c_void); +} +unsafe extern "C" { + pub fn SSL_CTX_set_keylog_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, line: *const ::core::ffi::c_char), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_keylog_callback( + ctx: *const SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: *const ::core::ffi::c_char), + >; +} +unsafe extern "C" { + pub fn SSL_CTX_set_current_time_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option, + ); +} +unsafe extern "C" { + pub fn SSL_set_shed_handshake_config(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +pub const ssl_renegotiate_mode_t_ssl_renegotiate_never: ssl_renegotiate_mode_t = 0; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_once: ssl_renegotiate_mode_t = 1; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_freely: ssl_renegotiate_mode_t = 2; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_ignore: ssl_renegotiate_mode_t = 3; +pub const ssl_renegotiate_mode_t_ssl_renegotiate_explicit: ssl_renegotiate_mode_t = 4; +pub type ssl_renegotiate_mode_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: ssl_renegotiate_mode_t); +} +unsafe extern "C" { + pub fn SSL_renegotiate(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_renegotiate_pending(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_total_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_max_cert_list(ctx: *const SSL_CTX) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_cert_list(ctx: *mut SSL_CTX, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_get_max_cert_list(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_set_max_cert_list(ssl: *mut SSL, max_cert_list: usize); +} +unsafe extern "C" { + pub fn SSL_CTX_set_max_send_fragment( + ctx: *mut SSL_CTX, + max_send_fragment: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_max_send_fragment(ssl: *mut SSL, max_send_fragment: usize) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_early_callback_ctx { + pub ssl: *mut SSL, + pub client_hello: *const u8, + pub client_hello_len: usize, + pub version: u16, + pub random: *const u8, + pub random_len: usize, + pub session_id: *const u8, + pub session_id_len: usize, + pub dtls_cookie: *const u8, + pub dtls_cookie_len: usize, + pub cipher_suites: *const u8, + pub cipher_suites_len: usize, + pub compression_methods: *const u8, + pub compression_methods_len: usize, + pub extensions: *const u8, + pub extensions_len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_early_callback_ctx"][::core::mem::size_of::() - 128usize]; + ["Alignment of ssl_early_callback_ctx"] + [::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_early_callback_ctx::ssl"] + [::core::mem::offset_of!(ssl_early_callback_ctx, ssl) - 0usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello) - 8usize]; + ["Offset of field: ssl_early_callback_ctx::client_hello_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, client_hello_len) - 16usize]; + ["Offset of field: ssl_early_callback_ctx::version"] + [::core::mem::offset_of!(ssl_early_callback_ctx, version) - 24usize]; + ["Offset of field: ssl_early_callback_ctx::random"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random) - 32usize]; + ["Offset of field: ssl_early_callback_ctx::random_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, random_len) - 40usize]; + ["Offset of field: ssl_early_callback_ctx::session_id"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id) - 48usize]; + ["Offset of field: ssl_early_callback_ctx::session_id_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, session_id_len) - 56usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie) - 64usize]; + ["Offset of field: ssl_early_callback_ctx::dtls_cookie_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, dtls_cookie_len) - 72usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites) - 80usize]; + ["Offset of field: ssl_early_callback_ctx::cipher_suites_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, cipher_suites_len) - 88usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods) - 96usize]; + ["Offset of field: ssl_early_callback_ctx::compression_methods_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, compression_methods_len) - 104usize]; + ["Offset of field: ssl_early_callback_ctx::extensions"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions) - 112usize]; + ["Offset of field: ssl_early_callback_ctx::extensions_len"] + [::core::mem::offset_of!(ssl_early_callback_ctx, extensions_len) - 120usize]; +}; +pub const ssl_select_cert_result_t_ssl_select_cert_success: ssl_select_cert_result_t = 1; +pub const ssl_select_cert_result_t_ssl_select_cert_retry: ssl_select_cert_result_t = 0; +pub const ssl_select_cert_result_t_ssl_select_cert_error: ssl_select_cert_result_t = -1; +pub const ssl_select_cert_result_t_ssl_select_cert_disable_ech: ssl_select_cert_result_t = -2; +pub type ssl_select_cert_result_t = ::core::ffi::c_int; +unsafe extern "C" { + pub fn SSL_early_callback_ctx_extension_get( + client_hello: *const SSL_CLIENT_HELLO, + extension_type: u16, + out_data: *mut *const u8, + out_len: *mut usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_select_certificate_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ssl_select_cert_result_t, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_dos_protection_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn(arg1: *const SSL_CLIENT_HELLO) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_reverify_on_resume(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_info_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_get_info_callback( + ctx: *mut SSL_CTX, + ) -> ::core::option::Option< + unsafe extern "C" fn(ctx: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_set_info_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *const SSL, + type_: ::core::ffi::c_int, + value: ::core::ffi::c_int, + ), + >, + ); +} +unsafe extern "C" { + pub fn SSL_get_info_callback( + ssl: *const SSL, + ) -> ::core::option::Option< + unsafe extern "C" fn(ssl: *const SSL, arg1: ::core::ffi::c_int, arg2: ::core::ffi::c_int), + >; +} +unsafe extern "C" { + pub fn SSL_state_string_long(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shutdown(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_peer_signature_algorithm(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_client_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_server_random(ssl: *const SSL, out: *mut u8, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_signature_algorithm_used(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_pending_cipher(ssl: *const SSL) -> *const SSL_CIPHER; +} +unsafe extern "C" { + pub fn SSL_set_retain_only_sha256_of_client_certs(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_retain_only_sha256_of_client_certs( + ctx: *mut SSL_CTX, + enable: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set_grease_enabled(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_permute_extensions(ctx: *mut SSL_CTX, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_set_permute_extensions(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_max_seal_overhead(ssl: *const SSL) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_false_start_allowed_without_alpn( + ctx: *mut SSL_CTX, + allowed: ::core::ffi::c_int, + ); +} +unsafe extern "C" { + pub fn SSL_used_hello_retry_request(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_jdk11_workaround(ssl: *mut SSL, enable: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_parse_client_hello( + ssl: *const SSL, + out: *mut SSL_CLIENT_HELLO, + in_: *const u8, + len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_library_init() -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CIPHER_description( + cipher: *const SSL_CIPHER, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_id(cipher: *const SSL_CIPHER) -> u32; +} +unsafe extern "C" { + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const ::core::ffi::c_char; +} +pub type COMP_METHOD = ::core::ffi::c_void; +pub type SSL_COMP = ssl_comp_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_SSL_COMP { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn SSL_COMP_get_compression_methods() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_COMP_add_compression_method( + id: ::core::ffi::c_int, + cm: *mut COMP_METHOD, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get0_name(comp: *const SSL_COMP) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_COMP_get_id(comp: *const SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_COMP_free_compression_methods(); +} +unsafe extern "C" { + pub fn SSLv23_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSLv23_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn TLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLS_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_server_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn DTLSv1_2_client_method() -> *const SSL_METHOD; +} +unsafe extern "C" { + pub fn SSL_clear(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut RSA, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_connect_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_renegotiate(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_accept_good(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cb_hits(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_misses(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_timeouts(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_sess_cache_full(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_cutthrough_complete(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_num_renegotiations(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_need_tmp_RSA(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_need_tmp_RSA(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_rsa(ctx: *mut SSL_CTX, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_rsa(ssl: *mut SSL, rsa: *const RSA) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_read_ahead(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, yes: ::core::ffi::c_int) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_read_ahead(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_read_ahead(ssl: *mut SSL, yes: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_state(ssl: *mut SSL, state: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_get_shared_ciphers( + ssl: *const SSL, + buf: *mut ::core::ffi::c_char, + len: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_shared_sigalgs( + ssl: *mut SSL, + idx: ::core::ffi::c_int, + psign: *mut ::core::ffi::c_int, + phash: *mut ::core::ffi::c_int, + psignandhash: *mut ::core::ffi::c_int, + rsig: *mut u8, + rhash: *mut u8, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION(in_: *const SSL_SESSION, pp: *mut *mut u8) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION( + out: *mut *mut SSL_SESSION, + inp: *mut *const u8, + len: ::core::ffi::c_long, + ) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn i2d_SSL_SESSION_bio(bio: *mut BIO, session: *const SSL_SESSION) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn d2i_SSL_SESSION_bio(bio: *mut BIO, out: *mut *mut SSL_SESSION) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn ERR_load_SSL_strings(); +} +unsafe extern "C" { + pub fn SSL_load_error_strings(); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_use_srtp( + ctx: *mut SSL_CTX, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_use_srtp( + ssl: *mut SSL, + profiles: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_current_expansion(ssl: *mut SSL) -> *const COMP_METHOD; +} +unsafe extern "C" { + pub fn SSL_get_server_tmp_key(ssl: *mut SSL, out_key: *mut *mut EVP_PKEY) + -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *const DH) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_dh_callback( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_set_tmp_dh_callback( + ssl: *mut SSL, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + is_export: ::core::ffi::c_int, + keylength: ::core::ffi::c_int, + ) -> *mut DH, + >, + ); +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs( + ctx: *mut SSL_CTX, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs( + ssl: *mut SSL, + values: *const ::core::ffi::c_int, + num_values: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_sigalgs_list( + ctx: *mut SSL_CTX, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_sigalgs_list( + ssl: *mut SSL, + str_: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_comp_st { + pub id: ::core::ffi::c_int, + pub name: *const ::core::ffi::c_char, + pub method: *mut ::core::ffi::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ssl_comp_st"][::core::mem::size_of::() - 24usize]; + ["Alignment of ssl_comp_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: ssl_comp_st::id"][::core::mem::offset_of!(ssl_comp_st, id) - 0usize]; + ["Offset of field: ssl_comp_st::name"][::core::mem::offset_of!(ssl_comp_st, name) - 8usize]; + ["Offset of field: ssl_comp_st::method"] + [::core::mem::offset_of!(ssl_comp_st, method) - 16usize]; +}; +pub type sk_SSL_COMP_free_func = ::core::option::Option; +pub type sk_SSL_COMP_copy_func = + ::core::option::Option *mut SSL_COMP>; +pub type sk_SSL_COMP_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const SSL_COMP, + arg2: *const *const SSL_COMP, + ) -> ::core::ffi::c_int, +>; +pub type sk_SSL_COMP_delete_if_func = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut SSL_COMP, arg2: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_free_func__extern"] + pub fn sk_SSL_COMP_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_copy_func__extern"] + pub fn sk_SSL_COMP_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_cmp_func__extern"] + pub fn sk_SSL_COMP_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_call_delete_if_func__extern"] + pub fn sk_SSL_COMP_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new__extern"] + pub fn sk_SSL_COMP_new(comp: sk_SSL_COMP_cmp_func) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_new_null__extern"] + pub fn sk_SSL_COMP_new_null() -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_num__extern"] + pub fn sk_SSL_COMP_num(sk: *const stack_st_SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_zero__extern"] + pub fn sk_SSL_COMP_zero(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_value__extern"] + pub fn sk_SSL_COMP_value(sk: *const stack_st_SSL_COMP, i: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set__extern"] + pub fn sk_SSL_COMP_set(sk: *mut stack_st_SSL_COMP, i: usize, p: *mut SSL_COMP) + -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_free__extern"] + pub fn sk_SSL_COMP_free(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop_free__extern"] + pub fn sk_SSL_COMP_pop_free(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_insert__extern"] + pub fn sk_SSL_COMP_insert(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP, where_: usize) + -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete__extern"] + pub fn sk_SSL_COMP_delete(sk: *mut stack_st_SSL_COMP, where_: usize) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_ptr__extern"] + pub fn sk_SSL_COMP_delete_ptr(sk: *mut stack_st_SSL_COMP, p: *const SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_delete_if__extern"] + pub fn sk_SSL_COMP_delete_if( + sk: *mut stack_st_SSL_COMP, + func: sk_SSL_COMP_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_find__extern"] + pub fn sk_SSL_COMP_find( + sk: *const stack_st_SSL_COMP, + out_index: *mut usize, + p: *const SSL_COMP, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_shift__extern"] + pub fn sk_SSL_COMP_shift(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_push__extern"] + pub fn sk_SSL_COMP_push(sk: *mut stack_st_SSL_COMP, p: *mut SSL_COMP) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_pop__extern"] + pub fn sk_SSL_COMP_pop(sk: *mut stack_st_SSL_COMP) -> *mut SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_dup__extern"] + pub fn sk_SSL_COMP_dup(sk: *const stack_st_SSL_COMP) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort__extern"] + pub fn sk_SSL_COMP_sort(sk: *mut stack_st_SSL_COMP); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_sort_and_dedup__extern"] + pub fn sk_SSL_COMP_sort_and_dedup(sk: *mut stack_st_SSL_COMP, free_func: sk_SSL_COMP_free_func); +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_is_sorted__extern"] + pub fn sk_SSL_COMP_is_sorted(sk: *const stack_st_SSL_COMP) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_set_cmp_func__extern"] + pub fn sk_SSL_COMP_set_cmp_func( + sk: *mut stack_st_SSL_COMP, + comp: sk_SSL_COMP_cmp_func, + ) -> sk_SSL_COMP_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_SSL_COMP_deep_copy__extern"] + pub fn sk_SSL_COMP_deep_copy( + sk: *const stack_st_SSL_COMP, + copy_func: sk_SSL_COMP_copy_func, + free_func: sk_SSL_COMP_free_func, + ) -> *mut stack_st_SSL_COMP; +} +unsafe extern "C" { + pub fn SSL_cache_hit(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_default_timeout(ssl: *const SSL) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_version(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_version_names(out: *mut *const ::core::ffi::c_char, max_out: usize) + -> usize; +} +unsafe extern "C" { + pub fn SSL_get_cipher_list( + ssl: *const SSL, + n: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_CTX_set_client_cert_cb( + ctx: *mut SSL_CTX, + cb: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + out_x509: *mut *mut X509, + out_pkey: *mut *mut EVP_PKEY, + ) -> ::core::ffi::c_int, + >, + ); +} +unsafe extern "C" { + pub fn SSL_want(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_finished(ssl: *const SSL, buf: *mut ::core::ffi::c_void, count: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_get_peer_finished( + ssl: *const SSL, + buf: *mut ::core::ffi::c_void, + count: usize, + ) -> usize; +} +unsafe extern "C" { + pub fn SSL_alert_type_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_alert_desc_string(value: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_state_string(ssl: *const SSL) -> *const ::core::ffi::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ssl_conf_ctx_st { + _unused: [u8; 0], +} +pub type SSL_CONF_CTX = ssl_conf_ctx_st; +unsafe extern "C" { + pub fn SSL_state(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_shutdown(ssl: *mut SSL, mode: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tmp_ecdh(ssl: *mut SSL, ec_key: *const EC_KEY) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_add_dir_cert_subjects_to_stack( + out: *mut stack_st_X509_NAME, + dir: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_enable_tls_channel_id(ctx: *mut SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_enable_tls_channel_id(ssl: *mut SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn BIO_f_ssl() -> *const BIO_METHOD; +} +unsafe extern "C" { + pub fn BIO_set_ssl( + bio: *mut BIO, + ssl: *mut SSL, + take_owership: ::core::ffi::c_int, + ) -> ::core::ffi::c_long; +} +unsafe extern "C" { + pub fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn SSL_get1_session(ssl: *mut SSL) -> *mut SSL_SESSION; +} +unsafe extern "C" { + pub fn OPENSSL_init_ssl( + opts: u64, + settings: *const OPENSSL_INIT_SETTINGS, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_type( + ssl: *mut SSL, + type_: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_type(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set_tlsext_status_ocsp_resp( + ssl: *mut SSL, + resp: *mut u8, + resp_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_tlsext_status_ocsp_resp(ssl: *const SSL, out: *mut *const u8) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_cb( + ctx: *mut SSL_CTX, + callback: ::core::option::Option< + unsafe extern "C" fn( + ssl: *mut SSL, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set_tlsext_status_arg( + ctx: *mut SSL_CTX, + arg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_curve_id(ssl: *const SSL) -> u16; +} +unsafe extern "C" { + pub fn SSL_get_curve_name(curve_id: u16) -> *const ::core::ffi::c_char; +} +unsafe extern "C" { + pub fn SSL_get_all_curve_names(out: *mut *const ::core::ffi::c_char, max_out: usize) -> usize; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves( + ssl: *mut SSL, + curves: *const ::core::ffi::c_int, + num_curves: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set1_curves_list( + ctx: *mut SSL_CTX, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_set1_curves_list( + ssl: *mut SSL, + curves: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_check_private_key(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_security_level(ctx: *const SSL_CTX) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_set0_buffer_pool(ctx: *mut SSL_CTX, pool: *mut CRYPTO_BUFFER_POOL); +} +pub const ssl_compliance_policy_t_ssl_compliance_policy_none: ssl_compliance_policy_t = 0; +pub const ssl_compliance_policy_t_ssl_compliance_policy_fips_202205: ssl_compliance_policy_t = 1; +pub const ssl_compliance_policy_t_ssl_compliance_policy_wpa3_192_202304: ssl_compliance_policy_t = + 2; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa_202407: ssl_compliance_policy_t = 3; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa1_202603: ssl_compliance_policy_t = 4; +pub const ssl_compliance_policy_t_ssl_compliance_policy_cnsa2_202603: ssl_compliance_policy_t = 5; +pub type ssl_compliance_policy_t = ::core::ffi::c_uint; +unsafe extern "C" { + pub fn SSL_CTX_set_compliance_policy( + ctx: *mut SSL_CTX, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_CTX_get_compliance_policy(ctx: *const SSL_CTX) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_compliance_policy( + ssl: *mut SSL, + policy: ssl_compliance_policy_t, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn SSL_get_compliance_policy(ssl: *const SSL) -> ssl_compliance_policy_t; +} +unsafe extern "C" { + pub fn SSL_set_server_padding_request(ssl: *mut SSL, num_bytes: u16); +} +unsafe extern "C" { + pub fn SSL_set_server_padding_enabled(ssl: *mut SSL, enabled: ::core::ffi::c_int); +} +unsafe extern "C" { + pub fn SSL_server_sent_requested_padding(ssl: *const SSL) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const u8, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v1() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_experiment_v2_pmb() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_voprf() -> *const TRUST_TOKEN_METHOD; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_pst_v1_pmb() -> *const TRUST_TOKEN_METHOD; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct trust_token_st { + pub data: *mut u8, + pub len: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of trust_token_st"][::core::mem::size_of::() - 16usize]; + ["Alignment of trust_token_st"][::core::mem::align_of::() - 8usize]; + ["Offset of field: trust_token_st::data"] + [::core::mem::offset_of!(trust_token_st, data) - 0usize]; + ["Offset of field: trust_token_st::len"][::core::mem::offset_of!(trust_token_st, len) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stack_st_TRUST_TOKEN { + _unused: [u8; 0], +} +pub type sk_TRUST_TOKEN_free_func = + ::core::option::Option; +pub type sk_TRUST_TOKEN_copy_func = + ::core::option::Option *mut TRUST_TOKEN>; +pub type sk_TRUST_TOKEN_cmp_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const *const TRUST_TOKEN, + arg2: *const *const TRUST_TOKEN, + ) -> ::core::ffi::c_int, +>; +pub type sk_TRUST_TOKEN_delete_if_func = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut TRUST_TOKEN, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, +>; +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_free_func__extern"] + pub fn sk_TRUST_TOKEN_call_free_func( + free_func: OPENSSL_sk_free_func, + ptr: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_copy_func__extern"] + pub fn sk_TRUST_TOKEN_call_copy_func( + copy_func: OPENSSL_sk_copy_func, + ptr: *const ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_call_cmp_func( + cmp_func: OPENSSL_sk_cmp_func, + a: *const ::core::ffi::c_void, + b: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_call_delete_if_func__extern"] + pub fn sk_TRUST_TOKEN_call_delete_if_func( + func: OPENSSL_sk_delete_if_func, + obj: *mut ::core::ffi::c_void, + data: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new__extern"] + pub fn sk_TRUST_TOKEN_new(comp: sk_TRUST_TOKEN_cmp_func) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_new_null__extern"] + pub fn sk_TRUST_TOKEN_new_null() -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_num__extern"] + pub fn sk_TRUST_TOKEN_num(sk: *const stack_st_TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_zero__extern"] + pub fn sk_TRUST_TOKEN_zero(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_value__extern"] + pub fn sk_TRUST_TOKEN_value(sk: *const stack_st_TRUST_TOKEN, i: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set__extern"] + pub fn sk_TRUST_TOKEN_set( + sk: *mut stack_st_TRUST_TOKEN, + i: usize, + p: *mut TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_free__extern"] + pub fn sk_TRUST_TOKEN_free(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop_free__extern"] + pub fn sk_TRUST_TOKEN_pop_free( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_insert__extern"] + pub fn sk_TRUST_TOKEN_insert( + sk: *mut stack_st_TRUST_TOKEN, + p: *mut TRUST_TOKEN, + where_: usize, + ) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete__extern"] + pub fn sk_TRUST_TOKEN_delete(sk: *mut stack_st_TRUST_TOKEN, where_: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_ptr__extern"] + pub fn sk_TRUST_TOKEN_delete_ptr( + sk: *mut stack_st_TRUST_TOKEN, + p: *const TRUST_TOKEN, + ) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_delete_if__extern"] + pub fn sk_TRUST_TOKEN_delete_if( + sk: *mut stack_st_TRUST_TOKEN, + func: sk_TRUST_TOKEN_delete_if_func, + data: *mut ::core::ffi::c_void, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_find__extern"] + pub fn sk_TRUST_TOKEN_find( + sk: *const stack_st_TRUST_TOKEN, + out_index: *mut usize, + p: *const TRUST_TOKEN, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_shift__extern"] + pub fn sk_TRUST_TOKEN_shift(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_push__extern"] + pub fn sk_TRUST_TOKEN_push(sk: *mut stack_st_TRUST_TOKEN, p: *mut TRUST_TOKEN) -> usize; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_pop__extern"] + pub fn sk_TRUST_TOKEN_pop(sk: *mut stack_st_TRUST_TOKEN) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_dup__extern"] + pub fn sk_TRUST_TOKEN_dup(sk: *const stack_st_TRUST_TOKEN) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort__extern"] + pub fn sk_TRUST_TOKEN_sort(sk: *mut stack_st_TRUST_TOKEN); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_sort_and_dedup__extern"] + pub fn sk_TRUST_TOKEN_sort_and_dedup( + sk: *mut stack_st_TRUST_TOKEN, + free_func: sk_TRUST_TOKEN_free_func, + ); +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_is_sorted__extern"] + pub fn sk_TRUST_TOKEN_is_sorted(sk: *const stack_st_TRUST_TOKEN) -> ::core::ffi::c_int; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_set_cmp_func__extern"] + pub fn sk_TRUST_TOKEN_set_cmp_func( + sk: *mut stack_st_TRUST_TOKEN, + comp: sk_TRUST_TOKEN_cmp_func, + ) -> sk_TRUST_TOKEN_cmp_func; +} +unsafe extern "C" { + #[link_name = "sk_TRUST_TOKEN_deep_copy__extern"] + pub fn sk_TRUST_TOKEN_deep_copy( + sk: *const stack_st_TRUST_TOKEN, + copy_func: sk_TRUST_TOKEN_copy_func, + free_func: sk_TRUST_TOKEN_free_func, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_new(data: *const u8, len: usize) -> *mut TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_free(token: *mut TRUST_TOKEN); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_generate_key( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_derive_key_from_secret( + method: *const TRUST_TOKEN_METHOD, + out_priv_key: *mut u8, + out_priv_key_len: *mut usize, + max_priv_key_len: usize, + out_pub_key: *mut u8, + out_pub_key_len: *mut usize, + max_pub_key_len: usize, + id: u32, + secret: *const u8, + secret_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_free(ctx: *mut TRUST_TOKEN_CLIENT); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_dup_for_testing( + ctx: *const TRUST_TOKEN_CLIENT, + ) -> *mut TRUST_TOKEN_CLIENT; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_add_key( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_set_srr_key( + ctx: *mut TRUST_TOKEN_CLIENT, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_issuance_over_message( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + count: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_issuance( + ctx: *mut TRUST_TOKEN_CLIENT, + out_key_index: *mut usize, + response: *const u8, + response_len: usize, + ) -> *mut stack_st_TRUST_TOKEN; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_begin_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out: *mut *mut u8, + out_len: *mut usize, + token: *const TRUST_TOKEN, + data: *const u8, + data_len: usize, + time: u64, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_CLIENT_finish_redemption( + ctx: *mut TRUST_TOKEN_CLIENT, + out_rr: *mut *mut u8, + out_rr_len: *mut usize, + out_sig: *mut *mut u8, + out_sig_len: *mut usize, + response: *const u8, + response_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_new( + method: *const TRUST_TOKEN_METHOD, + max_batchsize: usize, + ) -> *mut TRUST_TOKEN_ISSUER; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_free(ctx: *mut TRUST_TOKEN_ISSUER); +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_add_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *const u8, + key_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_set_srr_key( + ctx: *mut TRUST_TOKEN_ISSUER, + key: *mut EVP_PKEY, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_issue( + ctx: *const TRUST_TOKEN_ISSUER, + out: *mut *mut u8, + out_len: *mut usize, + out_tokens_issued: *mut usize, + request: *const u8, + request_len: usize, + public_metadata: u32, + private_metadata: u8, + max_issuance: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_ISSUER_redeem_over_message( + ctx: *const TRUST_TOKEN_ISSUER, + out_public: *mut u32, + out_private: *mut u8, + out_token: *mut *mut TRUST_TOKEN, + out_client_data: *mut *mut u8, + out_client_data_len: *mut usize, + request: *const u8, + request_len: usize, + msg: *const u8, + msg_len: usize, + ) -> ::core::ffi::c_int; +} +unsafe extern "C" { + pub fn TRUST_TOKEN_decode_private_metadata( + method: *const TRUST_TOKEN_METHOD, + out_value: *mut u8, + key: *const u8, + key_len: usize, + nonce: *const u8, + nonce_len: usize, + encrypted_bit: u8, + ) -> ::core::ffi::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::core::ffi::c_uint, + pub fp_offset: ::core::ffi::c_uint, + pub overflow_arg_area: *mut ::core::ffi::c_void, + pub reg_save_area: *mut ::core::ffi::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CRYPTO_dynlock_value { + pub _address: u8, +} diff --git a/src/bssl/lib.rs b/src/bssl/lib.rs new file mode 100644 index 000000000000..4ba87d14b153 --- /dev/null +++ b/src/bssl/lib.rs @@ -0,0 +1,12 @@ +//! The tree's BoringSSL binding surface. +//! +//! Re-exports the vendored `bssl-sys` crate (`vendor/boringssl/rust/bssl-sys`), +//! whose mechanically generated, fork-synchronized bindings are committed +//! per target under `bindings/` (see `bindings/README.md`). Symbols resolve +//! against the BoringSSL objects compiled by `scripts/build/deps/boringssl.ts` +//! at final-binary link. +//! +//! `bun_boringssl_sys` (`src/boringssl_sys`) is the legacy hand-written extern +//! surface; its consumers are pending migration onto this crate. + +pub use bssl_sys::*; diff --git a/src/bun_bin/Cargo.toml b/src/bun_bin/Cargo.toml index 94839e8d1237..9d1873c6c07e 100644 --- a/src/bun_bin/Cargo.toml +++ b/src/bun_bin/Cargo.toml @@ -34,4 +34,7 @@ bun_platform.workspace = true # Phase-C: bun_runtime now compiles green; pulled in for `Cli::start()`. # bun_jsc remains gated until the JSC bridge links. bun_runtime.workspace = true +# The Rust uSockets core; the default `cabi` feature exports the extern "C" +# `us_*` surface the surviving C/C++ (uWS bindings, quic.c) links against. +bun_usockets.workspace = true # bun_jsc.workspace = true diff --git a/src/bun_bin/lib.rs b/src/bun_bin/lib.rs index 751ee356fb29..3e23ff23ebad 100644 --- a/src/bun_bin/lib.rs +++ b/src/bun_bin/lib.rs @@ -41,6 +41,10 @@ mod c_abi_exports; // (`sys_epoll_pwait2`, …) reach the linker. use bun_platform as _; +// Force-link `bun_usockets` so the `cabi` feature's `#[no_mangle]` `us_*` +// exports reach the linker for the surviving C/C++ consumers. +use bun_usockets as _; + use bun_core::Global; use bun_core::StackCheck; use bun_core::output; diff --git a/src/dns/lib.rs b/src/dns/lib.rs index 336f1589e8e7..3f38539892b9 100644 --- a/src/dns/lib.rs +++ b/src/dns/lib.rs @@ -477,9 +477,9 @@ impl Order { /// The process-wide DNS /// cache lives in `bun_runtime` (it owns libinfo/libuv worker threads + JSC -/// stat counters). Lower-tier crates (`bun_http`, `bun_install`) reach it via -/// the link-time `Bun__addrinfo_*` family — same mechanism usockets C uses — -/// rather than a `bun_runtime` crate dep, which would cycle. +/// stat counters). Lower-tier crates (`bun_usockets`, `bun_http`, +/// `bun_install`) reach it via the link-time `Bun__addrinfo_*` family rather +/// than a `bun_runtime` crate dep, which would cycle. pub mod internal { use core::ffi::c_void; diff --git a/src/event_loop/AnyEventLoop.rs b/src/event_loop/AnyEventLoop.rs index 98b75524e59f..f0d35a8bc3ad 100644 --- a/src/event_loop/AnyEventLoop.rs +++ b/src/event_loop/AnyEventLoop.rs @@ -1,9 +1,8 @@ use core::ptr::NonNull; use bun_dotenv::Loader as DotEnvLoader; -use bun_io::FilePoll; use bun_ptr::BackRef; -use bun_uws::Loop as UwsLoop; +use bun_usockets::Loop as UwsLoop; use crate::AnyTaskWithExtraContext::AnyTaskWithExtraContext; use crate::ConcurrentTask::ConcurrentTask; @@ -246,8 +245,10 @@ impl AnyEventLoop<'static> { #[inline] pub fn wakeup(&mut self) { - // SAFETY: `r#loop()` returns a valid live loop pointer. - unsafe { (*self.r#loop()).wakeup() }; + // Raw cross-thread-safe wake path — never forms `&mut Loop`. + // Liveness: worker teardown unpublishes the loop pointer under its + // lock before `on_thread_exit` frees it — no wake can see a dead loop. + bun_usockets::us_wakeup_loop(self.r#loop()); } /// Returns the FilePoll store as a raw pointer. @@ -258,11 +259,6 @@ impl AnyEventLoop<'static> { EventLoopHandle::from_any(self).file_polls() } - #[inline] - pub fn put_file_poll(&mut self, poll: &mut FilePoll) { - EventLoopHandle::from_any(self).put_file_poll(poll) - } - /// Returns the shared pipe-read scratch buffer as a raw fat ptr. /// See [`EventLoopHandle::pipe_read_buffer`]. #[inline] @@ -449,20 +445,10 @@ impl EventLoopHandle { } } -/// Carrier-trait impl so `bun_uws::InternalLoopDataExt::set_parent_event_loop` -/// accepts `EventLoopHandle` directly. Kept here (not in `bun_uws`) because -/// `bun_uws` is a lower tier than `bun_event_loop` and cannot name this enum. -impl bun_uws::ParentEventLoopHandle for EventLoopHandle { - #[inline] - fn into_tag_ptr(self) -> (core::ffi::c_char, *mut core::ffi::c_void) { - EventLoopHandle::into_tag_ptr(self) - } -} - impl EventLoopHandle { - /// Convenience wrapper so callers don't need both `bun_uws::InternalLoopDataExt` - /// (the trait) and the `*mut Loop` deref dance in scope. `uws_loop` is the - /// process-global loop returned by `AnyEventLoop::r#loop()` — never null. + /// Convenience wrapper around `into_tag_ptr()` + `set_parent_raw`. + /// `uws_loop` is the process-global loop returned by + /// `AnyEventLoop::r#loop()` — never null. #[inline] pub fn set_as_parent_of(self, uws_loop: &mut UwsLoop) { let (tag, ptr) = self.into_tag_ptr(); @@ -547,30 +533,6 @@ impl EventLoopHandle { } } - pub fn put_file_poll(&mut self, poll: &mut FilePoll) { - let was_ever_registered = poll - .flags - .contains(bun_io::file_poll::Flags::WasEverRegistered); - // Decay `poll` to `NonNull` *before* taking any further `&mut` so - // `Store::put`'s raw-pointer field touches don't alias a live `&mut`. - let poll_ptr = NonNull::from(poll); - match self { - // `JsEventLoop::put_file_poll` takes a raw `*mut FilePoll`; pass - // the decayed `poll_ptr` straight through. - EventLoopHandle::Js { owner } => { - owner.put_file_poll(poll_ptr.as_ptr(), was_ever_registered) - } - // ctx only touches `after_event_loop_callback{,_ctx}`, field-disjoint - // from `file_polls_` — safe to hold both across `Store::put`. - EventLoopHandle::Mini(mini) => { - let ctx = MiniEventLoop::as_event_loop_ctx(mini_mut(mini)); - mini_mut(mini) - .file_polls() - .put(poll_ptr, ctx, was_ever_registered); - } - } - } - pub fn enqueue_task_concurrent(self, task: EventLoopTaskPtr) { match self { EventLoopHandle::Js { owner } => { @@ -638,13 +600,14 @@ impl EventLoopHandle { } pub fn ref_(self) { - // SAFETY: `r#loop` returns a valid live loop. - unsafe { (*self.r#loop()).ref_() }; + // Raw-place twin: `r#loop` returns the live loop; a `&mut Loop` here + // would span `pending_wakeups`, which waker threads mutate. + bun_usockets::Loop::ref_raw(self.r#loop()); } pub fn unref(self) { - // SAFETY: `r#loop` returns a valid live loop. - unsafe { (*self.r#loop()).unref() }; + // See `ref_`. + bun_usockets::Loop::unref_raw(self.r#loop()); } pub fn env(self) -> *mut DotEnvLoader<'static> { diff --git a/src/event_loop/Cargo.toml b/src/event_loop/Cargo.toml index 31ac037f31a3..269f862c326c 100644 --- a/src/event_loop/Cargo.toml +++ b/src/event_loop/Cargo.toml @@ -27,4 +27,4 @@ bun_paths.workspace = true bun_ptr.workspace = true bun_sys.workspace = true bun_threading.workspace = true -bun_uws.workspace = true +bun_usockets.workspace = true diff --git a/src/event_loop/MiniEventLoop.rs b/src/event_loop/MiniEventLoop.rs index 4c7446ce1acc..0ac097de5a3a 100644 --- a/src/event_loop/MiniEventLoop.rs +++ b/src/event_loop/MiniEventLoop.rs @@ -28,7 +28,7 @@ use bun_dotenv::{self as dotenv, Loader as DotEnvLoader}; use bun_io::file_poll::Store as FilePollStore; use bun_sys::{self as sys, Fd, Mode}; use bun_threading::UnboundedQueue; -use bun_uws::Loop as UwsLoop; +use bun_usockets::Loop as UwsLoop; use crate::AnyTaskWithExtraContext::{AnyTaskWithExtraContext, New}; // MOVE-IN: EventLoopHandle relocated from bun_jsc — see AnyEventLoop.rs. @@ -93,9 +93,6 @@ pub struct MiniEventLoop<'a> { pub env: Option>>, // Never freed in `deinit`. Use Box<[u8]> and dupe on assign. pub top_level_dir: Box<[u8]>, - // Opaque ctx assigned externally; only read/cleared here. - pub after_event_loop_callback_ctx: Option>, - pub after_event_loop_callback: Option, pub pipe_read_buffer: Option>, // SAFETY: erased `*mut webcore::blob::Store` (tier-6). Constructed via // `__bun_stdio_blob_store_new` with ref_count=2: one owning intrusive ref @@ -257,17 +254,6 @@ impl<'a> MiniEventLoop<'a> { .get_or_insert_with(bun_core::boxed_zeroed::)[..] } - pub fn on_after_event_loop(&mut self) { - if let Some(cb) = self.after_event_loop_callback { - let ctx = self.after_event_loop_callback_ctx; - self.after_event_loop_callback = None; - self.after_event_loop_callback_ctx = None; - // SAFETY: `cb` is a C-ABI callback registered by the owner of `ctx`; the owner - // guarantees `ctx` is valid until the callback fires. - unsafe { cb(ctx.map_or(core::ptr::null_mut(), |p| p.as_ptr())) }; - } - } - pub fn file_polls(&mut self) -> &mut FilePollStore { if self.file_polls_.is_none() { self.file_polls_ = Some(Box::new(FilePollStore::init())); @@ -316,8 +302,6 @@ impl<'a> MiniEventLoop<'a> { file_polls_: None, env: None, top_level_dir: Box::default(), - after_event_loop_callback_ctx: None, - after_event_loop_callback: None, pipe_read_buffer: None, stdout_store: None, stderr_store: None, @@ -367,13 +351,12 @@ impl<'a> MiniEventLoop<'a> { #[inline] pub fn tick_once(&mut self, context: *mut c_void) { if self.tick_concurrent_with_count() == 0 && self.tasks.readable_length() == 0 { - // SAFETY: see `loop_ptr()` invariant. - unsafe { - (*self.loop_ptr()).inc(); - (*self.loop_ptr()).tick(); - (*self.loop_ptr()).dec(); - } - self.on_after_event_loop(); + // Raw-place inc/dec: a `&mut UwsLoop` here would span bytes + // (`pending_wakeups`) that enqueue_task_concurrent threads + // `fetch_add` concurrently. + UwsLoop::inc_raw(self.loop_ptr()); + UwsLoop::tick(self.loop_ptr()); + UwsLoop::dec_raw(self.loop_ptr()); } while let Some(task) = self.tasks.read_item() { @@ -390,14 +373,12 @@ impl<'a> MiniEventLoop<'a> { unsafe { (*task).run(context) }; } - // SAFETY: see `loop_ptr()` invariant. - unsafe { (*self.loop_ptr()).tick_without_idle() }; + UwsLoop::tick_without_idle(self.loop_ptr()); if self.tasks.readable_length() == 0 && self.tick_concurrent_with_count() == 0 { break; } } - self.on_after_event_loop(); } pub fn tick(&mut self, context: *mut c_void, is_done: F) @@ -435,8 +416,9 @@ impl<'a> MiniEventLoop<'a> { /// node stays with the caller until the callback runs. pub fn enqueue_task_concurrent(&mut self, task: NonNull) { self.concurrent_tasks.push(task); - // SAFETY: see `loop_ptr()` invariant. - unsafe { (*self.loop_ptr()).wakeup() }; + // Raw cross-thread wake path — never forms `&mut UwsLoop`. Liveness: + // the MiniEventLoop and its loop live until process exit. + bun_usockets::us_wakeup_loop(self.loop_ptr()); } /// The caller supplies `field_offset = core::mem::offset_of!(C, )` of the @@ -461,8 +443,9 @@ impl<'a> MiniEventLoop<'a> { self.concurrent_tasks .push(unsafe { NonNull::new_unchecked(task) }); - // SAFETY: see `loop_ptr()` invariant. - unsafe { (*self.loop_ptr()).wakeup() }; + // Raw cross-thread wake path — never forms `&mut UwsLoop`. Liveness: + // the MiniEventLoop and its loop live until process exit. + bun_usockets::us_wakeup_loop(self.loop_ptr()); } /// Lazy-init helper shared by [`stderr`]/[`stdout`]: `fstat → __bun_stdio_blob_store_new → cache`. @@ -521,11 +504,6 @@ bun_io::link_impl_EventLoopCtx! { // mutating uws counters off-thread. ref_concurrently() => unreachable!("KeepAlive::refConcurrently is JS-VM-only"), unref_concurrently() => unreachable!("KeepAlive::unrefConcurrently is JS-VM-only"), - after_event_loop_callback() => (*this).after_event_loop_callback, - set_after_event_loop_callback(cb, ctx) => { - (*this).after_event_loop_callback = cb; - (*this).after_event_loop_callback_ctx = ctx; - }, pipe_read_buffer() => core::ptr::from_mut::<[u8]>((*this).pipe_read_buffer()), } } diff --git a/src/event_loop/README.md b/src/event_loop/README.md index c5c569ddd5a7..386456e4e56c 100644 --- a/src/event_loop/README.md +++ b/src/event_loop/README.md @@ -89,7 +89,7 @@ This is called when the event loop is active and needs to wait for I/O: ▼ ┌─────────────────────────────────────┐ │ 4. Poll I/O via uSockets │ ← epoll_wait/kevent with timeout -│ (epoll_kqueue.c:251-320) │ +│ (src/usockets/loop_/tick.rs) │ │ - Dispatch ready polls │ │ - Each I/O event treated as task│ └──────────────┬──────────────────────┘ @@ -101,12 +101,7 @@ This is called when the event loop is active and needs to wait for I/O: │ ▼ ┌─────────────────────────────────────┐ -│ 6. Call VM.onAfterEventLoop() │ -└──────────────┬──────────────────────┘ - │ - ▼ -┌─────────────────────────────────────┐ -│ 7. Handle rejected promises │ +│ 6. Handle rejected promises │ └─────────────────────────────────────┘ ``` @@ -230,7 +225,7 @@ The queue maintains a map of `(pointer, task_fn)` pairs and runs each task. If a ## I/O Polling Integration -### uSockets Event Loop (`epoll_kqueue.c:251-320`) +### uSockets Event Loop (`src/usockets/loop_/tick.rs`) The I/O poll is integrated into the event loop via `us_loop_run_bun_tick()`: @@ -267,12 +262,12 @@ The I/O poll is integrated into the event loop via `us_loop_run_bun_tick()`: When I/O becomes ready (socket readable/writable, file descriptor ready): -1. The poll is dispatched via `us_internal_dispatch_ready_poll()` or `Bun__internal_dispatch_ready_poll()` +1. The poll is dispatched via `us_internal_dispatch_ready_poll()` (non-socket polls go through the `bun_usockets` poll registry to their registered owner) 2. This triggers the appropriate callback **synchronously during the I/O poll phase** 3. The callback may: - Directly execute JavaScript (must use `EventLoop.enter()/exit()`) - Enqueue a task to the concurrent task queue for later processing - - Update internal state and return (e.g., `FilePoll.onUpdate()`) + - Update internal state and return (e.g., a FilePoll registry event) 4. If JavaScript is called via `enter()/exit()`, microtasks are drained when `entered_event_loop_count` reaches 0 **Important**: I/O callbacks don't automatically get the microtask draining behavior - they must explicitly wrap JS calls in `enter()/exit()` or use `runCallback()` to ensure proper microtask handling. This is why some I/O operations enqueue tasks to the concurrent queue instead of running JavaScript directly. diff --git a/src/event_loop/SpawnSyncEventLoop.rs b/src/event_loop/SpawnSyncEventLoop.rs index 4221a9b0262d..8faec01055b0 100644 --- a/src/event_loop/SpawnSyncEventLoop.rs +++ b/src/event_loop/SpawnSyncEventLoop.rs @@ -25,7 +25,7 @@ use bun_sys::windows::libuv; // `ref_`/`unref`/`close` are `UvHandle` default trait methods; bring it into // scope so method resolution finds them on `Timer`. use bun_sys::windows::libuv::UvHandle as _; -use bun_uws as uws; +use bun_usockets as uws; // MOVE-IN: EventLoopHandle relocated from bun_jsc — see AnyEventLoop.rs. use crate::EventLoopHandle; @@ -220,7 +220,9 @@ impl SpawnSyncEventLoop { #[inline] pub fn uws_loop(&self) -> &uws::Loop { // SAFETY: see doc invariant above — non-null, owned for `self`'s lifetime, - // no `&mut` alias while `&self` is held. + // no `&mut` alias while `&self` is held. Cross-thread clause: see + // `uws_loop_mut` — no foreign waker ever writes this isolated loop's + // `pending_wakeups`, so the shared borrow cannot race one. unsafe { self.uws_loop.as_ref() } } @@ -239,6 +241,12 @@ impl SpawnSyncEventLoop { // SAFETY: `uws_loop` is non-null and exclusively owned by `self` for its // entire lifetime (created in `init`, freed in `Drop`). `&mut self` // guarantees no other safe borrow of the loop is live. + // Cross-thread clause: unlike the published per-VM loop, this isolated + // loop must never be handed to foreign wakers — a cross-thread + // `us_wakeup_loop` writes `pending_wakeups`, which this `&mut` spans. + // Its wakeup handler is a no-op and the pointer never leaves this + // struct, so no such waker exists; if that changes, convert callers + // to the `Loop::*_raw` twins. unsafe { self.uws_loop.as_mut() } } @@ -309,7 +317,7 @@ impl SpawnSyncEventLoop { let new_handle: VmEventLoopHandle = Some(self.uws_loop); #[cfg(windows)] let new_handle: VmEventLoopHandle = Some( - NonNull::new(self.uws_loop().uv_loop) + NonNull::new(self.uws_loop().uv_loop.cast::()) .expect("uv_loop is set by us_create_loop for the loop's lifetime"), ); __bun_spawn_sync_vm_set_event_loop_handle(vm, new_handle); @@ -348,12 +356,10 @@ extern "C" fn on_uv_timer(timer_: *mut libuv::Timer) { // the SpawnSyncEventLoop outlives the timer (timer is stopped/closed in `cleanup`/`Drop`). // // ALIASING: this callback fires re-entrantly from inside `tick_with_timeout`'s uws tick - // (uv_run) while that frame still holds `&mut self` (LLVM `noalias`) AND a live - // `&mut uws::Loop` (Loop::tick_with_timeout takes `&mut self`). We must not: + // (uv_run) while that frame still holds `&mut self` (LLVM `noalias`). We must not: // (a) materialize a second `&mut SpawnSyncEventLoop` here, nor // (b) read `(*this).uws_loop` — the outer frame's `&mut self` access to `uws_loop` at the - // tick call popped the raw `*mut Self`'s Stacked-Borrows tag at those bytes, and the - // `&mut uws::Loop` it produced is still live around us. + // tick call popped the raw `*mut Self`'s Stacked-Borrows tag at those bytes. // So: touch only `(*this).did_timeout` (a `Cell`, interior-mutable), and obtain the uv loop // from the timer handle itself rather than routing through `*this`. unsafe { @@ -378,9 +384,9 @@ impl SpawnSyncEventLoop { // pointer derives from the post-`into_raw` provenance (not a // `Box`-`noalias` reborrow that `into_raw` would later pop). self.uv_timer = Some(bun_core::heap::into_raw_nn(uv_timer)); - // `uv_loop` is set by C `us_create_loop`. Read it (a `*mut`, Copy) + // `uv_loop` is set by `us_create_loop`. Read it (a `*mut`, Copy) // before borrowing `self` mutably via the timer accessor. - let uv_loop = self.uws_loop().uv_loop; + let uv_loop = self.uws_loop().uv_loop.cast::(); self.uv_timer_mut().expect("just set").init(uv_loop); } @@ -388,7 +394,7 @@ impl SpawnSyncEventLoop { // flight, so `loop->time` (which `uv_timer_start` computes the due time from) can be // staler than the timeout, which would make the timer fire immediately. // SAFETY: `uv_loop` is the live initialized loop owned by `self.uws_loop`. - unsafe { libuv::uv_update_time(self.uws_loop().uv_loop) }; + unsafe { libuv::uv_update_time(self.uws_loop().uv_loop.cast()) }; // NOTE: `timer.data` is assigned later in `tick_with_timeout`, immediately before the // uws tick, so the stored `*mut Self` derives directly from that frame's live `&mut self` @@ -436,9 +442,8 @@ impl SpawnSyncEventLoop { // its `&mut self` receiver reborrow is a Unique retag over the full extent of `*self` // under Stacked Borrows, which would pop the SharedReadWrite tag of the raw pointer just // stored into `timer.data` at `did_timeout`'s bytes — making the callback's - // `(*this).did_timeout.set(true)` UB. The `uws::Loop` lives in a separate allocation, so - // forming `&mut uws::Loop` from the copied `NonNull` does not touch `*self`'s borrow - // stacks. + // `(*this).did_timeout.set(true)` UB. The tick takes the raw `*mut Loop` directly, so + // no `&mut uws::Loop` is formed at all. let loop_ = self.uws_loop; #[cfg(windows)] if let Some(t) = self.uv_timer { @@ -450,9 +455,7 @@ impl SpawnSyncEventLoop { // SAFETY: `t` is a valid initialized libuv timer handle owned by `self`. unsafe { (*t.as_ptr()).data = (core::ptr::from_mut(self)).cast() }; } - // SAFETY: `uws_loop` is non-null and exclusively owned by `self` (created in `init`, - // freed in `Drop`); `&mut self` guarantees no other safe borrow of the loop is live. - unsafe { (*loop_.as_ptr()).tick_with_timeout(duration) }; + uws::Loop::tick_with_timeout(loop_.as_ptr(), duration); if let Some(ts) = timeout { #[cfg(windows)] diff --git a/src/event_loop/lib.rs b/src/event_loop/lib.rs index 8a9a5dab8640..6d7194049f04 100644 --- a/src/event_loop/lib.rs +++ b/src/event_loop/lib.rs @@ -51,8 +51,7 @@ bun_dispatch::link_interface! { pub JsEventLoop[Jsc] { fn iteration_number() -> u64; fn file_polls() -> *mut bun_io::file_poll::Store; - fn put_file_poll(poll: *mut bun_io::FilePoll, was_ever_registered: bool); - fn uws_loop() -> *mut bun_uws::Loop; + fn uws_loop() -> *mut bun_usockets::Loop; fn pipe_read_buffer() -> *mut [u8]; fn tick(); fn auto_tick(); diff --git a/src/http/AsyncHTTP.rs b/src/http/AsyncHTTP.rs index 02d2a5c1d395..73254f3aa378 100644 --- a/src/http/AsyncHTTP.rs +++ b/src/http/AsyncHTTP.rs @@ -116,10 +116,11 @@ unsafe fn free_owned_href(href: &'static [u8]) { } } -/// Read the HTTP-thread monotonic timer in nanoseconds. +/// Read the HTTP-thread monotonic timer in nanoseconds. Callable from any +/// thread (reads the set-once `START_TIMER` static). #[inline] fn http_thread_timer_read() -> u64 { - crate::http_thread().timer.elapsed().as_nanos() as u64 + crate::http_thread::timer_read() } /// Build the `Proxy-Authorization: Basic ` header value. @@ -671,8 +672,24 @@ fn send_sync_callback( } } +/// Owns the response metadata backing [`AsyncHTTP::send_sync`]'s `Response`; +/// header/status slices point into `metadata.owned_buf` (freed on drop), and +/// `response()` ties their borrow to `&self`. +pub struct SyncHTTPResponse { + metadata: crate::HTTPResponseMetadata, +} + +impl SyncHTTPResponse { + pub fn response<'s>(&'s self) -> &'s picohttp::Response<'s> { + // Covariant reborrow: the stored `Response<'static>` is only 'static + // because `clone_metadata` erased the borrow of `owned_buf`; narrow it + // back to `&self`'s lifetime. + &self.metadata.response + } +} + impl<'a> AsyncHTTP<'a> { - pub fn send_sync(&mut self) -> crate::Result> { + pub fn send_sync(&mut self) -> crate::Result { crate::http_thread::init(&Default::default()); // Note: `Box::leak` is forbidden (PORTING.md §Forbidden); @@ -699,10 +716,11 @@ impl<'a> AsyncHTTP<'a> { } debug_assert!(result.metadata.is_some()); // The returned `Response` borrows `metadata.owned_buf` (status text + - // header slices); suppress Drop so the borrowed buffer outlives the - // call. `send_sync` is one-shot CLI. - let metadata = core::mem::ManuallyDrop::new(result.metadata.unwrap()); - Ok(metadata.response) + // header slices); hand the metadata to the caller so the buffers stay + // live while the response is read and are freed on drop. + Ok(SyncHTTPResponse { + metadata: result.metadata.unwrap(), + }) } // ────────────────────────────────────────────────────────────────────── @@ -863,11 +881,11 @@ impl<'a> AsyncHTTP<'a> { } let thread = crate::http_thread(); - if (!thread.queued_tasks.is_empty() || !thread.deferred_tasks.is_empty()) + if (!crate::http_thread::QUEUED_TASKS.is_empty() || !thread.deferred_tasks.is_empty()) && ACTIVE_REQUESTS_COUNT.load(Ordering::Relaxed) < MAX_SIMULTANEOUS_REQUESTS.load(Ordering::Relaxed) { - thread.wakeup(); + crate::HTTPThread::wakeup(); } } diff --git a/src/http/Cargo.toml b/src/http/Cargo.toml index 518c5bac856d..96bec9e7ea6a 100644 --- a/src/http/Cargo.toml +++ b/src/http/Cargo.toml @@ -42,7 +42,9 @@ bun_ptr.workspace = true bun_sys.workspace = true bun_threading.workspace = true bun_url.workspace = true -bun_uws.workspace = true +bun_usockets.workspace = true +# SSLWrapper, MaybeAnySocket and quic/h3 (surviving C++/lsquic bindings). +bun_uws_shim.workspace = true bun_wyhash.workspace = true bun_zlib.workspace = true bun_zstd.workspace = true diff --git a/src/http/CertificateInfo.rs b/src/http/CertificateInfo.rs index 1b50b633b305..251b80f31c5a 100644 --- a/src/http/CertificateInfo.rs +++ b/src/http/CertificateInfo.rs @@ -6,5 +6,5 @@ pub struct CertificateInfo { pub hostname: Box<[u8]>, } -// All owned fields are `Box<[u8]>` (here and in `HTTPCertError`) and drop +// All owned fields (`Box<[u8]>` here, `ZBox` in `HTTPCertError`) drop // automatically — no explicit `Drop` impl needed. diff --git a/src/http/HTTPCertError.rs b/src/http/HTTPCertError.rs index 9a955fb57411..68ce77c23270 100644 --- a/src/http/HTTPCertError.rs +++ b/src/http/HTTPCertError.rs @@ -1,13 +1,12 @@ -use bun_core::ZStr; +use bun_core::{ZBox, ZStr}; pub struct HTTPCertError { pub error_no: i32, - // `code`/`reason` borrow process-lifetime static string tables (uSockets' - // verify-error strings and BoringSSL's `X509_verify_cert_error_string` - // literals — see the SAFETY note in `from_verify_error`), so nothing owns - // or frees them here. + // `code` borrows the core's static verify-error code table; `reason` is + // owned — the EPROTO arm hands us a per-socket `FatalReason` that dies + // when `on_handshake` returns, so it must be copied, never widened. pub code: &'static ZStr, - pub reason: &'static ZStr, + pub reason: ZBox, } impl Default for HTTPCertError { @@ -15,7 +14,7 @@ impl Default for HTTPCertError { Self { error_no: 0, code: ZStr::EMPTY, - reason: ZStr::EMPTY, + reason: ZBox::default(), } } } @@ -23,39 +22,30 @@ impl Default for HTTPCertError { impl HTTPCertError { /// Build from the uSockets verify-error struct delivered to `on_handshake`. /// - /// Centralises the two `cstr → ZStr` upgrades so each handshake handler - /// (outer-TLS in `HTTPContext::Handler::on_handshake`, inner-TLS in + /// Centralises the decode so each handshake handler (outer-TLS in + /// `HTTPContext::Handler::on_handshake`, inner-TLS in /// `ProxyTunnel::on_handshake`) doesn't repeat the raw deref. /// /// `reason` is gated on `code` being non-null (the /// uSockets API populates both together or neither). - pub fn from_verify_error(ssl_error: bun_uws::us_bun_verify_error_t) -> Self { - /// Borrow a NUL-terminated C string from uSockets as `&'static ZStr`. - /// Both sources are process-lifetime static string tables (see the - /// SAFETY note below), so the `'static` widen is genuine, not a - /// convenience. - #[inline] - fn zstr(p: *const core::ffi::c_char) -> &'static ZStr { - // SAFETY: (`bun_ptr::Interned`-style audit — Population A, - // process-lifetime): `code` is uSockets' - // `us_ssl_socket_verify_error_str` lookup into a static - // string-literal table; `reason` is BoringSSL's - // `X509_verify_cert_error_string`, which likewise returns a - // pointer to a compile-time string literal (switch over - // `X509_V_ERR_*`). Both are genuinely process-lifetime, so the - // widen to `&'static ZStr` is sound. (`Interned` itself is - // `[u8]`-only; `ZStr` keeps the open-coded widen but the owner is - // now named per the `Interned::assume` contract.) - unsafe { ZStr::from_c_ptr(p) } - } + pub fn from_verify_error(ssl_error: bun_usockets::us_bun_verify_error_t) -> Self { + // SAFETY: `code` is always a pointer into a process-lifetime static + // table (`x509_error_code`, the `"EPROTO"`/`"ECONNRESET"` literals in + // `us_bun_verify_error_t`'s constructors), so the `'static` widen is + // sound for `code` only. + let code = unsafe { ZStr::from_c_ptr(ssl_error.code) }; + let reason = if ssl_error.code.is_null() { + ZBox::default() + } else { + // SAFETY: `reason` is NUL-terminated and live for the duration of + // the `on_handshake` dispatch only — the EPROTO arm borrows the + // socket's parked `FatalReason` (§3.4) — so copy it here. + ZBox::from_bytes(unsafe { ZStr::from_c_ptr(ssl_error.reason) }.as_bytes()) + }; Self { error_no: ssl_error.error_no, - code: zstr(ssl_error.code), - reason: if ssl_error.code.is_null() { - ZStr::EMPTY - } else { - zstr(ssl_error.reason) - }, + code, + reason, } } } diff --git a/src/http/HTTPContext.rs b/src/http/HTTPContext.rs index a9de38b96dd4..2f6a1f5e8ace 100644 --- a/src/http/HTTPContext.rs +++ b/src/http/HTTPContext.rs @@ -10,10 +10,11 @@ use crate::{ }; use bun_boringssl::ssl_ctx_setup; use bun_boringssl_sys::SSL_CTX; -use bun_collections::{HiveArray, TaggedPtrUnion}; +use bun_collections::HiveArray; use bun_core::strings; use bun_core::{self, FeatureFlags}; -use bun_uws as uws; +use bun_usockets as uws; +use bun_usockets::unsafe_core::trampolines::{socket_owner_ref, with_socket_owner}; bun_core::declare_scope!(HTTPContext, hidden); @@ -69,94 +70,74 @@ pub(crate) type PooledSocketHiveAllocator = pub type HTTPSocket = uws::SocketHandler; -pub(crate) type ActiveSocket = TaggedPtrUnion>; - -/// Local type-list marker so `TypeList`/`UnionMember` impls satisfy orphan -/// rules (the `bun_ptr::impl_tagged_ptr_union!` macro impls on a tuple, which -/// is foreign even when every element is local). -pub(crate) struct ActiveSocketTypes; - -// Note: tags assigned 1024 - i, descending. -impl bun_ptr::tagged_pointer::TypeList for ActiveSocketTypes { - const LEN: usize = 4; - const MIN_TAG: bun_ptr::tagged_pointer::TagType = 1024 - 3; - fn type_name_from_tag(tag: bun_ptr::tagged_pointer::TagType) -> Option<&'static str> { - match tag { - 1024 => Some("DeadSocket"), - 1023 => Some("HTTPClient"), - 1022 => Some("PooledSocket"), - 1021 => Some("H2.ClientSession"), - _ => None, - } - } -} -impl bun_ptr::tagged_pointer::UnionMember> for DeadSocket { - const TAG: bun_ptr::tagged_pointer::TagType = 1024; - const NAME: &'static str = "DeadSocket"; -} -impl bun_ptr::tagged_pointer::UnionMember> - for HTTPClient<'static> -{ - const TAG: bun_ptr::tagged_pointer::TagType = 1023; - const NAME: &'static str = "HTTPClient"; -} -impl bun_ptr::tagged_pointer::UnionMember> - for PooledSocket -{ - const TAG: bun_ptr::tagged_pointer::TagType = 1022; - const NAME: &'static str = "PooledSocket"; -} -impl bun_ptr::tagged_pointer::UnionMember> - for h2::ClientSession -{ - const TAG: bun_ptr::tagged_pointer::TagType = 1021; - const NAME: &'static str = "H2.ClientSession"; +/// What a socket's [`SocketOwner`] currently dispatches to — the safe enum +/// replacement for the old ext tagged-pointer union (Protocol v2 — src/usockets/docs/design.md). +#[derive(Copy, Clone)] +pub(crate) enum ActiveSocket { + /// Terminal/no-op: whoever owned the socket already ran its teardown. + Dead, + Client(NonNull>), + Pooled(NonNull>), + H2(NonNull), } -/// Typed accessors for the `ActiveSocket` tagged-pointer recovered from a -/// socket's ext slot. Centralises the `unsafe { &mut *ptr }` upgrade that the -/// socket-event dispatch handlers (and HTTPThread queue drains) repeat at -/// every site. -/// -/// INVARIANT (single point of unsafe): a tagged pointer stored in a live -/// socket's ext slot identifies an object that is alive for the duration of -/// the dispatched callback — `HTTPClient` until its terminal result callback, -/// `h2::ClientSession` while it holds a registry strong ref, `PooledSocket` -/// while its HiveArray bit is set. All accesses are HTTP-thread-only, so no -/// concurrent `&mut` exists. Callers obtain the tagged value via -/// [`HTTPContext::get_tagged`] / [`HTTPContext::get_tagged_from_socket`] and -/// must not retain the returned reference past the callback. -pub(crate) trait ActiveSocketExt: Copy { - fn client_mut<'a>(self) -> Option<&'a mut HTTPClient<'static>>; - fn session_mut<'a>(self) -> Option<&'a mut h2::ClientSession>; - fn pooled_mut<'a>(self) -> Option<&'a mut PooledSocket>; +/// Per-socket Protocol v2 dispatch owner. One heap allocation per HTTP-thread +/// socket. Ref holders: the core ext word (released by core exactly once at +/// the socket terminal), the keepalive pool slot while parked +/// (`PooledSocket::owner_ref`), and the trampoline's per-dispatch guard. +#[derive(bun_ptr::RefCounted)] +pub struct SocketOwner { + ref_count: bun_ptr::RefCount, + /// Retagged in place at ownership transitions (connect / park / reuse / + /// ALPN=h2 / dead-marking) — same transitions the old ext word made. + state: Cell>, + /// Owner-held handle: Protocol v2 `on_connect_error` has no socket + /// argument, so the terminal close + `dns_error()` read use this. + /// Refreshed on `on_open` and pool reuse. + socket: Cell>, } -/// The single `&mut *p` upgrade for [`ActiveSocketExt`] — generic so -/// `client_mut`/`session_mut`/`pooled_mut` share one SAFETY argument instead of -/// three open-coded ones. INVARIANT: see [`ActiveSocketExt`] trait doc. -#[inline(always)] -fn active_socket_get_mut<'a, const SSL: bool, T>(tagged: ActiveSocket) -> Option<&'a mut T> -where - T: bun_ptr::tagged_pointer::UnionMember>, -{ - // SAFETY: see [`ActiveSocketExt`] trait-level INVARIANT — the tagged pointer - // identifies an object live for the dispatched callback, HTTP-thread-only. - tagged.get::().map(|p| unsafe { &mut *p }) +impl SocketOwner { + fn new_client(client: &HTTPClient) -> bun_ptr::RefPtr { + bun_ptr::RefPtr::new(Self { + ref_count: bun_ptr::RefCount::init(), + state: Cell::new(ActiveSocket::Client(client.as_erased_ptr())), + socket: Cell::new(HTTPSocket::::DETACHED), + }) + } } -impl ActiveSocketExt for ActiveSocket { +impl ActiveSocket { + /// INVARIANT (single point of unsafe; irreducible until the AsyncHTTP + /// bitwise-clone ownership model is reworked): a variant read from a live + /// socket's owner identifies an object alive for the current callback — + /// `HTTPClient` until its terminal result callback, `h2::ClientSession` + /// while it holds a registry/tag strong ref, `PooledSocket` while its + /// HiveArray bit is set. HTTP-thread-only, so no concurrent `&mut`; + /// callers must not retain the returned reference past the callback. #[inline] - fn client_mut<'a>(self) -> Option<&'a mut HTTPClient<'static>> { - active_socket_get_mut(self) + pub(crate) fn client_mut<'a>(self) -> Option<&'a mut HTTPClient<'static>> { + match self { + // SAFETY: see enum-level INVARIANT above. + ActiveSocket::Client(p) => Some(unsafe { &mut *p.as_ptr() }), + _ => None, + } } #[inline] - fn session_mut<'a>(self) -> Option<&'a mut h2::ClientSession> { - active_socket_get_mut(self) + pub(crate) fn session_mut<'a>(self) -> Option<&'a mut h2::ClientSession> { + match self { + // SAFETY: see enum-level INVARIANT above. + ActiveSocket::H2(p) => Some(unsafe { &mut *p.as_ptr() }), + _ => None, + } } #[inline] - fn pooled_mut<'a>(self) -> Option<&'a mut PooledSocket> { - active_socket_get_mut(self) + pub(crate) fn pooled_mut<'a>(self) -> Option<&'a mut PooledSocket> { + match self { + // SAFETY: see enum-level INVARIANT above. + ActiveSocket::Pooled(p) => Some(unsafe { &mut *p.as_ptr() }), + _ => None, + } } } @@ -195,6 +176,11 @@ pub struct PooledSocket { /// HTTP/2 connection state (HPACK tables, server SETTINGS) when /// this socket negotiated "h2". Owned by the pool while parked. pub h2_session: Option>, + /// The pool's strong ref on the socket's dispatch owner while parked + /// (Protocol v2: pool slots hold OwnerRef). Taken in + /// `release_socket`; released in `release_parked_refs`, or moved out by + /// `existing_socket` and released after the reuse retag in `connect`. + pub(crate) owner_ref: Option>>, } /// Upgrade an `Option>` held by a pool / found-slot @@ -262,6 +248,11 @@ impl PooledSocket { // SAFETY: pool owns one strong ref while parked. unsafe { h2::ClientSession::deref(s.as_ptr()) }; } + if let Some(o) = self.owner_ref.take() { + // Release the pool's strong ref on the dispatch owner (the core + // ext ref keeps it alive until the socket terminal). + o.deref(); + } } } @@ -272,6 +263,9 @@ struct ExistingSocket { tunnel: Option, /// Non-null if the socket negotiated "h2"; ownership transferred. h2_session: Option>, + /// The parked slot's strong ref on the dispatch owner, moved out of the + /// pool; `connect` derefs it after retagging the owner to the new client. + owner: Option>>, } impl ExistingSocket { @@ -288,11 +282,56 @@ impl ExistingSocket { } } -/// The ext stores `*anyopaque` (the `ActiveSocket` tagged pointer), so -/// dispatch reads it as `**anyopaque` and `Handler` decodes the tag. -// Note: a `pub type ActiveSocketHandler = Handler;` inherent -// associated type is unstable, so this is a free alias. -pub type ActiveSocketHandler = Handler; +/// Protocol v2 registration marker for the HTTP client kinds; the ext word +/// is a core-owned strong ref to a [`SocketOwner`]. +pub struct HttpProtocol; + +/// Convert the trampoline's [`uws::AnySocket`] to the kind-matching typed +/// handle (the KIND registration fixes the SSL flavor). +#[inline] +fn from_any(s: uws::AnySocket) -> HTTPSocket { + HTTPSocket::::from_any(*s.socket()) +} + +impl uws::Protocol for HttpProtocol { + type Owner = SocketOwner; + const KIND: uws::SocketKind = HTTPContext::::KIND; + + fn on_open(o: &Self::Owner, s: uws::AnySocket, _is_client: bool, _ip: &[u8]) { + let socket = from_any::(s); + // Refresh the owner-held handle: the connect-time handle may have + // been a Connecting one that has since promoted. + o.socket.set(socket); + Handler::::on_open(o, socket); + } + fn on_data(o: &Self::Owner, s: uws::AnySocket, data: &mut [u8]) { + Handler::::on_data(o, from_any::(s), data); + } + fn on_writable(o: &Self::Owner, s: uws::AnySocket) { + Handler::::on_writable(o, from_any::(s)); + } + fn on_close(o: &Self::Owner, s: uws::AnySocket, _code: uws::CloseCode2, _errno: i32) { + Handler::::on_close(o, from_any::(s)); + } + fn on_end(o: &Self::Owner, s: uws::AnySocket) { + Handler::::on_end(o, from_any::(s)); + } + fn on_timeout(o: &Self::Owner, s: uws::AnySocket) { + Handler::::on_timeout(o, from_any::(s)); + } + fn on_long_timeout(o: &Self::Owner, s: uws::AnySocket) { + Handler::::on_long_timeout(o, from_any::(s)); + } + fn on_connect_error(o: &Self::Owner, _err: uws::ConnectFailure) { + // The wire errno is ignored on purpose (v1 parity): the client + // distinguishes DNS failures via `dns_error()` on the owner-held + // handle, and everything else maps to ConnectionRefused. + Handler::::on_connect_error(o); + } + fn on_handshake(o: &Self::Owner, s: uws::AnySocket, ok: bool, err: uws::VerifyError) { + Handler::::on_handshake(o, from_any::(s), ok, err); + } +} impl HTTPContext { pub(crate) const KIND: uws::SocketKind = if SSL { @@ -302,20 +341,28 @@ impl HTTPContext { }; pub(crate) fn mark_tagged_socket_as_dead(socket: HTTPSocket, tagged: ActiveSocket) { - if tagged.is::>() { - // SAFETY: tag check above guarantees the pointer is a PooledSocket. - unsafe { - Handler::::add_memory_back_to_pool(tagged.as_unchecked::>()); - } + if let ActiveSocket::Pooled(p) = tagged { + // SAFETY: a Pooled variant read from a live owner points at the + // slot whose HiveArray bit is still set (enum-level INVARIANT). + unsafe { Handler::::add_memory_back_to_pool(p.as_ptr()) }; } - - Self::set_socket_ext(socket, ActiveSocket::::init(dead_socket())); + Self::set_state(socket, ActiveSocket::Dead); } pub(crate) fn mark_socket_as_dead(socket: HTTPSocket) { Self::mark_tagged_socket_as_dead(socket, Self::get_tagged_from_socket(socket)); } + /// Owner-side dead-marking for dispatch handlers that already hold the + /// owner (skips the handle→owner re-resolution). + fn mark_owner_dead(owner: &SocketOwner) { + if let ActiveSocket::Pooled(p) = owner.state.get() { + // SAFETY: see `mark_tagged_socket_as_dead`. + unsafe { Handler::::add_memory_back_to_pool(p.as_ptr()) }; + } + owner.state.set(ActiveSocket::Dead); + } + pub(crate) fn terminate_socket(socket: HTTPSocket) { Self::mark_socket_as_dead(socket); socket.close(uws::CloseKind::Failure); @@ -326,34 +373,18 @@ impl HTTPContext { socket.close(uws::CloseKind::Normal); } - /// `ptr` is the *value* stored in the socket ext (the packed - /// `ActiveSocket` tagged pointer), already dereferenced by - /// `NsHandler` before reaching `Handler.on*`. No second deref. - fn get_tagged(ptr: *mut c_void) -> ActiveSocket { - ActiveSocket::::from(Some(ptr)) - } - + /// Read the socket's current owner state; `Dead` for stale/detached + /// handles and sockets whose terminal already released the owner. pub(crate) fn get_tagged_from_socket(socket: HTTPSocket) -> ActiveSocket { - if let Some(slot) = socket.ext::<*mut c_void>() { - // SAFETY: ext slot stores the ActiveSocket tagged-pointer word. - return Self::get_tagged(unsafe { *slot }); - } - ActiveSocket::::init(dead_socket()) + with_socket_owner(&socket, |o: &SocketOwner| o.state.get()) + .unwrap_or(ActiveSocket::Dead) } - /// Write `tagged` into `socket`'s ext slot. - /// - /// INVARIANT (centralised here): the ext slot of every HTTP-thread socket - /// holds exactly the `ActiveSocket` tagged-pointer word; uSockets allocates - /// it as `size_of::<*mut c_void>()` and never reads/writes it itself, so - /// the raw `*slot = …` write is the sole owner. `ext()` returns `None` - /// only for closed sockets, in which case the write is a no-op. + /// Retag the socket's owner in place; no-op when the owner is already + /// released (post-terminal) or the handle is stale. #[inline] - pub(crate) fn set_socket_ext(socket: HTTPSocket, tagged: ActiveSocket) { - if let Some(slot) = socket.ext::<*mut c_void>() { - // SAFETY: see INVARIANT above. - unsafe { *slot = tagged.ptr() }; - } + pub(crate) fn set_state(socket: HTTPSocket, state: ActiveSocket) { + let _ = with_socket_owner(&socket, |o: &SocketOwner| o.state.set(state)); } /// Shared-borrow a live `*const ClientSession` to read/set its @@ -471,7 +502,8 @@ impl HTTPContext { } pub(crate) fn tag_as_h2(socket: HTTPSocket, session: *const h2::ClientSession) { - Self::set_socket_ext(socket, ActiveSocket::::init(session)); + let session = NonNull::new(session.cast_mut()).expect("tag_as_h2 requires a live session"); + Self::set_state(socket, ActiveSocket::H2(session)); } pub(crate) fn ssl_ctx(&self) -> *mut SSL_CTX { @@ -481,6 +513,12 @@ impl HTTPContext { self.secure.unwrap() } + /// `secure` as the connect-time borrow, spelled in the core crate's + /// opaque `SslCtx` name (same BoringSSL object, cast at the seam). + fn ssl_ctx_for_connect(&self) -> Option<*mut uws::SslCtx> { + self.secure.map(|c| c.cast::()) + } + pub(crate) fn init_with_client_config( &mut self, client: &mut HTTPClient, @@ -497,14 +535,13 @@ impl HTTPContext { self.init_with_opts(&opts) } - fn init_with_opts( - &mut self, - opts: &uws::SocketContext::BunSocketContextOptions, - ) -> Result<(), InitError> { + fn init_with_opts(&mut self, opts: &uws::BunSocketContextOptions) -> Result<(), InitError> { debug_assert!(SSL, "ssl only"); let mut err = uws::create_bun_socket_error_t::none; + // `uws::SslCtx` (bssl-sys) and `SSL_CTX` (bun_boringssl_sys) are two + // opaque names for the same BoringSSL object; cast at the crate seam. self.secure = match opts.create_ssl_context(&mut err) { - Some(ctx) => Some(ctx), + Some(ctx) => Some(ctx.cast::()), None => { return Err(match err { uws::create_bun_socket_error_t::load_ca_file => InitError::LoadCAFile, @@ -527,7 +564,7 @@ impl HTTPContext { init_opts: &HTTPThreadInitOpts, ) -> Result<(), InitError> { debug_assert!(SSL, "ssl only"); - let opts = uws::SocketContext::BunSocketContextOptions { + let opts = uws::BunSocketContextOptions { ca: if !init_opts.ca.is_empty() { init_opts.ca.as_ptr().cast() } else { @@ -552,7 +589,7 @@ impl HTTPContext { if SSL { let mut err = uws::create_bun_socket_error_t::none; self.secure = Some( - uws::SocketContext::BunSocketContextOptions { + uws::BunSocketContextOptions { // we request the cert so we load root certs and can verify it request_cert: 1, // we manually abort the connection if the hostname doesn't match @@ -560,7 +597,9 @@ impl HTTPContext { ..Default::default() } .create_ssl_context(&mut err) - .unwrap(), + .unwrap() + // Same opaque BoringSSL object; cast at the crate seam. + .cast::(), ); // SAFETY: secure was just set to Some. unsafe { ssl_ctx_setup(self.ssl_ctx()) }; @@ -611,60 +650,68 @@ impl HTTPContext { // borrow held by the `HiveSlot` doesn't conflict with a whole-`self` // borrow inside the initializer. let owner: *mut Self = self; - if let Some(slot) = self.pending_sockets.claim() { - // The slot's stable address is registered as the socket's - // user-data *before* the `PooledSocket` is written; nothing - // dereferences it until after `slot.write()` below. If the - // `Box::from`/`Arc::clone` in the initializer panic, `slot`'s - // `Drop` releases the hive bit without running - // `PooledSocket::drop` (which would otherwise drop garbage in - // `ssl_config: Option` / `target_hostname: Box<[u8]>`). - let pending_addr = slot.addr(); - Self::set_socket_ext( - socket, - ActiveSocket::::init(pending_addr.as_ptr().cast_const()), - ); - socket.flush(); - socket.timeout(0); - socket.set_timeout_minutes(5); - - let had_tunnel = tunnel.is_some(); - let mut hostname_buf = [0u8; MAX_KEEPALIVE_HOSTNAME]; - hostname_buf[..hostname.len()].copy_from_slice(hostname); - - slot.write(PooledSocket { - http_socket: socket, - hostname_buf, - hostname_len: hostname.len() as u8, // @truncate - port, - did_have_handshaking_error_while_reject_unauthorized_is_false, - established_with_reject_unauthorized, - // Clone a strong ref for the keepalive pool; the caller retains - // its own ref via HTTPClient.tls_props. - ssl_config: ssl_config.cloned(), - owner, - // Pool owns the tunnel ref transferred by the caller. - proxy_tunnel: tunnel, - target_hostname: if had_tunnel && !target_hostname.is_empty() { - Box::<[u8]>::from(target_hostname) - } else { - Box::default() - }, - target_port, - proxy_auth_hash, - h2_session, - }); - - bun_core::scoped_log!( - HTTPContext, - "Keep-Alive release {}:{} tunnel={} target={}:{}", - bstr::BStr::new(hostname), - port, - had_tunnel, - bstr::BStr::new(target_hostname), - target_port, - ); - return; + // The pool's strong ref on the dispatch owner (P5: pool slots + // hold OwnerRef). None only if the terminal already released the + // owner — then the socket can't be parked. + if let Some(owner_ref) = socket_owner_ref::>(&socket) { + if let Some(slot) = self.pending_sockets.claim() { + // The slot's stable address is retagged into the owner + // *before* the `PooledSocket` is written; nothing + // dereferences it until after `slot.write()` below. If the + // `Box::from`/`Arc::clone` in the initializer panic, `slot`'s + // `Drop` releases the hive bit without running + // `PooledSocket::drop` (which would otherwise drop garbage in + // `ssl_config: Option` / `target_hostname: Box<[u8]>`). + let pending_addr = slot.addr(); + owner_ref + .data() + .state + .set(ActiveSocket::Pooled(pending_addr)); + socket.flush(); + socket.timeout(0); + socket.set_timeout_minutes(5); + + let had_tunnel = tunnel.is_some(); + let mut hostname_buf = [0u8; MAX_KEEPALIVE_HOSTNAME]; + hostname_buf[..hostname.len()].copy_from_slice(hostname); + + slot.write(PooledSocket { + http_socket: socket, + hostname_buf, + hostname_len: hostname.len() as u8, // @truncate + port, + did_have_handshaking_error_while_reject_unauthorized_is_false, + established_with_reject_unauthorized, + // Clone a strong ref for the keepalive pool; the caller retains + // its own ref via HTTPClient.tls_props. + ssl_config: ssl_config.cloned(), + owner, + // Pool owns the tunnel ref transferred by the caller. + proxy_tunnel: tunnel, + target_hostname: if had_tunnel && !target_hostname.is_empty() { + Box::<[u8]>::from(target_hostname) + } else { + Box::default() + }, + target_port, + proxy_auth_hash, + h2_session, + owner_ref: Some(owner_ref), + }); + + bun_core::scoped_log!( + HTTPContext, + "Keep-Alive release {}:{} tunnel={} target={}:{}", + bstr::BStr::new(hostname), + port, + had_tunnel, + bstr::BStr::new(target_hostname), + target_port, + ); + return; + } + // Pool full: release the ref taken above and fall through to close. + owner_ref.deref(); } } bun_core::scoped_log!(HTTPContext, "close socket"); @@ -804,10 +851,14 @@ impl HTTPContext { let tunnel: Option = socket.proxy_tunnel.take(); socket.target_hostname = Box::default(); let h2_session = socket.h2_session.take(); + // Move the slot's owner ref out; `connect` derefs it after + // retagging the owner to the reusing client. + let owner_ref = socket.owner_ref.take(); // SAFETY: `socket_ptr` is a fully-initialized hive slot; the - // owned-heap fields (ssl_config/tunnel/target_hostname/h2_session) - // were just moved out / cleared, so the in-place drop in `put` - // touches only trivially-droppable residuals. + // owned-heap fields (ssl_config/tunnel/target_hostname/ + // h2_session/owner_ref) were just moved out / cleared, so the + // in-place drop in `put` touches only trivially-droppable + // residuals. let ok = unsafe { self.pending_sockets.put(socket_ptr) }; debug_assert!(ok); bun_core::scoped_log!( @@ -825,6 +876,7 @@ impl HTTPContext { socket: http_socket, tunnel, h2_session, + owner: owner_ref, }); } } @@ -841,20 +893,31 @@ impl HTTPContext { .http_proxy .clone() .unwrap_or_else(|| client.url.clone()); - let socket = HTTPSocket::::connect_unix_group( + let ssl_ctx = if SSL { + self.ssl_ctx_for_connect() + } else { + None + }; + let owner = SocketOwner::::new_client(client); + // Second ref so the owner-held handle can be stamped after connect + // (connect_unix_owned transfers `owner` to the core ext). + let owner_view = owner.clone(); + let socket = match HTTPSocket::::connect_unix_owned( &mut self.group, Self::KIND, - if SSL { self.secure } else { None }, + ssl_ctx, socket_path, - ActiveSocket::::init( - client - .as_erased_ptr() - .as_ptr() - .cast::>(), - ) - .ptr(), + owner, false, // dont allow half-open sockets - )?; + ) { + Ok(s) => s, + Err(e) => { + owner_view.deref(); + return Err(e.into()); + } + }; + owner_view.data().socket.set(socket); + owner_view.deref(); client.allow_retry = false; Ok(Some(socket)) } @@ -968,15 +1031,18 @@ impl HTTPContext { }, ) { let sock = found.socket; - Self::set_socket_ext( - sock, - ActiveSocket::::init( - client - .as_erased_ptr() - .as_ptr() - .cast::>(), - ), - ); + if let Some(o) = found.owner.take() { + // Retag the parked owner to the new client and refresh its + // held handle, then release the pool's ref (the core ext + // ref keeps the owner alive while the socket lives). + o.data() + .state + .set(ActiveSocket::Client(client.as_erased_ptr())); + o.data().socket.set(sock); + o.deref(); + } else { + Self::set_state(sock, ActiveSocket::Client(client.as_erased_ptr())); + } client.allow_retry = true; if let Some(session) = found.h2_session { if SSL { @@ -1023,21 +1089,32 @@ impl HTTPContext { } } - let socket = HTTPSocket::::connect_group( + let ssl_ctx = if SSL { + self.ssl_ctx_for_connect() + } else { + None + }; + let owner = SocketOwner::::new_client(client); + // Second ref so the owner-held handle can be stamped after connect + // (connect_owned transfers `owner` to the core ext). + let owner_view = owner.clone(); + let socket = match HTTPSocket::::connect_owned( &mut self.group, Self::KIND, - if SSL { self.secure } else { None }, + ssl_ctx, hostname, port as c_int, - ActiveSocket::::init( - client - .as_erased_ptr() - .as_ptr() - .cast::>(), - ) - .ptr(), + owner, false, - )?; + ) { + Ok(s) => s, + Err(e) => { + owner_view.deref(); + return Err(e.into()); + } + }; + owner_view.data().socket.set(socket); + owner_view.deref(); client.allow_retry = false; if SSL { if client.can_offer_h2() { @@ -1066,6 +1143,16 @@ impl HTTPContext { impl Drop for HTTPContext { fn drop(&mut self) { + // Exit teardown: the HTTP loop is parked forever and sockets may still + // be tagged with clients the exit path already freed — `close_all` would + // dispatch on_close into them. Leak the sockets; free only the SSL_CTX. + if crate::http_thread::exit_teardown_active() { + if SSL && let Some(c) = self.secure { + // SAFETY: we own one ref on the SSL_CTX. + unsafe { bun_boringssl_sys::SSL_CTX_free(c) }; + } + return; + } // Drain pooled keepalive sockets: deref their ssl_config and force-close. // Must force-close (code != 0) because SSL clean shutdown (code=0) requires a // shutdown handshake with the peer, which won't complete during eviction. @@ -1118,12 +1205,13 @@ impl Drop for HTTPContext { } } -/// Ext is the `ActiveSocket` tagged-pointer word. -pub struct Handler; +/// Socket-event handlers, dispatched via [`HttpProtocol`]; the owner's +/// `state` enum selects the client / h2-session / pooled-slot recipient. +pub(crate) struct Handler; impl Handler { - pub fn on_open(ptr: *mut c_void, socket: HTTPSocket) { - let active = HTTPContext::::get_tagged(ptr); + pub(crate) fn on_open(owner: &SocketOwner, socket: HTTPSocket) { + let active = owner.state.get(); if let Some(client) = active.client_mut() { match client.on_open::(socket) { Ok(_) => return, @@ -1139,17 +1227,15 @@ impl Handler { HTTPContext::::terminate_socket(socket); } - pub fn on_handshake( - ptr: *mut c_void, + pub(crate) fn on_handshake( + owner: &SocketOwner, socket: HTTPSocket, - success: i32, + handshake_success: bool, ssl_error: uws::us_bun_verify_error_t, ) { - let handshake_success = success == 1; - let handshake_error = HTTPCertError::from_verify_error(ssl_error); - let active = HTTPContext::::get_tagged(ptr); + let active = owner.state.get(); if let Some(client) = active.client_mut() { // handshake completed but we may have ssl errors client.flags.did_have_handshaking_error = handshake_error.error_no != 0; @@ -1202,12 +1288,12 @@ impl Handler { } if socket.is_closed() { - HTTPContext::::mark_socket_as_dead(socket); + HTTPContext::::mark_owner_dead(owner); return; } if handshake_success { - if active.is::>() { + if matches!(active, ActiveSocket::Pooled(_)) { // Allow pooled sockets to be reused if the handshake was successful. socket.set_timeout(0); socket.set_timeout_minutes(5); @@ -1218,9 +1304,9 @@ impl Handler { HTTPContext::::terminate_socket(socket); } - pub fn on_close(ptr: *mut c_void, socket: HTTPSocket, _: c_int, _: Option<*mut c_void>) { - let tagged = HTTPContext::::get_tagged(ptr); - HTTPContext::::mark_socket_as_dead(socket); + pub(crate) fn on_close(owner: &SocketOwner, socket: HTTPSocket) { + let tagged = owner.state.get(); + HTTPContext::::mark_owner_dead(owner); if let Some(client) = tagged.client_mut() { return client.on_close::(socket); @@ -1228,9 +1314,9 @@ impl Handler { if let Some(session) = tagged.session_mut() { return session.on_close(crate::Error::ConnectionClosed); } - // PooledSocket/DeadSocket: whoever retagged the ext should have - // unregistered; sweep by pointer so a miss can't leave a stale - // entry for `drain_queued_shutdowns` to deref after free. + // Pooled/Dead: whoever retagged the owner should have unregistered; + // sweep by pointer so a miss can't leave a stale entry for + // `drain_queued_shutdowns` to hit on a later abort. crate::unregister_abort_tracker_for_socket(socket.socket); } @@ -1252,8 +1338,8 @@ impl Handler { debug_assert!(ok); } - pub fn on_data(ptr: *mut c_void, socket: HTTPSocket, buf: &[u8]) { - let tagged = HTTPContext::::get_tagged(ptr); + pub(crate) fn on_data(owner: &SocketOwner, socket: HTTPSocket, buf: &[u8]) { + let tagged = owner.state.get(); if let Some(client) = tagged.client_mut() { return client.on_data::(buf, client.get_ssl_ctx::(), socket); } else if let Some(session) = tagged.session_mut() { @@ -1292,13 +1378,13 @@ impl Handler { HTTPContext::::terminate_socket(socket); } - pub fn on_writable(ptr: *mut c_void, socket: HTTPSocket) { - let tagged = HTTPContext::::get_tagged(ptr); + pub(crate) fn on_writable(owner: &SocketOwner, socket: HTTPSocket) { + let tagged = owner.state.get(); if let Some(client) = tagged.client_mut() { return client.on_writable::(socket); } else if let Some(session) = tagged.session_mut() { return session.on_writable(); - } else if tagged.is::>() { + } else if matches!(tagged, ActiveSocket::Pooled(_)) { // it's a keep-alive socket } else { // don't know what this is, let's close it @@ -1307,13 +1393,13 @@ impl Handler { } } - pub fn on_long_timeout(ptr: *mut c_void, socket: HTTPSocket) { - let tagged = HTTPContext::::get_tagged(ptr); + pub(crate) fn on_long_timeout(owner: &SocketOwner, socket: HTTPSocket) { + let tagged = owner.state.get(); if let Some(client) = tagged.client_mut() { return client.on_timeout::(socket); } if let Some(session) = tagged.session_mut() { - HTTPContext::::mark_socket_as_dead(socket); + HTTPContext::::mark_owner_dead(owner); session.on_close(crate::Error::Timeout); } @@ -1323,38 +1409,46 @@ impl Handler { /// Short-tick (seconds-granularity) idle timer. Same handling as /// [`on_long_timeout`]; `HTTPClient::set_timeout` routes to whichever /// timer suits the configured duration, so both must dispatch. - pub fn on_timeout(ptr: *mut c_void, socket: HTTPSocket) { - Self::on_long_timeout(ptr, socket); + pub(crate) fn on_timeout(owner: &SocketOwner, socket: HTTPSocket) { + Self::on_long_timeout(owner, socket); } - pub fn on_connect_error(ptr: *mut c_void, socket: HTTPSocket, _: c_int) { - // Read before the socket is marked dead: uSockets keeps the - // connecting socket alive for the whole dispatch. + pub(crate) fn on_connect_error(owner: &SocketOwner) { + let socket = owner.socket.get(); + // Read before the close below: uSockets keeps the connecting socket + // alive for the whole dispatch, and `dns_error()` is 0 for a socket + // that failed after name resolution (v1 parity). let dns_error = socket.dns_error(); - let tagged = HTTPContext::::get_tagged(ptr); - HTTPContext::::mark_tagged_socket_as_dead(socket, tagged); + if matches!(socket.socket, uws::InternalSocket::Connected(_)) { + // C5: dispatch_connect_error already closed the socket before + // notifying (close-then-notify at the core), so this close is an + // idempotent no-op kept to mirror the other fail paths. + socket.close(uws::CloseKind::Failure); + } + let tagged = owner.state.get(); + HTTPContext::::mark_owner_dead(owner); if let Some(client) = tagged.client_mut() { client.on_connect_error(dns_error); } else { // Same backstop as `on_close`: a SEMI_SOCKET/connecting socket - // whose ext is no longer a client never dispatches `on_close`, + // whose owner is no longer a client never dispatches `on_close`, // so sweep any leftover tracker entry here. crate::unregister_abort_tracker_for_socket(socket.socket); } // us_connecting_socket_close is always called internally by uSockets } - pub fn on_end(ptr: *mut c_void, socket: HTTPSocket) { + pub(crate) fn on_end(owner: &SocketOwner, socket: HTTPSocket) { // TCP fin must be closed, but we must keep the original tagged - // pointer so that their onClose callback is called. + // state so that their onClose callback is called. // // Four possible states: // 1. HTTP Keep-Alive socket: it must be removed from the pool // 2. HTTP Client socket: it might need to be retried // 3. HTTP/2 session: fail every stream on it // 4. Dead socket: it is already marked as dead - let tagged = HTTPContext::::get_tagged(ptr); - HTTPContext::::mark_tagged_socket_as_dead(socket, tagged); + let tagged = owner.state.get(); + HTTPContext::::mark_owner_dead(owner); // An idle (pooled keep-alive) socket's FIN is answered with a graceful // close so well-behaved servers don't observe ECONNRESET for // connections we were simply done with, and so is a FIN that @@ -1385,19 +1479,3 @@ impl Handler { socket.close(uws::CloseKind::Normal); } } - -/// Must be aligned to `align_of::()` so that tagged pointer values -/// embedding this address pass the align check in `bun.cast`. -#[repr(C, align(8))] -pub(crate) struct DeadSocket { - garbage: u8, -} - -// A shared static + accessor; the pointer is only ever compared, never -// written through. -static DEAD_SOCKET: DeadSocket = DeadSocket { garbage: 0 }; - -#[inline] -fn dead_socket() -> *const DeadSocket { - &raw const DEAD_SOCKET -} diff --git a/src/http/HTTPRequestBody.rs b/src/http/HTTPRequestBody.rs index 13f00a5808dd..4cdc4f98b48e 100644 --- a/src/http/HTTPRequestBody.rs +++ b/src/http/HTTPRequestBody.rs @@ -24,20 +24,30 @@ pub struct Stream { } impl Stream { - /// Mutable access to the JS-side `ThreadSafeStreamBuffer` while attached. + /// Shared access to the JS-side `ThreadSafeStreamBuffer` while attached. /// /// INVARIANT: while `buffer` is `Some`, this `Stream` holds an intrusive /// ref on the `ThreadSafeStreamBuffer` (taken on attach, released in /// `detach`); the buffer is a separate heap allocation that outlives the - /// returned borrow. HTTP-thread-only at the call sites, so the `&mut` is - /// the sole live borrow on this side of the lock. + /// returned borrow. Shared (never `&mut`) — the JS thread holds + /// concurrent borrows; mutation goes through the buffer's own lock. #[inline] - pub fn buffer_mut(&mut self) -> Option<&mut ThreadSafeStreamBuffer> { + pub fn buffer_ref(&self) -> Option<&ThreadSafeStreamBuffer> { // Route through the shared `from_attached` accessor (one centralised // unsafe); see INVARIANT above. self.buffer.map(ThreadSafeStreamBuffer::from_attached) } + /// Latch end-of-body from the shared buffer's sticky flag: the JS thread + /// marks the buffer before scheduling the End wake-up, so a send that starts + /// after a missed wake-up (queued task, h2 pending_attach) still terminates. + pub fn sync_ended(&mut self) -> bool { + if !self.ended && self.buffer_ref().is_some_and(|b| b.is_ended()) { + self.ended = true; + } + self.ended + } + pub fn detach(&mut self) { if let Some(buffer) = self.buffer.take() { // Intrusive refcount decrement. diff --git a/src/http/HTTPThread.rs b/src/http/HTTPThread.rs index ede3e2c888c7..227d70ddd8ce 100644 --- a/src/http/HTTPThread.rs +++ b/src/http/HTTPThread.rs @@ -1,16 +1,15 @@ use core::ffi::c_void; use core::ptr::NonNull; -use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::atomic::{AtomicBool, AtomicPtr, Ordering}; use std::time::Instant; use bun_collections::ArrayHashMap; use bun_core::{self, Output}; -use bun_threading::{Mutex, UnboundedQueue}; -use bun_uws as uws; +use bun_threading::{Guarded, UnboundedQueue}; +use bun_usockets as uws; use crate::async_http::{ACTIVE_REQUESTS_COUNT, MAX_SIMULTANEOUS_REQUESTS}; -use crate::http_context::ActiveSocketExt; use crate::proxy_tunnel::ProxyTunnel; use crate::ssl_config::{self, SSLConfig}; use crate::{AsyncHttp, HTTPContext, HttpClient, InitError, NewHttpContext, h3}; @@ -83,13 +82,43 @@ fn custom_ssl_context_map() -> &'static mut ArrayHashMap<*const SSLConfig, SslCo use bun_event_loop::MiniEventLoop as mini_event_loop; use bun_event_loop::MiniEventLoop::MiniEventLoop; +// ── Cross-thread state (module statics, NOT `HttpThread` fields) ──────────── +// The HTTP thread holds `&mut HttpThread` for its whole life +// (`process_events`), so JS-thread producers must never touch that struct — +// not even via `&HttpThread` — or they'd be foreign accesses under the +// `&mut`'s protector. All producer-visible state lives here instead +// (in-repo precedent: h3_client/PendingConnect::RESOLVED). +pub(crate) static QUEUED_TASKS: Queue = Queue::new(); +static QUEUED_SHUTDOWNS: Guarded> = Guarded::new(Vec::new()); +static QUEUED_WRITES: Guarded> = Guarded::new(Vec::new()); +static QUEUED_RECEIVE_RESUMES: Guarded> = Guarded::new(Vec::new()); +static QUEUED_CERT_CHECK_RESUMES: Guarded> = Guarded::new(Vec::new()); +/// The HTTP thread's uws loop, published (Release) by `on_start` once the +/// loop exists; null before that. Cross-thread `wakeup()` Acquire-loads it, +/// which also publishes the loop's initialization. +static UWS_LOOP: AtomicPtr = AtomicPtr::new(core::ptr::null_mut()); +/// Start instant for `elapsed` timestamps; set on the JS thread in `init` +/// before the HTTP thread spawns (never mutated afterwards). +static START_TIMER: std::sync::OnceLock = std::sync::OnceLock::new(); + +/// Nanoseconds since HTTP-thread init. `Instant::elapsed().as_nanos()` is +/// u128; checked narrow to u64 — overflows only after ~584 years of uptime. +#[inline] +pub(crate) fn timer_read() -> u64 { + u64::try_from( + START_TIMER + .get() + .expect("HTTPThread::init") + .elapsed() + .as_nanos(), + ) + .expect("int cast") +} + pub struct HttpThread { /// Per-thread `MiniEventLoop` singleton — published by /// `MiniEventLoop::init_global()` in [`on_start`]; outlives the thread. pub loop_: *const MiniEventLoop<'static>, - /// The raw uSockets loop inside `loop_.loop` — split out so HTTPContext - /// can `SocketGroup::init` without naming MiniEventLoop. - pub uws_loop: *mut uws::Loop, pub http_context: NewHttpContext, pub https_context: NewHttpContext, /// Stashed `InitOpts` for the default HTTPS context. When the user passed @@ -106,8 +135,7 @@ pub struct HttpThread { /// reentrant). lazy_https_init: Option, - pub queued_tasks: Queue, - /// Tasks popped from `queued_tasks` that couldn't start because + /// Tasks popped from `QUEUED_TASKS` that couldn't start because /// `active_requests_count >= max_simultaneous_requests`. Kept in FIFO order /// and processed before `queued_tasks` on the next `drainEvents`. Owned by /// the HTTP thread; never accessed concurrently. @@ -120,20 +148,8 @@ pub struct HttpThread { /// path stays O(1). Owned by the HTTP thread. pub has_pending_queued_abort: bool, - pub queued_shutdowns: Vec, - pub queued_writes: Vec, - pub queued_receive_resumes: Vec, - pub queued_cert_check_resumes: Vec, - - pub queued_shutdowns_lock: Mutex, - pub queued_writes_lock: Mutex, - pub queued_receive_resumes_lock: Mutex, - pub queued_cert_check_resumes_lock: Mutex, - pub queued_threadlocal_proxy_derefs: Vec<*mut ProxyTunnel>, - pub has_awoken: AtomicBool, - pub timer: Instant, pub lazy_libdeflater: Option>, pub lazy_request_body_buffer: Option>, @@ -148,13 +164,13 @@ pub struct HttpThread { } impl HttpThread { - /// `loop_`/`uws_loop` are filled in by - /// `on_start` on the spawned thread; `timer` is started on the calling + /// `loop_` (and the `UWS_LOOP` static) are filled in by + /// `on_start` on the spawned thread; `START_TIMER` is set on the calling /// thread. fn new() -> Self { + let _ = START_TIMER.set(Instant::now()); Self { loop_: core::ptr::null(), - uws_loop: core::ptr::null_mut(), http_context: NewHttpContext:: { ref_count: Cell::new(1), pending_sockets: bun_collections::HiveArray::init(), @@ -172,20 +188,9 @@ impl HttpThread { pending_h2_connects: Vec::new(), }, lazy_https_init: None, - queued_tasks: Queue::new(), deferred_tasks: Vec::new(), has_pending_queued_abort: false, - queued_shutdowns: Vec::new(), - queued_writes: Vec::new(), - queued_receive_resumes: Vec::new(), - queued_cert_check_resumes: Vec::new(), - queued_shutdowns_lock: Mutex::new(), - queued_writes_lock: Mutex::new(), - queued_receive_resumes_lock: Mutex::new(), - queued_cert_check_resumes_lock: Mutex::new(), queued_threadlocal_proxy_derefs: Vec::new(), - has_awoken: AtomicBool::new(false), - timer: Instant::now(), lazy_libdeflater: None, lazy_request_body_buffer: None, in_flight: Vec::new(), @@ -381,30 +386,15 @@ fn on_init_error_noop(err: InitError, opts: &InitOpts) -> ! { impl HttpThread { /// Raw uSockets loop for `SocketGroup::init`. Split from `loop_` so /// HTTPContext doesn't need to name the higher-tier MiniEventLoop type. + /// Relaxed: HTTP-thread callers read the value this thread stored. #[inline] pub fn uws_loop(&self) -> *mut uws::Loop { - self.uws_loop - } - - /// Mutable access to the live uSockets event loop. - /// - /// INVARIANT: `uws_loop` is set once in [`on_start`] (published via the - /// `has_awoken` Release store) and outlives the HTTP thread. The loop is a - /// separate C heap allocation disjoint from `self`. HTTP-thread-only at - /// every caller — `wakeup()` is the sole cross-thread entry and uses the - /// raw FFI call instead. Centralises the raw `&mut *self.uws_loop` - /// upgrade repeated in `process_events`. - #[inline] - fn uws_loop_mut<'a>(&self) -> &'a mut uws::Loop { - // SAFETY: see INVARIANT above. - unsafe { &mut *self.uws_loop } + UWS_LOOP.load(Ordering::Relaxed) } - /// `Instant::elapsed().as_nanos()` is u128; checked narrow to u64 — - /// overflows only after ~584 years of process uptime. #[inline] fn timer_read(&self) -> u64 { - u64::try_from(self.timer.elapsed().as_nanos()).expect("int cast") + timer_read() } #[inline] @@ -500,6 +490,15 @@ impl HttpThread { } let requested_config: *const SSLConfig = tls.get(); + // Validate the proxy scheme before the cache is touched: the + // hit path connects without re-checking, and a miss must not + // cache a context for a request that fails anyway. + if let Some(url) = client.http_proxy.clone() + && !is_supported_proxy_protocol(url.protocol) + { + return Err(crate::Error::UnsupportedProxyProtocol); + } + // Evict stale entries from the cache self.evict_stale_ssl_contexts(); @@ -570,14 +569,7 @@ impl HttpThread { client.set_custom_ssl_ctx(ctx_nn); // Keepalive is now supported for custom SSL contexts let result = if let Some(url) = client.http_proxy.clone() { - if url.protocol.is_empty() - || url.protocol == b"https" - || url.protocol == b"http" - { - custom_context.connect(client, url.hostname, url.get_port_auto()) - } else { - return Err(crate::Error::UnsupportedProxyProtocol); - } + custom_context.connect(client, url.hostname, url.get_port_auto()) } else { let (hn, pt) = (client.url.hostname, client.url.get_port_auto()); custom_context.connect(client, hn, pt) @@ -589,7 +581,7 @@ impl HttpThread { if let Some(url) = client.http_proxy.clone() { if !url.href.is_empty() { // https://github.com/oven-sh/bun/issues/11343 - if url.protocol.is_empty() || url.protocol == b"https" || url.protocol == b"http" { + if is_supported_proxy_protocol(url.protocol) { return self.context::().connect( client, url.hostname, @@ -635,10 +627,7 @@ impl HttpThread { loop { // socket.close() can potentially be slow // Let's not block other threads while this runs. - let queued_shutdowns = { - let _guard = self.queued_shutdowns_lock.lock_guard(); - core::mem::take(&mut self.queued_shutdowns) - }; + let queued_shutdowns = core::mem::take(&mut *QUEUED_SHUTDOWNS.lock()); for http in &queued_shutdowns { let tracker = abort_tracker(); @@ -706,10 +695,7 @@ impl HttpThread { fn drain_queued_writes(&mut self) { loop { - let queued_writes = { - let _guard = self.queued_writes_lock.lock_guard(); - core::mem::take(&mut self.queued_writes) - }; + let queued_writes = core::mem::take(&mut *QUEUED_WRITES.lock()); for write in &queued_writes { let message = write.kind; let ended = message == WriteMessageType::End; @@ -766,10 +752,7 @@ impl HttpThread { fn drain_queued_cert_check_resumes(&mut self) { loop { - let queued_cert_check_resumes = { - let _guard = self.queued_cert_check_resumes_lock.lock_guard(); - core::mem::take(&mut self.queued_cert_check_resumes) - }; + let queued_cert_check_resumes = core::mem::take(&mut *QUEUED_CERT_CHECK_RESUMES.lock()); for resume in &queued_cert_check_resumes { // Both arms are required: an HTTPS target behind a plaintext // proxy parks behind a SocketTcp tracker entry. @@ -811,10 +794,7 @@ impl HttpThread { fn drain_queued_receive_resumes(&mut self) { loop { - let queued = { - let _guard = self.queued_receive_resumes_lock.lock_guard(); - core::mem::take(&mut self.queued_receive_resumes) - }; + let queued = core::mem::take(&mut *QUEUED_RECEIVE_RESUMES.lock()); if queued.is_empty() { return; } @@ -928,7 +908,7 @@ impl HttpThread { } loop { - let Some(http) = NonNull::new(self.queued_tasks.pop()) else { + let Some(http) = NonNull::new(QUEUED_TASKS.pop()) else { break; }; // AsyncHttp is heap-owned by the caller and alive until its @@ -957,57 +937,55 @@ impl HttpThread { } } - pub fn schedule_receive_resume(&mut self, async_http_id: u32) { + // Producer entry points: associated fns (no `self`) callable from ANY + // thread — they touch only the module statics above, never the struct + // the HTTP thread mutably owns. + + pub fn schedule_receive_resume(async_http_id: u32) { { - let _guard = self.queued_receive_resumes_lock.lock_guard(); - if self.queued_receive_resumes.last() == Some(&async_http_id) { + let mut q = QUEUED_RECEIVE_RESUMES.lock(); + if q.last() == Some(&async_http_id) { return; } - self.queued_receive_resumes.push(async_http_id); + q.push(async_http_id); } - self.wakeup(); + Self::wakeup(); } - pub fn schedule_shutdown(&mut self, http: &AsyncHttp) { - self.schedule_shutdown_by_id(http.async_http_id); + pub fn schedule_shutdown(http: &AsyncHttp) { + Self::schedule_shutdown_by_id(http.async_http_id); } - pub fn schedule_shutdown_by_id(&mut self, async_http_id: u32) { + pub fn schedule_shutdown_by_id(async_http_id: u32) { bun_core::scoped_log!(HTTPThread, "scheduleShutdown {}", async_http_id); - { - let _guard = self.queued_shutdowns_lock.lock_guard(); - self.queued_shutdowns - .push(ShutdownMessage { async_http_id }); - } - self.wakeup(); + QUEUED_SHUTDOWNS + .lock() + .push(ShutdownMessage { async_http_id }); + Self::wakeup(); } - pub fn schedule_cert_check_resume(&mut self, http: &AsyncHttp) { + pub fn schedule_cert_check_resume(http: &AsyncHttp) { bun_core::scoped_log!(HTTPThread, "scheduleCertCheckResume {}", http.async_http_id); - { - let _guard = self.queued_cert_check_resumes_lock.lock_guard(); - self.queued_cert_check_resumes.push(CertCheckResumeMessage { + QUEUED_CERT_CHECK_RESUMES + .lock() + .push(CertCheckResumeMessage { async_http_id: http.async_http_id, }); - } - self.wakeup(); + Self::wakeup(); } - pub fn schedule_request_write(&mut self, http: &AsyncHttp, kind: WriteMessageType) { - { - let _guard = self.queued_writes_lock.lock_guard(); - self.queued_writes.push(WriteMessage { - async_http_id: http.async_http_id, - kind, - }); - } - self.wakeup(); + pub fn schedule_request_write(http: &AsyncHttp, kind: WriteMessageType) { + QUEUED_WRITES.lock().push(WriteMessage { + async_http_id: http.async_http_id, + kind, + }); + Self::wakeup(); } pub fn schedule_proxy_deref(&mut self, proxy: *mut ProxyTunnel) { // this is always called on the http thread, self.queued_threadlocal_proxy_derefs.push(proxy); - self.wakeup(); + Self::wakeup(); } /// Called from [`crate::shutdown_for_exit`] on the HTTP thread once @@ -1068,17 +1046,15 @@ impl HttpThread { } } - pub fn wakeup(&self) { - // Acquire (not Relaxed): pairs with the Release store in `on_start` - // so the read of `self.uws_loop` (a non-atomic field set there) - // observes the published value. This is the canonical "Relaxed gives - // no happens-before for the init it guards" case. - if self.has_awoken.load(Ordering::Acquire) { - // SAFETY: uws_loop is the live HTTP-thread loop set in on_start. - // Call the raw extern (not `Loop::wakeup(&mut self)`) — this runs - // cross-thread while the HTTP thread owns the loop, so forming - // `&mut Loop` here would alias. - unsafe { uws::us_wakeup_loop(self.uws_loop) }; + /// Callable from ANY thread. Acquire pairs with the Release store in + /// `on_start` so a non-null pointer implies the loop is initialized. + pub fn wakeup() { + let loop_ = UWS_LOOP.load(Ordering::Acquire); + if !loop_.is_null() { + // Raw-ptr wakeup — this runs cross-thread while the HTTP thread + // owns the loop, so forming `&mut Loop` here would alias. + // `us_wakeup_loop` is the one documented thread-safe entry point. + uws::us_wakeup_loop(loop_); } } @@ -1091,29 +1067,16 @@ impl HttpThread { if batch.len == 0 { return; } - // Release-mode guard: `HttpThread` has niche-bearing fields, so - // dereffing `as_mut_ptr()` below on an uninitialized static is UB. // The "every caller goes through `init`" invariant was unenforced - // (e.g. `async_http::preconnect` did not), so check it here. The - // `Acquire` load pairs with `init_once`'s `Release` store to publish - // the `HTTP_THREAD.write(..)` to this thread. + // (e.g. `async_http::preconnect` did not), so check it here — a + // pre-init schedule would strand tasks in `QUEUED_TASKS` with no + // thread to drain them. assert!( crate::HTTP_THREAD_INIT.load(Ordering::Acquire), "HTTPThread::schedule() called before HTTPThread::init()" ); - // SAFETY: `HTTP_THREAD_INIT == true` (checked above) ⇒ `HTTP_THREAD` - // is fully written. `get_unchecked` (no owner assert) so the - // `ThreadCell` debug-owner check is skipped on this cross-thread - // caller. Wrap the result in a `ParentRef` (process-lifetime backref) - // so the `&self`-only calls below — `queued_tasks.push` (lock-free - // MPSC) and `wakeup` (atomics + raw uws ptr) — go through the safe - // `Deref` impl instead of open-coded `(*this_p)` raw derefs. Only a - // shared `&HttpThread` is ever materialised; the HTTP thread itself - // never holds a long-lived `&mut HttpThread` across the points these - // touch (both fields are designed for cross-thread shared access). - let this = unsafe { - bun_ptr::ParentRef::::from_raw((*crate::HTTP_THREAD.get_unchecked()).as_mut_ptr()) - }; + // Statics only — never touch the `HttpThread` struct from here (the + // HTTP thread holds `&mut` over it for its whole life). { let mut batch_ = batch; while let Some(task) = batch_.pop() { @@ -1122,13 +1085,20 @@ impl HttpThread { unsafe { bun_core::from_field_ptr!(AsyncHttp, task, task.as_ptr()) }; // SAFETY: `http` recovered from a live batch node (non-null); valid until popped. let http = unsafe { core::ptr::NonNull::new_unchecked(http) }; - this.queued_tasks.push(http); + QUEUED_TASKS.push(http); } } - this.wakeup(); + Self::wakeup(); } } +/// Only `http`/`https` proxies are supported (empty = scheme-relative); +/// anything else (socks5, …) must fail with UnsupportedProxyProtocol +/// before any socket is opened. https://github.com/oven-sh/bun/issues/11343 +fn is_supported_proxy_protocol(protocol: &[u8]) -> bool { + protocol.is_empty() || protocol == b"https" || protocol == b"http" +} + /// Evict the least-recently-used SSL context cache entry. fn evict_oldest_ssl_context() { let map = custom_ssl_context_map(); @@ -1183,19 +1153,22 @@ fn abort_tracker() -> &'static mut ArrayHashMap { crate::abort_tracker() } -/// Debug+ASAN invariant check: every socket pointer in the abort tracker must -/// point at live (unfreed) memory. A stale entry here means some socket-close -/// path forgot `unregister_abort_tracker`, which later manifests as a -/// use-after-free in `drain_queued_shutdowns`/`drain_queued_writes` when the -/// JS thread aborts that request id. Runs before and after each loop tick so -/// the report fires at the tick that leaked, not at the eventual abort. +/// Debug invariant check: every abort-tracker entry must still resolve to a +/// live (generation-matching) socket. A stale entry means some socket-close +/// path forgot `unregister_abort_tracker` — with generation-checked handles +/// that is no longer a use-after-free (stale handles are safe no-ops in +/// `drain_queued_shutdowns`/`drain_queued_writes`), but it still silently +/// drops a later abort for that request id. Runs before and after each loop +/// tick so the report fires at the tick that leaked, not at the eventual +/// abort. `ext()` is the generation-validated probe (None == stale/recycled). #[inline] fn assert_abort_tracker_sockets_alive() { if cfg!(debug_assertions) { - for socket in abort_tracker().values() { - if let Some(usocket) = socket.socket().get() { - bun_core::asan::assert_unpoisoned(usocket); - } + for (async_http_id, socket) in abort_tracker().iter() { + assert!( + socket.ext::().is_some(), + "stale abort-tracker entry for async_http_id {async_http_id}: a close path skipped unregister_abort_tracker" + ); } } } @@ -1256,6 +1229,10 @@ mod _event_loop_draft { } pub(super) fn on_start(opts: InitOpts) { + // Latch the ThreadCell to this thread: any later JS-thread + // `http_thread()` (debug) panics instead of forming a cross-thread + // `&mut HttpThread` — cross-thread entries use the module statics only. + crate::HTTP_THREAD.claim(); Output::Source::configure_named_thread(bun_core::zstr!("HTTP Client")); // Normalising once here (see `normalize_idle_timeout_seconds`) keeps @@ -1304,7 +1281,9 @@ mod _event_loop_draft { let thread = crate::http_thread_mut(); thread.loop_ = loop_; - thread.uws_loop = uws_loop; + // Release: publishes the fully-initialized loop to cross-thread + // `wakeup()` readers (Acquire load; null = not started yet). + UWS_LOOP.store(uws_loop, Ordering::Release); thread.http_context.init(); // `https_context.init_with_thread_opts` eagerly builds the BoringSSL // `SSL_CTX` and parses the bundled root-CA store @@ -1329,26 +1308,28 @@ mod _event_loop_draft { // none). thread.lazy_https_init = Some(opts); } - // Release: publishes `uws_loop`/`loop_` to cross-thread `wakeup()` - // readers (which Acquire-load `has_awoken`). - thread.has_awoken.store(true, Ordering::Release); thread.process_events(); } impl HttpThread { fn process_events(&mut self) -> ! { - let uws_loop = self.uws_loop_mut(); + let uws_loop = self.uws_loop(); + // Raw-place accounting (no `&mut Loop`): JS-thread `wakeup()` + // calls `us_wakeup_loop` on this loop concurrently (C17). #[cfg(unix)] { - uws_loop.num_polls = uws_loop.num_polls.max(2); + uws::Loop::raise_num_polls_to(uws_loop, 2); } #[cfg(windows)] { - uws_loop.inc(); + uws::Loop::inc_raw(uws_loop); } loop { if SHUTDOWN_REQUESTED.load(Ordering::Acquire) { + // Published to the JS thread via the SHUTDOWN_DONE ack + // below (reclaim drains there can also drop contexts). + EXIT_TEARDOWN.store(true, Ordering::Release); self.dealloc_in_flight_for_exit(); { let mut done = SHUTDOWN_DONE.0.lock(); @@ -1366,10 +1347,11 @@ mod _event_loop_draft { assert_abort_tracker_sockets_alive(); Output::flush(); - let uws_loop = self.uws_loop_mut(); - uws_loop.inc(); - uws_loop.tick(); - uws_loop.dec(); + uws::Loop::inc_raw(uws_loop); + // Raw-ptr tick: no `&mut Loop` may span the tick — wakeup + // threads touch `pending_wakeups` concurrently (C17). + uws::Loop::tick(uws_loop); + uws::Loop::dec_raw(uws_loop); assert_abort_tracker_sockets_alive(); if cfg!(debug_assertions) { @@ -1381,6 +1363,16 @@ mod _event_loop_draft { } static SHUTDOWN_REQUESTED: AtomicBool = AtomicBool::new(false); + +/// Set on the HTTP thread right before [`HttpThread::dealloc_in_flight_for_exit`]; +/// the loop never ticks again after that point. `HTTPContext::drop` reads it to +/// skip `close_all` — dispatching on_close mid-exit would re-enter clients the +/// exit teardown has already freed (or is tearing down). +static EXIT_TEARDOWN: AtomicBool = AtomicBool::new(false); + +pub(crate) fn exit_teardown_active() -> bool { + EXIT_TEARDOWN.load(Ordering::Acquire) +} static SHUTDOWN_DONE: (bun_threading::Guarded, bun_threading::Condvar) = ( bun_threading::Guarded::new(false), bun_threading::Condvar::new(), @@ -1416,23 +1408,13 @@ pub fn shutdown_for_exit() { if !crate::HTTP_THREAD_INIT.load(Ordering::Acquire) { return; } - // SAFETY: `HTTP_THREAD_INIT == true` ⇒ `HTTP_THREAD` is fully written. - // `get_unchecked` so the `ThreadCell` owner assert is skipped on this - // cross-thread caller; `ParentRef` so only a shared `&HttpThread` is - // materialised — `process_events(&mut self)` is live on the HTTP thread, - // so a `&mut` here would alias. Same shape as `schedule()` above. - let thread = unsafe { - bun_ptr::ParentRef::::from_raw( - (*crate::HTTP_THREAD.get_unchecked()).as_mut_ptr(), - ) - }; - if !thread.has_awoken.load(Ordering::Acquire) { + if UWS_LOOP.load(Ordering::Acquire).is_null() { // `on_start` hasn't published the loop yet — no `start_queued_task` // can have run, so no boxes exist. return; } SHUTDOWN_REQUESTED.store(true, Ordering::Release); - thread.wakeup(); + HttpThread::wakeup(); let mut done = SHUTDOWN_DONE.0.lock(); // 1s upper bound: a stuck HTTP thread shouldn't deadlock process exit. let deadline = Instant::now() + std::time::Duration::from_secs(1); diff --git a/src/http/ProxyTunnel.rs b/src/http/ProxyTunnel.rs index 11477a54642b..fad843347d73 100644 --- a/src/http/ProxyTunnel.rs +++ b/src/http/ProxyTunnel.rs @@ -4,7 +4,7 @@ use core::sync::atomic::Ordering; use crate::Error; use bun_core::scoped_log; -use bun_uws as uws; +use bun_usockets as uws; use crate::http_cert_error::HTTPCertError; use crate::http_context::HTTPSocket; @@ -39,8 +39,8 @@ type ProxyTunnelWrapper = SSLWrapper<*mut HTTPClient<'static>>; /// active socket is the socket that is currently being used // `HTTPSocket` = `uws::SocketHandler` = `NewSocketHandler`, so the -// canonical 3-arm enum lives in `bun_uws` next to its payload type. -pub use bun_uws::MaybeAnySocket as Socket; +// canonical 3-arm enum lives in the shim crate next to SSLWrapper. +pub use bun_uws_shim::MaybeAnySocket as Socket; #[derive(bun_ptr::CellRefCounted)] pub struct ProxyTunnel { diff --git a/src/http/ThreadSafeStreamBuffer.rs b/src/http/ThreadSafeStreamBuffer.rs index 53124fa1cbc3..d8fba9cfce67 100644 --- a/src/http/ThreadSafeStreamBuffer.rs +++ b/src/http/ThreadSafeStreamBuffer.rs @@ -1,17 +1,27 @@ use core::ffi::c_void; +use core::sync::atomic::{AtomicBool, Ordering}; use bun_io::StreamBuffer; -use bun_threading::Mutex; +use bun_threading::{Guarded, GuardedLock, Mutex}; #[derive(bun_ptr::ThreadSafeRefCounted)] pub struct ThreadSafeStreamBuffer { - pub buffer: StreamBuffer, - pub mutex: Mutex, + /// The shared byte buffer lives INSIDE the lock: both the JS thread and + /// the HTTP thread reach it through `&self` + `lock()`, so neither side + /// ever forms a `&mut ThreadSafeStreamBuffer` that the other's writes + /// would alias. + pub buffer: Guarded, /// Intrusive atomic refcount. Starts at 2: 1 for main thread and 1 for http thread. pub ref_count: bun_ptr::ThreadSafeRefCount, /// callback will be called passing the context for the http callback /// this is used to report when the buffer is drained and only if end chunk was not sent/reported + /// Set on the JS thread before the buffer is published to the HTTP thread + /// (`set_drain_callback`); cleared only after the HTTP side detached. pub callback: Option, + /// Sticky end-of-body flag, set by the JS thread before it schedules the + /// End wake-up. Senders latch it via `Stream::sync_ended` so an End that + /// arrives while the request has no live stream/socket is never lost. + ended: AtomicBool, } pub struct Callback { @@ -38,11 +48,11 @@ impl Callback { impl Default for ThreadSafeStreamBuffer { fn default() -> Self { Self { - buffer: StreamBuffer::default(), - mutex: Mutex::default(), + buffer: Guarded::new(StreamBuffer::default()), // .initExactRefs(2) — 1 for main thread and 1 for http thread ref_count: bun_ptr::ThreadSafeRefCount::init_exact_refs(2), callback: None, + ended: AtomicBool::new(false), } } } @@ -55,19 +65,17 @@ impl ThreadSafeStreamBuffer { bun_core::heap::into_raw(Box::new(init)) } - /// Upgrade an attached intrusive-ref handle to `&mut Self`. + /// Upgrade an attached intrusive-ref handle to `&Self`. /// /// INVARIANT: while `p` is held, the HTTP side owns one intrusive ref on /// the buffer (taken at attach, released in `Stream::detach`); the buffer - /// is a separate heap allocation that outlives the returned borrow and is - /// disjoint from any `&mut HTTPClient`/`&mut Stream`. HTTP-thread-only at - /// every caller, so the `&mut` is the sole live borrow on this side of the - /// internal lock. Centralises the SAFETY argument shared by - /// `http_request_body::Stream::buffer_mut` and `HTTPClient::write_to_stream`. + /// is a separate heap allocation that outlives the returned borrow. + /// Shared (never `&mut`): the JS thread holds concurrent `&Self` borrows + /// of the same allocation — all mutation goes through `lock()`/atomics. #[inline] - pub(crate) fn from_attached<'a>(mut p: core::ptr::NonNull) -> &'a mut Self { + pub(crate) fn from_attached<'a>(p: core::ptr::NonNull) -> &'a Self { // SAFETY: see INVARIANT above. - unsafe { p.as_mut() } + unsafe { p.as_ref() } } pub fn ref_(this: core::ptr::NonNull) { @@ -80,26 +88,22 @@ impl ThreadSafeStreamBuffer { unsafe { bun_ptr::ThreadSafeRefCount::::deref(this.as_ptr()) }; } - pub fn acquire(&mut self) -> &mut StreamBuffer { - self.mutex.lock(); - // The mutex stays locked until `release()`. Prefer `lock()` (RAII - // guard) for simple critical sections; this split form remains for - // callers that interleave release with disjoint `self` access. - &mut self.buffer + /// Lock the shared buffer. The returned guard derefs to the inner + /// `StreamBuffer` and unlocks on `Drop`. + #[inline] + pub fn lock(&self) -> GuardedLock<'_, StreamBuffer, Mutex> { + self.buffer.lock() } - pub fn release(&mut self) { - self.mutex.unlock(); + /// JS thread: mark end-of-body. Release pairs with the Acquire in + /// `is_ended` so the final buffered bytes are visible with the flag. + pub fn mark_ended(&self) { + self.ended.store(true, Ordering::Release); } - /// RAII spelling of `acquire()`/`release()` — locks the mutex and returns a - /// guard that derefs to the inner `StreamBuffer` and unlocks on `Drop`. - /// Use this instead of a bare `acquire`/`release` pair so the lock is - /// released on every return path. - #[inline] - pub fn lock(&mut self) -> StreamBufferGuard<'_> { - self.mutex.lock(); - StreamBufferGuard(self) + /// HTTP thread: read the sticky end-of-body flag (see `mark_ended`). + pub fn is_ended(&self) -> bool { + self.ended.load(Ordering::Acquire) } /// Should only be called in the main thread and before scheduling it to the http thread @@ -107,43 +111,20 @@ impl ThreadSafeStreamBuffer { self.callback = Some(Callback::init(callback, context)); } + /// Main thread only, and only after the HTTP side detached (its ref was + /// released in `Stream::detach`), so no concurrent `report_drain` reads. pub fn clear_drain_callback(&mut self) { self.callback = None; } - /// This is exclusively called from the http thread. - /// Buffer should be acquired before calling this. - pub fn report_drain(&self) { - if self.buffer.is_empty() { + /// This is exclusively called from the http thread. `buffer` must be the + /// view of this buffer's own `lock()` guard — the drain check has to + /// happen while the lock is still held. + pub fn report_drain(&self, buffer: &StreamBuffer) { + if buffer.is_empty() { if let Some(callback) = &self.callback { callback.call(); } } } } - -/// RAII guard returned by [`ThreadSafeStreamBuffer::lock`]. Derefs to the -/// protected `StreamBuffer` and releases the mutex on `Drop`. -pub struct StreamBufferGuard<'a>(&'a mut ThreadSafeStreamBuffer); - -impl core::ops::Deref for StreamBufferGuard<'_> { - type Target = StreamBuffer; - #[inline] - fn deref(&self) -> &StreamBuffer { - &self.0.buffer - } -} - -impl core::ops::DerefMut for StreamBufferGuard<'_> { - #[inline] - fn deref_mut(&mut self) -> &mut StreamBuffer { - &mut self.0.buffer - } -} - -impl Drop for StreamBufferGuard<'_> { - #[inline] - fn drop(&mut self) { - self.0.mutex.unlock(); - } -} diff --git a/src/http/error.rs b/src/http/error.rs index 2512da71c2a2..fad9d1ed3b60 100644 --- a/src/http/error.rs +++ b/src/http/error.rs @@ -354,8 +354,8 @@ impl From for Error { } } -impl From for Error { - fn from(_: bun_uws::ConnectError) -> Self { +impl From for Error { + fn from(_: bun_uws_shim::ConnectError) -> Self { Error::FailedToOpenSocket } } diff --git a/src/http/h2_client/ClientSession.rs b/src/http/h2_client/ClientSession.rs index b92803783380..6fea75dcc03f 100644 --- a/src/http/h2_client/ClientSession.rs +++ b/src/http/h2_client/ClientSession.rs @@ -471,6 +471,13 @@ impl ClientSession { }; client.state.response_stage = HTTPStage::Headers; + if client.flags.is_streaming_request_body { + // Deliver body bytes / end-of-body buffered while this request was + // parked (pending_attach / coalesced connect): their Data/End + // wake-ups fired before a stream existed and were dropped. + encode::drain_send_body(self, stream_mut(stream), usize::MAX); + } + if let Err(err) = self.flush() { self.fail_all(err); return; @@ -856,7 +863,7 @@ impl ClientSession { } NewHTTPContext::::mark_socket_as_dead(sock); self.on_close(err); - sock.close(bun_uws::CloseKind::Failure); + sock.close(bun_usockets::CloseKind::Failure); } /// Called from the HTTP thread's shutdown queue when a fetch on this diff --git a/src/http/h2_client/encode.rs b/src/http/h2_client/encode.rs index ccf501687c27..059e128b7343 100644 --- a/src/http/h2_client/encode.rs +++ b/src/http/h2_client/encode.rs @@ -325,24 +325,20 @@ pub(crate) fn drain_send_body(session: &mut ClientSession, stream: &mut Stream, } } HTTPRequestBody::Stream(body) => { - let ended = body.ended; - let Some(sb) = body.buffer_mut() else { + let ended = body.sync_ended(); + let Some(sb) = body.buffer_ref() else { return; }; - let buffer = sb.acquire(); + let mut buffer = sb.lock(); let data_ptr = buffer.list.as_ptr(); let data_len = buffer.size(); let cursor = buffer.cursor; if data_len == 0 && !ended { - sb.release(); return; } // SAFETY: data_ptr[cursor..cursor+data_len] is the readable slice. let data = unsafe { bun_core::ffi::slice(data_ptr.add(cursor), data_len) }; let sent = write_data_windowed(session, stream, data, ended, cap); - // We still hold the lock from `acquire()` above; `sb` is the sole - // live borrow, so reborrowing `&mut sb.buffer` is a child access. - let buffer = &mut sb.buffer; buffer.cursor += sent; let drained = buffer.is_empty(); if drained { @@ -352,9 +348,9 @@ pub(crate) fn drain_send_body(session: &mut ClientSession, stream: &mut Stream, stream.sent_end_stream(); client.state.request_stage = HTTPStage::Done; } else if drained && data_len > 0 { - sb.report_drain(); + sb.report_drain(&buffer); } - sb.release(); + drop(buffer); if stream.local_closed() { body.detach(); } diff --git a/src/http/h3_client/ClientContext.rs b/src/http/h3_client/ClientContext.rs index 6a1a8114bf35..bc28d85a76c6 100644 --- a/src/http/h3_client/ClientContext.rs +++ b/src/http/h3_client/ClientContext.rs @@ -6,9 +6,9 @@ use core::ffi::{c_uint, c_void}; use core::ptr::NonNull; use core::sync::atomic::Ordering; -use bun_uws::Loop as UwsLoop; -use bun_uws::quic; -use bun_uws::quic::context::ConnectResult; +use bun_uws_shim::Loop as UwsLoop; +use bun_uws_shim::quic; +use bun_uws_shim::quic::context::ConnectResult; use super::callbacks; use super::client_session::{ClientSession, quic_socket_mut, session_mut}; diff --git a/src/http/h3_client/ClientSession.rs b/src/http/h3_client/ClientSession.rs index 65ef2b6e43c2..5bf495ea8b8e 100644 --- a/src/http/h3_client/ClientSession.rs +++ b/src/http/h3_client/ClientSession.rs @@ -8,7 +8,7 @@ use core::ptr::NonNull; use core::sync::atomic::Ordering; use bun_core::strings; -use bun_uws::quic; +use bun_uws_shim::quic; use super::client_context::ClientContext; use super::encode; diff --git a/src/http/h3_client/PendingConnect.rs b/src/http/h3_client/PendingConnect.rs index a3e9f64821bb..9acb72acf7fd 100644 --- a/src/http/h3_client/PendingConnect.rs +++ b/src/http/h3_client/PendingConnect.rs @@ -12,8 +12,8 @@ use core::ptr::NonNull; use core::sync::atomic::Ordering; use bun_threading::Guarded; -use bun_uws as uws; -use bun_uws::quic; +use bun_usockets as uws; +use bun_uws_shim::quic; use super::ClientSession; use super::client_session::session_mut; @@ -124,8 +124,9 @@ impl PendingConnect { ) .r#loop(); RESOLVED.lock().push(Resolved(this)); - // SAFETY: `loop_ptr` is a live uws::Loop for as long as the HTTP thread runs. - unsafe { (*loop_ptr).wakeup() }; + // Raw-ptr wakeup: this runs off the HTTP thread, so forming + // `&mut Loop` here would alias the loop owner (C16/C17). + uws::us_wakeup_loop(loop_ptr); } pub fn drain_resolved() { diff --git a/src/http/h3_client/Stream.rs b/src/http/h3_client/Stream.rs index 7f58ee643d60..5c79c37ba58e 100644 --- a/src/http/h3_client/Stream.rs +++ b/src/http/h3_client/Stream.rs @@ -8,7 +8,7 @@ use core::ptr::NonNull; use core::sync::atomic::Ordering; use bun_picohttp as picohttp; -use bun_uws::quic; +use bun_uws_shim::quic; use super::ClientSession; use crate::HttpClient; diff --git a/src/http/h3_client/callbacks.rs b/src/http/h3_client/callbacks.rs index 9e254a831ac0..6ef9662f8852 100644 --- a/src/http/h3_client/callbacks.rs +++ b/src/http/h3_client/callbacks.rs @@ -10,7 +10,7 @@ use core::ptr::NonNull; use core::sync::atomic::Ordering; use bstr::BStr; -use bun_uws::quic; +use bun_uws_shim::quic; use super::client_context::ClientContext; use super::client_session::{ClientSession, session_mut, stream_mut, stream_ref}; diff --git a/src/http/h3_client/encode.rs b/src/http/h3_client/encode.rs index 9d890910d183..f9999035c529 100644 --- a/src/http/h3_client/encode.rs +++ b/src/http/h3_client/encode.rs @@ -3,9 +3,9 @@ //! a JS streaming sink) onto the lsquic stream. Mirrors `h2_client/encode.rs`. use bun_core::strings; -use bun_uws::quic; -use bun_uws::quic::Qpack; -use bun_uws::quic::header::Class as QpackClass; +use bun_uws_shim::quic; +use bun_uws_shim::quic::Qpack; +use bun_uws_shim::quic::header::Class as QpackClass; use super::client_session::ClientSession; use super::stream::Stream; @@ -160,11 +160,11 @@ pub(crate) fn drain_send_body(stream: &mut Stream, qs: &mut quic::Stream) { let HTTPRequestBody::Stream(body) = &mut client.state.original_request_body else { unreachable!() }; - let ended = body.ended; - let Some(sb) = body.buffer_mut() else { + let ended = body.sync_ended(); + let Some(sb) = body.buffer_ref() else { return; }; - let buffer = sb.acquire(); + let mut buffer = sb.lock(); let data_len = buffer.slice().len(); let mut written: usize = 0; while written < data_len { @@ -186,9 +186,9 @@ pub(crate) fn drain_send_body(stream: &mut Stream, qs: &mut quic::Stream) { } else if !drained { qs.want_write(true); } else if data_len > 0 { - sb.report_drain(); + sb.report_drain(&buffer); } - sb.release(); + drop(buffer); if stream.request_body_done { body.detach(); } diff --git a/src/http/lib.rs b/src/http/lib.rs index 155e4ed70ab6..cd48daae8b10 100644 --- a/src/http/lib.rs +++ b/src/http/lib.rs @@ -67,10 +67,10 @@ pub use thread_safe_stream_buffer::ThreadSafeStreamBuffer; #[path = "ssl_config.rs"] pub mod ssl_config; pub use ssl_config::SSLConfig; -// SSLWrapper was MOVE_DOWN to bun_uws (tier 4); re-export here so +// SSLWrapper lives in the shim crate; re-export here so // `crate::ssl_wrapper::SSLWrapper` resolves for ProxyTunnel/HTTPContext. -pub use bun_uws::ssl_wrapper; -pub use bun_uws::ssl_wrapper::SSLWrapper; +pub use bun_uws_shim::ssl_wrapper; +pub use bun_uws_shim::ssl_wrapper::SSLWrapper; // ── naming aliases ── // Submodules use both `HTTPClient`/`HttpClient` and the older name @@ -595,10 +595,6 @@ pub fn hash_header_name(name: &[u8]) -> u64 { } // ───────────────────────────── HTTPClient struct ───────────────────────────── -// The heavy `impl HTTPClient` (socket dispatch / state machine) remains -// gated below until the missing -// `bun_uws::NewSocketHandler` methods (`ext`/`timeout`/`raw_write`/`flush`/ -// `shutdown`/`connect_group`/…) land. use bun_core::ZigStringSlice; use bun_url::URL; @@ -902,10 +898,10 @@ impl Drop for HTTPClient<'_> { // every process. // // `ThreadCell` (not `RacyCell`) to encode "HTTP-thread-only after init" in the -// type. `claim()` is invoked from `HTTPThread::on_start`. JS-side callers that -// only touch the lock-free `queued_tasks` + `wakeup` (e.g. `schedule()`) go -// through [`http_thread_shared`] / `get_unchecked` until those fields are -// hoisted out of the thread-confined struct. +// type. `claim()` is invoked from `HTTPThread::on_start`, so any JS-thread +// `http_thread()` panics in debug builds. Cross-thread callers (schedule_*, +// timer reads, wakeup) never touch the struct at all — they use the module +// statics in `http_thread` (QUEUED_*, UWS_LOOP, START_TIMER). pub static HTTP_THREAD: bun_core::ThreadCell> = bun_core::ThreadCell::new(core::mem::MaybeUninit::uninit()); pub(crate) static HTTP_THREAD_INIT: core::sync::atomic::AtomicBool = @@ -939,7 +935,7 @@ pub fn http_thread_mut() -> &'static mut HTTPThread { // TODO: this needs to be freed when Worker Threads are implemented // HTTP-thread-only; `RacyCell` is the alias-safe static cell. pub static SOCKET_ASYNC_HTTP_ABORT_TRACKER: bun_core::RacyCell< - Option>, + Option>, > = bun_core::RacyCell::new(None); // ═══════════════════════════════════════════════════════════════════════ @@ -957,7 +953,7 @@ use bun_core::StringBuilder; use bun_core::{FeatureFlags, Global, Output}; use bun_core::{OwnedString, String as BunString, Tag as BunStringTag, strings}; use bun_http_types::ETag::StringPointer; -use bun_uws as uws; +use bun_usockets as uws; // the std Wyhash algorithm, not Wyhash11. use bun_wyhash::Wyhash; @@ -1175,11 +1171,11 @@ pub(crate) fn abort_tracker() -> &'static mut ArrayHashMap /// Remove every abort-tracker entry whose stored socket is `socket`. /// /// Backstop for the per-client `unregister_abort_tracker()` calls: when -/// `Handler::on_close` fires on a socket whose ext has already been retagged -/// to `DeadSocket`/`PooledSocket`, the client/session dispatch is skipped and -/// any stale entry would survive into `us_internal_free_closed_sockets`, -/// leaving `drain_queued_shutdowns` to dereference freed memory on a later -/// abort. O(n) over live abortable requests; no-op on a `Detached` socket. +/// `Handler::on_close` fires on a socket whose owner has already been +/// retagged `Dead`/`Pooled`, the client/session dispatch is skipped and any +/// stale entry would silently swallow a later abort for that request id in +/// `drain_queued_shutdowns`. O(n) over live abortable requests; no-op on a +/// `Detached` socket. pub(crate) fn unregister_abort_tracker_for_socket(socket: uws::InternalSocket) { if socket.is_detached() { return; @@ -2775,7 +2771,7 @@ impl<'a> HTTPClient<'a> { // SAFETY: runs on the HTTP thread after `HTTPThread::init` // set `uws_loop` to its live `us_loop_t`. let h3_ctx = h3::ClientContext::get_or_create(unsafe { - NonNull::new_unchecked(http_thread().uws_loop) + NonNull::new_unchecked(http_thread().uws_loop()) }); if let Some(ctx) = h3_ctx { if !h3::ClientContext::as_mut(ctx).connect( @@ -2828,7 +2824,7 @@ impl<'a> HTTPClient<'a> { // SAFETY: runs on the HTTP thread after `HTTPThread::init` set // `uws_loop` to its live `us_loop_t`. let Some(ctx) = h3::ClientContext::get_or_create(unsafe { - NonNull::new_unchecked(http_thread().uws_loop) + NonNull::new_unchecked(http_thread().uws_loop()) }) else { self.fail(crate::Error::HTTP3Unsupported); self.complete_connecting_process(); @@ -3184,18 +3180,18 @@ impl<'a> HTTPClient<'a> { return; }; let Some(buf) = stream.buffer else { return }; - (buf, stream.ended) + (buf, stream.sync_ended()) }; // ThreadSafeStreamBuffer is owned by the JS-side request body stream // and outlives this call (intrusive-refcounted; independent heap - // allocation, so `&mut` here does not alias `self`). Route through the - // shared `from_attached` accessor (one centralised unsafe). + // allocation). Shared borrow only — the JS thread accesses the same + // allocation concurrently; the byte buffer is behind its own lock. let stream_buffer = ThreadSafeStreamBuffer::from_attached(stream_buffer_ptr); if upgrade_state == HTTPUpgradeState::Pending { // cannot drain yet, upgrade is waiting for upgrade return; } - let buffer = stream_buffer.acquire(); + let mut buffer = stream_buffer.lock(); let was_empty = buffer.is_empty() && data.is_empty(); if was_empty && ended { // nothing is buffered and the stream is done so we just release and detach @@ -3205,7 +3201,7 @@ impl<'a> HTTPClient<'a> { // keep-alive / redirect pooling gates, matching the // `ended && !has_backpressure` exit below. self.state.request_stage = RequestStage::Done; - stream_buffer.release(); + drop(buffer); self.request_stream_detach(); if upgrade_state == HTTPUpgradeState::Upgraded { // for upgraded connections we need to shutdown the socket to signal the end of the connection @@ -3219,11 +3215,11 @@ impl<'a> HTTPClient<'a> { // `write_to_stream_using_buffer` touches only `state.request_sent_len`, // disjoint from `original_request_body` and `stream_buffer`. let has_backpressure = - match self.write_to_stream_using_buffer::(socket, buffer, data) { + match self.write_to_stream_using_buffer::(socket, &mut buffer, data) { Ok(b) => b, Err(err) => { // we got some critical error so we need to fail and close the connection - stream_buffer.release(); + drop(buffer); self.request_stream_detach(); self.close_and_fail::(err, socket); return; @@ -3232,12 +3228,12 @@ impl<'a> HTTPClient<'a> { if has_backpressure { // we have backpressure so just release the buffer and wait for onWritable - stream_buffer.release(); + drop(buffer); } else { if ended { // done sending everything so we can release the buffer and detach the stream self.state.request_stage = RequestStage::Done; - stream_buffer.release(); + drop(buffer); self.request_stream_detach(); if upgrade_state == HTTPUpgradeState::Upgraded { // for upgraded connections we need to shutdown the socket to signal the end of the connection @@ -3247,10 +3243,10 @@ impl<'a> HTTPClient<'a> { } else { // only report drain if we send everything and previous we had something to send if !was_empty { - stream_buffer.report_drain(); + stream_buffer.report_drain(&buffer); } // release the buffer so main thread can use it to send more data - stream_buffer.release(); + drop(buffer); } } } diff --git a/src/http/ssl_config.rs b/src/http/ssl_config.rs index 002b8a1a293c..09c7edec13cf 100644 --- a/src/http/ssl_config.rs +++ b/src/http/ssl_config.rs @@ -6,7 +6,7 @@ use core::ffi::{CStr, c_char}; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::{Arc, Weak}; -use bun_uws as uws; +use bun_usockets as uws; // Wyhash final4 variant. NOT `Wyhash11`. use bun_threading::Guarded as Mutex; use bun_wyhash::Wyhash; @@ -171,8 +171,8 @@ impl SSLConfig { maybe_shared.map(|s| &raw const **s) } - pub fn as_usockets(&self) -> uws::socket_context::BunSocketContextOptions { - let mut ctx_opts = uws::socket_context::BunSocketContextOptions::default(); + pub fn as_usockets(&self) -> uws::BunSocketContextOptions { + let mut ctx_opts = uws::BunSocketContextOptions::default(); if !self.key_file_name.is_null() { ctx_opts.key_file_name = self.key_file_name; @@ -221,9 +221,7 @@ impl SSLConfig { /// Returns socket options for client-side TLS with manual verification. /// Sets request_cert=1 (to receive server cert) and reject_unauthorized=0 /// (to handle verification manually in handshake callback). - pub fn as_usockets_for_client_verification( - &self, - ) -> uws::socket_context::BunSocketContextOptions { + pub fn as_usockets_for_client_verification(&self) -> uws::BunSocketContextOptions { let mut opts = self.as_usockets(); opts.request_cert = 1; opts.reject_unauthorized = 0; diff --git a/src/http_jsc/Cargo.toml b/src/http_jsc/Cargo.toml index 48ddc564ce55..ae26c23e643b 100644 --- a/src/http_jsc/Cargo.toml +++ b/src/http_jsc/Cargo.toml @@ -35,6 +35,6 @@ bun_libdeflate_sys.workspace = true bun_picohttp.workspace = true bun_ptr.workspace = true bun_sha_hmac.workspace = true -bun_uws.workspace = true -bun_uws_sys.workspace = true +bun_usockets.workspace = true +bun_uws_shim.workspace = true bun_zlib.workspace = true diff --git a/src/http_jsc/websocket_client.rs b/src/http_jsc/websocket_client.rs index b5c43240de97..d444a15b6d1c 100644 --- a/src/http_jsc/websocket_client.rs +++ b/src/http_jsc/websocket_client.rs @@ -20,9 +20,11 @@ use bun_http::websocket::{Opcode, WebsocketHeader}; use bun_io::KeepAlive; use bun_jsc::event_loop::EventLoop; use bun_jsc::{self as jsc, GlobalRef, JSGlobalObject, JSValue}; -use bun_ptr::{AsCtxPtr, ThisPtr}; -use bun_uws::{self as uws, NewSocketHandler, SslCtx, us_bun_verify_error_t}; -use bun_uws_sys::us_socket_t; +use bun_ptr::AsCtxPtr; +use bun_usockets::{ + self as uws, AnySocket, NewSocketHandler, SocketKind, SocketRef, SslCtx, us_bun_verify_error_t, + us_socket_t, +}; use self::cpp_websocket::{CppWebSocket, CppWebSocketRef}; use self::websocket_deflate::WebSocketDeflate; @@ -63,10 +65,10 @@ const MAX_CLOSE_REASON: usize = MAX_CONTROL_PAYLOAD - 2; /// Outgoing control frame prefix: 2-byte header + 4-byte masking key. const CONTROL_HEADER_SIZE: usize = 6; -#[derive(bun_ptr::CellRefCounted)] +#[derive(bun_ptr::RefCounted)] #[ref_count(destroy = Self::deinit)] pub struct WebSocket { - pub ref_count: Cell, + pub ref_count: bun_ptr::RefCount, pub tcp: Cell>, pub outgoing_websocket: Cell>>, @@ -128,6 +130,52 @@ pub struct WebSocket { pub proxy_tunnel: Cell>>, } +/// Rebuild the const-generic socket handle from the dispatch-provided +/// [`AnySocket`] (kind stamp and `SSL` always agree for these kinds). +pub(crate) fn socket_from_any(s: AnySocket) -> Socket { + Socket::::from_any(*s.socket()) +} + +// Protocol v2 handler set for the framed phase (kind = `WsClient[Tls]`). +// No `on_open`: the socket arrives via adoption of an already-connected +// upgrade socket. The dispatch trampoline holds a strong owner ref across +// every handler, and core releases its ext-held owner ref exactly once at the +// terminal (after on_close/on_connect_error return) — the consumer-side +// I/O-layer ref bookkeeping for adopted sockets is gone. +impl uws::Protocol for WebSocket { + type Owner = Self; + const KIND: SocketKind = if SSL { + SocketKind::WsClientTls + } else { + SocketKind::WsClient + }; + + fn on_data(o: &Self, _s: AnySocket, data: &mut [u8]) { + o.handle_data(data); + } + fn on_writable(o: &Self, s: AnySocket) { + o.handle_writable(socket_from_any::(s)); + } + fn on_close(o: &Self, _s: AnySocket, _code: uws::CloseCode2, _errno: i32) { + o.handle_close(); + } + fn on_end(o: &Self, s: AnySocket) { + o.handle_end(socket_from_any::(s)); + } + fn on_timeout(o: &Self, s: AnySocket) { + o.handle_timeout(socket_from_any::(s)); + } + fn on_long_timeout(o: &Self, s: AnySocket) { + o.handle_timeout(socket_from_any::(s)); + } + fn on_connect_error(o: &Self, _err: uws::ConnectFailure) { + o.handle_connect_error(); + } + fn on_handshake(o: &Self, s: AnySocket, ok: bool, err: us_bun_verify_error_t) { + o.handle_handshake(socket_from_any::(s), ok, err); + } +} + impl WebSocket { /// Tests grep for this exact shape under `BUN_DEBUG_alloc=1`. const ALLOC_TYPE_NAME: &'static str = if SSL { @@ -136,6 +184,17 @@ impl WebSocket { "http.websocket_client.NewWebSocketClient(false)" }; + /// Thin release wrapper over the intrusive [`bun_ptr::RefCount`] (the + /// derive emits no inherent forwarders). + /// + /// # Safety + /// `this` must point to a live `Self` and the caller must own one ref. + /// After this call `this` may be dangling. + pub(crate) unsafe fn deref(this: *mut Self) { + // SAFETY: forwarded caller contract. + unsafe { bun_ptr::RefCount::::deref(this) }; + } + #[inline] fn vm_loop_ctx(global_this: &JSGlobalObject) -> bun_io::EventLoopCtx { // SAFETY: `EventLoopCtx.owner` is a type-erased `*mut ()` slot. Source @@ -143,8 +202,7 @@ impl WebSocket { // `bun_vm()`'s `&VirtualMachine`, so the stored pointer carries write // provenance instead of being // laundered through a shared-ref `*const _ as *mut` hop — the vtable - // slots (`file_polls`, `set_after_event_loop_callback`) write through - // it. + // slots (e.g. `file_polls`) write through it. unsafe { jsc::virtual_machine::VirtualMachine::event_loop_ctx(global_this.bun_vm_ptr()) } } @@ -174,8 +232,8 @@ impl WebSocket { self.message_is_compressed.set(false); self.deflate.replace(None); if let Some(s) = self.secure.take() { - // SAFETY: s is a valid SSL_CTX* owned by us per field invariant - unsafe { boringssl::c::SSL_CTX_free(s) }; + // s is a valid SSL_CTX* owned by us per field invariant. + bun_usockets::tls::context::ssl_ctx_unref(s); } // Detach the tunnel first so its shutdown callbacks cannot re-enter this path. if let Some(tunnel) = self.proxy_tunnel.take() { @@ -193,9 +251,9 @@ impl WebSocket { unsafe { WebSocketProxyTunnel::deref(tunnel_ptr) }; // Release the I/O-layer ref taken in init_with_tunnel() — the // tunnel was this struct's socket-equivalent owner. In the - // non-tunnel path this same ref is released by handle_close() - // when the adopted uSockets socket fires its close event, but - // tunnel mode never adopts a socket so that callback never runs. + // non-tunnel path the equivalent ref is core-held (Protocol v2 + // attach ref, released after on_close returns), but tunnel mode + // never adopts a socket so core holds nothing to release. // Callers that touch `self` after clear_data() must hold a local // ref guard (see cancel/finalize). // SAFETY: allocation is live (guarded by callers' ref). @@ -255,12 +313,12 @@ impl WebSocket { pub fn handle_handshake( &self, socket: Socket, - success: i32, + success: bool, ssl_error: us_bun_verify_error_t, ) { jsc::mark_binding!(); - let authorized = success == 1; + let authorized = success; log!("onHandshake({})", success); @@ -309,7 +367,10 @@ impl WebSocket { self.tcp.set(tcp); } - pub fn handle_close(&self, _socket: Socket, _code: c_int, _reason: *mut c_void) { + // The adopted socket's I/O-layer ref is core-owned (Protocol v2): core + // releases it exactly once after this handler returns — no consumer-side + // terminal deref here. + pub fn handle_close(&self) { log!("onClose"); jsc::mark_binding!(); if let Some((code, mut reason)) = self.close_dispatch_pending.take() { @@ -319,21 +380,12 @@ impl WebSocket { self.detach_tcp(); self.clear_data(); self.dispatch_close(code, &mut reason); - // For the socket. - // SAFETY: this is the terminal release of the socket's - // I/O-layer ref. - unsafe { Self::deref(self.as_ctx_ptr()) }; return; } self.clear_data(); self.detach_tcp(); self.dispatch_abrupt_close(ErrorCode::Ended); - - // For the socket. - // SAFETY: this is the terminal release of the socket's - // I/O-layer ref. - unsafe { Self::deref(self.as_ctx_ptr()) }; } pub fn terminate(&self, code: ErrorCode) { @@ -543,44 +595,43 @@ impl WebSocket { self.message_is_compressed.set(false); } - // Takes `ThisPtr` instead of `&self` because - // `handle_without_deinit()` re-enters this very function on the same - // allocation through its own raw back-pointer. + // There is no `socket` parameter: the dispatch trampoline wraps the same + // socket handle that adoption stored into `self.tcp`, so the parse loop + // reads `self.tcp` directly. // - // There is no `socket` parameter: the dispatch thunk wraps the same - // `us_socket_t*` that `adopt_group` stored into `self.tcp`, so the parse - // loop reads `self.tcp` directly. - pub fn handle_data(this: ThisPtr, data_: &[u8]) { + // Liveness: every caller keeps the allocation alive across this call — + // the Protocol v2 dispatch guard on the socket path, the ScopedRef in + // `handle_tunnel_data`, and the ScopedRef in + // `InitialDataHandler::handle_without_deinit`. + pub fn handle_data(&self, data_: &[u8]) { // after receiving close we should ignore the data - if this.close_received.get() { + if self.close_received.get() { return; } - // Bumps the intrusive refcount and derefs on Drop. - let _guard = this.ref_guard(); // Due to scheduling, it is possible for the websocket onData // handler to run with additional data before the microtask queue is // drained. - if let Some(initial_handler) = this.initial_data_handler.get() { + if let Some(initial_handler) = self.initial_data_handler.get() { // This calls `handle_data` // We deliberately do not set self.initial_data_handler to None here, that's done in handle_without_deinit. // We do not free the memory here since the lifetime is managed by the microtask queue (it should free when called from there) // SAFETY: `initial_handler` is valid (managed by microtask queue). // `handle_without_deinit` re-enters `Self::handle_data` via the - // `adopted` raw ptr (same `heap::alloc` provenance as `this`). + // `adopted` raw ptr; shared `&self` borrows coexist. unsafe { (*initial_handler.as_ptr()).handle_without_deinit() }; // handle_without_deinit is supposed to clear the handler from WebSocket* // to prevent an infinite loop - debug_assert!(this.initial_data_handler.get().is_none()); + debug_assert!(self.initial_data_handler.get().is_none()); // If we disconnected for any reason in the re-entrant case, we should just ignore the data - if this.outgoing_websocket.get().is_none() || !this.has_tcp() { + if self.outgoing_websocket.get().is_none() || !self.has_tcp() { return; } } - this.handle_data_loop(data_); + self.handle_data_loop(data_); } fn handle_data_loop(&self, data: &[u8]) { @@ -1275,7 +1326,7 @@ impl WebSocket { self.terminate(ErrorCode::Timeout); } - pub fn handle_connect_error(&self, _socket: Socket, _errno: c_int) { + pub fn handle_connect_error(&self) { self.detach_tcp(); self.terminate(ErrorCode::FailedToConnect); } @@ -1490,18 +1541,17 @@ impl WebSocket { this.send_close_with_body(code, None, &reason_buf[..reason_len]); } - /// Allocate a client with `ref_count == 1` (the I/O-layer ref, released by - /// `handle_close` for adopted sockets and by `clear_data` in tunnel mode) + /// Allocate a client with one strong ref (held by the returned `RefPtr`) /// and an optional permessage-deflate context. - fn new_raw( + fn new_rc( outgoing: *mut CppWebSocket, global_this: &JSGlobalObject, deflate_params: Option<&websocket_deflate::Params>, secure: Option<*mut SslCtx>, proxy_tunnel: Option>, - ) -> *mut Self { - let ws = bun_core::heap::into_raw(Box::new(WebSocket:: { - ref_count: Cell::new(1), + ) -> bun_ptr::RefPtr { + let ws = bun_ptr::RefPtr::new(WebSocket:: { + ref_count: bun_ptr::RefCount::init(), tcp: Cell::new(Socket::::detached()), outgoing_websocket: Cell::new(NonNull::new(outgoing)), receive_state: Cell::new(ReceiveState::NeedHeader), @@ -1528,36 +1578,40 @@ impl WebSocket { message_is_compressed: Cell::new(false), secure: Cell::new(secure), proxy_tunnel: Cell::new(proxy_tunnel), - })); - bun_core::scoped_log!(alloc, "new({}) = {:p}", Self::ALLOC_TYPE_NAME, ws); - // SAFETY: ws was just allocated via heap::alloc; no other reference exists. - let ws_ref = unsafe { &mut *ws }; + }); + bun_core::scoped_log!(alloc, "new({}) = {:p}", Self::ALLOC_TYPE_NAME, ws.as_ptr()); if let Some(params) = deflate_params { - *ws_ref.deflate.get_mut() = WebSocketDeflate::init(*params).ok(); + ws.deflate.replace(WebSocketDeflate::init(*params).ok()); } ws } /// Shared tail of `init`/`init_with_tunnel`: reserve the I/O buffers, take - /// the keep-alive ref, queue any handshake-buffered bytes, and take the - /// C++-side ref. Returns the type-erased pointer handed back to C++. + /// the keep-alive ref, and queue any handshake-buffered bytes. Consumes + /// `ws` — its strong ref transfers to C++ as the `m_connectedWebSocket` + /// ref (released by `dispatch_close`/`dispatch_abrupt_close`/`finalize`). fn finish_init( - ws: *mut Self, + ws: bun_ptr::RefPtr, outgoing: *mut CppWebSocket, global_this: &JSGlobalObject, buffered_data: *mut u8, buffered_data_len: usize, ) -> *mut c_void { - // SAFETY: `ws` is the live `heap::alloc` allocation from `new_raw`. - let ws_ref = unsafe { &mut *ws }; - bun_core::handle_oom(ws_ref.send_buffer.get_mut().ensure_total_capacity(2048)); - bun_core::handle_oom(ws_ref.receive_buffer.get_mut().ensure_total_capacity(2048)); - ws_ref - .poll_ref - .get_mut() - .r#ref(Self::vm_loop_ctx(global_this)); + let ws_ref = ws.data(); + bun_core::handle_oom(ws_ref.send_buffer.borrow_mut().ensure_total_capacity(2048)); + bun_core::handle_oom( + ws_ref + .receive_buffer + .borrow_mut() + .ensure_total_capacity(2048), + ); + { + let mut poll_ref = ws_ref.poll_ref.take(); + poll_ref.r#ref(Self::vm_loop_ctx(global_this)); + ws_ref.poll_ref.set(poll_ref); + } if buffered_data_len > 0 { // SAFETY: buffered_data/len from C++; caller guarantees validity. @@ -1572,7 +1626,7 @@ impl WebSocket { )) }; let initial_data = bun_core::heap::into_raw(Box::new(InitialDataHandler:: { - adopted: NonNull::new(ws), + adopted: NonNull::new(ws.as_ptr()), slice: buffered_slice, // We need to ref the outgoing websocket so that it doesn't get // finalized before the initial data handler is called. @@ -1595,10 +1649,8 @@ impl WebSocket { ); } - // And lastly, ref the new websocket since C++ has a reference to it - ws_ref.ref_(); - - ws.cast::() + // The consumed `ws` ref becomes the C++-side ref. + ws.into_raw().cast::() } pub extern "C" fn init( @@ -1610,11 +1662,23 @@ impl WebSocket { deflate_params: Option<&websocket_deflate::Params>, secure_ptr: *mut c_void, ) -> *mut c_void { - let tcp = input_socket.cast::(); + // Re-derive a generational handle from the raw header pointer that + // round-tripped through C++ (`WebSocket__didConnect`); no tick ran in + // between, so the generation captured here matches the live slot. + let Some(tcp_nn) = NonNull::new(input_socket.cast::()) else { + // Caller transferred a +1 SSL_CTX ref via `secure_ptr`; release it. + if !secure_ptr.is_null() { + uws::tls::context::ssl_ctx_unref(secure_ptr.cast::()); + } + return core::ptr::null_mut(); + }; + let tcp = SocketRef::from_live(tcp_nn); let secure = (!secure_ptr.is_null()).then(|| secure_ptr.cast::()); - let ws = Self::new_raw(outgoing, global_this, deflate_params, secure, None); + let ws = Self::new_rc(outgoing, global_this, deflate_params, secure, None); - // `adopt_group` takes a closure to write the new socket. + // `adopt_owned` re-stamps kind + ext in place (never relocates) and + // takes the framed owner ref, releasing the upgrade client's owner + // word (already detached) under the old kind's ops. let group = { // reshaped for borrowck — `rare_data()` borrows `vm` // mutably and `ws_client_group` also wants a `vm` reference. @@ -1629,27 +1693,24 @@ impl WebSocket { // observe or invalidate the `&mut RareData` receiver. unsafe { (*vm_ptr).rare_data().ws_client_group::(&*vm_ptr) } }; - if !Socket::::adopt_group( + match Socket::::adopt_owned( tcp, group, - if SSL { - uws::DispatchKind::WsClientTls - } else { - uws::DispatchKind::WsClient - }, - ws, - // SAFETY: `owner == ws` is a valid live allocation; raw-ptr field - // write avoids materializing a second `&mut` that would alias - // another borrow of the new allocation. - |owner, sock| unsafe { core::ptr::addr_of_mut!((*owner).tcp).write(Cell::new(sock)) }, + ::KIND, + // Transferred to core: the I/O-layer ref, released exactly once + // at the socket terminal (after on_close/on_connect_error). + ws.clone(), ) { - // SAFETY: `ws` is the `heap::alloc` allocation just created - // above; sole owner on this failure path. - unsafe { Self::deref(ws) }; - return core::ptr::null_mut(); + Some(sock) => { + ws.tcp.set(sock); + Self::finish_init(ws, outgoing, global_this, buffered_data, buffered_data_len) + } + None => { + // `adopt_owned` released the transferred ref; drop ours. + ws.deref(); + core::ptr::null_mut() + } } - - Self::finish_init(ws, outgoing, global_this, buffered_data, buffered_data_len) } /// Initialize a WebSocket client that uses a proxy tunnel for I/O. @@ -1674,12 +1735,12 @@ impl WebSocket { NonNull::new(p).expect("extern-C contract: tunnel_ptr is non-null") }; - // ref_count starts at 1: this is the I/O-layer ref, owned by the - // tunnel connection (analogous to the adopted-socket ref in init() - // that handle_close() releases). It is released in clear_data() when - // proxy_tunnel is detached. The ws.ref() below adds the C++ ref - // paired with m_connectedWebSocket. - let ws = Self::new_raw( + // The original ref is the I/O-layer ref, owned by the tunnel + // connection (tunnel mode never adopts a socket, so core holds no ext + // ref); released in clear_data() when proxy_tunnel is detached. The + // clone consumed by finish_init becomes the C++ ref paired with + // m_connectedWebSocket. + let ws = Self::new_rc( outgoing, global_this, deflate_params, @@ -1687,7 +1748,16 @@ impl WebSocket { Some(tunnel_owned), ); - Self::finish_init(ws, outgoing, global_this, buffered_data, buffered_data_len) + let out = Self::finish_init( + ws.clone(), + outgoing, + global_this, + buffered_data, + buffered_data_len, + ); + // Leak = the tunnel I/O-layer ref (see clear_data). + let _ = ws.into_raw(); + out } /// Handle data received from the proxy tunnel (already decrypted). @@ -1698,11 +1768,13 @@ impl WebSocket { /// `heap::alloc`; no `&`/`&mut` borrow of `*this_ptr` may be live across /// this call (the tunnel calls through its raw `connected_websocket` backref). pub unsafe fn handle_tunnel_data(this_ptr: *mut Self, data: &[u8]) { - // Process the decrypted data as if it came from the socket - // has_tcp() now returns true for tunnel mode, so this will work correctly - // SAFETY: caller contract — `this_ptr` is a live `heap::alloc` pointer - // with no outstanding `&`/`&mut` borrow. - Self::handle_data(unsafe { ThisPtr::new(this_ptr) }, data); + // Process the decrypted data as if it came from the socket. + // handle_data can re-enter fail()/clear_data() synchronously via the + // tunnel; the guard keeps the allocation alive across that. + // SAFETY: caller contract — `this_ptr` is a live `heap::alloc` pointer. + let _guard = unsafe { bun_ptr::ScopedRef::new(this_ptr) }; + // SAFETY: guarded above. + unsafe { &*this_ptr }.handle_data(data); } /// Called by the WebSocketProxyTunnel when the underlying socket drains. @@ -1713,16 +1785,17 @@ impl WebSocket { /// `heap::alloc`; no `&`/`&mut` borrow of `*this_ptr` may be live across /// this call. pub unsafe fn handle_tunnel_writable(this_ptr: *mut Self) { + // send_buffer → tunnel.write() can re-enter fail() synchronously + // (see write_binary_data). The tunnel ref-guards itself in + // on_writable() but not this struct. // SAFETY: caller contract — `this_ptr` is a live `heap::alloc` pointer // (the tunnel calls through its raw `connected_websocket` backref). - let this = unsafe { ThisPtr::new(this_ptr) }; + let _guard = unsafe { bun_ptr::ScopedRef::new(this_ptr) }; + // SAFETY: guarded above. + let this = unsafe { &*this_ptr }; if this.close_received.get() && !this.has_pending_close_dispatch() { return; } - // send_buffer → tunnel.write() can re-enter fail() synchronously - // (see write_binary_data). The tunnel ref-guards itself in - // on_writable() but not this struct. - let _guard = this.ref_guard(); this.drain_send_buffer_and_finish_close(); } @@ -1970,17 +2043,16 @@ impl InitialDataHandler { // `adopted == None` (early return leaves `ws` already `None`). let _ws_ref = self.ws.take(); + // handle_data may run JS that drops every other ref; keep the + // allocation alive across the call. + // SAFETY: `adopted` is a backref to a live WebSocket. + let _guard = unsafe { bun_ptr::ScopedRef::new(ws_ptr) }; + // SAFETY: guarded above. + let ws = unsafe { &*ws_ptr }; // For tunnel mode, tcp is detached but connection is still active through the tunnel - // SAFETY: `ws_ptr` is live (see above); brief shared borrows for - // `is_closed()` / `is_some()` — no `&mut` to `*ws_ptr` is live. - let is_connected = - unsafe { !(*ws_ptr).tcp.get().is_closed() || (*ws_ptr).proxy_tunnel.get().is_some() }; - // SAFETY: `ws_ptr` is live; raw read of a `Copy` field. - if unsafe { (*ws_ptr).outgoing_websocket.get().is_some() } && is_connected { - // SAFETY: `ws_ptr` carries `heap::alloc` provenance and is live; no - // borrow of `*ws_ptr` is live in this frame across the call. - let ws = unsafe { ThisPtr::new(ws_ptr) }; - WebSocket::::handle_data(ws, &self.slice); + let is_connected = !ws.tcp.get().is_closed() || ws.proxy_tunnel.get().is_some(); + if ws.outgoing_websocket.get().is_some() && is_connected { + ws.handle_data(&self.slice); } } diff --git a/src/http_jsc/websocket_client/CppWebSocket.rs b/src/http_jsc/websocket_client/CppWebSocket.rs index cb3fec21054b..2d962a5a45ea 100644 --- a/src/http_jsc/websocket_client/CppWebSocket.rs +++ b/src/http_jsc/websocket_client/CppWebSocket.rs @@ -12,7 +12,7 @@ use core::ffi::c_void; use bun_core::{String as BunString, ZigString}; use bun_jsc::virtual_machine::VirtualMachine; -use bun_uws_sys::{Socket, SslCtx}; +use bun_usockets::{Socket, SslCtx}; use super::ErrorCode; use super::websocket_deflate; @@ -28,6 +28,8 @@ bun_opaque::opaque_ffi! { // `CppWebSocket` is an UnsafeCell-backed opaque ZST, so `&CppWebSocket` carries // no `readonly`/`noalias` — the C++ side owns and mutates all state behind it. // Imports whose only non-value param is that handle are declared `safe fn`. +// `*mut Socket` is opaque to C++; the lint recurses into repr(Rust) pointees. +#[allow(improper_ctypes)] unsafe extern "C" { fn WebSocket__didConnect( websocket_context: &CppWebSocket, @@ -120,15 +122,18 @@ impl CppWebSocket { result } - // Forwards `buffered_data` to C++ without dereferencing; not_unsafe_ptr_arg_deref is a false positive on opaque-token forwarding. + // Forwards `socket`/`buffered_data` to C++ without dereferencing; + // not_unsafe_ptr_arg_deref is a false positive on opaque-token forwarding. + // `socket` is a raw header pointer (never a `&mut`): C++ synchronously + // re-enters `Bun__WebSocketClient__init`, which adopts (mutates) the header. #[allow(clippy::not_unsafe_ptr_arg_deref)] pub(crate) fn did_connect( &self, - socket: &mut Socket, + socket: *mut Socket, buffered_data: *mut u8, buffered_len: usize, deflate_params: Option<&websocket_deflate::Params>, - secure: Option<&mut SslCtx>, + secure: *mut SslCtx, ) { // SAFETY: VirtualMachine::get() returns the live current-thread VM; // event_loop() yields its raw event-loop pointer (live for VM lifetime). @@ -142,7 +147,7 @@ impl CppWebSocket { buffered_data, buffered_len, deflate_params.map_or(core::ptr::null(), std::ptr::from_ref), - secure.map_or(core::ptr::null_mut(), std::ptr::from_mut), + secure, ) }; event_loop.exit(); diff --git a/src/http_jsc/websocket_client/WebSocketProxyTunnel.rs b/src/http_jsc/websocket_client/WebSocketProxyTunnel.rs index 66611b2f55fc..f8594f0e0fbc 100644 --- a/src/http_jsc/websocket_client/WebSocketProxyTunnel.rs +++ b/src/http_jsc/websocket_client/WebSocketProxyTunnel.rs @@ -37,8 +37,10 @@ use core::ptr::NonNull; use bun_boringssl as boringssl; use bun_core::strings; use bun_io::StreamBuffer; -use bun_uws::ssl_wrapper::{Handlers as SslHandlers, SslWrapper}; -use bun_uws::{NewSocketHandler, us_bun_verify_error_t}; +// SSLWrapper lives unchanged in `bun_uws_shim`; its `Handlers::on_handshake` fn type pins the verify-error type below. +use bun_usockets::NewSocketHandler; +use bun_usockets::us_bun_verify_error_t; +use bun_uws_shim::ssl_wrapper::{Handlers as SslHandlers, SslWrapper}; use super::websocket_upgrade_client::{ HttpUpgradeClient, HttpsUpgradeClient, NewHttpUpgradeClient, @@ -138,7 +140,7 @@ pub struct WebSocketProxyTunnel { reject_unauthorized: bool, } -use bun_uws::MaybeAnySocket as SocketUnion; +use bun_uws_shim::MaybeAnySocket as SocketUnion; type SslWrapperType = SslWrapper<*mut WebSocketProxyTunnel>; diff --git a/src/http_jsc/websocket_client/WebSocketUpgradeClient.rs b/src/http_jsc/websocket_client/WebSocketUpgradeClient.rs index e7c63e78ba66..7d7f08f5acc0 100644 --- a/src/http_jsc/websocket_client/WebSocketUpgradeClient.rs +++ b/src/http_jsc/websocket_client/WebSocketUpgradeClient.rs @@ -19,8 +19,8 @@ //! - MDN WebSocket API: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API //! - WebSocket Handshake: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#the_websocket_handshake -use core::cell::Cell; -use core::ffi::{c_int, c_void}; +use core::cell::{Cell, RefCell}; +use core::ffi::c_int; use core::ptr; use std::io::Write as _; @@ -34,14 +34,14 @@ use bun_http::{HeaderValueIterator, Headers}; use bun_io::KeepAlive; use bun_jsc::{JSGlobalObject, VirtualMachineRef}; use bun_picohttp as picohttp; -use bun_ptr::ThisPtr; -use bun_uws::{self as uws, SocketHandler, SocketKind, SslCtx}; +use bun_ptr::AsCtxPtr; +use bun_usockets::{self as uws, AnySocket, SocketHandler, SocketKind, SslCtx}; use super::cpp_websocket::CppWebSocket; use super::websocket_deflate as WebSocketDeflate; use super::websocket_proxy::WebSocketProxy; use super::websocket_proxy_tunnel::WebSocketProxyTunnel; -use crate::websocket_client::ErrorCode; +use crate::websocket_client::{ErrorCode, socket_from_any}; // LAYERING: SSLConfig was MOVE_DOWN'd from bun_runtime::api::server_config → // bun_http::ssl_config (data + as_usockets/for_client_verification). The @@ -102,47 +102,48 @@ impl SslCtxOwned { impl Drop for SslCtxOwned { fn drop(&mut self) { - // SAFETY: `self.0` is an owned retained ref (returned with +1 by + // `self.0` is an owned retained ref (returned with +1 by // `ssl_ctx_cache_get_or_create`) that has not been transferred out. - unsafe { boringssl::c::SSL_CTX_free(self.0) }; + bun_usockets::tls::context::ssl_ctx_unref(self.0); } } /// WebSocket HTTP upgrade client, generic over `SSL`. /// -/// Intrusive single-thread -/// refcount; `ref_count` field below, `ref()`/`deref()` inherent methods, `deinit` -/// runs when count hits 0. -#[derive(bun_ptr::CellRefCounted)] +/// Interior-mutable Protocol v2 owner: handlers receive `&self`, so every +/// mutable field is a `Cell`/`RefCell`. No `RefCell` borrow may be held +/// across a call that can re-enter this struct (terminate/fail, tunnel +/// writes, `tcp.close`, any C++ callback) — those paths reach `clear_data`. +#[derive(bun_ptr::RefCounted)] #[ref_count(destroy = Self::deinit)] pub struct HTTPClient { - ref_count: Cell, - tcp: Socket, - outgoing_websocket: Option<*mut CppWebSocket>, + ref_count: bun_ptr::RefCount, + tcp: Cell>, + outgoing_websocket: Cell>, /// Owned request bytes. Freed via `clear_input`. - input_body_buf: Vec, + input_body_buf: RefCell>, // The unsent bytes are always a suffix of `input_body_buf`; stored here as // the suffix length so we don't hold a self-referential slice. - to_send_len: usize, - headers_buf: [picohttp::Header; 128], - body: Vec, + to_send_len: Cell, + /// Partial-header accumulator across reads (response not yet complete). + body: RefCell>, /// Owned NUL-terminated hostname for SNI; empty when unset. - hostname: ZBox, - poll_ref: KeepAlive, - state: State, - subprotocols: StringSet, + hostname: RefCell, + poll_ref: Cell, + state: Cell, + subprotocols: RefCell, /// Proxy state (None when not using proxy) - proxy: Option, + proxy: RefCell>, /// TLS options (full SSLConfig for complete TLS customization) - ssl_config: Option>, + ssl_config: RefCell>>, /// `us_ssl_ctx_t` built from `ssl_config` when it carries a custom CA. /// Heap-allocated because ownership transfers to the connected /// `WebSocket` after the upgrade completes (so the `SSL_CTX` outlives /// this struct). RAII: dropping the wrapper releases the retained ref. - secure: Option, + secure: RefCell>, /// Expected Sec-WebSocket-Accept value for handshake validation per RFC 6455 §4.2.2. /// This is base64(SHA-1(Sec-WebSocket-Key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11")). @@ -155,18 +156,48 @@ pub struct HTTPClient { offered_permessage_deflate: bool, } -// Handler set referenced by the dispatch table (kind = `.ws_client_upgrade[_tls]`). -// The `register()` C++ round-trip that previously installed these on a -// shared `us_socket_context_t` is gone — sockets are stamped with the -// kind at connect time and routed via the `RawSocketEvents` impl in -// `bun_runtime::socket::uws_handlers`, which forwards to the `pub -// handle_*` methods below. -// -// The handlers take `ThisPtr` (not `&mut Self`) because uSockets -// dispatches them from the raw userdata pointer and several can free `Self` -// (`deref` reaching zero) or be re-entered synchronously by `tcp.close()` / -// C++ callbacks; a `&mut Self` argument across either is UB under Stacked -// Borrows (argument protectors / aliased `&mut`). +// Protocol v2 handler set (kind = `WsClientUpgrade[Tls]`): sockets are +// stamped with the kind at connect time; the dispatch trampoline recovers +// the typed owner from the ext word, holds a strong ref across every +// handler, and releases the core-owned attach ref exactly once at the +// terminal (on_close / on_connect_error / silent SEMI_SOCKET close). +impl uws::Protocol for HTTPClient { + type Owner = Self; + const KIND: SocketKind = if SSL { + SocketKind::WsClientUpgradeTls + } else { + SocketKind::WsClientUpgrade + }; + + fn on_open(o: &Self, s: AnySocket, _is_client: bool, _ip: &[u8]) { + o.handle_open(socket_from_any::(s)); + } + fn on_data(o: &Self, s: AnySocket, data: &mut [u8]) { + o.handle_data(socket_from_any::(s), data); + } + fn on_writable(o: &Self, s: AnySocket) { + o.handle_writable(socket_from_any::(s)); + } + fn on_close(o: &Self, _s: AnySocket, _code: uws::CloseCode2, _errno: i32) { + o.handle_close(); + } + fn on_end(o: &Self, _s: AnySocket) { + o.handle_end(); + } + fn on_timeout(o: &Self, _s: AnySocket) { + o.handle_timeout(); + } + fn on_long_timeout(o: &Self, _s: AnySocket) { + o.handle_timeout(); + } + fn on_connect_error(o: &Self, _err: uws::ConnectFailure) { + o.handle_connect_error(); + } + fn on_handshake(o: &Self, s: AnySocket, ok: bool, err: uws::us_bun_verify_error_t) { + o.handle_handshake(socket_from_any::(s), ok, err); + } +} + impl HTTPClient { const TYPE_NAME: &'static str = if SSL { "http.websocket_client.WebSocketUpgradeClient.NewHTTPUpgradeClient(true)" @@ -180,20 +211,42 @@ impl HTTPClient { /// `this` must be the unique remaining pointer to a `Self` allocated via /// `heap::alloc` in `connect`. unsafe fn deinit(this: *mut Self) { - // SAFETY: caller guarantees `this` is the unique remaining ref. - unsafe { - (*this).clear_data(); - debug_assert!((*this).tcp.is_detached()); - // allocated via heap::alloc in `connect`. - bun_core::scoped_log!(alloc, "destroy({}) = {:p}", Self::TYPE_NAME, this); - drop(bun_core::heap::take(this)); + { + // SAFETY: caller guarantees `this` is the unique remaining ref. + let me = unsafe { &*this }; + me.clear_data(); + debug_assert!(me.tcp.get().is_detached()); } + bun_core::scoped_log!(alloc, "destroy({}) = {:p}", Self::TYPE_NAME, this); + // SAFETY: allocated via `heap::alloc` in `connect`; sole owner. + drop(unsafe { bun_core::heap::take(this) }); + } + + /// Thin release wrapper over the intrusive [`bun_ptr::RefCount`] (the + /// derive emits no inherent forwarders). + /// + /// # Safety + /// `this` must point to a live `Self` and the caller must own one ref. + /// After this call `this` may be dangling. + unsafe fn deref(this: *mut Self) { + // SAFETY: forwarded caller contract. + unsafe { bun_ptr::RefCount::::deref(this) }; } - /// Suffix of `input_body_buf` still pending write. - fn to_send(&self) -> &[u8] { - let len = self.input_body_buf.len(); - &self.input_body_buf[len - self.to_send_len..] + /// Copy of the `input_body_buf` suffix still pending write. Owned copy so + /// no `RefCell` borrow spans the (possibly re-entrant) write below. + fn pending_write_bytes(&self) -> Vec { + let buf = self.input_body_buf.borrow(); + let pending = self.to_send_len.get().min(buf.len()); + buf[buf.len() - pending..].to_vec() + } + + /// Post-write bookkeeping: `to_send_len` shrinks by `wrote`, clamped to + /// the current buffer (a re-entrant `clear_data` may have emptied it). + fn note_wrote(&self, wrote: usize) { + let remaining = self.to_send_len.get().saturating_sub(wrote); + self.to_send_len + .set(remaining.min(self.input_body_buf.borrow().len())); } /// On error, this returns null. @@ -337,36 +390,29 @@ impl HTTPClient { subprotocols }; - let client: *mut Self = bun_core::heap::into_raw(Box::new(HTTPClient:: { - ref_count: Cell::new(1), - tcp: Socket::::detached(), - outgoing_websocket: Some(websocket), - input_body_buf, - to_send_len: 0, - headers_buf: [picohttp::Header::ZERO; 128], - body: Vec::new(), - hostname: ZBox::default(), - poll_ref: KeepAlive::init(), - state: State::Initializing, - proxy: proxy_state, - ssl_config: None, - secure: None, + let client: bun_ptr::RefPtr = bun_ptr::RefPtr::new(HTTPClient:: { + ref_count: bun_ptr::RefCount::init(), + tcp: Cell::new(Socket::::detached()), + outgoing_websocket: Cell::new(Some(websocket)), + input_body_buf: RefCell::new(input_body_buf), + to_send_len: Cell::new(0), + body: RefCell::new(Vec::new()), + hostname: RefCell::new(ZBox::default()), + poll_ref: Cell::new(KeepAlive::init()), + state: Cell::new(State::Initializing), + proxy: RefCell::new(proxy_state), + ssl_config: RefCell::new(ssl_config), + secure: RefCell::new(None), expected_accept: request_result.expected_accept, offered_permessage_deflate: offer_permessage_deflate, - subprotocols, - })); - bun_core::scoped_log!(alloc, "new({}) = {:p}", Self::TYPE_NAME, client); - // SAFETY: just allocated above; we hold the only ref. This `&mut` is - // used only for pre-connect setup and MUST NOT span any - // `Socket::connect_*_group` call below — those install `client` as - // socket userdata and may synchronously dispatch - // `handle_connect_error(*mut Self)`, which would - // alias this borrow under Stacked Borrows. A fresh `&mut *client` is - // re-derived after each connect call returns. - let client_ref = unsafe { &mut *client }; - - // Store TLS config if provided (ownership transferred to client) - client_ref.ssl_config = ssl_config; + subprotocols: RefCell::new(subprotocols), + }); + bun_core::scoped_log!(alloc, "new({}) = {:p}", Self::TYPE_NAME, client.as_ptr()); + // Ref ledger: `client` (this RefPtr) becomes the C++ `m_upgradeClient` + // ref returned to the caller; `connect_*_owned` below transfers ONE + // extra strong ref to core (released by core exactly once at the + // socket terminal, incl. silent SEMI_SOCKET close via detach_owner). + let client_ref: &Self = client.data(); let display_host_: &[u8] = if using_proxy { proxy_host_slice.as_ref().unwrap().slice() @@ -375,8 +421,12 @@ impl HTTPClient { }; let connect_port = if using_proxy { proxy_port } else { port }; - // SAFETY: `vm_ptr` is the live per-thread VM (`global.bun_vm_ptr()`). - client_ref.poll_ref.r#ref(unsafe { vm_loop_ctx(vm_ptr) }); + { + let mut poll_ref = client_ref.poll_ref.take(); + // SAFETY: `vm_ptr` is the live per-thread VM (`global.bun_vm_ptr()`). + poll_ref.r#ref(unsafe { vm_loop_ctx(vm_ptr) }); + client_ref.poll_ref.set(poll_ref); + } let display_host: &[u8] = if FeatureFlags::HARDCODE_LOCALHOST_TO_127_0_0_1 && display_host_ == b"localhost" { b"127.0.0.1" @@ -387,7 +437,7 @@ impl HTTPClient { log!( "connect: ssl={}, has_ssl_config={}, using_proxy={}", SSL, - client_ref.ssl_config.is_some(), + client_ref.ssl_config.borrow().is_some(), using_proxy ); @@ -415,39 +465,41 @@ impl HTTPClient { let hooks = bun_jsc::virtual_machine::runtime_hooks().expect("RuntimeHooks not installed"); 'brk: { - if let Some(config) = &client_ref.ssl_config { - if config.requires_custom_request_ctx { - let mut err = uws::create_bun_socket_error_t::none; - // Per-VM weak cache: every `new WebSocket(wss://, {tls:{ca}})` - // with the same CA shares one CTX with each other and with - // any `Bun.connect`/Postgres/etc. that named it. - // SAFETY: `vm_ptr` is the live per-thread VM (caller - // contract); JS thread. - let ctx = unsafe { - (hooks.ssl_ctx_cache_get_or_create)( - vm_ptr, - &config.as_usockets_for_client_verification(), - &mut err, - ) - }; - let Some(ctx) = ctx else { - // Do NOT fall through to the default trust store — the - // user passed an explicit CA/cert and BoringSSL - // rejected it. Swapping in system roots would let the - // connection succeed against a host the user didn't - // trust. The C++ caller emits an `error` event on null. - log!("createSSLContext failed for WebSocket: {:?}", err); - // SAFETY: `vm_ptr` is the live per-thread VM. - client_ref.poll_ref.unref(unsafe { vm_loop_ctx(vm_ptr) }); - // SAFETY: `client` from heap::alloc above; sole owner. - unsafe { Self::deref(client) }; - return None; - }; - // Owned ref; transferred to the connected WebSocket on - // upgrade, freed in `deinit` if we never get that far. - client_ref.secure = Some(SslCtxOwned(ctx)); - break 'brk Some(ctx); - } + let needs_custom_ctx = client_ref + .ssl_config + .borrow() + .as_ref() + .is_some_and(|c| c.requires_custom_request_ctx); + if needs_custom_ctx { + let mut err = uws::create_bun_socket_error_t::none; + // Per-VM weak cache: every `new WebSocket(wss://, {tls:{ca}})` + // with the same CA shares one CTX with each other and with + // any `Bun.connect`/Postgres/etc. that named it. + let opts = client_ref + .ssl_config + .borrow() + .as_ref() + .expect("checked above") + .as_usockets_for_client_verification(); + // SAFETY: `vm_ptr` is the live per-thread VM (caller + // contract); JS thread. + let ctx = + unsafe { (hooks.ssl_ctx_cache_get_or_create)(vm_ptr, &opts, &mut err) }; + let Some(ctx) = ctx else { + // Do NOT fall through to the default trust store — the + // user passed an explicit CA/cert and BoringSSL + // rejected it. Swapping in system roots would let the + // connection succeed against a host the user didn't + // trust. The C++ caller emits an `error` event on null. + log!("createSSLContext failed for WebSocket: {:?}", err); + // Sole ref; the destructor's clear_data unrefs poll_ref. + client.deref(); + return None; + }; + // Owned ref; transferred to the connected WebSocket on + // upgrade, freed in `deinit` if we never get that far. + client_ref.secure.replace(Some(SslCtxOwned(ctx))); + break 'brk Some(ctx); } // SAFETY: `vm_ptr` is the live per-thread VM; JS thread. Some(unsafe { (hooks.default_client_ssl_ctx)(vm_ptr) }) @@ -456,31 +508,26 @@ impl HTTPClient { None }; - // End the setup `&mut` before connect: `connect_*_group` may - // synchronously dispatch `handle_connect_error` via the userdata - // pointer, which would alias any live `&mut Self`. - let _ = client_ref; - // Unix domain socket path (ws+unix:// / wss+unix://) if let Some(usp) = &unix_socket_path_slice { - match Socket::::connect_unix_group( + // May synchronously dispatch `on_connect_error` before returning; + // the handler runs under the core dispatch guard and only flips + // `state` to Failed (observed below). + match Socket::::connect_unix_owned( group, kind, secure_ptr, usp.slice(), - client, + client.clone(), false, ) { Ok(socket) => { - // SAFETY: `client` is live (refcount >= 1); re-derive a - // fresh `&mut` now that any reentrant dispatch has - // returned. Not the sole owner anymore — `client` is also - // installed as socket userdata. - let client_ref = unsafe { &mut *client }; - client_ref.tcp = socket; - if client_ref.state == State::Failed { - // SAFETY: `client` from heap::alloc above. - unsafe { Self::deref(client) }; + client_ref.tcp.set(socket); + if client_ref.state.get() == State::Failed { + // Core already released its attach ref at the + // connect-error terminal; drop the C++ ref. + client_ref.detach_tcp(); + client.deref(); return None; } bun_analytics::features::web_socket @@ -494,44 +541,42 @@ impl HTTPClient { // in the URL (wss+unix://name/path) to verify against // a specific certificate name. if !host_slice.slice().is_empty() { - client_ref.hostname = ZBox::from_bytes(host_slice.slice()); + client_ref + .hostname + .replace(ZBox::from_bytes(host_slice.slice())); } } - client_ref.tcp.timeout(120); - client_ref.state = State::Reading; - // +1 for cpp_websocket - client_ref.ref_(); - return Some(client); + client_ref.tcp.get().timeout(120); + client_ref.state.set(State::Reading); + // The remaining local ref is the C++ `m_upgradeClient` ref. + return Some(client.into_raw()); } Err(_) => { - // SAFETY: `client` from heap::alloc above; never - // installed as userdata on the Err path. - unsafe { Self::deref(client) }; + // `connect_unix_owned` released the transferred ref on Err. + client.deref(); } } return None; } - match Socket::::connect_group( + match Socket::::connect_owned( group, kind, secure_ptr, display_host, c_int::from(connect_port), - client, + client.clone(), false, ) { Ok(sock) => { - // SAFETY: `client` is live (refcount >= 1); re-derive a fresh - // `&mut` now that any reentrant dispatch has returned. Not the - // sole owner anymore — `client` is also socket userdata. - let out = unsafe { &mut *client }; - out.tcp = sock; + client_ref.tcp.set(sock); // I don't think this case gets reached. - if out.state == State::Failed { - // SAFETY: `client` from heap::alloc above. - unsafe { Self::deref(client) }; + if client_ref.state.get() == State::Failed { + // Core already released its attach ref at the + // connect-error terminal; drop the C++ ref. + client_ref.detach_tcp(); + client.deref(); return None; } bun_analytics::features::web_socket @@ -542,132 +587,110 @@ impl HTTPClient { // dialed. For HTTPS proxy connections, that's the proxy host, // not the wss:// target. if !display_host_.is_empty() { - out.hostname = ZBox::from_bytes(display_host_); + client_ref.hostname.replace(ZBox::from_bytes(display_host_)); } } - out.tcp.timeout(120); - out.state = State::Reading; - // +1 for cpp_websocket - out.ref_(); - Some(client) + client_ref.tcp.get().timeout(120); + client_ref.state.set(State::Reading); + // The remaining local ref is the C++ `m_upgradeClient` ref. + Some(client.into_raw()) } Err(_) => { - // SAFETY: `client` from heap::alloc above; never installed - // as userdata on the Err path. - unsafe { Self::deref(client) }; + // `connect_owned` released the transferred ref on Err. + client.deref(); None } } } - pub fn clear_input(&mut self) { - self.input_body_buf = Vec::new(); - self.to_send_len = 0; + pub fn clear_input(&self) { + self.input_body_buf.replace(Vec::new()); + self.to_send_len.set(0); } - pub fn clear_data(&mut self) { - // SAFETY: `get_mut_ptr()` is the live per-thread VM singleton. - self.poll_ref - .unref(unsafe { vm_loop_ctx(VirtualMachineRef::get_mut_ptr()) }); - - self.subprotocols.clear_and_free(); - self.clear_input(); - self.body = Vec::new(); - - if !self.hostname.is_empty() { - self.hostname = ZBox::default(); + pub fn clear_data(&self) { + { + let mut poll_ref = self.poll_ref.take(); + // SAFETY: `get_mut_ptr()` is the live per-thread VM singleton. + poll_ref.unref(unsafe { vm_loop_ctx(VirtualMachineRef::get_mut_ptr()) }); + self.poll_ref.set(poll_ref); } - // Clean up proxy state. Null the field and detach the tunnel's - // back-reference before deinit so that SSLWrapper shutdown callbacks - // cannot re-enter clear_data() while the proxy is still reachable. - if let Some(proxy) = self.proxy.take() { + self.subprotocols.borrow_mut().clear_and_free(); + self.clear_input(); + self.body.replace(Vec::new()); + self.hostname.replace(ZBox::default()); + + // Clean up proxy state. Take the field (ending the RefCell borrow) and + // detach the tunnel's back-reference before drop so that SSLWrapper + // shutdown callbacks cannot re-enter clear_data() through the proxy. + let proxy = self.proxy.borrow_mut().take(); + if let Some(proxy) = proxy { if let Some(tunnel) = proxy.get_tunnel() { // SAFETY: `proxy` holds a live ref on `tunnel`. unsafe { (*tunnel.as_ptr()).detach_upgrade_client() }; } drop(proxy); } - // ssl_config: Option> — Drop runs SSLConfig::deinit + frees the box. - self.ssl_config = None; - // secure: Option — Drop releases the ref taken in `connect`. - self.secure = None; + // Option> — Drop runs SSLConfig::deinit + frees the box. + // Take first so the RefCell borrow ends before the Drop runs. + drop(self.ssl_config.borrow_mut().take()); + // Option — Drop releases the ref taken in `connect`. + drop(self.secure.borrow_mut().take()); } /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` (not `&mut self`) - /// because `tcp.close()` synchronously dispatches `handle_close` from the - /// socket userdata pointer, which would alias a `&mut self` argument; and - /// the trailing `deref` may free `this`, which would violate a `&mut self` - /// argument protector. + /// `this` must point to a live `Self`. Raw entry from C++: releases the + /// C++-side ref, so the pointer may be dangling when this returns. pub unsafe fn cancel(this: *mut Self) { - // SAFETY: caller (C++ / uWS) holds a live ref; `this` carries root - // (userdata) provenance from `heap::alloc`. - let this = unsafe { ThisPtr::new(this) }; - // SAFETY: short-lived `&mut` for clear_data; ends before any reentrant call. - unsafe { (*this.as_ptr()).clear_data() }; - - // Either of the below two operations - closing the TCP socket or clearing the C++ reference could trigger a deref - // Therefore, we need to make sure the `this` pointer is valid until the end of the function. - // Bumps the intrusive refcount and derefs on Drop (after `tcp.close` - // below), which may free `this` — no `&`/`&mut Self` is live at that - // point. - let _guard = this.ref_guard(); - - // The C++ end of the socket is no longer holding a reference to this, so we must clear it. - // SAFETY: short-lived `&mut` for the field take; ends before any reentrant call. - if unsafe { (*this.as_ptr()).outgoing_websocket.take().is_some() } { + // Keep the allocation alive across the two releases below. + // SAFETY: caller (C++) holds a live ref. + let _guard = unsafe { bun_ptr::ScopedRef::new(this) }; + // SAFETY: guarded above. + let me = unsafe { &*this }; + me.clear_data(); + + // The C++ end is no longer holding a reference to this; release it. + if me.outgoing_websocket.take().is_some() { // SAFETY: refcount > 1 here (the +1 from `_guard` above). - unsafe { Self::deref(this.as_ptr()) }; + unsafe { Self::deref(this) }; } - // Copy `tcp` out so no `&mut Self` spans the close. - let tcp = this.tcp; - // Clear the socket's ext slot before closing. `us_socket_close` on a + let tcp = me.tcp.get(); + // Detach the core-held owner ref before closing. `close` on a // SEMI_SOCKET (TCP connect still in flight — the common case when // `ws.close()` is called synchronously after `new WebSocket()`) skips - // dispatch entirely, so we cannot rely on `handle_close` / - // `handle_connect_error` to release the socket-userdata ref taken in - // `connect()`. Take it back here and deref it ourselves; any callback - // that does fire sees `ext == None` and no-ops via the - // `RawPtrHandler` guard. - let had_socket_ref = tcp - .ext::>>() - // SAFETY: ext slot is the `Option>` written in - // `connect_group`; single-threaded (JS thread), no other `&mut` - // to it is live. - .is_some_and(|ext| unsafe { (*ext).take().is_some() }); + // dispatch entirely; `detach_owner` makes core release its attach ref + // NOW and turns any subsequent dispatch on this socket into a no-op. + tcp.detach_owner(); // no need to be .failure we still wanna to send pending SSL buffer + close_notify if SSL { tcp.close(uws::CloseCode::Normal); } else { tcp.close(uws::CloseCode::Failure); } - if had_socket_ref { - // SAFETY: short-lived `&mut` for the field detach. - unsafe { (*this.as_ptr()).tcp.detach() }; - // SAFETY: refcount > 1 (the +1 from `_guard` above). - unsafe { Self::deref(this.as_ptr()) }; - } + me.detach_tcp(); // `_guard` drops here, balancing the ref above. May free `this`. } - /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` because - /// `did_abrupt_close` may run JS that re-enters via `cancel()`, and - /// `tcp.close()` synchronously dispatches `handle_close`; both would alias - /// a `&mut self` argument. - pub unsafe fn fail(this: *mut Self, code: ErrorCode) { + /// Detach the local socket handle so later `close()`/`is_closed()` calls + /// are no-ops on a stale handle. + fn detach_tcp(&self) { + let mut tcp = self.tcp.get(); + tcp.detach(); + self.tcp.set(tcp); + } + + /// Callers must keep the allocation alive across this call (dispatch + /// guard, ScopedRef in the raw entry points): `did_abrupt_close` runs JS + /// that may re-enter `cancel()`, and `tcp.close()` synchronously + /// dispatches `handle_close`. + pub fn fail(&self, code: ErrorCode) { log!("onFail: {}", <&'static str>::from(code)); bun_jsc::mark_binding!(); - // SAFETY: caller contract — `this` is a live `heap::alloc` pointer. - let this = unsafe { ThisPtr::new(this) }; - // Copy `tcp` out before dispatch so nothing touches `*this` after the - // FFI call (which may reenter and pop our tag). - let tcp = this.tcp; - // SAFETY: forwards `this` with root provenance; no `&mut Self` is live. - unsafe { Self::dispatch_abrupt_close(this.as_ptr(), code) }; + let tcp = self.tcp.get(); + self.dispatch_abrupt_close(code); // A failed upgrade (bad status line, mismatched subprotocol, invalid // headers, ...) is an application-level rejection of a healthy TCP @@ -677,51 +700,40 @@ impl HTTPClient { tcp.close(uws::CloseCode::Normal); } - /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` because - /// `did_abrupt_close` runs JS error handlers and may re-enter via C++ - /// `cancel()`, which would alias a `&mut self` argument; and the trailing - /// `deref` may free `this`. - unsafe fn dispatch_abrupt_close(this: *mut Self, code: ErrorCode) { - // SAFETY: short-lived `&mut` for the field take; ends before the FFI call. - let ws = unsafe { (*this).outgoing_websocket.take() }; - if let Some(ws) = ws { + fn dispatch_abrupt_close(&self, code: ErrorCode) { + if let Some(ws) = self.outgoing_websocket.take() { CppWebSocket::opaque_ref(ws).did_abrupt_close(code); - // SAFETY: `this` carries root provenance; may free `this`. - unsafe { Self::deref(this) }; + // Release the C++-side ref; callers hold a guard, so the + // allocation survives this release. + // SAFETY: live per callers' liveness contract. + unsafe { Self::deref(self.as_ctx_ptr()) }; } } - /// Takes `ThisPtr` because the trailing `deref` releases the socket - /// ref and on the normal path frees `this`; a `&mut self` argument would - /// carry a Stacked Borrows protector that makes deallocating it UB. - pub fn handle_close(this: ThisPtr, _: Socket, _: c_int, _: *mut c_void) { + // Terminal: after this returns, core releases its attach ref exactly once. + pub fn handle_close(&self) { log!("onClose"); bun_jsc::mark_binding!(); - // SAFETY: short-lived `&mut` borrows; each ends before the next call. - unsafe { (*this.as_ptr()).clear_data() }; - // SAFETY: short-lived `&mut` for the field detach; `this` is live. - unsafe { (*this.as_ptr()).tcp.detach() }; - // SAFETY: forwards `this` with root provenance; no `&mut Self` is live. - unsafe { Self::dispatch_abrupt_close(this.as_ptr(), ErrorCode::Ended) }; - - // SAFETY: may free `this`; no `&mut Self` is live. - unsafe { Self::deref(this.as_ptr()) }; + self.clear_data(); + self.detach_tcp(); + self.dispatch_abrupt_close(ErrorCode::Ended); } + /// Raw entry for the proxy tunnel's backref dispatch. + /// /// # Safety - /// `this` must point to a live `Self`. See `fail`. + /// `this` must point to a live `Self`. pub unsafe fn terminate(this: *mut Self, code: ErrorCode) { - // SAFETY: forwards `this` with root provenance. - unsafe { Self::fail(this, code) }; - // We cannot access the pointer after fail is called. + // SAFETY: caller contract — `this` is live. + let _guard = unsafe { bun_ptr::ScopedRef::new(this) }; + // SAFETY: guarded above. + unsafe { &*this }.fail(code); } - /// Takes `ThisPtr` because `fail` may free `this` / be re-entered. pub fn handle_handshake( - this: ThisPtr, + &self, socket: Socket, - success: i32, + success: bool, ssl_error: uws::us_bun_verify_error_t, ) { log!( @@ -730,13 +742,12 @@ impl HTTPClient { ssl_error.error_no ); - let handshake_success = success == 1; let mut reject_unauthorized = false; - if let Some(ws) = this.outgoing_websocket { + if let Some(ws) = self.outgoing_websocket.get() { reject_unauthorized = CppWebSocket::opaque_ref(ws).reject_unauthorized(); } - if handshake_success { + if success { // handshake completed but we may have ssl errors if reject_unauthorized { // only reject the connection if reject_unauthorized == true @@ -744,10 +755,9 @@ impl HTTPClient { log!( "TLS handshake failed: ssl_error={}, has_custom_ctx={}", ssl_error.error_no, - this.secure.is_some() + self.secure.borrow().is_some() ); - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::fail(this.as_ptr(), ErrorCode::TlsHandshakeFailed) }; + self.fail(ErrorCode::TlsHandshakeFailed); return; } // SAFETY: native handle on a TLS socket is `*SSL`. @@ -757,8 +767,7 @@ impl HTTPClient { if ssl_ptr.is_null() { // No SSL object to verify against — treat as handshake failure // rather than dereferencing null below. - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::fail(this.as_ptr(), ErrorCode::TlsHandshakeFailed) }; + self.fail(ErrorCode::TlsHandshakeFailed); return; } // SAFETY: ssl_ptr is a live *SSL from the open socket; SSL_get_servername @@ -766,44 +775,47 @@ impl HTTPClient { // Keep the raw pointer — round-tripping through `&c_char` would // shrink provenance to 1 byte and make the CStr scan UB. let servername = unsafe { boringssl::c::SSL_get_servername(ssl_ptr, 0) }; - let hostname = if !this.hostname.is_empty() { - this.hostname.as_bytes() - } else if !servername.is_null() { - // SAFETY: SSL_get_servername returns a NUL-terminated C string - // owned by the SSL session; full provenance retained above. - unsafe { bun_core::ffi::cstr(servername) }.to_bytes() - } else { - b"" + // Owned copy so no `hostname` RefCell borrow spans `fail`. + let hostname_owned: Vec = { + let hn = self.hostname.borrow(); + if !hn.is_empty() { + hn.as_bytes().to_vec() + } else if !servername.is_null() { + // SAFETY: SSL_get_servername returns a NUL-terminated C + // string owned by the SSL session; full provenance + // retained above. + unsafe { bun_core::ffi::cstr(servername) } + .to_bytes() + .to_vec() + } else { + Vec::new() + } }; - if hostname.is_empty() + if hostname_owned.is_empty() // SAFETY: `ssl_ptr` is non-null (checked above) and is the live `*SSL` // for this open socket; reached only after a successful TLS handshake. - || !boringssl::check_server_identity(unsafe { &mut *ssl_ptr }, hostname) + || !boringssl::check_server_identity(unsafe { &mut *ssl_ptr }, &hostname_owned) { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::fail(this.as_ptr(), ErrorCode::TlsHandshakeFailed) }; + self.fail(ErrorCode::TlsHandshakeFailed); } } } else { // if we are here is because server rejected us, and the error_no is the cause of this // if we set reject_unauthorized == false this means the server requires custom CA aka NODE_EXTRA_CA_CERTS - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::fail(this.as_ptr(), ErrorCode::TlsHandshakeFailed) }; + self.fail(ErrorCode::TlsHandshakeFailed); } } - /// Takes `ThisPtr` because `terminate` may free `this`; see `fail`. - pub fn handle_open(this: ThisPtr, socket: Socket) { + pub fn handle_open(&self, socket: Socket) { log!("onOpen"); - // SAFETY: short-lived `&mut` for setup; ends before any reentrant call. - let me = unsafe { &mut *this.as_ptr() }; - me.tcp = socket; + self.tcp.set(socket); - debug_assert!(!me.input_body_buf.is_empty()); - debug_assert!(me.to_send_len == 0); + debug_assert!(!self.input_body_buf.borrow().is_empty()); + debug_assert!(self.to_send_len.get() == 0); if SSL { - if !me.hostname.is_empty() { + let hostname = self.hostname.borrow(); + if !hostname.is_empty() { if let Some(handle) = socket.get_native_handle() { // SAFETY: native handle on a TLS socket is `*SSL`; live for the // open socket's lifetime. @@ -811,14 +823,14 @@ impl HTTPClient { // `configureHTTPClient` ext-method hasn't landed on // boringssl::SSL; use bun_http's helper. // SAFETY: `handle` is the live `*mut SSL` for this just-opened - // socket (uSockets never passes null); `me.hostname` is a + // socket (uSockets never passes null); `hostname` is a // NUL-terminated CString that outlives this call. bun_http::configure_http_client_with_alpn( unsafe { &mut *handle }, - if strings::is_ip_address(me.hostname.as_bytes()) { + if strings::is_ip_address(hostname.as_bytes()) { core::ptr::null() } else { - me.hostname.as_ptr() + hostname.as_ptr() }, bun_http::AlpnOffer::H1, ); @@ -827,182 +839,176 @@ impl HTTPClient { } // If using proxy, set state to proxy_handshake - if me.proxy.is_some() { - me.state = State::ProxyHandshake; + if self.proxy.borrow().is_some() { + self.state.set(State::ProxyHandshake); } - let wrote = socket.write(&me.input_body_buf); + // Borrow spans only `socket.write` (plain send; never re-enters). + let wrote = { + let buf = self.input_body_buf.borrow(); + socket.write(&buf) + }; if wrote < 0 { - // SAFETY: no `&mut Self` is live across this call (`me`'s last use is above). - unsafe { Self::terminate(this.as_ptr(), ErrorCode::FailedToWrite) }; + self.fail(ErrorCode::FailedToWrite); return; } - me.to_send_len = me.input_body_buf.len() - usize::try_from(wrote).expect("int cast"); + self.to_send_len + .set(self.input_body_buf.borrow().len() - usize::try_from(wrote).expect("int cast")); } pub fn is_same_socket(&self, socket: Socket) -> bool { // `InternalSocket` has no `PartialEq`; compare native handles. - socket.get_native_handle() == self.tcp.get_native_handle() + socket.get_native_handle() == self.tcp.get().get_native_handle() } - /// Takes `ThisPtr` because `socket.close()` synchronously dispatches - /// `handle_close` (aliased `&mut`), and `terminate`/`process_response`/the - /// trailing `deref` may free `this` (argument-protector UB on `&mut self`). - pub fn handle_data(this: ThisPtr, socket: Socket, data: &[u8]) { + /// Snapshot of the tunnel pointer, with the `proxy` RefCell borrow scoped + /// so re-entrant tunnel callbacks can reach `clear_data` safely. + fn tunnel_ptr(&self) -> Option> { + self.proxy + .borrow() + .as_ref() + .and_then(WebSocketProxy::get_tunnel) + } + + pub fn handle_data(&self, socket: Socket, data: &[u8]) { log!("onData"); // For tunnel mode after successful upgrade, forward all data to the tunnel // The tunnel will decrypt and pass to the WebSocket client - if this.state == State::Done { - // SAFETY: short-lived `&mut` for the proxy borrow; ends before return. - if let Some(p) = unsafe { &mut (*this.as_ptr()).proxy } { - if let Some(tunnel) = p.get_tunnel() { - let tp = tunnel.as_ptr(); - // Ref the tunnel to keep it alive during this call - // (in case the WebSocket client closes during processing) - // SAFETY: `p` holds a live ref on `tunnel`. - let _g = unsafe { bun_ptr::ScopedRef::new(tp) }; - // SAFETY: ref guard above keeps the tunnel live. - unsafe { WebSocketProxyTunnel::receive(tp, data) }; - } + if self.state.get() == State::Done { + if let Some(tunnel) = self.tunnel_ptr() { + let tp = tunnel.as_ptr(); + // Ref the tunnel to keep it alive during this call + // (in case the WebSocket client closes during processing) + // SAFETY: `proxy` holds a live ref on `tunnel`. + let _g = unsafe { bun_ptr::ScopedRef::new(tp) }; + // SAFETY: ref guard above keeps the tunnel live. + unsafe { WebSocketProxyTunnel::receive(tp, data) }; } return; } - if this.outgoing_websocket.is_none() { - // SAFETY: short-lived `&mut` writes; each ends before `socket.close`. - unsafe { (*this.as_ptr()).state = State::Failed }; - // SAFETY: short-lived `&mut` for clear_data; ends before `socket.close` below. - unsafe { (*this.as_ptr()).clear_data() }; - // No `&mut Self` is live across this call (handle_close reenters). + if self.outgoing_websocket.get().is_none() { + self.state.set(State::Failed); + self.clear_data(); + // handle_close re-enters synchronously; no borrows are live. socket.close(uws::CloseCode::Failure); return; } - // Bumps the intrusive refcount and derefs on Drop at every return path - // below. No `&`/`&mut Self` is live when the guard drops. - let _guard = this.ref_guard(); - debug_assert!(this.is_same_socket(socket)); + debug_assert!(self.is_same_socket(socket)); #[cfg(debug_assertions)] debug_assert!(!socket.is_shutdown()); // Handle proxy handshake response - if this.state == State::ProxyHandshake { - Self::handle_proxy_response(this, socket, data); + if self.state.get() == State::ProxyHandshake { + self.handle_proxy_response(socket, data); return; } // Route through proxy tunnel if TLS handshake is in progress or complete - { - // SAFETY: short-lived `&mut` for the proxy borrow. - if let Some(p) = unsafe { &mut (*this.as_ptr()).proxy } { - if let Some(tunnel) = p.get_tunnel() { - // SAFETY: `p` holds a live ref on `tunnel`. - unsafe { WebSocketProxyTunnel::receive(tunnel.as_ptr(), data) }; - return; - } - } + if let Some(tunnel) = self.tunnel_ptr() { + // SAFETY: `proxy` holds a live ref on `tunnel`. + unsafe { WebSocketProxyTunnel::receive(tunnel.as_ptr(), data) }; + return; } - // SAFETY: short-lived `&mut` for body buffering; no reentrant calls in - // this region until `terminate`/`process_response` below. - let me = unsafe { &mut *this.as_ptr() }; - let mut body = data; - if !me.body.is_empty() { - me.body.extend_from_slice(data); - body = &me.body; + self.process_upgrade_response_bytes(data); + } + + /// Accumulate + parse the 101 response. The parse buffers are locals, so + /// `process_response` (which can reach `clear_data` through JS) never + /// races a `RefCell` borrow of `self.body`. + fn process_upgrade_response_bytes(&self, data: &[u8]) { + let mut accum: Vec = self.body.take(); + let is_first = accum.is_empty(); + if !is_first { + accum.extend_from_slice(data); } + let body: &[u8] = if is_first { data } else { &accum }; - let is_first = me.body.is_empty(); const HTTP_101: &[u8] = b"HTTP/1.1 101 "; if is_first && body.len() > HTTP_101.len() { // fail early if we receive a non-101 status code if !body.starts_with(HTTP_101) { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::Expected101StatusCode) }; + self.fail(ErrorCode::Expected101StatusCode); return; } } - let response = match picohttp::Response::parse(body, &mut me.headers_buf) { + let mut headers_buf = [picohttp::Header::ZERO; 128]; + let response = match picohttp::Response::parse(body, &mut headers_buf) { Ok(r) => r, Err(picohttp::ParseResponseError::MalformedHttpResponse) => { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::InvalidResponse) }; + self.fail(ErrorCode::InvalidResponse); return; } Err(picohttp::ParseResponseError::ShortRead) => { - if me.body.is_empty() { - me.body.extend_from_slice(data); + if is_first { + accum.extend_from_slice(data); } // ShortRead means no \r\n\r\n was found, so every byte in - // `body` is part of an incomplete header — cap that, not + // `accum` is part of an incomplete header — cap that, not // total bytes received (which may include pipelined // WebSocket frames once the header does complete). - if me.body.len() > bun_http::max_http_header_size() { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::InvalidResponse) }; + if accum.len() > bun_http::max_http_header_size() { + self.fail(ErrorCode::InvalidResponse); + return; } + self.body.replace(accum); return; } }; let bytes_read = usize::try_from(response.bytes_read).expect("int cast"); - // Reshaped for borrowck — copy remain_buf out before mutating self. let remain_buf: Vec = body[bytes_read..].to_vec(); - // SAFETY: `me`'s last use is the `body` slice above (now copied out); - // no `&mut Self` spans this call. - unsafe { Self::process_response(this.as_ptr(), response, &remain_buf) }; - // `_guard` drops here, balancing the ref above. May free `this`. + self.process_response(response, &remain_buf); } - /// Takes `ThisPtr` because `terminate`/`handle_data` may free `this`. - fn handle_proxy_response(this: ThisPtr, socket: Socket, data: &[u8]) { + fn handle_proxy_response(&self, socket: Socket, data: &[u8]) { log!("handleProxyResponse"); - // SAFETY: short-lived `&mut` for body buffering; no reentrant calls in - // this region until `terminate` below. - let me = unsafe { &mut *this.as_ptr() }; - let mut body = data; - if !me.body.is_empty() { - me.body.extend_from_slice(data); - body = &me.body; + // Parse buffers are locals — see process_upgrade_response_bytes. + let mut accum: Vec = self.body.take(); + let is_first = accum.is_empty(); + if !is_first { + accum.extend_from_slice(data); } + let body: &[u8] = if is_first { data } else { &accum }; // Check for HTTP 200 response from proxy - let is_first = me.body.is_empty(); const HTTP_200: &[u8] = b"HTTP/1.1 200 "; const HTTP_200_ALT: &[u8] = b"HTTP/1.0 200 "; if is_first && body.len() > HTTP_200.len() { if !body.starts_with(HTTP_200) && !body.starts_with(HTTP_200_ALT) { // Proxy connection failed - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::ProxyConnectFailed) }; + self.fail(ErrorCode::ProxyConnectFailed); return; } } // Parse the response to find the end of headers - let response = match picohttp::Response::parse(body, &mut me.headers_buf) { + let mut headers_buf = [picohttp::Header::ZERO; 128]; + let response = match picohttp::Response::parse(body, &mut headers_buf) { Ok(r) => r, Err(picohttp::ParseResponseError::MalformedHttpResponse) => { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::InvalidResponse) }; + self.fail(ErrorCode::InvalidResponse); return; } Err(picohttp::ParseResponseError::ShortRead) => { - if me.body.is_empty() { - me.body.extend_from_slice(data); + if is_first { + accum.extend_from_slice(data); } // ShortRead means no \r\n\r\n was found, so every byte in - // `body` is part of an incomplete header — cap that, not + // `accum` is part of an incomplete header — cap that, not // total bytes received. - if me.body.len() > bun_http::max_http_header_size() { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::InvalidResponse) }; + if accum.len() > bun_http::max_http_header_size() { + self.fail(ErrorCode::InvalidResponse); + return; } + self.body.replace(accum); return; } }; @@ -1010,11 +1016,9 @@ impl HTTPClient { // Proxy returned non-200 status if response.status_code != 200 { if response.status_code == 407 { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::ProxyAuthenticationRequired) }; + self.fail(ErrorCode::ProxyAuthenticationRequired); } else { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::ProxyConnectFailed) }; + self.fail(ErrorCode::ProxyConnectFailed); } return; } @@ -1023,93 +1027,93 @@ impl HTTPClient { log!("Proxy tunnel established"); let bytes_read = usize::try_from(response.bytes_read).expect("int cast"); - // Reshaped for borrowck — copy remain_buf before clearing self.body. let remain_buf: Vec = body[bytes_read..].to_vec(); - // SAFETY: re-derive a fresh `&mut` after the `body` borrow above. - let me = unsafe { &mut *this.as_ptr() }; - - // Clear the body buffer for WebSocket handshake - me.body.clear(); - - // Safely unwrap proxy state - it must exist if we're in proxy_handshake state - let Some(p) = &mut me.proxy else { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::ProxyTunnelFailed) }; + // For wss:// through proxy, we need to do TLS handshake inside the tunnel + let target_https: Option = self + .proxy + .borrow() + .as_ref() + .map(WebSocketProxy::is_target_https); + let Some(target_https) = target_https else { + // Proxy state must exist in proxy_handshake state. + self.fail(ErrorCode::ProxyTunnelFailed); return; }; - - // For wss:// through proxy, we need to do TLS handshake inside the tunnel - if p.is_target_https() { - // SAFETY: `me`/`p` last used above; forwards `this` with root provenance. - unsafe { Self::start_proxy_tls_handshake(this.as_ptr(), socket, &remain_buf) }; + if target_https { + self.start_proxy_tls_handshake(socket, &remain_buf); return; } // For ws:// through proxy, send the WebSocket upgrade request - me.state = State::Reading; + self.state.set(State::Reading); // Use the WebSocket upgrade request from proxy state (replaces CONNECT // request buffer; old Vec is dropped here). - me.input_body_buf = p.take_websocket_request_buf().into_vec(); - me.to_send_len = 0; + let request: Vec = match self.proxy.borrow_mut().as_mut() { + Some(p) => p.take_websocket_request_buf().into_vec(), + None => Vec::new(), + }; + self.input_body_buf.replace(request); + self.to_send_len.set(0); - // Send the WebSocket upgrade request - let wrote = socket.write(&me.input_body_buf); + // Send the WebSocket upgrade request (plain send; never re-enters). + let wrote = { + let buf = self.input_body_buf.borrow(); + socket.write(&buf) + }; if wrote < 0 { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::FailedToWrite) }; + self.fail(ErrorCode::FailedToWrite); return; } - me.to_send_len = me.input_body_buf.len() - usize::try_from(wrote).expect("int cast"); + self.to_send_len + .set(self.input_body_buf.borrow().len() - usize::try_from(wrote).expect("int cast")); // If there's remaining data after the proxy response, process it if !remain_buf.is_empty() { - Self::handle_data(this, socket, &remain_buf); + self.handle_data(socket, &remain_buf); } } - /// Start TLS handshake inside the proxy tunnel for wss:// connections - /// - /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` because - /// `terminate` may free `this`; see `fail`. - unsafe fn start_proxy_tls_handshake(this: *mut Self, socket: Socket, initial_data: &[u8]) { + /// Start TLS handshake inside the proxy tunnel for wss:// connections. + fn start_proxy_tls_handshake(&self, socket: Socket, initial_data: &[u8]) { log!("startProxyTLSHandshake"); - // SAFETY: short-lived `&mut`; no reentrant calls until `terminate` below. - let me = unsafe { &mut *this }; - - // Safely unwrap proxy state - it must exist if we're called from handle_proxy_response - let Some(p) = &mut me.proxy else { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::ProxyTunnelFailed) }; - return; - }; - // Get certificate verification setting - let reject_unauthorized = match me.outgoing_websocket { + let reject_unauthorized = match self.outgoing_websocket.get() { Some(ws) => CppWebSocket::opaque_ref(ws).reject_unauthorized(), None => true, }; - // Create proxy tunnel with all parameters - let target_host = p.get_target_host(); - let tunnel = - match WebSocketProxyTunnel::init::(this, socket, target_host, reject_unauthorized) - { - Ok(t) => t, - Err(_) => { - // SAFETY: `me`/`p` last used above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::ProxyTunnelFailed) }; - return; - } - }; + // Create proxy tunnel with all parameters. The target-host copy ends + // the `proxy` borrow before any call that can re-enter this struct. + let target_host: Option> = self + .proxy + .borrow() + .as_ref() + .map(|p| p.get_target_host().to_vec()); + let Some(target_host) = target_host else { + // Proxy state must exist when called from handle_proxy_response. + self.fail(ErrorCode::ProxyTunnelFailed); + return; + }; + let tunnel = match WebSocketProxyTunnel::init::( + self.as_ctx_ptr(), + socket, + &target_host, + reject_unauthorized, + ) { + Ok(t) => t, + Err(_) => { + self.fail(ErrorCode::ProxyTunnelFailed); + return; + } + }; // Use ssl_config if available, otherwise use defaults - let ssl_options: SSLConfig = match &me.ssl_config { - Some(config) => (**config).clone(), + let ssl_options: SSLConfig = match self.ssl_config.borrow().as_deref() { + Some(config) => config.clone(), None => { let mut c = SSLConfig::default(); c.reject_unauthorized = 0; // We verify manually @@ -1118,162 +1122,111 @@ impl HTTPClient { } }; - // Start TLS handshake + // Start TLS handshake; may synchronously fire SSLWrapper callbacks + // that re-enter this struct — no RefCell borrow is live here. // SAFETY: `tunnel` was just allocated by `init` (live, ref_count == 1). if unsafe { WebSocketProxyTunnel::start(tunnel.as_ptr(), &ssl_options, initial_data) } .is_err() { // SAFETY: release the ref taken by `init`. unsafe { WebSocketProxyTunnel::deref(tunnel.as_ptr()) }; - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::ProxyTunnelFailed) }; + self.fail(ErrorCode::ProxyTunnelFailed); return; } - // Reshaped for borrowck — re-borrow proxy after uses above. - // SAFETY: re-derive a fresh `&mut`. - let me = unsafe { &mut *this }; - let Some(p) = &mut me.proxy else { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::ProxyTunnelFailed) }; - return; + let stored = { + let mut proxy = self.proxy.borrow_mut(); + match proxy.as_mut() { + Some(p) => { + p.set_tunnel(Some(tunnel)); + true + } + None => false, + } }; - p.set_tunnel(Some(tunnel)); - me.state = State::ProxyTlsHandshake; + if !stored { + // A re-entrant teardown during start() cleared the proxy; the + // tunnel ref from init() must not leak. + // SAFETY: `tunnel` holds the init() ref; sole owner here. + unsafe { WebSocketProxyTunnel::deref(tunnel.as_ptr()) }; + self.fail(ErrorCode::ProxyTunnelFailed); + return; + } + self.state.set(State::ProxyTlsHandshake); } /// Called by WebSocketProxyTunnel when TLS handshake completes successfully /// /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` because - /// `terminate` may free `this`; see `fail`. + /// `this` must point to a live `Self` (tunnel backref entry). pub unsafe fn on_proxy_tls_handshake_complete(this: *mut Self) { log!("onProxyTLSHandshakeComplete"); - - // SAFETY: short-lived `&mut`; no reentrant calls until `terminate` below. - let me = unsafe { &mut *this }; + // SAFETY: caller contract — `this` is live. + let _guard = unsafe { bun_ptr::ScopedRef::new(this) }; + // SAFETY: guarded above. + let me = unsafe { &*this }; // TLS handshake done - send WebSocket upgrade request through tunnel - me.state = State::Reading; - - // Free the CONNECT request buffer - me.input_body_buf = Vec::new(); - me.to_send_len = 0; - - // Safely unwrap proxy state and send through the tunnel - let Some(p) = &mut me.proxy else { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::ProxyTunnelFailed) }; + me.state.set(State::Reading); + + // Replace the CONNECT request buffer with the WebSocket upgrade + // request from proxy state (transfers ownership); handle_writable + // retries any unwritten suffix on drain. + let request: Option> = me + .proxy + .borrow_mut() + .as_mut() + .map(|p| p.take_websocket_request_buf().into_vec()); + let Some(request) = request else { + me.fail(ErrorCode::ProxyTunnelFailed); return; }; - - // Take the WebSocket upgrade request from proxy state (transfers ownership). - // Store it in input_body_buf so handle_writable can retry on drain. - me.input_body_buf = p.take_websocket_request_buf().into_vec(); - if me.input_body_buf.is_empty() { - // SAFETY: `me`/`p` last used above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::FailedToWrite) }; + if request.is_empty() { + me.fail(ErrorCode::FailedToWrite); return; } - - // Send through the tunnel (will be encrypted). Buffer any unwritten - // portion in to_send so handle_writable retries when the socket drains. - if let Some(tunnel) = p.get_tunnel() { - // SAFETY: `p` holds a live ref on `tunnel`. - let wrote = - match unsafe { WebSocketProxyTunnel::write(tunnel.as_ptr(), &me.input_body_buf) } { - Ok(n) => n, - Err(_) => { - // SAFETY: `me`/`p`/`tunnel` last used above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::FailedToWrite) }; - return; - } - }; - me.to_send_len = me.input_body_buf.len() - wrote; - } else { - // SAFETY: `me`/`p` last used above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::ProxyTunnelFailed) }; + let total = request.len(); + me.input_body_buf.replace(request); + me.to_send_len.set(0); + + // Send through the tunnel (will be encrypted). The write can + // synchronously re-enter fail/clear_data, so write from an owned + // copy and clamp the bookkeeping afterwards. + let Some(tunnel) = me.tunnel_ptr() else { + me.fail(ErrorCode::ProxyTunnelFailed); + return; + }; + me.to_send_len.set(total); + let pending = me.pending_write_bytes(); + // SAFETY: `proxy` holds a live ref on `tunnel`. + match unsafe { WebSocketProxyTunnel::write(tunnel.as_ptr(), &pending) } { + Ok(wrote) => me.note_wrote(wrote), + Err(_) => me.fail(ErrorCode::FailedToWrite), } } /// Called by WebSocketProxyTunnel with decrypted data from the TLS tunnel /// /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` because - /// `terminate`/`process_response` may free `this`; see `fail`. + /// `this` must point to a live `Self` (tunnel backref entry). pub unsafe fn handle_decrypted_data(this: *mut Self, data: &[u8]) { log!("handleDecryptedData: {} bytes", data.len()); - - // SAFETY: short-lived `&mut` for body buffering; no reentrant calls in - // this region until `terminate`/`process_response` below. - let me = unsafe { &mut *this }; - - // Process as if it came directly from the socket - let mut body = data; - if !me.body.is_empty() { - me.body.extend_from_slice(data); - body = &me.body; - } - - let is_first = me.body.is_empty(); - const HTTP_101: &[u8] = b"HTTP/1.1 101 "; - if is_first && body.len() > HTTP_101.len() { - // fail early if we receive a non-101 status code - if !body.starts_with(HTTP_101) { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::Expected101StatusCode) }; - return; - } - } - - let response = match picohttp::Response::parse(body, &mut me.headers_buf) { - Ok(r) => r, - Err(picohttp::ParseResponseError::MalformedHttpResponse) => { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::InvalidResponse) }; - return; - } - Err(picohttp::ParseResponseError::ShortRead) => { - if me.body.is_empty() { - me.body.extend_from_slice(data); - } - // ShortRead means no \r\n\r\n was found, so every byte in - // `body` is part of an incomplete header — cap that, not - // total bytes received (which may include pipelined - // WebSocket frames once the header does complete). - if me.body.len() > bun_http::max_http_header_size() { - // SAFETY: `me`'s last use is above; no `&mut Self` spans this call. - unsafe { Self::terminate(this, ErrorCode::InvalidResponse) }; - } - return; - } - }; - - let bytes_read = usize::try_from(response.bytes_read).expect("int cast"); - // Reshaped for borrowck — copy remain_buf out before mutating self. - let remain_buf: Vec = body[bytes_read..].to_vec(); - // SAFETY: `me`'s last use is the `body` slice above (now copied out); - // no `&mut Self` spans this call. - unsafe { Self::process_response(this, response, &remain_buf) }; + // SAFETY: caller contract — `this` is live. + let _guard = unsafe { bun_ptr::ScopedRef::new(this) }; + // Process as if it came directly from the socket. + // SAFETY: guarded above. + unsafe { &*this }.process_upgrade_response_bytes(data); } - /// Takes `ThisPtr` because `terminate` may free `this`; see `fail`. - pub fn handle_end(this: ThisPtr, _: Socket) { + pub fn handle_end(&self) { log!("onEnd"); - // SAFETY: forwards `this` with root provenance; no `&mut Self` is live. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::Ended) }; + self.fail(ErrorCode::Ended); } - /// # Safety - /// `this` must point to a live `Self`. Takes `*mut Self` because - /// `terminate`/`tcp.close()` may synchronously dispatch `handle_close` - /// (aliased `&mut`), and the success path's double `deref` may free - /// `this` (argument-protector UB on `&mut self`). - pub unsafe fn process_response( - this: *mut Self, - response: picohttp::Response, - remain_buf: &[u8], - ) { + /// `response` borrows the caller's LOCAL parse buffers, so the re-entrant + /// paths below (fail/close/C++ callbacks → clear_data) cannot invalidate + /// it or trip a `RefCell` borrow. + fn process_response(&self, response: picohttp::Response, remain_buf: &[u8]) { let mut upgrade_header = picohttp::Header::ZERO; let mut connection_header = picohttp::Header::ZERO; let mut websocket_accept_header = picohttp::Header::ZERO; @@ -1283,8 +1236,7 @@ impl HTTPClient { let mut deflate_result = DeflateNegotiationResult::default(); if response.status_code != 101 { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::Expected101StatusCode) }; + self.fail(ErrorCode::Expected101StatusCode); return; } @@ -1316,8 +1268,7 @@ impl HTTPClient { b"Sec-WebSocket-Version", ) { if !strings::eql_comptime(header.value(), b"13") { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::InvalidWebsocketVersion) }; + self.fail(ErrorCode::InvalidWebsocketVersion); return; } } @@ -1358,13 +1309,11 @@ impl HTTPClient { } // Protocol must be in the list of allowed protocols. - // SAFETY: short-lived `&self` read. - if !unsafe { (*this).subprotocols.contains(protocol) } { + if !self.subprotocols.borrow().contains(protocol) { break 'brk false; } - // SAFETY: short-lived read of `outgoing_websocket`. - if let Some(ws) = unsafe { (*this).outgoing_websocket } { + if let Some(ws) = self.outgoing_websocket.get() { let mut protocol_str = BunString::clone_latin1(protocol); CppWebSocket::opaque_ref(ws).set_protocol(&mut protocol_str); // `BunString` is `Copy`; explicitly drop the @@ -1375,8 +1324,7 @@ impl HTTPClient { }; if !valid { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::MismatchClientProtocol) }; + self.fail(ErrorCode::MismatchClientProtocol); return; } } @@ -1391,10 +1339,8 @@ impl HTTPClient { // (lib/websocket.js: "Server sent a Sec-WebSocket-Extensions // header but no extension was requested") and fail the // handshake instead of silently accepting it. - // SAFETY: short-lived read. - if !unsafe { (*this).offered_permessage_deflate } { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::InvalidResponse) }; + if !self.offered_permessage_deflate { + self.fail(ErrorCode::InvalidResponse); return; } // This is a simplified parser. A full parser would handle multiple extensions and quoted values. @@ -1487,8 +1433,7 @@ impl HTTPClient { .min(upgrade_header.value().len()) == 0 { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::MissingUpgradeHeader) }; + self.fail(ErrorCode::MissingUpgradeHeader); return; } @@ -1498,8 +1443,7 @@ impl HTTPClient { .min(connection_header.value().len()) == 0 { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::MissingConnectionHeader) }; + self.fail(ErrorCode::MissingConnectionHeader); return; } @@ -1509,35 +1453,27 @@ impl HTTPClient { .min(websocket_accept_header.value().len()) == 0 { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::MissingWebsocketAcceptHeader) }; + self.fail(ErrorCode::MissingWebsocketAcceptHeader); return; } - // SAFETY: short-lived `&self` read. - if !protocol_header_seen && !unsafe { (*this).subprotocols.is_empty() } { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::MissingClientProtocol) }; + if !protocol_header_seen && !self.subprotocols.borrow().is_empty() { + self.fail(ErrorCode::MissingClientProtocol); return; } if !strings::eql_case_insensitive_ascii(connection_header.value(), b"Upgrade", true) { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::InvalidConnectionHeader) }; + self.fail(ErrorCode::InvalidConnectionHeader); return; } if !strings::eql_case_insensitive_ascii(upgrade_header.value(), b"websocket", true) { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::InvalidUpgradeHeader) }; + self.fail(ErrorCode::InvalidUpgradeHeader); return; } - // SAFETY: short-lived read. - // SAFETY: `this` is live (caller contract); short-lived shared borrow of the field. - if websocket_accept_header.value() != unsafe { &(&(*this).expected_accept)[..] } { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::MismatchWebsocketAcceptHeader) }; + if websocket_accept_header.value() != &self.expected_accept[..] { + self.fail(ErrorCode::MismatchWebsocketAcceptHeader); return; } @@ -1556,8 +1492,7 @@ impl HTTPClient { if v.try_reserve_exact(overflow_len).is_err() { // OOM here terminates with `invalid_response` rather than // aborting the process. - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::InvalidResponse) }; + self.fail(ErrorCode::InvalidResponse); return; } v.extend_from_slice(remain_buf); @@ -1569,93 +1504,87 @@ impl HTTPClient { }; // Check if we're using a proxy tunnel (wss:// through HTTP proxy) - // SAFETY: short-lived `&mut` for the proxy borrow. - if let Some(p) = unsafe { &mut (*this).proxy } { - if let Some(tunnel) = p.get_tunnel() { - // wss:// through HTTP proxy: use tunnel mode - // For tunnel mode, the upgrade client STAYS ALIVE to forward socket data to the tunnel. - // The socket continues to call handle_data on the upgrade client, which forwards to tunnel. - // The tunnel forwards decrypted data to the WebSocket client. - bun_jsc::mark_binding!(); - // SAFETY: short-lived reads. - let tcp = unsafe { (*this).tcp }; - // SAFETY: short-lived read; `this` is live per caller contract. - let has_ws = unsafe { (*this).outgoing_websocket.is_some() }; - if !tcp.is_closed() && has_ws { - tcp.timeout(0); - log!("onDidConnect (tunnel mode)"); - - // Release the ref that paired with C++'s m_upgradeClient: C++ - // nulls m_upgradeClient inside didConnectWithTunnel() so it will - // never call cancel() to drop it. The TCP socket's ref (released - // in handle_close) is what keeps this struct alive to forward - // socket data to the tunnel after we switch to .done. - // SAFETY: short-lived `&mut` for the field take. - let ws = unsafe { (*this).outgoing_websocket.take().unwrap() }; - - // Create the WebSocket client with the tunnel - // SAFETY: live C++ back-reference. - unsafe { - (*ws).did_connect_with_tunnel( - tunnel.as_ptr().cast::(), - overflow_ptr, - overflow_len, - if deflate_result.enabled { - Some(&deflate_result.params) - } else { - None - }, - ) - }; + if let Some(tunnel) = self.tunnel_ptr() { + // wss:// through HTTP proxy: use tunnel mode + // For tunnel mode, the upgrade client STAYS ALIVE to forward socket data to the tunnel. + // The socket continues to call handle_data on the upgrade client, which forwards to tunnel. + // The tunnel forwards decrypted data to the WebSocket client. + bun_jsc::mark_binding!(); + let tcp = self.tcp.get(); + let has_ws = self.outgoing_websocket.get().is_some(); + if !tcp.is_closed() && has_ws { + tcp.timeout(0); + log!("onDidConnect (tunnel mode)"); + + // Release the ref that paired with C++'s m_upgradeClient: C++ + // nulls m_upgradeClient inside didConnectWithTunnel() so it will + // never call cancel() to drop it. The core-held owner ref + // (released after handle_close returns) is what keeps this + // struct alive to forward socket data to the tunnel after we + // switch to .done. + let ws = self.outgoing_websocket.take().unwrap(); + + // Create the WebSocket client with the tunnel + // SAFETY: live C++ back-reference. + unsafe { + (*ws).did_connect_with_tunnel( + tunnel.as_ptr().cast::(), + overflow_ptr, + overflow_len, + if deflate_result.enabled { + Some(&deflate_result.params) + } else { + None + }, + ) + }; - // Switch state to connected - handle_data will forward to tunnel - // SAFETY: short-lived write. - unsafe { (*this).state = State::Done }; - // SAFETY: drops the outgoing_websocket ref; no `&mut Self` is live. - unsafe { Self::deref(this) }; - } else if tcp.is_closed() { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::Cancel) }; - } else if !has_ws { - // No `&mut Self` spans this call (handle_close reenters). - tcp.close(uws::CloseCode::Failure); - } - return; + // Switch state to connected - handle_data will forward to tunnel + self.state.set(State::Done); + // Drop the C++ ref; the caller's dispatch guard + the core + // owner ref keep the allocation alive. + // SAFETY: live per callers' liveness contract. + unsafe { Self::deref(self.as_ctx_ptr()) }; + } else if tcp.is_closed() { + self.fail(ErrorCode::Cancel); + } else if !has_ws { + // handle_close re-enters synchronously; no borrows are live. + tcp.close(uws::CloseCode::Failure); } + return; } // Normal (non-tunnel) mode — original code path. Transfer the // custom `us_ssl_ctx_t` to the connected WebSocket (it must outlive // the upgrade client because the socket's SSL* still references the // SSL_CTX inside it). - // SAFETY: short-lived `&mut` for the field take. - let mut saved_secure = unsafe { (*this).secure.take() }; // prevent clear_data from freeing it + let mut saved_secure = self.secure.borrow_mut().take(); // prevent clear_data from freeing it // Any arm below that doesn't hand `saved_secure` to did_connect must // release the ref it took out of `self` (SSL_CTX_free at fn end). - // SAFETY: short-lived `&mut` for clear_data; ends before any reentrant call. - unsafe { (*this).clear_data() }; + self.clear_data(); bun_jsc::mark_binding!(); - // SAFETY: short-lived reads. - let tcp = unsafe { (*this).tcp }; - // SAFETY: short-lived read; `this` is live per caller contract. - let has_ws = unsafe { (*this).outgoing_websocket.is_some() }; + let tcp = self.tcp.get(); + let has_ws = self.outgoing_websocket.get().is_some(); if !tcp.is_closed() && has_ws { tcp.timeout(0); log!("onDidConnect"); - // SAFETY: short-lived `&mut` for the field take/detach; ends before - // the FFI call below. - let ws = unsafe { (*this).outgoing_websocket.take().unwrap() }; + let ws = self.outgoing_websocket.take().unwrap(); let socket = tcp; - // Normal mode: pass socket directly to WebSocket client - // SAFETY: short-lived `&mut` for the field detach; ends before the FFI call below. - unsafe { (*this).tcp.detach() }; + // Normal mode: pass socket directly to WebSocket client. + // Release the core-held owner ref FIRST so the handed-off socket + // carries a clean (null) owner word into the framed adopt; any + // event before the adopt no-ops. Then detach the local handle. + socket.detach_owner(); + self.detach_tcp(); if let uws::InternalSocket::Connected(native_socket) = socket.socket { + // Raw header pointer round-trips opaquely through C++ into + // `Bun__WebSocketClient__init`, which re-derives a SocketRef. // SAFETY: live C++ back-reference. unsafe { (*ws).did_connect( - &mut *native_socket, + native_socket.ptr.as_ptr(), overflow_ptr, overflow_len, if deflate_result.enabled { @@ -1665,27 +1594,23 @@ impl HTTPClient { }, // ownership transferred; `into_raw` suppresses the // RAII release at fn end. - saved_secure.take().map(|s| &mut *s.into_raw()), + saved_secure + .take() + .map_or(core::ptr::null_mut(), SslCtxOwned::into_raw), ) }; } else { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::FailedToConnect) }; + self.fail(ErrorCode::FailedToConnect); } - // SAFETY: two refs are released here (the outgoing_websocket ref - // then the TCP socket ref). The first call cannot reach zero - // because the second ref is still held. The second may free - // `this`; no `&mut Self` is live. - // Once for the outgoing_websocket. - unsafe { Self::deref(this) }; - // Once again for the TCP socket. - // SAFETY: releases the TCP-socket ref; may free `this` — no `&mut Self` is live. - unsafe { Self::deref(this) }; + // Drop the C++ ref (the core owner ref was released by + // detach_owner above); the caller's dispatch guard keeps the + // allocation alive until dispatch returns. + // SAFETY: live per callers' liveness contract. + unsafe { Self::deref(self.as_ctx_ptr()) }; } else if tcp.is_closed() { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this, ErrorCode::Cancel) }; + self.fail(ErrorCode::Cancel); } else if !has_ws { - // No `&mut Self` spans this call (handle_close reenters). + // handle_close re-enters synchronously; no borrows are live. tcp.close(uws::CloseCode::Failure); } // Any arm above that didn't transfer ownership to `did_connect` left @@ -1695,102 +1620,74 @@ impl HTTPClient { pub fn memory_cost(&self) -> usize { let mut cost: usize = core::mem::size_of::(); - cost += self.body.capacity(); - cost += self.to_send_len; + cost += self.body.borrow().capacity(); + cost += self.to_send_len.get(); cost } - /// Takes `ThisPtr` because `terminate` and the trailing `deref` may - /// free `this`; see `fail`. - pub fn handle_writable(this: ThisPtr, socket: Socket) { - debug_assert!(this.is_same_socket(socket)); + pub fn handle_writable(&self, socket: Socket) { + debug_assert!(self.is_same_socket(socket)); // Forward to proxy tunnel if active - // SAFETY: short-lived `&mut` for the proxy borrow. - if let Some(p) = unsafe { &mut (*this.as_ptr()).proxy } { - if let Some(tunnel) = p.get_tunnel() { - // SAFETY: `p` holds a live ref on `tunnel`. - unsafe { WebSocketProxyTunnel::on_writable(tunnel.as_ptr()) }; - // In .done state (after WebSocket upgrade), just handle tunnel writes - if this.state == State::Done { - return; - } + if let Some(tunnel) = self.tunnel_ptr() { + // SAFETY: `proxy` holds a live ref on `tunnel`. + unsafe { WebSocketProxyTunnel::on_writable(tunnel.as_ptr()) }; + // In .done state (after WebSocket upgrade), just handle tunnel writes + if self.state.get() == State::Done { + return; + } - // Flush any unwritten upgrade request bytes through the tunnel - if this.to_send_len == 0 { - return; - } - // Bumps the intrusive refcount and derefs on Drop at every - // return path below. - let _guard = this.ref_guard(); - // SAFETY: `p` holds a live ref on `tunnel`. - let wrote = - match unsafe { WebSocketProxyTunnel::write(tunnel.as_ptr(), this.to_send()) } { - Ok(n) => n, - Err(_) => { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::FailedToWrite) }; - return; - } - }; - // SAFETY: short-lived `&mut` write. - unsafe { - let to_send_len = &mut (*this.as_ptr()).to_send_len; - *to_send_len -= wrote.min(*to_send_len); - } + // Flush any unwritten upgrade request bytes through the tunnel. + // The write can synchronously re-enter fail/clear_data, so write + // from an owned copy and clamp the bookkeeping afterwards. + if self.to_send_len.get() == 0 { return; } + let pending = self.pending_write_bytes(); + // SAFETY: `proxy` holds a live ref on `tunnel`. + match unsafe { WebSocketProxyTunnel::write(tunnel.as_ptr(), &pending) } { + Ok(wrote) => self.note_wrote(wrote), + Err(_) => self.fail(ErrorCode::FailedToWrite), + } + return; } - if this.to_send_len == 0 { + if self.to_send_len.get() == 0 { return; } - // Bumps the intrusive refcount and derefs on Drop at every return path - // below. - let _guard = this.ref_guard(); - - let wrote = socket.write(this.to_send()); + // Plain socket send; never re-enters, so the borrow may span it. + let wrote = { + let buf = self.input_body_buf.borrow(); + let pending = self.to_send_len.get().min(buf.len()); + socket.write(&buf[buf.len() - pending..]) + }; if wrote < 0 { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::FailedToWrite) }; + self.fail(ErrorCode::FailedToWrite); return; } - let wrote = usize::try_from(wrote).expect("int cast"); - // SAFETY: short-lived `&mut` write. - unsafe { - let to_send_len = &mut (*this.as_ptr()).to_send_len; - *to_send_len -= wrote.min(*to_send_len); - } + self.note_wrote(usize::try_from(wrote).expect("int cast")); } - /// Takes `ThisPtr` because `terminate` may free `this`; see `fail`. - pub fn handle_timeout(this: ThisPtr, _: Socket) { - // SAFETY: forwards `this` with root provenance; no `&mut Self` is live. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::Timeout) }; + pub fn handle_timeout(&self) { + self.fail(ErrorCode::Timeout); } - /// In theory, this could be called immediately. - /// In that case, we set `state` to `failed` and return, expecting the parent to call `destroy`. - /// - /// Takes `ThisPtr` because the trailing `deref` releases the socket - /// ref and may free `this`; a `&mut self` argument would carry a Stacked - /// Borrows protector that makes deallocating its referent UB. - pub fn handle_connect_error(this: ThisPtr, _: Socket, _: c_int) { - // SAFETY: short-lived `&mut` for detach; ends before any reentrant call. - unsafe { (*this.as_ptr()).tcp.detach() }; - - // For the TCP socket. - if this.state == State::Reading { - // SAFETY: no `&mut Self` is live across this call. - unsafe { Self::terminate(this.as_ptr(), ErrorCode::FailedToConnect) }; + /// In theory, this could be called immediately (synchronously from + /// `connect_*_owned`). In that case, we set `state` to `Failed` and + /// return, expecting `connect` to observe it and release the C++ ref. + /// Terminal: core releases its attach ref exactly once after this returns. + pub fn handle_connect_error(&self) { + // Close through the still-live handle BEFORE detaching it (core + // already closed the socket per C5, so this is an idempotent no-op). + self.tcp.get().close(uws::CloseCode::Failure); + self.detach_tcp(); + + if self.state.get() == State::Reading { + self.fail(ErrorCode::FailedToConnect); } else { - // SAFETY: short-lived write. - unsafe { (*this.as_ptr()).state = State::Failed }; + self.state.set(State::Failed); } - - // SAFETY: may free `this`; no `&mut Self` is live. - unsafe { Self::deref(this.as_ptr()) }; } } diff --git a/src/install/Cargo.toml b/src/install/Cargo.toml index 154e7cc109a2..d78463416d45 100644 --- a/src/install/Cargo.toml +++ b/src/install/Cargo.toml @@ -68,7 +68,6 @@ bun_sys.workspace = true bun_threading.workspace = true bun_transpiler.workspace = true bun_url.workspace = true -bun_uws.workspace = true bun_which.workspace = true bun_wyhash.workspace = true bun_zlib.workspace = true diff --git a/src/install/PackageManager/security_scanner.rs b/src/install/PackageManager/security_scanner.rs index 0e117f64af99..800420c6bd11 100644 --- a/src/install/PackageManager/security_scanner.rs +++ b/src/install/PackageManager/security_scanner.rs @@ -5,10 +5,8 @@ use std::io::Write as _; use bstr::BStr; -// `BufferedReaderParent::loop_` is typed `*mut bun_uws::Loop` (the -// uws wrapper — `WindowsLoop` on Windows, `PosixLoop` on POSIX), not -// `bun_io::Loop` is the trait's nominal: `us_loop_t` on POSIX, `uv_loop_t` -// on Windows. The inherent `loop_()` projects `.uv_loop` from the uws wrapper +// `bun_io::Loop` is `BufferedReaderParent::loop_`'s nominal: `bun_usockets::Loop` +// on POSIX, `uv_loop_t` on Windows. The inherent `loop_()` projects `.uv_loop` // on Windows so `BufferedReaderParent::loop_` returns the libuv loop directly. use crate::Error; use crate::bun_fs::FileSystem; diff --git a/src/install/lifecycle_script_runner.rs b/src/install/lifecycle_script_runner.rs index 9b89c434a7d7..012205ba2ffd 100644 --- a/src/install/lifecycle_script_runner.rs +++ b/src/install/lifecycle_script_runner.rs @@ -21,11 +21,9 @@ use bun_spawn::SpawnResultExt as _; use bun_spawn::{Process, ProcessExit, ProcessExitKind, Rusage, SpawnOptions, Status}; #[cfg(unix)] use bun_sys::Fd; -// `BufferedReaderParent::loop_` is typed `*mut bun_uws::Loop` (the -// `bun_io::Loop` is the trait's nominal: `us_loop_t` on POSIX, `uv_loop_t` -// on Windows. `AnyEventLoop::native_loop()` projects through the uws wrapper -// (`WindowsLoop::uv_loop`) on Windows so both paths hand back the same shape -// `BufferedReaderParent::loop_` expects. +// `bun_io::Loop` is `BufferedReaderParent::loop_`'s nominal: `bun_usockets::Loop` +// on POSIX, `uv_loop_t` on Windows. `AnyEventLoop::native_loop()` projects +// `WindowsLoop::uv_loop` on Windows so both paths hand back the same shape. bun_output::declare_scope!(Script, visible); diff --git a/src/install/npm.rs b/src/install/npm.rs index 2f27885f2a1f..e1b9a1b67657 100644 --- a/src/install/npm.rs +++ b/src/install/npm.rs @@ -176,12 +176,13 @@ pub fn whoami(manager: &mut PackageManager) -> Result, WhoamiError> { } }; - if res.status_code >= 400 { + if res.response().status_code >= 400 { const OTP_RESPONSE: bool = false; - response_error::(&req, &res, None, &mut response_buf)?; + response_error::(&req, res.response(), None, &mut response_buf)?; } if let Some(notice) = res + .response() .headers .get_if_other_is_absent(b"npm-notice", b"x-local-cache") { diff --git a/src/install/resolution.rs b/src/install/resolution.rs index 68f5a6385d17..e258dddf64cd 100644 --- a/src/install/resolution.rs +++ b/src/install/resolution.rs @@ -612,7 +612,7 @@ impl<'a, SemverInt: VersionInt> URLFormatter<'a, SemverInt> { Tag::RemoteTarball => writer.write_all(res.remote_tarball().slice(buf)), // `Repository::format_as` still goes through `fmt::Write` // (and uses `BStr` internally); git/github URLs are ASCII in - // practice so byte-exactness is preserved. A follow-up shard owns + // practice so byte-exactness is preserved. A follow-up can cover // `repository.rs` if that ever needs a byte-level path too. Tag::Git => write!(writer, "{}", res.git().fmt("git+", buf)), Tag::Github => write!(writer, "{}", res.github().fmt("github:", buf)), diff --git a/src/io/Cargo.toml b/src/io/Cargo.toml index 162e1fb7abfc..c8c1b9f8073e 100644 --- a/src/io/Cargo.toml +++ b/src/io/Cargo.toml @@ -26,7 +26,7 @@ bun_ptr.workspace = true bun_collections.workspace = true bun_spawn_sys.workspace = true bun_sys.workspace = true -bun_uws_sys.workspace = true +bun_usockets.workspace = true bun_paths.workspace = true bun_errno.workspace = true bun_threading.workspace = true diff --git a/src/io/ParentDeathWatchdog.rs b/src/io/ParentDeathWatchdog.rs index 663d34e6e9a0..0051261c92ca 100644 --- a/src/io/ParentDeathWatchdog.rs +++ b/src/io/ParentDeathWatchdog.rs @@ -325,7 +325,7 @@ pub fn install_on_event_loop(handle: EventLoopCtx) { // SAFETY: `poll` was just allocated by `FilePoll::init`; sole `&mut` // borrow; `register` does not re-derive the loop. match unsafe { &mut *poll }.register( - handle.loop_mut(), + handle.loop_(), crate::file_poll::Pollable::Process, true, ) { diff --git a/src/io/PipeReader.rs b/src/io/PipeReader.rs index 2dd493599b90..b4591eabf82a 100644 --- a/src/io/PipeReader.rs +++ b/src/io/PipeReader.rs @@ -13,7 +13,7 @@ use crate::{EventLoopHandle, FilePollFlag, FilePollKind, FilePollRef, Owner, Pol // Public so trait implementors in `bun_runtime` can name the same type in // their `loop_` signature without duplicating the cfg-split. #[cfg(not(windows))] -pub type Loop = bun_uws_sys::Loop; +pub type Loop = bun_usockets::Loop; #[cfg(windows)] pub type Loop = bun_sys::windows::libuv::Loop; diff --git a/src/io/PipeWriter.rs b/src/io/PipeWriter.rs index e9a80c6cb7cd..a17a2d01cf08 100644 --- a/src/io/PipeWriter.rs +++ b/src/io/PipeWriter.rs @@ -624,7 +624,7 @@ pub trait PosixStreamingWriterParent { unsafe fn event_loop(this: *mut Self) -> EventLoopHandle; /// # Safety /// `this` must point to a live `Self`. - unsafe fn loop_(this: *mut Self) -> *mut bun_uws_sys::Loop; + unsafe fn loop_(this: *mut Self) -> *mut bun_usockets::Loop; } pub struct PosixStreamingWriter { @@ -2603,7 +2603,7 @@ pub mod __parent_macro { pub use ::bun_sys::Error as SysError; #[cfg(windows)] pub use ::bun_sys::windows::libuv::Loop as UvLoop; - pub use ::bun_uws_sys::Loop as UwsLoop; + pub use ::bun_usockets::Loop as UwsLoop; } /// Stamp `PosixStreamingWriterParent` + `WindowsWriterParent` + diff --git a/src/io/keep_alive.rs b/src/io/keep_alive.rs index 207a06e4bd01..8450c95c11e0 100644 --- a/src/io/keep_alive.rs +++ b/src/io/keep_alive.rs @@ -35,44 +35,46 @@ impl KeepAlive { self.status = Status::Done; } - /// Only intended to be used from EventLoop.Pollable + /// Only intended to be used from EventLoop.Pollable. Raw-place loop + /// accounting — a `&mut Loop` would span `pending_wakeups`, which waker + /// threads mutate concurrently. #[cfg(not(windows))] - pub fn deactivate(&mut self, loop_: &mut crate::Loop) { + pub fn deactivate(&mut self, loop_: *mut crate::Loop) { if self.status != Status::Active { return; } self.status = Status::Inactive; - loop_.sub_active(1); + crate::Loop::sub_active_raw(loop_, 1); } /// Only intended to be used from EventLoop.Pollable #[cfg(windows)] - pub fn deactivate(&mut self, loop_: &mut crate::Loop) { + pub fn deactivate(&mut self, loop_: *mut crate::Loop) { if self.status != Status::Active { return; } self.status = Status::Inactive; - loop_.dec(); + crate::Loop::dec_raw(loop_); } /// Only intended to be used from EventLoop.Pollable #[cfg(not(windows))] - pub fn activate(&mut self, loop_: &mut crate::Loop) { + pub fn activate(&mut self, loop_: *mut crate::Loop) { if self.status != Status::Inactive { return; } self.status = Status::Active; - loop_.add_active(1); + crate::Loop::add_active_raw(loop_, 1); } /// Only intended to be used from EventLoop.Pollable #[cfg(windows)] - pub fn activate(&mut self, loop_: &mut crate::Loop) { + pub fn activate(&mut self, loop_: *mut crate::Loop) { // The Windows arm guards on `!= Active` (vs posix `!= Inactive`); // preserved verbatim. if self.status != Status::Active { return; } self.status = Status::Active; - loop_.inc(); + crate::Loop::inc_raw(loop_); } pub fn init() -> KeepAlive { diff --git a/src/io/lib.rs b/src/io/lib.rs index 9d41658684c3..596450bdc95d 100644 --- a/src/io/lib.rs +++ b/src/io/lib.rs @@ -32,8 +32,8 @@ pub use error::Error; pub mod windows_event_loop; // `posix_event_loop` also defines the *shared* event-loop scaffolding -// (`EventLoopCtx`, `AllocatorType`, `Owner`, `Flags`, `PollTag`, `Store`, -// `OpaqueCallback`); `windows_event_loop` re-uses those types and only +// (`EventLoopCtx`, `AllocatorType`, `Owner`, `Flags`, `PollTag`, `Store`); +// `windows_event_loop` re-uses those types and only // overrides `FilePoll`/`KeepAlive`/`Closer`/`Loop`/`Waker`. The platform- // specific bits inside (kqueue/epoll wakers, fd polling) are individually // `#[cfg(unix)]`-gated so the module still compiles on Windows. @@ -79,17 +79,17 @@ pub use posix_event_loop::{FilePoll, Loop}; #[cfg(windows)] pub use windows_event_loop::{FilePoll, Loop}; -/// Project a `*mut bun_uws_sys::Loop` (the uws wrapper — `PosixLoop` / +/// Project a `*mut bun_usockets::Loop` (the uws wrapper — `PosixLoop` / /// `WindowsLoop`) to the platform-native [`Loop`] (`us_loop_t*` on POSIX, /// `uv_loop_t*` on Windows). /// -/// On POSIX `bun_io::Loop` **is** `bun_uws_sys::Loop` (nominal identity), so +/// On POSIX `bun_io::Loop` **is** `bun_usockets::Loop` (nominal identity), so /// this is the identity. On Windows the wrapper stores the libuv loop in its /// `uv_loop` field — set once in C at `us_create_loop` and immutable /// thereafter — which we project here so callers needn't open an `unsafe` /// block per site just to read a set-once field. #[inline] -pub fn uws_to_native(uws: *mut bun_uws_sys::Loop) -> *mut Loop { +pub fn uws_to_native(uws: *mut bun_usockets::Loop) -> *mut Loop { #[cfg(not(windows))] { uws @@ -99,26 +99,24 @@ pub fn uws_to_native(uws: *mut bun_uws_sys::Loop) -> *mut Loop { // `uv_loop` is initialised in C before any Rust caller can observe the // handle and is never mutated. { - unsafe { (*uws).uv_loop } + unsafe { (*uws).uv_loop.cast::() } } } pub use posix_event_loop::{AllocatorType, Owner, PollTag, get_vm_ctx, js_vm_ctx}; -pub type OpaqueCallback = unsafe extern "C" fn(*mut core::ffi::c_void); - // At crate root so the per-method `$crate::__EventLoopCtx__*` type aliases the // macro emits (and the impl-macro reads back) actually resolve from impl // crates. `Store`/`FilePoll` here are the *platform* re-exports above. // -// `platform_event_loop_ptr` is typed `*mut bun_uws_sys::Loop` (the uws +// `platform_event_loop_ptr` is typed `*mut bun_usockets::Loop` (the uws // wrapper — `PosixLoop`/`WindowsLoop`), NOT the cfg-aliased `crate::Loop` // re-export. On POSIX those coincide, but on Windows `crate::Loop` is the raw // `uv_loop_t` whereas the impl bodies // (`VirtualMachine::uws_loop` / `MiniEventLoop::loop_ptr`) hand back the wrapper. bun_dispatch::link_interface! { pub EventLoopCtx[Js, Mini] { - fn platform_event_loop_ptr() -> *mut bun_uws_sys::Loop; + fn platform_event_loop_ptr() -> *mut bun_usockets::Loop; fn file_polls_ptr() -> *mut Store; // `alloc_file_poll() -> *mut FilePoll` was removed — it // returned an *uninitialized* hive slot, and any caller forming @@ -128,11 +126,6 @@ bun_dispatch::link_interface! { fn increment_pending_unref_counter(); fn ref_concurrently(); fn unref_concurrently(); - fn after_event_loop_callback() -> Option; - fn set_after_event_loop_callback( - cb: Option, - ctx: Option>, - ); fn pipe_read_buffer() -> *mut [u8]; } } @@ -140,48 +133,21 @@ bun_dispatch::link_interface! { pub type EventLoopKind = EventLoopCtxKind; impl EventLoopCtx { - /// SAFETY: caller must not hold another live `&mut` to the same loop - /// across this borrow (resolver-style accessor; the loop is per-thread). - #[inline] - pub unsafe fn platform_event_loop(&self) -> &'static mut bun_uws_sys::Loop { - // Route through the single nonnull-asref accessor below; the `unsafe` - // on this fn's signature is the caller-side aliasing contract — the - // body itself needs no extra `unsafe`. - self.loop_mut() - } - /// SAFETY: same aliasing hazard as [`platform_event_loop`]. + /// SAFETY: same aliasing hazard as [`Self::file_polls_mut`]. #[inline] pub unsafe fn file_polls(&self) -> &'static mut Store { self.file_polls_mut() } - // ── safe leaf wrappers (nonnull-asref) ────────────────────────────── + // ── safe leaf wrappers ────────────────────────────────────────────── // The platform loop / poll store are per-thread, set-once back-pointers - // (`BackRef`-shaped). [`platform_event_loop`] cannot be a safe fn because - // handing out `&mut Loop` from `&self` would let a caller alias two - // copies; these wrappers instead perform one counter adjustment and drop - // the borrow before returning, so no `&mut` escapes. Collapses N - // identical `ctx.platform_event_loop().op()` call sites into the single - // deref inside [`loop_mut`]. + // (`BackRef`-shaped). Loop accounting never forms `&mut Loop` at all — + // even a leaf-scoped one spans `pending_wakeups`, which waker threads + // `fetch_add` concurrently — so these wrappers route the raw + // `platform_event_loop_ptr()` into the `Loop::*_raw` twins. // - // `loop_mut` is the single nonnull-asref accessor: `pub(crate)`, - // `&self → &mut` (so it must NOT be called twice with overlapping live - // results). Every in-crate caller is a leaf op — counter bump, - // `FilePoll::activate`/`deactivate`, `unregister` — that consumes the - // borrow before returning and never re-enters `EventLoopCtx`, so no two - // `&mut Loop` ever coexist. Widened from impl-private to crate-private so - // `posix_event_loop`/`windows_event_loop` route their N identical - // `ctx.platform_event_loop()` derefs through this single accessor. - #[inline] - pub(crate) fn loop_mut(&self) -> &'static mut bun_uws_sys::Loop { - // SAFETY: per-thread set-once pointer (the uws loop singleton); the - // event loop is single-threaded so no concurrent `&mut` exists, and - // every crate-internal caller is a leaf op that drops the borrow - // before returning — see block comment above. - unsafe { &mut *self.platform_event_loop_ptr() } - } - /// Single backref-deref accessor for the per-thread `Store`. Same contract - /// as [`loop_mut`]: `pub(crate)`, `&self → &mut`, must NOT be called while + /// Single backref-deref accessor for the per-thread `Store`: + /// `pub(crate)`, `&self → &mut`, must NOT be called while /// another `&mut Store` (or a `&mut FilePoll` that lives inside the inline /// hive buffer) is live. Every in-crate caller is a leaf op that decays /// any conflicting `&mut FilePoll` to a raw slot pointer first @@ -212,29 +178,32 @@ impl EventLoopCtx { // could re-derive it — see doc comment above. unsafe { &mut *self.pipe_read_buffer() } } + // Counter bumps go through the raw-place twins on `*mut Loop`: even a + // leaf-scoped `&mut Loop` spans `pending_wakeups`, which waker threads + // `fetch_add` concurrently. #[inline] pub fn loop_ref(&self) { - self.loop_mut().ref_(); + bun_usockets::Loop::ref_raw(self.platform_event_loop_ptr()); } #[inline] pub fn loop_unref(&self) { - self.loop_mut().unref(); + bun_usockets::Loop::unref_raw(self.platform_event_loop_ptr()); } #[inline] pub fn loop_inc(&self) { - self.loop_mut().inc(); + bun_usockets::Loop::inc_raw(self.platform_event_loop_ptr()); } #[inline] pub fn loop_dec(&self) { - self.loop_mut().dec(); + bun_usockets::Loop::dec_raw(self.platform_event_loop_ptr()); } #[inline] pub fn loop_add_active(&self, n: u32) { - self.loop_mut().add_active(n); + bun_usockets::Loop::add_active_raw(self.platform_event_loop_ptr(), n); } #[inline] pub fn loop_sub_active(&self, n: u32) { - self.loop_mut().sub_active(n); + bun_usockets::Loop::sub_active_raw(self.platform_event_loop_ptr(), n); } #[cfg(not(windows))] #[inline] @@ -247,7 +216,7 @@ impl EventLoopCtx { self.is(EventLoopCtxKind::Js) } #[inline] - pub fn loop_(&self) -> *mut bun_uws_sys::Loop { + pub fn loop_(&self) -> *mut bun_usockets::Loop { self.platform_event_loop_ptr() } /// Platform-native loop pointer (`us_loop_t*` / `uv_loop_t*`); see @@ -1848,24 +1817,9 @@ impl FilePollRef { pub fn deinit_force_unregister(self) { self.inner().deinit_force_unregister(); } - /// Single nonnull-asref accessor for the process-global uWS loop pointer. - /// - /// Type invariant (encapsulated `unsafe`): every caller of - /// [`unregister`](Self::unregister) / [`register_with_fd`](Self::register_with_fd) - /// passes `Loop::get()` (the per-thread uWS loop singleton), which is - /// non-null after init and lives for the program. The event loop is - /// single-threaded so the returned `&mut` is the sole live borrow at the - /// point of use. Collapses the two identical `&mut *loop_` deref blocks in - /// those wrappers into one. - #[inline(always)] - fn uws_loop_mut<'a>(loop_: *mut bun_uws_sys::Loop) -> &'a mut bun_uws_sys::Loop { - debug_assert!(!loop_.is_null()); - // SAFETY: type invariant — see doc comment above. - unsafe { &mut *loop_ } - } #[inline] - pub fn unregister(self, loop_: *mut bun_uws_sys::Loop, force: bool) -> sys::Result<()> { - let loop_ = Self::uws_loop_mut(loop_); + pub fn unregister(self, loop_: *mut bun_usockets::Loop, force: bool) -> sys::Result<()> { + debug_assert!(!loop_.is_null()); #[cfg(not(windows))] { self.inner().unregister(loop_, force) @@ -1882,22 +1836,19 @@ impl FilePollRef { #[inline] pub fn register_with_fd( self, - loop_: *mut bun_uws_sys::Loop, + loop_: *mut bun_usockets::Loop, kind: FilePollKind, fd: Fd, ) -> sys::Result<()> { + debug_assert!(!loop_.is_null()); let flag = match kind { FilePollKind::Readable => PollFlags::Readable, FilePollKind::Writable => PollFlags::Writable, }; #[cfg(not(windows))] { - self.inner().register_with_fd( - Self::uws_loop_mut(loop_), - flag, - OneShotFlag::Dispatch, - fd, - ) + self.inner() + .register_with_fd(loop_, flag, OneShotFlag::Dispatch, fd) } #[cfg(windows)] { @@ -2162,7 +2113,7 @@ pub mod waker { /// /// [`placeholder`]: Self::placeholder /// [`init`]: Self::init - pub loop_: Option>, + pub loop_: Option>, } #[cfg(windows)] @@ -2180,7 +2131,7 @@ pub mod waker { pub fn init() -> crate::Result { Ok(Self { loop_: Some(bun_ptr::BackRef::from( - core::ptr::NonNull::new(bun_uws_sys::WindowsLoop::get()) + core::ptr::NonNull::new(bun_usockets::WindowsLoop::get()) .expect("WindowsLoop::get() singleton"), )), }) @@ -2190,7 +2141,7 @@ pub mod waker { /// is the same precondition the previous raw-pointer deref carried /// (just loud instead of UB). #[inline] - fn loop_ref(&self) -> bun_ptr::BackRef { + fn loop_ref(&self) -> bun_ptr::BackRef { self.loop_.expect("WindowsWaker used before init()") } @@ -2203,19 +2154,16 @@ pub mod waker { // allocation is UB under Stacked/Tree Borrows. Call the C entry // point with the raw pointer directly so no Rust reference is // ever formed. - // SAFETY: `loop_` is the live `WindowsLoop::get()` singleton, - // non-null after `init()`. - unsafe { bun_uws_sys::loop_::us_loop_run(self.loop_ref().as_ptr()) }; + bun_usockets::us_loop_run(self.loop_ref().as_ptr()); } pub fn wake(&self) { // See `wait()` — this is the cross-thread wake path; forming a // `&mut WindowsLoop` here would alias the event-loop thread's // borrow held across `us_loop_run`. Pass the raw pointer to the - // thread-safe C wake (`uv_async_send`) instead. - // SAFETY: `loop_` is the live `WindowsLoop::get()` singleton; - // `us_wakeup_loop` → `uv_async_send` is documented thread-safe. - unsafe { bun_uws_sys::loop_::us_wakeup_loop(self.loop_ref().as_ptr()) }; + // thread-safe wake (`uv_async_send`) instead. Liveness: `loop_` + // is the process-global singleton (see `loop_ref` docs below). + bun_usockets::us_wakeup_loop(self.loop_ref().as_ptr()); } /// Raw libuv `uv_loop_t*` underlying this waker's `WindowsLoop`. @@ -2227,8 +2175,8 @@ pub mod waker { #[inline] pub fn uv_loop(&self) -> *mut bun_sys::windows::libuv::Loop { // `BackRef` deref is safe (process-lifetime singleton); `uv_loop` - // is a `Copy` field set once by C `us_create_loop`. - self.loop_ref().uv_loop + // is a `Copy` field set once by `us_create_loop`. + self.loop_ref().uv_loop.cast() } } } diff --git a/src/io/posix_event_loop.rs b/src/io/posix_event_loop.rs index 8f36b301a9a7..0b7319371371 100644 --- a/src/io/posix_event_loop.rs +++ b/src/io/posix_event_loop.rs @@ -1,90 +1,19 @@ -#[cfg(unix)] -use core::ffi::c_int; -use core::ffi::c_void; use core::fmt; #[cfg(unix)] use core::ptr; #[cfg(not(windows))] use bun_sys::{self as sys, Fd}; -use bun_uws_sys::Loop as UwsLoop; +use bun_usockets::Loop as UwsLoop; pub type Loop = UwsLoop; -// Note: `bun_uws_sys::Loop` only exposes `inc`/`dec`/`ref_`/`unref`. The -// `active` counter is a public field, so inline the saturating math here until -// `bun_uws_sys` grows `add_active`/`sub_active`. On Windows the uws loop has no -// such counter (libuv tracks active handles itself); `posix_event_loop` is only -// reachable from non-Windows `Loop` consumers, so the Windows arm is a no-op. -#[cfg(not(windows))] -#[inline] -fn loop_add_active(loop_: &mut Loop, value: u32) { - loop_.active = loop_.active.saturating_add(value); -} -#[cfg(not(windows))] -#[inline] -fn loop_sub_active(loop_: &mut Loop, value: u32) { - loop_.active = loop_.active.saturating_sub(value); -} - bun_core::declare_scope!(KeepAlive, visible); #[cfg(not(windows))] use bun_sys::syslog; -/// Local `errno_sys` helper. `bun_sys` -/// does not yet expose this helper on `Result`; once it does, drop this and -/// call `sys::Result::<()>::errno_sys` directly. -/// -/// Decodes the -1-sentinel *return-code* convention (the thread-local errno is -/// only read when `rc` is the all-ones failure value). Do NOT feed it a value -/// that already is an errno — use [`kevent_change_error`] for those. -#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))] -#[inline] -fn errno_sys(rc: R, syscall: sys::Tag) -> Option> -where - R: sys::GetErrno, -{ - match sys::get_errno(rc) { - sys::E::SUCCESS => None, - e => Some(sys::Result::Err(sys::Error::from_code(e, syscall))), - } -} - -/// Error for a kevent changelist entry that came back with `EV_ERROR` set: -/// the kernel stores the errno *value* in `data`. That is not the -1-sentinel -/// return-code convention `errno_sys` decodes — feeding `data` through it -/// yields `None` for every real errno. -#[cfg(any(target_os = "macos", all(test, not(windows))))] -#[inline] -fn kevent_change_error(data: i64) -> sys::Result<()> { - sys::Result::Err(sys::Error::from_code( - sys::SystemErrno::init(data).unwrap_or(sys::E::EINVAL), - sys::Tag::kevent, - )) -} - -/// Is this errno from a failed deregistration just "the registration is -/// already gone"? Two routine producers: -/// - the fd was closed while the poll was still registered (close() removes -/// an fd's kevents; epoll drops closed fds automatically) → EBADF/ENOENT -/// - on macOS, closing a pty master marks the slave's knotes -/// `EV_EOF|EV_ONESHOT`, so the kernel deletes them when the hangup event is -/// delivered; the reader's teardown `EV_DELETE` then finds nothing → ENOENT. -/// This happens on every terminal window/tab close while a tty is polled. -/// -/// Both mean the kernel-side state already matches what unregistration wants, -/// so they count as success — in particular the registration flags must still -/// be cleared, which an error return would skip, leaving the poll claiming to -/// be registered and re-issuing doomed deletes on later teardown calls. libuv -/// ignores the same errnos for its kqueue/epoll delete operations. -#[cfg(not(windows))] -#[inline] -fn deregistration_already_gone(errno: sys::E) -> bool { - matches!(errno, sys::E::ENOENT | sys::E::EBADF) -} - -pub use crate::{EventLoopCtx, EventLoopCtxKind, EventLoopKind, OpaqueCallback}; +pub use crate::{EventLoopCtx, EventLoopCtxKind, EventLoopKind}; unsafe extern "Rust" { /// Defined `#[no_mangle]` in `bun_runtime::jsc_hooks`. @@ -144,55 +73,10 @@ pub fn js_vm_ctx() -> EventLoopCtx { // `windows_event_loop.rs`; both copies now live in `crate::keep_alive`. // ────────────────────────────────────────────────────────────────────────── -// FilePoll +// FilePoll — registered through the bun_usockets poll registry. No raw +// epoll_ctl/kevent here: kernel mechanics live in src/usockets/backend/. // ────────────────────────────────────────────────────────────────────────── -// `KQueueGenerationNumber` is `usize` on macOS-debug, else a zero-size sentinel. -#[cfg(all(target_os = "macos", debug_assertions))] -type KQueueGenerationNumber = usize; -#[cfg(all(unix, not(all(target_os = "macos", debug_assertions))))] -type KQueueGenerationNumber = u8; // Note: conceptually zero-width; smallest Rust int is u8. Gated by cfg below. - -// Debug-only diagnostic; `Relaxed` (no synchronization implied). -#[cfg(all(target_os = "macos", debug_assertions))] -static MAX_GENERATION_NUMBER: core::sync::atomic::AtomicUsize = - core::sync::atomic::AtomicUsize::new(0); - -/// Darwin uses the extended `kevent64_s` (extra `ext` field carries our -/// generation number); FreeBSD only has the plain `struct kevent`. -#[cfg(target_os = "macos")] -type KQueueEvent = bun_sys::darwin::kevent64_s; -#[cfg(target_os = "freebsd")] -type KQueueEvent = bun_sys::freebsd::Kevent; - -/// Build a `struct kevent` without naming every field. FreeBSD ≥12 added -/// `ext: [u64; 4]` to the struct, so a literal initializer fails to compile -/// against older/newer libc ABI variants. Start from zeroed and assign. -#[cfg(target_os = "freebsd")] -#[inline] -fn make_kevent( - ident: usize, - filter: i16, - flags: u16, - fflags: u32, - udata: *mut core::ffi::c_void, -) -> KQueueEvent { - // SAFETY: all-zero is a valid `struct kevent` (POD). - let mut ev: KQueueEvent = bun_core::ffi::zeroed(); - ev.ident = ident; - ev.filter = filter; - ev.flags = flags; - ev.fflags = fflags; - ev.data = 0; - ev.udata = udata; - ev -} - -/// The kernel value is the -/// same as Darwin/OpenBSD (sys/event.h: `#define EV_EOF 0x8000`). -#[cfg(any(target_os = "macos", target_os = "freebsd"))] -const EV_EOF: u16 = 0x8000; - // ────────────────────────────────────────────────────────────────────────── // FilePoll Owner — hot-path tag+ptr (CYCLEBREAK §Hot dispatch list). // Low tier (here) stores `(tag: u8, ptr: *mut ())`; `bun_runtime::dispatch::on_poll` @@ -289,27 +173,92 @@ pub enum AllocatorType { Mini, } -// `FilePoll`/`Store` here are POSIX-specific (kqueue/epoll registration, -// generation_number, allocator_type). On Windows the variants live in -// `windows_event_loop`; the shared `EventLoopCtxVTable` above names -// `crate::FilePoll`/`crate::Store` so the right one is picked. +// `FilePoll`/`Store` here are POSIX-specific (registry registration, +// allocator_type). On Windows the variants live in `windows_event_loop`; the +// shared `EventLoopCtxVTable` above names `crate::FilePoll`/`crate::Store` +// so the right one is picked. #[cfg(not(windows))] pub struct FilePoll { pub fd: Fd, pub flags: FlagsSet, pub owner: Owner, - /// We re-use FilePoll objects to avoid allocating new ones. - /// - /// That means we might run into situations where the event is stale. - /// on macOS kevent64 has an extra pointer field so we use it for that - /// linux doesn't have a field like that - pub generation_number: KQueueGenerationNumber, - pub next_to_free: *mut FilePoll, + /// Live core-registry registration (kernel arm). `None` = disarmed + /// (never registered, one-shot already fired, or unregistered). + registration: Option, pub allocator_type: AllocatorType, } +/// One armed registry slot. INVARIANT: released only via +/// [`FilePoll::drop_registration`]/[`FilePoll::drop_registration_on`] — +/// `poll_ref.unregister{,_on}()` (kernel disarm + generation bump; stale +/// same-tick events are dropped core-side), then the shim backpointer is +/// nulled, then our shim ref is released. +#[cfg(not(windows))] +struct Registration { + poll_ref: bun_usockets::PollRef, + /// The fd (or pid/port token) the slot was armed for; a re-arm with a + /// different fd must re-register, not mutate the old fd's interest. + fd: Fd, + /// Owned strong ref (`RefPtr` has no Drop); discharged in + /// `drop_registration`. The registry slot + dispatch guard hold their own. + shim: bun_ptr::RefPtr, +} + +/// Refcounted dispatch owner handed to the core registry. Holds the address +/// of the hive-resident `FilePoll` (exposed provenance — a stored `*mut` +/// would be invalidated by every later owner-side `&mut FilePoll` under +/// Stacked/Tree Borrows); zeroed before the slot can be recycled, so a +/// late-held guard ref can never dispatch into a reused slot. +#[cfg(not(windows))] +#[derive(bun_ptr::RefCounted)] +struct RegistryShim { + ref_count: bun_ptr::RefCount, + poll: core::cell::Cell, +} + +#[cfg(not(windows))] +struct FilePollProtocol; + +#[cfg(not(windows))] +impl bun_usockets::PollProtocol for FilePollProtocol { + type Owner = RegistryShim; + + fn on_event( + shim: &RegistryShim, + _poll: bun_usockets::PollRef, + events: bun_usockets::PollEvents, + ) { + let addr = shim.poll.get(); + if addr == 0 { + return; + } + // Provenance: reconstruct from the address exposed at `arm` — the + // transient `&mut`'s tag there is long invalidated by owner-side + // borrows, so only the exposed-provenance round-trip is sound. + let ptr = ptr::with_exposed_provenance_mut::(addr); + // SAFETY: `poll` is zeroed in `drop_registration` before the hive + // slot is recycled, and the loop is single-threaded, so a nonzero + // backpointer is a live slot. The `&mut` is SCOPED to this statement: + // it ends before the dispatch below, whose handler may deinit + // (recycle or free) the slot — a live protected `&mut` across that + // call would be deallocation under a protector (SB-UB). + let size_or_offset = unsafe { &mut *ptr }.prepare_registry_event(events); + // SAFETY: `ptr` is still live (nothing ran since the borrow above; + // this thread is the sole accessor). The handler owns any subsequent + // deinit; `ptr` is never touched after the call. + unsafe { __bun_run_file_poll(ptr, size_or_offset) }; + } + + fn on_loop_teardown(shim: &RegistryShim) { + // The loop freed the slot and is about to unmap the slab; zero the + // backpointer so the surviving FilePoll's `drop_registration` knows + // its PollRef dangles and must not be resolved. + shim.poll.set(0); + } +} + #[cfg(not(windows))] impl Default for FilePoll { fn default() -> Self { @@ -317,8 +266,7 @@ impl Default for FilePoll { fd: INVALID_FD, flags: FlagsSet::empty(), owner: Owner::NULL, - generation_number: 0, - next_to_free: ptr::null_mut(), + registration: None, allocator_type: AllocatorType::Js, } } @@ -351,34 +299,86 @@ impl FilePoll { FileType::Pipe } - // Note: these handlers take no loop parameter: holding a - // protected `&mut Loop` across `on_update` would alias the fresh `&mut Loop` - // that downstream `__bun_run_file_poll` handlers conjure via - // `EventLoopCtx::platform_event_loop()` when they re-enter the loop - // (`register_with_fd`/`unregister`/`deinit`). - #[cfg(any(target_os = "macos", target_os = "freebsd"))] - pub fn on_kqueue_event(&mut self, kqueue_event: &KQueueEvent) { - self.update_flags(Flags::from_kqueue_event(kqueue_event)); - syslog!("onKQueueEvent: {}", self); - - #[cfg(all(target_os = "macos", debug_assertions))] - debug_assert!(self.generation_number == kqueue_event.ext[0] as usize); - - // EVFILT_MEMORYSTATUS reports the pressure level in `fflags`, not `data`; - // thread it through `size_or_offset` so the dispatch arm can read it. - #[cfg(target_os = "macos")] - if kqueue_event.filter == bun_sys::darwin::EVFILT::MEMORYSTATUS { - self.on_update(kqueue_event.fflags as i64); - return; + /// Release the registry slot: kernel disarm + slot free (generation bump + /// drops same-tick stale events core-side), null the shim backpointer, + /// then release our shim ref. Safe from inside `on_registry_event` — the + /// core dispatch guard keeps the shim alive until dispatch returns. + fn drop_registration(&mut self) { + if let Some(reg) = self.registration.take() { + // Zeroed backpointer = loop teardown already freed the slot (see + // on_loop_teardown); the PollRef dangles into an unmapped slab. + if reg.shim.data().poll.get() != 0 { + reg.poll_ref.unregister(); + } + Self::release_shim(reg); } + } - self.on_update(kqueue_event.data as i64); + fn release_shim(reg: Registration) { + reg.shim.data().poll.set(0); + reg.shim.deref(); } - #[cfg(any(target_os = "linux", target_os = "android"))] - pub fn on_epoll_event(&mut self, epoll_event: &bun_sys::linux::epoll_event) { - self.update_flags(Flags::from_epoll_event(epoll_event)); - self.on_update(0); + /// Flag mapping + one-shot disarm for a delivered registry event; returns + /// the `size_or_offset` payload for `__bun_run_file_poll`. Deliberately + /// does NOT dispatch: the `&mut self` borrow must end before the handler + /// runs (it may deinit this very poll). + fn prepare_registry_event(&mut self, events: bun_usockets::PollEvents) -> i64 { + let mut updated = FlagsSet::empty(); + // Single-purpose sources (proc exit, machport, memory pressure) + // report which kind fired via the registered-kind flag; Fd sources + // report the direction bits. Error/EOF-only deliveries (Linux PSI + // EPOLLERR without EPOLLPRI) carry no kind flag — old + // from_epoll_event parity: they surface via the Eof/Hup mapping only. + if events.readable || events.writable { + if self.flags.contains(Flags::PollProcess) { + updated.insert(Flags::Process); + } else if self.flags.contains(Flags::PollMachport) { + updated.insert(Flags::Machport); + } else if self.flags.contains(Flags::PollMemoryPressure) { + updated.insert(Flags::MemoryPressure); + } else { + if events.readable { + updated.insert(Flags::Readable); + } + if events.writable { + updated.insert(Flags::Writable); + } + } + } + if events.eof { + updated.insert(Flags::Hup); + } + // EPOLLERR → Eof parity (kqueue reported no error bit to FilePolls). + #[cfg(any(target_os = "linux", target_os = "android"))] + if events.error { + updated.insert(Flags::Eof); + } + + // kqueue filter payload: NOTE_EXIT status / bytes available in + // `data`; EVFILT_MEMORYSTATUS pressure level in `fflags`. + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + let size_or_offset: i64 = if self.flags.contains(Flags::PollMemoryPressure) { + i64::from(events.fflags) + } else { + events.data + }; + #[cfg(any(target_os = "linux", target_os = "android"))] + let size_or_offset: i64 = 0; + + self.update_flags(updated); + syslog!("onRegistryEvent: {}", self); + + // One-shot parity: the kernel used to auto-disarm before the + // callback; the registry is level-triggered, so disarm here — a + // handler that re-registers gets a fresh slot. + if self.flags.contains(Flags::OneShot) { + self.drop_registration(); + self.flags.insert(Flags::NeedsRearm); + } + + debug_assert!(!self.owner.is_null()); + size_or_offset } pub fn clear_event(&mut self, flag: Flags) { @@ -422,13 +422,12 @@ impl FilePoll { } fn deinit_possibly_defer(&mut self, vm: EventLoopCtx, force_unregister: bool) { - // `loop_mut()` is the crate-private nonnull-asref accessor (single - // deref in `EventLoopCtx`); the `&mut Loop` is consumed by `unregister` - // and dropped before any `&mut Store` is materialised. - let _ = self.unregister(vm.loop_mut(), force_unregister); + let _ = self.unregister(vm.loop_(), force_unregister); + // Belt-and-braces: the needs-rearm skip leaves `registration` None, + // but a leaked slot here would keep a dangling shim backpointer. + self.drop_registration(); self.owner.clear(); - let was_ever_registered = self.flags.contains(Flags::WasEverRegistered); self.flags = FlagsSet::empty(); self.fd = INVALID_FD; // `self` may live inside the `Store.hive` inline array, so a @@ -436,12 +435,10 @@ impl FilePoll { // access over the slot and invalidate `self`'s tag (Stacked Borrows). // Decay `self` to a raw slot pointer first, *then* materialise the // `&mut Store` via the crate-private backref-deref accessor. + // Immediate reuse is safe: the registry's generation bump + pending + // ready-list nulling (the core closed-drain) drop any stale event. let this = ptr::NonNull::from(self); - // `file_polls_mut()` is the per-thread set-once `Store` back-pointer - // (`BackRef`-shaped); `&mut self` has been retired to `this` above so - // the `&mut Store` it produces is the sole unique borrow into the hive. - // `Store::put` touches `this` only via raw-pointer ops (see its doc). - vm.file_polls_mut().put(this, vm, was_ever_registered); + vm.file_polls_mut().put(this); } pub fn deinit_with_vm(&mut self, vm: EventLoopCtx) { @@ -456,21 +453,6 @@ impl FilePoll { || self.flags.contains(Flags::PollMemoryPressure) } - pub fn on_update(&mut self, size_or_offset: i64) { - if self.flags.contains(Flags::OneShot) && !self.flags.contains(Flags::NeedsRearm) { - self.flags.insert(Flags::NeedsRearm); - } - - debug_assert!(!self.owner.is_null()); - - // Hot-path hoisted-match: the per-tag `switch` lives in - // `bun_runtime::dispatch::__bun_run_file_poll` (link-time extern) so - // this T3 crate names no variant types. - // SAFETY: `self` is a live FilePoll for the duration of the call - // (guaranteed by the uws loop callback contract). - unsafe { __bun_run_file_poll(self, size_or_offset) }; - } - #[inline] pub fn is_active(&self) -> bool { self.flags.contains(Flags::HasIncrementedPollCount) @@ -520,14 +502,16 @@ impl FilePoll { self.flags.insert(Flags::HasIncrementedActiveCount); } - /// Only intended to be used from EventLoop.Pollable - fn deactivate(&mut self, loop_: &mut Loop) { + /// Only intended to be used from EventLoop.Pollable. Raw-place loop + /// accounting — a `&mut Loop` would span `pending_wakeups`, which waker + /// threads mutate concurrently. + fn deactivate(&mut self, loop_: *mut Loop) { if self.flags.contains(Flags::HasIncrementedPollCount) { - loop_.dec(); + Loop::dec_raw(loop_); } self.flags.remove(Flags::HasIncrementedPollCount); - loop_sub_active( + Loop::sub_active_raw( loop_, self.flags.contains(Flags::HasIncrementedActiveCount) as u32, ); @@ -536,16 +520,16 @@ impl FilePoll { } /// Only intended to be used from EventLoop.Pollable - fn activate(&mut self, loop_: &mut Loop) { + fn activate(&mut self, loop_: *mut Loop) { self.flags.remove(Flags::Closed); if !self.flags.contains(Flags::HasIncrementedPollCount) { - loop_.inc(); + Loop::inc_raw(loop_); } self.flags.insert(Flags::HasIncrementedPollCount); if self.flags.contains(Flags::KeepsEventLoopAlive) { - loop_add_active( + Loop::add_active_raw( loop_, (!self.flags.contains(Flags::HasIncrementedActiveCount)) as u32, ); @@ -558,38 +542,27 @@ impl FilePoll { /// Note: the previous `&mut *pool.get()` + field-assign pattern was /// instant validity UB — `FilePoll.owner`/`allocator_type` are enums with /// niches, and `&mut FilePoll` over an uninitialized hive slot asserts a - /// valid discriminant. It also left `generation_number` uninitialized on - /// non-macOS-debug builds and then read it in the `syslog!` below. Building - /// the whole struct by value fixes both. + /// valid discriminant. Building the whole struct by value fixes that. #[inline] fn new_value(vm: EventLoopCtx, fd: Fd, flags: FlagsSet, owner: Owner) -> FilePoll { FilePoll { fd, flags, owner, - next_to_free: ptr::null_mut(), - allocator_type: if vm.is_js() { AllocatorType::Js } else { AllocatorType::Mini }, - #[cfg(all(target_os = "macos", debug_assertions))] - // Single-threaded event loop so `Relaxed` ordering is sufficient. - generation_number: MAX_GENERATION_NUMBER - .fetch_add(1, core::sync::atomic::Ordering::Relaxed) - .wrapping_add(1), - #[cfg(not(all(target_os = "macos", debug_assertions)))] - generation_number: 0, + registration: None, + allocator_type: if vm.is_js() { + AllocatorType::Js + } else { + AllocatorType::Mini + }, } } // Note: callers normalize to EventLoopCtx before calling. pub fn init(vm: EventLoopCtx, fd: Fd, flags: FlagsSet, owner: Owner) -> *mut FilePoll { let value = Self::new_value(vm, fd, flags, owner); - let generation_number = value.generation_number; let poll = vm.alloc_file_poll(value).as_ptr(); - syslog!( - "FilePoll.init(0x{:x}, generation_number={}, fd={})", - poll as usize, - generation_number, - fd - ); + syslog!("FilePoll.init(0x{:x}, fd={})", poll as usize, fd); poll } @@ -621,9 +594,7 @@ impl FilePoll { pub fn on_ended(&mut self, event_loop_ctx: EventLoopCtx) { self.flags.remove(Flags::KeepsEventLoopAlive); self.flags.insert(Flags::Closed); - // `loop_mut()` — crate-private nonnull-asref accessor; `deactivate` is - // a leaf counter op so the `&mut Loop` borrow does not escape. - self.deactivate(event_loop_ctx.loop_mut()); + self.deactivate(event_loop_ctx.loop_()); } #[inline] @@ -631,7 +602,7 @@ impl FilePoll { self.fd } - pub fn register(&mut self, loop_: &mut Loop, flag: Flags, one_shot: bool) -> sys::Result<()> { + pub fn register(&mut self, loop_: *mut Loop, flag: Flags, one_shot: bool) -> sys::Result<()> { self.register_with_fd( loop_, flag, @@ -646,7 +617,7 @@ impl FilePoll { pub fn register_with_fd( &mut self, - loop_: &mut Loop, + loop_: *mut Loop, flag: Flags, one_shot: OneShotFlag, fd: Fd, @@ -678,17 +649,14 @@ impl FilePoll { ))] fn register_with_fd_impl( &mut self, - loop_: &mut Loop, + loop_: *mut Loop, flag: Flags, one_shot: OneShotFlag, fd: Fd, ) -> sys::Result<()> { - let watcher_fd = loop_.fd; - syslog!( - "register: FilePoll(0x{:x}, generation_number={}) {} ({})", + "register: FilePoll(0x{:x}) {} ({})", std::ptr::from_mut(self) as usize, - self.generation_number, <&'static str>::from(flag), fd ); @@ -699,229 +667,19 @@ impl FilePoll { self.flags.insert(Flags::OneShot); } - #[cfg(any(target_os = "linux", target_os = "android"))] + // Bidirectional one-shot is unsupported (kernel parity: EPOLLONESHOT + // disarmed the whole fd after either direction fired). + if (flag == Flags::Readable && self.flags.contains(Flags::PollWritable)) + || (flag == Flags::Writable && self.flags.contains(Flags::PollReadable)) { - use bun_sys::linux::{self, EPOLL}; - let one_shot_flag: u32 = if !self.flags.contains(Flags::OneShot) { - 0 - } else { - EPOLL::ONESHOT - }; - - let mut flags: u32 = match flag { - Flags::Process | Flags::Readable => EPOLL::IN | EPOLL::HUP | one_shot_flag, - Flags::Writable => EPOLL::OUT | EPOLL::HUP | EPOLL::ERR | one_shot_flag, - // PSI trigger fds signal via POLLPRI only. - Flags::MemoryPressure => EPOLL::PRI | EPOLL::ERR | one_shot_flag, - _ => unreachable!(), - }; - // epoll keys on fd alone; if the other direction is already - // registered on this poll, preserve it in the CTL_MOD mask. - // (EPOLLONESHOT disarms the whole fd after the first event in - // either direction, so bidirectional one-shot is not supported.) - if flag == Flags::Readable && self.flags.contains(Flags::PollWritable) { - debug_assert!(!self.flags.contains(Flags::OneShot)); - flags |= EPOLL::OUT | EPOLL::ERR; - } - if flag == Flags::Writable && self.flags.contains(Flags::PollReadable) { - debug_assert!(!self.flags.contains(Flags::OneShot)); - flags |= EPOLL::IN; - } - - // Note: libc::epoll_event flattens the data union to a single `u64` field. - let mut event = linux::epoll_event { - events: flags, - u64: Pollable::init(self).ptr() as u64, - }; - - let op: c_int = if self.is_registered() || self.flags.contains(Flags::NeedsRearm) { - EPOLL::CTL_MOD - } else { - EPOLL::CTL_ADD - }; - - // SAFETY: FFI syscall; `event` is a stack-local valid for the call. - let ctl = unsafe { linux::epoll_ctl(watcher_fd, op, fd.native(), &raw mut event) }; - self.flags.insert(Flags::WasEverRegistered); - if let Some(errno) = errno_sys(ctl, sys::Tag::epoll_ctl) { - self.deactivate(loop_); - return errno; - } - } - #[cfg(target_os = "macos")] - { - use bun_sys::darwin::{EV, EVFILT, NOTE, kevent64_s}; - // SAFETY: all-zero is a valid kevent64_s - let mut changelist: [kevent64_s; 2] = bun_core::ffi::zeroed(); - let one_shot_flag: u16 = if !self.flags.contains(Flags::OneShot) { - 0 - } else if one_shot == OneShotFlag::Dispatch { - EV::DISPATCH | EV::ENABLE - } else { - EV::ONESHOT - }; - - changelist[0] = match flag { - Flags::Readable => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::READ, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::ADD | one_shot_flag, - ext: [self.generation_number as u64, 0], - }, - Flags::Writable => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::WRITE, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::ADD | one_shot_flag, - ext: [self.generation_number as u64, 0], - }, - Flags::Process => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::PROC, - data: 0, - fflags: NOTE::EXIT, - udata: Pollable::init(self).ptr() as u64, - flags: EV::ADD | one_shot_flag, - ext: [self.generation_number as u64, 0], - }, - Flags::Machport => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::MACHPORT, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::ADD | one_shot_flag, - ext: [self.generation_number as u64, 0], - }, - // System-wide memory pressure. ident is always 0; EV_CLEAR so each - // transition delivers once (matches libdispatch's registration). - Flags::MemoryPressure => kevent64_s { - ident: 0, - filter: EVFILT::MEMORYSTATUS, - data: 0, - fflags: NOTE::MEMORYSTATUS_PRESSURE_WARN | NOTE::MEMORYSTATUS_PRESSURE_CRITICAL, - udata: Pollable::init(self).ptr() as u64, - flags: EV::ADD | EV::CLEAR | one_shot_flag, - ext: [self.generation_number as u64, 0], - }, - _ => unreachable!(), - }; - - // output events only include change errors - const KEVENT_FLAG_ERROR_EVENTS: u32 = 0x000002; - - // The kevent() system call returns the number of events placed in - // the eventlist, up to the value given by nevents. If the time - // limit expires, then kevent() returns 0. - let rc = 'rc: loop { - // SAFETY: FFI syscall; pointers reference stack-local changelist valid for the call. - let rc = unsafe { - bun_sys::darwin::kevent64( - watcher_fd, - changelist.as_ptr(), - 1, - // The same array may be used for the changelist and eventlist. - changelist.as_mut_ptr(), - // we set 0 here so that if we get an error on - // registration, it becomes errno - 0, - KEVENT_FLAG_ERROR_EVENTS, - &raw const TIMEOUT, - ) - }; - if sys::get_errno(rc) == sys::E::EINTR { - continue; - } - break 'rc rc; - }; - - self.flags.insert(Flags::WasEverRegistered); - - // If an error occurs while - // processing an element of the changelist and there is enough room - // in the eventlist, then the event will be placed in the eventlist - // with EV_ERROR set in flags and the system error in data. xnu ORs - // EV_ERROR into the existing action bits, so test the bit. - if (changelist[0].flags & EV::ERROR) != 0 && changelist[0].data != 0 { - return kevent_change_error(changelist[0].data); - // Otherwise, -1 will be returned, and errno will be set to - // indicate the error condition. - } - - let errno = sys::get_errno(rc); - if errno != sys::E::SUCCESS { - self.deactivate(loop_); - return sys::Result::Err(sys::Error::from_code(errno, sys::Tag::kqueue)); - } + debug_assert!(!self.flags.contains(Flags::OneShot)); } - #[cfg(target_os = "freebsd")] - { - use bun_sys::freebsd::{EV, EVFILT, Kevent, NOTE, kevent}; - // SAFETY: all-zero is a valid Kevent - let mut changelist: [Kevent; 1] = bun_core::ffi::zeroed(); - let one_shot_flag: u16 = if !self.flags.contains(Flags::OneShot) { - 0 - } else if one_shot == OneShotFlag::Dispatch { - EV::DISPATCH | EV::ENABLE - } else { - EV::ONESHOT - }; - - let ident = usize::try_from(fd.native()).expect("int cast"); - let udata = Pollable::init(self).ptr(); - changelist[0] = match flag { - Flags::Readable => { - make_kevent(ident, EVFILT::READ, EV::ADD | one_shot_flag, 0, udata) - } - Flags::Writable => { - make_kevent(ident, EVFILT::WRITE, EV::ADD | one_shot_flag, 0, udata) - } - Flags::Process => make_kevent( - ident, - EVFILT::PROC, - EV::ADD | one_shot_flag, - NOTE::EXIT, - udata, - ), - Flags::Machport | Flags::MemoryPressure => { - return sys::Result::Err(sys::Error::from_code( - sys::E::EOPNOTSUPP, - sys::Tag::kevent, - )); - } - _ => unreachable!(), - }; - - let rc = 'rc: loop { - // SAFETY: FFI syscall; pointers reference stack-local changelist valid for the call. - let rc = unsafe { - kevent( - watcher_fd, - changelist.as_ptr(), - 1, - // Same array for changelist and eventlist; nevents=0 so - // registration errors come back via errno. - changelist.as_mut_ptr(), - 0, - ptr::null(), - ) - }; - if sys::get_errno(rc) == sys::E::EINTR { - continue; - } - break 'rc rc; - }; - self.flags.insert(Flags::WasEverRegistered); - if let Some(err) = errno_sys(rc, sys::Tag::kevent) { - self.deactivate(loop_); - return err; - } + let result = self.arm(loop_, flag, fd); + self.flags.insert(Flags::WasEverRegistered); + if let sys::Result::Err(err) = result { + self.deactivate(loop_); + return sys::Result::Err(err); } self.activate(loop_); @@ -947,13 +705,134 @@ impl FilePoll { sys::Result::Ok(()) } - pub fn unregister(&mut self, loop_: &mut Loop, force_unregister: bool) -> sys::Result<()> { + /// Kernel-arm through the core poll registry: interest-set update on the + /// live slot for Fd directions, or a fresh slot registration (first + /// registration and post-one-shot rearm both land here). + #[cfg(any( + target_os = "linux", + target_os = "android", + target_os = "macos", + target_os = "freebsd" + ))] + fn arm(&mut self, loop_: *mut Loop, flag: Flags, fd: Fd) -> sys::Result<()> { + use bun_usockets::PollSource; + + #[cfg(any(target_os = "linux", target_os = "android"))] + const REGISTER_TAG: sys::Tag = sys::Tag::epoll_ctl; + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + const REGISTER_TAG: sys::Tag = sys::Tag::kevent; + + // On Linux a process watch is a readable pidfd — an Fd direction. + let is_fd_direction = matches!(flag, Flags::Readable | Flags::Writable) + || (cfg!(any(target_os = "linux", target_os = "android")) && flag == Flags::Process); + + if let Some(reg) = &self.registration { + if reg.shim.data().poll.get() == 0 { + // Loop teardown already freed the slot (on_loop_teardown + // zeroed the backpointer): the PollRef dangles — discard our + // shim ref and fall through to a fresh registration. + Self::release_shim(self.registration.take().expect("checked Some")); + } else if reg.fd != fd { + // Re-arm on a different fd: the live slot watches the old + // one, so an interest change would mutate the wrong fd's + // registration. Disarm, then register `fd` fresh below. + self.drop_registration(); + } else { + // Already armed for this fd. Fd sources take the union of the + // live directions plus `flag`; single-purpose sources (proc/ + // machport/memorystatus) are level-armed — nothing to change. + let poll_ref = reg.poll_ref; + if is_fd_direction { + let readable = matches!(flag, Flags::Readable | Flags::Process) + || self.flags.contains(Flags::PollReadable); + let writable = + flag == Flags::Writable || self.flags.contains(Flags::PollWritable); + if let Err(errno) = poll_ref.change(readable, writable) { + // Failed rearm: fully disarm so the kernel, the registry + // slot, and the interest flags all agree with the failure + // the caller is told (register_with_fd_impl deactivates). + self.drop_registration(); + self.flags.remove(Flags::PollReadable); + self.flags.remove(Flags::PollWritable); + self.flags.remove(Flags::PollProcess); + self.flags.remove(Flags::PollMachport); + self.flags.remove(Flags::PollMemoryPressure); + return sys::Result::Err(sys::Error::from_code( + sys::SystemErrno::init(i64::from(errno)).unwrap_or(sys::E::EINVAL), + REGISTER_TAG, + )); + } + } + return sys::Result::Ok(()); + } + } + + let source = match flag { + Flags::Readable | Flags::Writable => { + let readable = flag == Flags::Readable || self.flags.contains(Flags::PollReadable); + let writable = flag == Flags::Writable || self.flags.contains(Flags::PollWritable); + PollSource::Fd { + fd: fd.native(), + readable, + writable, + } + } + #[cfg(any(target_os = "linux", target_os = "android"))] + Flags::Process => PollSource::Fd { + fd: fd.native(), + readable: true, + writable: false, + }, + // PSI trigger fds signal via EPOLLPRI only. + #[cfg(any(target_os = "linux", target_os = "android"))] + Flags::MemoryPressure => PollSource::Pri { fd: fd.native() }, + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + Flags::Process => PollSource::Proc { pid: fd.native() }, + #[cfg(target_os = "macos")] + Flags::Machport => PollSource::Machport { + port: u32::try_from(fd.native()).expect("int cast"), + }, + #[cfg(target_os = "macos")] + Flags::MemoryPressure => PollSource::Memorystatus, + #[cfg(target_os = "freebsd")] + Flags::Machport | Flags::MemoryPressure => { + return sys::Result::Err(sys::Error::from_code( + sys::E::EOPNOTSUPP, + sys::Tag::kevent, + )); + } + _ => unreachable!(), + }; + + let shim = bun_ptr::RefPtr::new(RegistryShim { + ref_count: bun_ptr::RefCount::init(), + poll: core::cell::Cell::new(std::ptr::from_mut(self).expose_provenance()), + }); + // One strong ref transfers to the registry slot; ours lives in + // `Registration` and is discharged in `drop_registration`. + match Loop::register_poll::(loop_, source, shim.dupe_ref(), false) { + Ok(poll_ref) => { + self.registration = Some(Registration { poll_ref, fd, shim }); + sys::Result::Ok(()) + } + Err(errno) => { + shim.data().poll.set(0); + shim.deref(); + sys::Result::Err(sys::Error::from_code( + sys::SystemErrno::init(i64::from(errno)).unwrap_or(sys::E::EINVAL), + REGISTER_TAG, + )) + } + } + } + + pub fn unregister(&mut self, loop_: *mut Loop, force_unregister: bool) -> sys::Result<()> { self.unregister_with_fd(loop_, self.fd, force_unregister) } pub fn unregister_with_fd( &mut self, - loop_: &mut Loop, + loop_: *mut Loop, fd: Fd, force_unregister: bool, ) -> sys::Result<()> { @@ -965,7 +844,7 @@ impl FilePoll { target_os = "macos", target_os = "freebsd" ))] - let result = self.unregister_with_fd_impl(loop_, fd, force_unregister); + let result = self.unregister_with_fd_impl(fd, force_unregister); #[cfg(not(any( target_os = "linux", target_os = "android", @@ -986,54 +865,18 @@ impl FilePoll { target_os = "macos", target_os = "freebsd" ))] - fn unregister_with_fd_impl( - &mut self, - loop_: &mut Loop, - fd: Fd, - force_unregister: bool, - ) -> sys::Result<()> { + fn unregister_with_fd_impl(&mut self, fd: Fd, force_unregister: bool) -> sys::Result<()> { #[cfg(debug_assertions)] debug_assert!(fd.native() >= 0 && fd != INVALID_FD); - if !(self.flags.contains(Flags::PollReadable) - || self.flags.contains(Flags::PollWritable) - || self.flags.contains(Flags::PollProcess) - || self.flags.contains(Flags::PollMachport) - || self.flags.contains(Flags::PollMemoryPressure)) - { - // no-op + if !self.is_registered() { return sys::Result::Ok(()); } - debug_assert!(fd != INVALID_FD); - let watcher_fd = loop_.fd; - let both_directions = - self.flags.contains(Flags::PollReadable) && self.flags.contains(Flags::PollWritable); - let flag: Flags = 'brk: { - if self.flags.contains(Flags::PollReadable) { - break 'brk Flags::Readable; - } - if self.flags.contains(Flags::PollWritable) { - break 'brk Flags::Writable; - } - if self.flags.contains(Flags::PollProcess) { - break 'brk Flags::Process; - } - if self.flags.contains(Flags::PollMachport) { - break 'brk Flags::Machport; - } - if self.flags.contains(Flags::PollMemoryPressure) { - break 'brk Flags::MemoryPressure; - } - return sys::Result::Ok(()); - }; - if self.flags.contains(Flags::NeedsRearm) && !force_unregister { - syslog!( - "unregister: {} ({}) skipped due to needs_rearm", - <&'static str>::from(flag), - fd - ); + // The one-shot delivery already released its registry slot. + debug_assert!(self.registration.is_none()); + syslog!("unregister: ({}) skipped due to needs_rearm", fd); self.flags.remove(Flags::PollProcess); self.flags.remove(Flags::PollReadable); self.flags.remove(Flags::PollWritable); @@ -1043,192 +886,15 @@ impl FilePoll { } syslog!( - "unregister: FilePoll(0x{:x}, generation_number={}) {}{} ({})", + "unregister: FilePoll(0x{:x}) ({})", std::ptr::from_mut(self) as usize, - self.generation_number, - <&'static str>::from(flag), - if both_directions { "+writable" } else { "" }, fd ); - #[cfg(any(target_os = "linux", target_os = "android"))] - { - use bun_sys::linux::{self, EPOLL}; - // CTL_DEL keys on fd alone, so both directions are removed together. - // SAFETY: FFI syscall; null event is valid for CTL_DEL on Linux ≥2.6.9. - let ctl = unsafe { - linux::epoll_ctl(watcher_fd, EPOLL::CTL_DEL, fd.native(), ptr::null_mut()) - }; - - match sys::get_errno(ctl) { - sys::E::SUCCESS => {} - e if deregistration_already_gone(e) => {} - e => return sys::Result::Err(sys::Error::from_code(e, sys::Tag::epoll_ctl)), - } - } - #[cfg(target_os = "macos")] - { - use bun_sys::darwin::{EV, EVFILT, NOTE, kevent64, kevent64_s}; - // SAFETY: all-zero is a valid kevent64_s - let mut changelist: [kevent64_s; 2] = bun_core::ffi::zeroed(); - - changelist[0] = match flag { - Flags::Readable => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::READ, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::DELETE, - ext: [0, 0], - }, - Flags::Machport => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::MACHPORT, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::DELETE, - ext: [0, 0], - }, - Flags::Writable => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::WRITE, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::DELETE, - ext: [0, 0], - }, - Flags::Process => kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::PROC, - data: 0, - fflags: NOTE::EXIT, - udata: Pollable::init(self).ptr() as u64, - flags: EV::DELETE, - ext: [0, 0], - }, - Flags::MemoryPressure => kevent64_s { - ident: 0, - filter: EVFILT::MEMORYSTATUS, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::DELETE, - ext: [0, 0], - }, - _ => unreachable!(), - }; - - let mut nchanges: c_int = 1; - if both_directions { - // kqueue keys on (fd, filter); delete EVFILT_WRITE as a second change. - changelist[1] = kevent64_s { - ident: u64::try_from(fd.native()).expect("int cast"), - filter: EVFILT::WRITE, - data: 0, - fflags: 0, - udata: Pollable::init(self).ptr() as u64, - flags: EV::DELETE, - ext: [0, 0], - }; - nchanges = 2; - } - - // output events only include change errors - const KEVENT_FLAG_ERROR_EVENTS: u32 = 0x000002; - - // The kevent() system call returns the number of events placed in - // the eventlist, up to the value given by nevents. If the time - // limit expires, then kevent() returns 0. - // SAFETY: FFI syscall; pointers reference stack-local changelist valid for the call. - let rc = unsafe { - kevent64( - watcher_fd, - changelist.as_ptr(), - nchanges, - // The same array may be used for the changelist and eventlist. - changelist.as_mut_ptr(), - nchanges, - KEVENT_FLAG_ERROR_EVENTS, - &raw const TIMEOUT, - ) - }; - - let errno = sys::get_errno(rc); - // Global failure (e.g. EBADF on the kqueue fd): the eventlist - // was not written, so per-entry checks below would read our - // own input. Report errno and stop. - if rc < 0 { - return sys::Result::Err(sys::Error::from_code(errno, sys::Tag::kevent)); - } - - // If an error occurs while processing an element of the changelist - // and there is enough room in the eventlist, then the event will be - // placed in the eventlist with EV_ERROR set in flags and the system - // error in data. With KEVENT_FLAG_ERROR_EVENTS, rc is the count of - // such error events; they are packed from index 0 regardless of - // which change failed. xnu ORs EV_ERROR into the existing action - // bits (EV_DELETE|EV_ERROR = 0x4002), so test the bit, not equality. - for i in 0..usize::try_from(rc.min(2)).expect("int cast") { - if (changelist[i].flags & EV::ERROR) == 0 || changelist[i].data == 0 { - continue; - } - if sys::SystemErrno::init(changelist[i].data) - .is_some_and(deregistration_already_gone) - { - continue; - } - return kevent_change_error(changelist[i].data); - } - } - #[cfg(target_os = "freebsd")] - { - use bun_sys::freebsd::{EV, EVFILT, Kevent, NOTE, kevent}; - // SAFETY: all-zero is a valid Kevent - let mut changelist: [Kevent; 2] = bun_core::ffi::zeroed(); - let ident = usize::try_from(fd.native()).expect("int cast"); - let udata = Pollable::init(self).ptr(); - changelist[0] = match flag { - Flags::Readable => make_kevent(ident, EVFILT::READ, EV::DELETE, 0, udata), - Flags::Writable => make_kevent(ident, EVFILT::WRITE, EV::DELETE, 0, udata), - Flags::Process => make_kevent(ident, EVFILT::PROC, EV::DELETE, NOTE::EXIT, udata), - Flags::Machport | Flags::MemoryPressure => { - return sys::Result::Err(sys::Error::from_code( - sys::E::EOPNOTSUPP, - sys::Tag::kevent, - )); - } - _ => unreachable!(), - }; - - let mut nchanges: c_int = 1; - if both_directions { - changelist[1] = make_kevent(ident, EVFILT::WRITE, EV::DELETE, 0, udata); - nchanges = 2; - } - - // nevents=0: per-entry errors surface as rc=-1/errno for the - // first failing change. For EV_DELETE (typically ENOENT) a silent - // miss on the second entry is harmless. - // SAFETY: FFI syscall; pointers reference stack-local changelist valid for the call. - let rc = unsafe { - kevent( - watcher_fd, - changelist.as_ptr(), - nchanges, - changelist.as_mut_ptr(), - 0, - ptr::null(), - ) - }; - match sys::get_errno(rc) { - sys::E::SUCCESS => {} - e if deregistration_already_gone(e) => {} - e => return sys::Result::Err(sys::Error::from_code(e, sys::Tag::kevent)), - } - } + // Kernel disarm + slot free happen core-side; already-gone + // registrations (fd closed while registered, pty knotes reaped on + // EV_EOF|EV_ONESHOT hangup) are tolerated there, matching libuv. + self.drop_registration(); self.flags.remove(Flags::NeedsRearm); self.flags.remove(Flags::OneShot); @@ -1247,9 +913,8 @@ impl fmt::Display for FilePoll { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, - "FilePoll(fd={}, generation_number={}) = {}", + "FilePoll(fd={}) = {}", self.fd, - self.generation_number, FlagsFormatter(self.flags) ) } @@ -1299,7 +964,6 @@ pub enum Flags { Nonblocking, WasEverRegistered, - IgnoreUpdates, /// Was O_NONBLOCK set on the file descriptor? Nonblock, @@ -1321,60 +985,6 @@ impl Flags { other => other, } } - - #[cfg(any(target_os = "macos", target_os = "freebsd"))] - pub fn from_kqueue_event(kqueue_event: &KQueueEvent) -> FlagsSet { - #[cfg(target_os = "macos")] - use bun_sys::darwin::EVFILT; - #[cfg(target_os = "freebsd")] - use bun_sys::freebsd::EVFILT; - let mut flags = FlagsSet::empty(); - if kqueue_event.filter == EVFILT::READ { - flags.insert(Flags::Readable); - if kqueue_event.flags & EV_EOF != 0 { - flags.insert(Flags::Hup); - } - } else if kqueue_event.filter == EVFILT::WRITE { - flags.insert(Flags::Writable); - if kqueue_event.flags & EV_EOF != 0 { - flags.insert(Flags::Hup); - } - } else if kqueue_event.filter == EVFILT::PROC { - flags.insert(Flags::Process); - } else { - #[cfg(target_os = "macos")] - if kqueue_event.filter == EVFILT::MACHPORT { - flags.insert(Flags::Machport); - } - #[cfg(target_os = "macos")] - if kqueue_event.filter == EVFILT::MEMORYSTATUS { - flags.insert(Flags::MemoryPressure); - } - } - flags - } - - #[cfg(any(target_os = "linux", target_os = "android"))] - pub fn from_epoll_event(epoll: &bun_sys::linux::epoll_event) -> FlagsSet { - use bun_sys::linux::EPOLL; - let mut flags = FlagsSet::empty(); - if epoll.events & EPOLL::IN != 0 { - flags.insert(Flags::Readable); - } - if epoll.events & EPOLL::OUT != 0 { - flags.insert(Flags::Writable); - } - if epoll.events & EPOLL::PRI != 0 { - flags.insert(Flags::MemoryPressure); - } - if epoll.events & EPOLL::ERR != 0 { - flags.insert(Flags::Eof); - } - if epoll.events & EPOLL::HUP != 0 { - flags.insert(Flags::Hup); - } - flags - } } #[allow(dead_code)] @@ -1406,13 +1016,13 @@ const HIVE_SIZE: usize = 128; #[cfg(not(windows))] type FilePollHive = bun_collections::hive_array::Fallback; -/// We defer freeing FilePoll until the end of the next event loop iteration -/// This ensures that we don't free a FilePoll before the next callback is called +/// FilePoll slot pool. Freed slots are recycled immediately: staleness +/// protection moved core-side (the registry slot is the kernel udata; its +/// generation bump + pending ready-list nulling drop any same-tick event, and +/// the dispatch shim backpointer is nulled before the slot returns here). #[cfg(not(windows))] pub struct Store { hive: FilePollHive, - pending_free_head: *mut FilePoll, - pending_free_tail: *mut FilePoll, } #[cfg(not(windows))] @@ -1420,8 +1030,6 @@ impl Store { pub fn init() -> Store { Store { hive: FilePollHive::init(), - pending_free_head: ptr::null_mut(), - pending_free_tail: ptr::null_mut(), } } @@ -1431,189 +1039,18 @@ impl Store { self.hive.get_init(value) } - pub fn process_deferred_frees(&mut self) { - let mut next = self.pending_free_head; - while !next.is_null() { - let current = next; - // SAFETY: intrusive list; nodes were allocated by this hive. Walk via - // raw-pointer reads/writes only — materializing a `&mut FilePoll` - // here would alias the `&mut self.hive` borrow taken by `put()` - // below (the slot may live inside the inline hive array). - unsafe { - next = (*current).next_to_free; - (*current).next_to_free = ptr::null_mut(); - // FilePoll has no drop glue; `put` is a no-op drop + recycle. - self.hive.put(current); - } - } - self.pending_free_head = ptr::null_mut(); - self.pending_free_tail = ptr::null_mut(); - } - /// `poll` is a live, fully-initialized slot in `self.hive`. It may point /// *inside* `self.hive`'s inline `[FilePoll; 128]` buffer, so accepting it /// as `&mut FilePoll` while `&mut self` is live would retag overlapping - /// storage under Stacked Borrows (UB). Take it as a raw pointer and - /// touch fields only through raw pointer ops — same - /// rationale as `process_deferred_frees` above. - pub fn put(&mut self, poll: ptr::NonNull, vm: EventLoopCtx, ever_registered: bool) { - let poll = poll.as_ptr(); - if !ever_registered { - // SAFETY: `poll` is a fully-initialized hive slot; FilePoll has no - // drop glue, so `put` is a no-op drop + recycle. - unsafe { self.hive.put(poll) }; - return; - } - - // SAFETY: `poll` is a live hive slot (see fn-level comment); raw read of a POD field. - debug_assert!(unsafe { (*poll).next_to_free }.is_null()); - - if !self.pending_free_tail.is_null() { - debug_assert!(!self.pending_free_head.is_null()); - // SAFETY: tail is non-null and points into the hive. - unsafe { - debug_assert!((*self.pending_free_tail).next_to_free.is_null()); - (*self.pending_free_tail).next_to_free = poll; - } - } - - if self.pending_free_head.is_null() { - self.pending_free_head = poll; - debug_assert!(self.pending_free_tail.is_null()); - } - - // SAFETY: see fn-level comment — raw-pointer field access only. - unsafe { (*poll).flags.insert(Flags::IgnoreUpdates) }; - self.pending_free_tail = poll; - - let callback: OpaqueCallback = Self::process_deferred_frees_thunk; - debug_assert!( - vm.after_event_loop_callback().is_none() - || vm.after_event_loop_callback().map(|f| f as usize) == Some(callback as usize) - ); - vm.set_after_event_loop_callback( - Some(callback), - core::ptr::NonNull::new(std::ptr::from_mut::(self).cast::()), - ); - } - - // Safe fn item: module-private thunk, only coerced to the C-ABI - // `OpaqueCallback` fn-pointer type — never callable by name outside - // `Store`. Body wraps its raw-ptr op explicitly. - extern "C" fn process_deferred_frees_thunk(ctx: *mut c_void) { - // SAFETY: ctx was set to `self as *mut Store` in `put` above. - let this = unsafe { bun_ptr::callback_ctx::(ctx) }; - this.process_deferred_frees(); + /// storage under Stacked Borrows (UB). Take it as a raw pointer instead. + pub fn put(&mut self, poll: ptr::NonNull) { + // SAFETY: `poll` is a fully-initialized hive slot whose registration + // was already released (deinit contract); FilePoll has no drop glue, + // so `put` is a no-op drop + recycle. + unsafe { self.hive.put(poll.as_ptr()) }; } } -// ────────────────────────────────────────────────────────────────────────── -// onTick (exported) -// ────────────────────────────────────────────────────────────────────────── - -// `Pollable` is a single-variant tagged-pointer union over `FilePoll`. -// -// Note: `bun_collections::TaggedPtrUnion<(FilePoll,)>` cannot be -// instantiated here — `impl_tagged_ptr_union!` would generate -// `impl TypeList for (FilePoll,)`, which trips the orphan rule (foreign trait -// on a tuple). Since the union has exactly one variant, wrap the raw -// `TaggedPtr` directly with the same tag scheme (`1024 - index`). -#[derive(Copy, Clone)] -#[allow(dead_code)] -pub(crate) struct Pollable { - repr: bun_collections::TaggedPointer, -} - -impl Pollable { - /// Tag value for `FilePoll` (index 0 → `1024 - 0`). - #[allow(dead_code)] - pub(crate) const FILE_POLL_TAG: u16 = 1024; - - #[inline] - #[allow(dead_code)] - pub(crate) fn init(ptr: *const crate::FilePoll) -> Self { - Self { - repr: bun_collections::TaggedPointer::init(ptr, Self::FILE_POLL_TAG), - } - } - - #[inline] - #[allow(dead_code)] - pub(crate) fn from(val: *mut c_void) -> Self { - Self { - repr: bun_collections::TaggedPointer::from(val), - } - } - - #[inline] - #[allow(dead_code)] - pub(crate) fn tag(self) -> u16 { - self.repr.data() - } - - #[inline] - #[allow(dead_code)] - pub(crate) fn as_file_poll(self) -> *mut crate::FilePoll { - self.repr.get::() - } - - #[inline] - #[allow(dead_code)] - pub(crate) fn ptr(self) -> *mut c_void { - self.repr.to() - } -} - -// `current_ready_poll`/`ready_polls` only exist on the POSIX uws loop layout; -// on Windows the libuv loop drives readiness, so this entry point is never -// linked there. Restrict to the platforms where the fields are present. -#[cfg(any( - target_os = "linux", - target_os = "android", - target_os = "macos", - target_os = "freebsd" -))] -#[unsafe(no_mangle)] -/// # Safety -/// uWS C callback: `loop_` is the live per-thread `us_loop_t`; `tagged_pointer` -/// was registered via `Pollable::init` in `register_with_fd`. -pub(crate) unsafe extern "C" fn Bun__internal_dispatch_ready_poll( - loop_: *mut Loop, - tagged_pointer: *mut c_void, -) { - let tag = Pollable::from(tagged_pointer); - - if tag.tag() != Pollable::FILE_POLL_TAG { - return; - } - - // SAFETY: tag matched FilePoll; pointer was set via Pollable::init in register_with_fd. - let file_poll: &mut FilePoll = unsafe { &mut *tag.as_file_poll() }; - if file_poll.flags.contains(Flags::IgnoreUpdates) { - return; - } - - // SAFETY: `loop_` is the live uws loop. Do *not* materialize `&mut *loop_` - // here — `on_update` (via `__bun_run_file_poll`) re-enters the loop and conjures - // a fresh `&mut Loop` through `EventLoopCtx::platform_event_loop()`; a - // protected `&mut Loop` spanning that call would be SB-UB. Take a short-lived - // `&*loop_` only to copy the POD event onto the stack (the `BackRef`-style - // accessor returns by value), then drop the borrow before dispatching so the - // handler is free to form its own `&mut Loop`. - let ev = unsafe { &*loop_ }.current_ready_event(); - - #[cfg(any(target_os = "macos", target_os = "freebsd"))] - file_poll.on_kqueue_event(&ev); - #[cfg(any(target_os = "linux", target_os = "android"))] - file_poll.on_epoll_event(&ev); -} - -#[cfg(target_os = "macos")] -static TIMEOUT: bun_sys::posix::timespec = bun_sys::posix::timespec { - tv_sec: 0, - tv_nsec: 0, -}; - #[repr(u8)] #[derive(Copy, Clone, PartialEq, Eq)] pub enum OneShotFlag { @@ -1639,29 +1076,3 @@ pub use crate::closer::Closer; pub use crate::waker::KEventWaker; #[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))] pub use crate::waker::Waker; - -#[cfg(test)] -mod tests { - use super::*; - - /// kevent `EV_ERROR` entries carry the errno value itself in `data`. - /// These used to be round-tripped through `errno_sys`, which decodes the - /// -1-sentinel return-code convention and therefore returned `None` for - /// every real errno — panicking at the `.unwrap()` call sites whenever an - /// `EV_DELETE` failed (e.g. EBADF/ENOENT from a pipe fd closed while its - /// `FilePoll` was still registered). - #[cfg(not(windows))] - #[test] - fn kevent_change_error_decodes_errno_value_not_return_code() { - let err = kevent_change_error(sys::E::EBADF as i64).unwrap_err(); - assert_eq!(err.get_errno(), sys::E::EBADF); - assert_eq!(err.syscall, sys::Tag::kevent); - - let err = kevent_change_error(sys::E::ENOENT as i64).unwrap_err(); - assert_eq!(err.get_errno(), sys::E::ENOENT); - - // Out-of-range data must not panic either. - let err = kevent_change_error(i64::MAX).unwrap_err(); - assert_eq!(err.get_errno(), sys::E::EINVAL); - } -} diff --git a/src/io/windows_event_loop.rs b/src/io/windows_event_loop.rs index 09b2416eb120..73e1e38fad8a 100644 --- a/src/io/windows_event_loop.rs +++ b/src/io/windows_event_loop.rs @@ -1,18 +1,15 @@ -use core::ffi::c_void; use core::ptr; use bun_sys::Fd; use bun_sys::windows::libuv as uv; -use bun_uws_sys::WindowsLoop; +use bun_usockets::WindowsLoop; use crate::posix_event_loop as posix; // Shared scaffolding lives in `posix_event_loop` (platform-agnostic types); // only `FilePoll`/`Store`/`KeepAlive`/`Closer`/`Loop`/`Waker` are redefined // here. `Flags`/`Owner`/etc. are re-aliased below from `posix` for callers // that name them via this module. -pub use crate::posix_event_loop::{ - AllocatorType, EventLoopCtx, OpaqueCallback, get_vm_ctx, js_vm_ctx, -}; +pub use crate::posix_event_loop::{AllocatorType, EventLoopCtx, get_vm_ctx, js_vm_ctx}; bun_core::declare_scope!(KeepAlive, visible); bun_core::declare_scope!(FilePoll, visible); @@ -36,7 +33,6 @@ pub struct FilePoll { pub fd: Fd, pub owner: Owner, pub flags: FlagsSet, - pub next_to_free: *mut FilePoll, } impl FilePoll { @@ -87,12 +83,7 @@ impl FilePoll { ) -> *mut FilePoll { // Crate-private backref-deref accessor — single live `&mut Store` borrow. vm.file_polls_mut() - .get_init(FilePoll { - fd, - flags, - owner, - next_to_free: ptr::null_mut(), - }) + .get_init(FilePoll { fd, flags, owner }) .as_ptr() } @@ -111,7 +102,7 @@ impl FilePoll { self.deinit() } - pub fn unregister(&mut self, _loop: &mut WindowsLoop) -> bool { + pub fn unregister(&mut self, _loop: *mut WindowsLoop) -> bool { // TODO: This cast is extremely suspicious. At best, `fd` is // the wrong type (it should be a uv handle), at worst this code is a // crash due to invalid memory access. @@ -130,24 +121,20 @@ impl FilePoll { true } - fn deinit_possibly_defer(&mut self, vm: EventLoopCtx, loop_: &mut WindowsLoop) { + fn deinit_possibly_defer(&mut self, vm: EventLoopCtx, loop_: *mut WindowsLoop) { if self.is_registered() { let _ = self.unregister(loop_); } - let was_ever_registered = self.flags.contains(Flags::WasEverRegistered); self.flags = FlagsSet::default(); self.fd = Fd::INVALID; // All `self` field writes are done. Decay `self` to a raw slot pointer // *before* materializing `&mut Store` so the `&mut Store` borrow (which // covers the inline hive buffer) is the only live unique reference into // that allocation when `Store::put` runs. `self` is never touched after - // this line — `Store::put` itself accesses `this` only via raw-pointer ops. + // this line. let this: ptr::NonNull = ptr::NonNull::from(&mut *self); - // `file_polls_mut()` is the per-thread set-once `Store` back-pointer - // (`BackRef`-shaped); `&mut self` has been retired to `this` above so - // the `&mut Store` it produces is the sole unique borrow into the hive. - vm.file_polls_mut().put(this, vm, was_ever_registered); + vm.file_polls_mut().put(this); } pub fn is_readable(&mut self) -> bool { @@ -179,12 +166,7 @@ impl FilePoll { } pub fn deinit_with_vm(&mut self, vm: EventLoopCtx) { - // `loop_mut()` — crate-private nonnull-asref accessor (single deref in - // `EventLoopCtx`); the uws loop is a disjoint allocation from `self`. - // Stacked-Borrows: `self` may live inside `Store.hive`'s inline buffer, - // so `&mut Store` is materialised only *after* `&mut self` is retired - // inside `deinit_possibly_defer` (via `file_polls_mut()`). - let loop_ = vm.loop_mut(); + let loop_ = vm.loop_(); self.deinit_possibly_defer(vm, loop_); } @@ -203,24 +185,28 @@ impl FilePoll { /// Only intended to be used from EventLoop.Pollable // Note: the cycle-broken `EventLoopCtx::platform_event_loop` vtable is typed - // `*mut bun_uws_sys::Loop` (the uws `WindowsLoop` wrapper) so the + // `*mut bun_usockets::Loop` (the uws `WindowsLoop` wrapper) so the // impl-crate bodies (`VirtualMachine::uws_loop` / `MiniEventLoop::loop_ptr`) - // type-check. `WindowsLoop::sub_active`/`add_active` proxy straight through - // to `(*self.uv_loop).{sub,add}_active`, so accept the wrapper here. - pub fn deactivate(&mut self, loop_: &mut WindowsLoop) { + // type-check. `WindowsLoop::sub_active_raw`/`add_active_raw` proxy straight + // through to `(*self.uv_loop).{sub,add}_active`, so accept the wrapper here. + pub fn deactivate(&mut self, loop_: *mut WindowsLoop) { debug_assert!(self.flags.contains(Flags::HasIncrementedPollCount)); - loop_.sub_active(self.flags.contains(Flags::HasIncrementedPollCount) as u32); - bun_core::scoped_log!(FilePoll, "deactivate - {}", loop_.uv().active_handles); + WindowsLoop::sub_active_raw( + loop_, + self.flags.contains(Flags::HasIncrementedPollCount) as u32, + ); + bun_core::scoped_log!(FilePoll, "deactivate"); self.flags.remove(Flags::HasIncrementedPollCount); } /// Only intended to be used from EventLoop.Pollable - pub fn activate(&mut self, loop_: &mut WindowsLoop) { - loop_.add_active( + pub fn activate(&mut self, loop_: *mut WindowsLoop) { + WindowsLoop::add_active_raw( + loop_, (!self.flags.contains(Flags::Closed) && !self.flags.contains(Flags::HasIncrementedPollCount)) as u32, ); - bun_core::scoped_log!(FilePoll, "activate - {}", loop_.uv().active_handles); + bun_core::scoped_log!(FilePoll, "activate"); self.flags.insert(Flags::HasIncrementedPollCount); } @@ -242,7 +228,7 @@ impl FilePoll { self.flags.remove(Flags::KeepsEventLoopAlive); self.flags.insert(Flags::Closed); // this.deactivate(vm.event_loop_handle.?); - self.deactivate(event_loop_ctx.loop_mut()); + self.deactivate(event_loop_ctx.loop_()); } /// Prevent a poll from keeping the process alive. @@ -252,7 +238,7 @@ impl FilePoll { } bun_core::scoped_log!(FilePoll, "unref"); // this.deactivate(vm.event_loop_handle.?); - self.deactivate(vm.loop_mut()); + self.deactivate(vm.loop_()); } /// Allow a poll to keep the process alive. @@ -263,7 +249,7 @@ impl FilePoll { } bun_core::scoped_log!(FilePoll, "ref"); // this.activate(vm.event_loop_handle.?); - self.activate(event_loop_ctx.loop_mut()); + self.activate(event_loop_ctx.loop_()); } } @@ -271,16 +257,12 @@ type FilePollHiveArray = bun_collections::hive_array::Fallback; pub struct Store { hive: FilePollHiveArray, - pending_free_head: *mut FilePoll, - pending_free_tail: *mut FilePoll, } impl Store { pub fn init() -> Store { Store { hive: FilePollHiveArray::init(), - pending_free_head: ptr::null_mut(), - pending_free_tail: ptr::null_mut(), } } @@ -289,80 +271,15 @@ impl Store { self.hive.get_init(value) } - pub fn process_deferred_frees(&mut self) { - let mut next = self.pending_free_head; - while !next.is_null() { - let current = next; - // SAFETY: intrusive deferred-free list; nodes are valid HiveArray slots - // until put(). Walk via raw-pointer reads/writes only — materializing a - // `&mut FilePoll` here would alias the `&mut self.hive` borrow taken by - // `put()` below (the slot may live inside the inline hive buffer). - unsafe { - next = (*current).next_to_free; - (*current).next_to_free = ptr::null_mut(); - // FilePoll has no drop glue; `put` is a no-op drop + recycle. - self.hive.put(current); - } - } - self.pending_free_head = ptr::null_mut(); - self.pending_free_tail = ptr::null_mut(); - } - /// `poll` is a live, fully-initialized slot in `self.hive`. Touched only /// through raw pointer ops to avoid forming a `&mut FilePoll` that would - /// alias `&mut self` (the hive buffer is inline storage). - pub fn put(&mut self, poll: ptr::NonNull, vm: EventLoopCtx, ever_registered: bool) { - let poll = poll.as_ptr(); - if !ever_registered { - // SAFETY: `poll` is a fully-initialized hive slot; FilePoll has no - // drop glue, so `put` is a no-op drop + recycle. - unsafe { self.hive.put(poll) }; - return; - } - - // SAFETY: `poll` is a valid HiveArray slot pointer. It may live inside - // `self.hive.buffer`, so we access it via raw pointer only (no `&mut FilePoll` - // materialized) to avoid aliasing `&mut self`. - debug_assert!(unsafe { (*poll).next_to_free }.is_null()); - - let tail = self.pending_free_tail; - if !tail.is_null() { - debug_assert!(!self.pending_free_head.is_null()); - // SAFETY: `tail` is a valid slot in the intrusive deferred-free list; - // raw-ptr access avoids a second `&mut FilePoll` overlapping `poll`/`self`. - debug_assert!(unsafe { (*tail).next_to_free }.is_null()); - unsafe { (*tail).next_to_free = poll }; - } - - if self.pending_free_head.is_null() { - self.pending_free_head = poll; - debug_assert!(self.pending_free_tail.is_null()); - } - - // SAFETY: see above — short-lived field borrow through raw `poll`, no overlap held. - unsafe { (*poll).flags.insert(Flags::IgnoreUpdates) }; - self.pending_free_tail = poll; - - let callback: OpaqueCallback = Self::process_deferred_frees_thunk; - debug_assert!( - vm.after_event_loop_callback().is_none() - || vm.after_event_loop_callback().map(|f| f as usize) == Some(callback as usize) - ); - vm.set_after_event_loop_callback( - Some(callback), - core::ptr::NonNull::new(core::ptr::from_mut::(self).cast::()), - ); - } - - // Safe fn item: module-private thunk, only coerced to the C-ABI - // `OpaqueCallback` fn-pointer type — never callable by name outside - // `Store`. Body wraps its raw-ptr op explicitly. - extern "C" fn process_deferred_frees_thunk(ctx: *mut c_void) { - // SAFETY: `ctx` was set to `self as *mut Store` in `put` above. The thunk fires - // from the event loop's after-tick hook with no other `&mut Store` borrow live, - // so this is the unique accessor (safe-single-owner). - let this = unsafe { bun_ptr::callback_ctx::(ctx) }; - this.process_deferred_frees(); + /// alias `&mut self` (the hive buffer is inline storage). Immediate + /// recycle: Windows FilePolls never kernel-register, so no stale + /// readiness can reference the slot. + pub fn put(&mut self, poll: ptr::NonNull) { + // SAFETY: `poll` is a fully-initialized hive slot; FilePoll has no + // drop glue, so `put` is a no-op drop + recycle. + unsafe { self.hive.put(poll.as_ptr()) }; } } @@ -399,7 +316,7 @@ impl Waker { // `BackRef` deref is safe (pointee outlives holder); `uv_loop` is a // `Copy` field set once by `us_create_loop` and immutable for the // process. - self.loop_.uv_loop + self.loop_.uv_loop.cast() } // `getFd`/`initWithFileDescriptor` must never be referenced on Windows, @@ -407,35 +324,21 @@ impl Waker { // `cfg`-gated, so a stray Windows use fails the build. pub fn wait(&self) { - // Do NOT go through `WindowsLoop::wait(&mut self)`: that would + // Do NOT go through a `&mut WindowsLoop` receiver: that would // materialize a `&mut WindowsLoop` over the process-global singleton // for the entire duration of `us_loop_run`/`uv_run`, and a concurrent // `wake()` from a worker thread would alias it (two live `&mut T` to - // one allocation = UB under Stacked/Tree Borrows). Call the C entry - // point with the raw pointer directly — no exclusivity claimed. - // SAFETY: `loop_` is the live `WindowsLoop::get()` singleton. - unsafe { waker_c::us_loop_run(self.loop_.as_ptr()) }; + // one allocation = UB under Stacked/Tree Borrows). The raw entry + // point takes `*mut Loop` — no exclusivity claimed. + bun_usockets::us_loop_run(self.loop_.as_ptr()); } pub fn wake(&self) { - // See `wait()` — call the thread-safe C wake path with the raw pointer + // See `wait()` — the thread-safe raw wake path (`uv_async_send`) // instead of forming a `&mut WindowsLoop` that would alias the - // event-loop thread's borrow held across `us_loop_run`. - // SAFETY: `loop_` is the live `WindowsLoop::get()` singleton; - // `us_wakeup_loop` → `uv_async_send` is documented thread-safe. - unsafe { waker_c::us_wakeup_loop(self.loop_.as_ptr()) }; - } -} - -// Local extern shims for `Waker`: the canonical decls live in -// `bun_uws_sys::loop_::c` but that module is crate-private. Re-declaring the -// two symbols here lets `Waker::{wait,wake}` pass the raw `*mut WindowsLoop` -// without round-tripping through a `&mut self` receiver (see comments above). -mod waker_c { - use super::WindowsLoop; - unsafe extern "C" { - pub(super) fn us_loop_run(loop_: *mut WindowsLoop); - pub(super) fn us_wakeup_loop(loop_: *mut WindowsLoop); + // event-loop thread's access held across `us_loop_run`. Liveness: + // `loop_` is the process-global singleton, never freed. + bun_usockets::us_wakeup_loop(self.loop_.as_ptr()); } } diff --git a/src/jsc/Cargo.toml b/src/jsc/Cargo.toml index d29c67cade25..e17beb7903f3 100644 --- a/src/jsc/Cargo.toml +++ b/src/jsc/Cargo.toml @@ -59,6 +59,7 @@ bun_sys.workspace = true bun_threading.workspace = true bun_transpiler.workspace = true bun_url.workspace = true -bun_uws.workspace = true +bun_uws_shim.workspace = true +bun_usockets.workspace = true bun_watcher.workspace = true bun_wyhash.workspace = true diff --git a/src/jsc/Debugger.rs b/src/jsc/Debugger.rs index 00da129943f4..4cb471bbdd51 100644 --- a/src/jsc/Debugger.rs +++ b/src/jsc/Debugger.rs @@ -311,11 +311,12 @@ impl Debugger { { let pending_unref = this.take_pending_unref(); if pending_unref > 0 { - this.uws_loop_mut().unref_count(pending_unref); + // Raw-place twin — no `&mut Loop` on a published loop. + bun_usockets::Loop::unref_count_raw(this.uws_loop(), pending_unref); } } - this.uws_loop_mut().tick_with_timeout(Some(&deadline)); + bun_usockets::Loop::tick_with_timeout(this.uws_loop(), Some(&deadline)); if bun_core::Environment::ENABLE_LOGS { bun_core::scoped_log!( diff --git a/src/jsc/FetchHeaders.rs b/src/jsc/FetchHeaders.rs index 2bec550f166b..5cbaed66d40b 100644 --- a/src/jsc/FetchHeaders.rs +++ b/src/jsc/FetchHeaders.rs @@ -4,7 +4,7 @@ use core::ptr::NonNull; use crate::virtual_machine::VirtualMachine; use crate::{JSGlobalObject, JSValue, JsResult, VM, host_fn}; use bun_core::{String as BunString, StringPointer, ZigString}; -use bun_uws::ResponseKind; +use bun_uws_shim::ResponseKind; bun_opaque::opaque_ffi! { /// Opaque C++ `WebCore::FetchHeaders` handle (ref-counted on the C++ side; see `deref`). diff --git a/src/jsc/GarbageCollectionController.rs b/src/jsc/GarbageCollectionController.rs index 931d559fc9d6..9d3ddc67dfbc 100644 --- a/src/jsc/GarbageCollectionController.rs +++ b/src/jsc/GarbageCollectionController.rs @@ -22,7 +22,7 @@ use core::ffi::c_int; use bun_core::{Timespec, TimespecMockMode}; use bun_event_loop::EventLoopTimer::{EventLoopTimer, State as TimerState, Tag as TimerTag}; -use bun_uws as uws; +use bun_usockets as uws; use crate::VM; use crate::virtual_machine::VirtualMachine; diff --git a/src/jsc/JSONLineBuffer.rs b/src/jsc/JSONLineBuffer.rs index 3d6c3a36c306..bfaf0f03da7e 100644 --- a/src/jsc/JSONLineBuffer.rs +++ b/src/jsc/JSONLineBuffer.rs @@ -19,6 +19,9 @@ pub struct JSONLineBuffer { pub newline_pos: Option, /// How far we've scanned for newlines relative to head. pub scanned_pos: u32, + /// Sticky: a position exceeded the u32 design limit (peer buffered a + /// >4 GiB line). The buffer is unusable; callers treat it as too-long. + overflow: bool, } /// Return type of [`JSONLineBuffer::next`]: a complete message slice plus its newline offset. @@ -38,7 +41,7 @@ impl JSONLineBuffer { /// Scan for newline in unscanned portion of the buffer. fn scan_for_newline(&mut self) { - if self.newline_pos.is_some() { + if self.overflow || self.newline_pos.is_some() { return; } let slice = self.active_slice(); @@ -47,13 +50,20 @@ impl JSONLineBuffer { } let unscanned = &slice[self.scanned_pos as usize..]; - if let Some(local_idx) = strings::index_of_char(unscanned, b'\n') { - let pos = self.scanned_pos.saturating_add(local_idx); - self.newline_pos = Some(pos); - self.scanned_pos = pos.saturating_add(1); // Only scanned up to (and including) the newline + if let Some(local_idx) = strings::index_of_char_usize(unscanned, b'\n') { + // `pos == u32::MAX` would overflow the `idx + 1` consumers downstream. + match u32::try_from(self.scanned_pos as usize + local_idx) { + Ok(pos) if pos < u32::MAX => { + self.newline_pos = Some(pos); + self.scanned_pos = pos + 1; // Only scanned up to (and including) the newline + } + _ => self.overflow = true, + } } else { - debug_assert!((slice.len() as u64) <= u32::MAX as u64); - self.scanned_pos = u32::try_from(slice.len()).expect("int cast"); // No newline, scanned everything + match u32::try_from(slice.len()) { + Ok(n) => self.scanned_pos = n, // No newline, scanned everything + Err(_) => self.overflow = true, + } } } @@ -72,8 +82,17 @@ impl JSONLineBuffer { self.scan_for_newline(); } + /// True once buffered positions exceeded the u32 design limit (a >4 GiB + /// line); the pending message can never be decoded. + pub fn overflowed(&self) -> bool { + self.overflow + } + /// Returns the next complete message (up to and including newline) if available. pub fn next(&self) -> Option> { + if self.overflow { + return None; + } let pos = self.newline_pos?; Some(Next { data: &self.active_slice()[0..(pos as usize) + 1], @@ -84,7 +103,13 @@ impl JSONLineBuffer { /// Consume bytes from the front of the buffer after processing a message. /// Just advances head offset - no copying until compaction threshold is reached. pub fn consume(&mut self, bytes: u32) { - self.head = self.head.saturating_add(bytes); + self.head = match self.head.checked_add(bytes) { + Some(h) => h, + None => { + self.overflow = true; + return; + } + }; // Adjust scanned_pos (subtract consumed bytes, but don't go negative) self.scanned_pos = self.scanned_pos.saturating_sub(bytes); diff --git a/src/jsc/SystemError.rs b/src/jsc/SystemError.rs index a1567c5b2007..0a0d0d6fb904 100644 --- a/src/jsc/SystemError.rs +++ b/src/jsc/SystemError.rs @@ -163,10 +163,10 @@ impl SystemError { /// /// LAYERING: lives here (not `bun_runtime::socket::uws_jsc`) so both /// `bun_runtime` and `bun_sql_jsc` import the single canonical body — both -/// crates already depend on `bun_jsc` + `bun_uws`, and the body touches +/// crates already depend on `bun_jsc` + `bun_usockets`, and the body touches /// nothing higher-tier. pub fn verify_error_to_js( - err: &bun_uws::us_bun_verify_error_t, + err: &bun_usockets::us_bun_verify_error_t, global: &JSGlobalObject, ) -> crate::JsResult { let code: &[u8] = err.code_bytes(); diff --git a/src/jsc/VirtualMachine.rs b/src/jsc/VirtualMachine.rs index 2dc03fbd4246..ca4a7f97e278 100644 --- a/src/jsc/VirtualMachine.rs +++ b/src/jsc/VirtualMachine.rs @@ -9,7 +9,7 @@ use core::ptr::NonNull; use bun_bundler::Transpiler; use bun_io as Async; -use bun_uws as uws; +use bun_usockets as uws; use crate::counters::Counters; use crate::event_loop::EventLoop; @@ -19,8 +19,7 @@ use crate::rare_data::RareData; use crate::saved_source_map::SavedSourceMap; use crate::{ self as jsc, ErrorCode, ErrorableResolvedSource, ErrorableString, Exception, JSGlobalObject, - JSInternalPromise, JSValue, JsResult, OpaqueCallback, PlatformEventLoop, ResolvedSource, VM, - ZigException, + JSInternalPromise, JSValue, JsResult, PlatformEventLoop, ResolvedSource, VM, ZigException, }; pub use crate::process_auto_killer as ProcessAutoKiller; @@ -264,9 +263,6 @@ pub struct VirtualMachine { pub transpiler_store: crate::runtime_transpiler_store::RuntimeTranspilerStore, - pub after_event_loop_callback_ctx: Option<*mut c_void>, - pub after_event_loop_callback: Option, - pub remap_stack_frames_mutex: bun_threading::Mutex, pub argv: Vec>, @@ -316,7 +312,9 @@ pub struct VirtualMachine { pub debugger: Option>, pub has_started_debugger: bool, - pub has_terminated: bool, + /// Atomic: read cross-thread by `EventLoop::enqueue_task_concurrent*` + /// debug asserts while the owning thread flips it in `deinit`. + pub has_terminated: core::sync::atomic::AtomicBool, #[cfg(debug_assertions)] pub debug_thread_id: std::thread::ThreadId, @@ -865,16 +863,10 @@ impl VirtualMachine { self.as_mut().debugger.as_deref_mut() } - /// Safe `&mut uws::Loop` accessor for the per-VM uSockets loop. Same - /// single-JS-thread soundness contract as [`Self::event_loop_mut`]. - #[inline(always)] - #[allow(clippy::mut_from_ref)] - pub fn uws_loop_mut(&self) -> &mut uws::Loop { - // SAFETY: `uws_loop()` returns the per-VM loop pointer; non-null on - // the JS thread once `init()` ran. Single-JS-thread invariant per - // `unsafe impl Sync`. - unsafe { &mut *self.uws_loop() } - } + // NOTE: there is deliberately no `&mut uws::Loop` accessor — even a + // JS-thread-scoped `&mut Loop` spans `pending_wakeups`, which waker + // threads `fetch_add` concurrently. Use `uws_loop()` + the + // `Loop::*_raw` twins. /// Safe `&mut PlatformEventLoop` accessor for `event_loop_handle` (the /// uws loop on POSIX, libuv loop on Windows). `None` only before @@ -882,7 +874,7 @@ impl VirtualMachine { /// `self.event_loop_handle.unwrap()` at the `EventLoop::tick*` / /// `update_counts` call sites into one SAFETY block. /// - /// Same single-JS-thread soundness contract as [`Self::uws_loop_mut`] — + /// Same single-JS-thread soundness contract as [`Self::event_loop_mut`] — /// the `PlatformEventLoop` is a separate heap allocation (uws/uv-owned), /// so the returned `&mut` cannot alias any field of `self`. #[inline(always)] @@ -1006,7 +998,7 @@ impl VirtualMachine { } /// Per-callback hot path: `drain_microtasks_with_global` calls - /// `uws_loop_mut()` (→ this) every time the microtask queue drains, and + /// this accessor every time the microtask queue drains, and /// the only call site there is already gated on /// `event_loop_handle.is_some()`. #[inline(always)] @@ -1027,19 +1019,13 @@ impl VirtualMachine { } } - pub fn on_after_event_loop(&mut self) { - if let Some(cb) = self.after_event_loop_callback.take() { - let ctx = self.after_event_loop_callback_ctx.take(); - // SAFETY: `cb` was registered with the matching `ctx`. - unsafe { cb(ctx.unwrap_or(core::ptr::null_mut())) }; - } - } - pub fn is_event_loop_alive_excluding_immediates(&self) -> bool { let el = self.event_loop_shared(); + // SAFETY: when `Some`, the handle is the live per-VM loop; `is_active` + // reads a loop-thread-owned counter through a transient shared borrow. let active = self - .platform_loop_opt() - .map(|h| h.is_active()) + .event_loop_handle + .map(|h| unsafe { (*h).is_active() }) .unwrap_or(false); self.unhandled_error_counter == 0 && ((active as usize) @@ -1179,6 +1165,10 @@ impl VirtualMachine { pub fn enter_uws_loop(&mut self) { // event_loop_handle is set in ensure_waker before any caller reaches here. + #[cfg(unix)] + // `run` takes `*mut Loop` — re-entrant callbacks re-fetch the loop. + uws::Loop::run(self.event_loop_handle.expect("event_loop_handle")); + #[cfg(not(unix))] self.platform_loop_opt().expect("event_loop_handle").run(); } @@ -1531,10 +1521,10 @@ impl VirtualMachine { if self.should_destruct_main_thread_on_exit() { #[cfg(windows)] if let Some(t) = self.event_loop_mut().forever_timer.take() { - // SAFETY: `t` is the live usockets timer created in - // `EventLoop::tick_possibly_forever`; `close::()` - // (fallthrough) frees it without re-entering the loop. - unsafe { uws::Timer::close::(t.as_ptr()) }; + // Stops the usockets timer created in + // `EventLoop::tick_possibly_forever`; the blob is freed by its + // uv_close callback. + uws::backend::libuv::Timer::close(t.as_ptr()); } // Drain `TimeoutObject`s / `ImmediateObject`s from `All.timers` // while `runtime_state`, the event loop, and the JSC heap are all @@ -1608,7 +1598,7 @@ impl VirtualMachine { // socket that was still open at process.exit(). // SAFETY: `uws::Loop::get()` returns the process-global usockets // loop, which is live for the process lifetime. - unsafe { (*uws::Loop::get()).drain_closed_sockets() }; + uws::Loop::drain_closed_sockets(uws::Loop::get()); self.destroy(); } @@ -1705,7 +1695,7 @@ pub struct RuntimeHooks { /// `bun_runtime::RuntimeState` (b2-cycle). pub ssl_ctx_cache_get_or_create: unsafe fn( vm: *mut VirtualMachine, - opts: &uws::SocketContext::BunSocketContextOptions, + opts: &uws::BunSocketContextOptions, err: &mut uws::create_bun_socket_error_t, ) -> Option<*mut uws::SslCtx>, /// Lazy `NodeFS` creation. @@ -1853,12 +1843,6 @@ bun_io::link_impl_EventLoopCtx! { // and `{,un}ref_concurrently` take `&self` (atomic fetch_add + wakeup). ref_concurrently() => (*(*this).event_loop()).ref_concurrently(), unref_concurrently() => (*(*this).event_loop()).unref_concurrently(), - after_event_loop_callback() => vm_from_owner(this.cast()).after_event_loop_callback, - set_after_event_loop_callback(cb, ctx) => { - let vm = vm_from_owner(this.cast()); - vm.after_event_loop_callback = cb; - vm.after_event_loop_callback_ctx = ctx.map(|p| p.as_ptr()); - }, pipe_read_buffer() => { core::ptr::from_mut::<[u8]>(vm_from_owner(this.cast()).rare_data().pipe_read_buffer()) }, @@ -2827,7 +2811,10 @@ pub struct IPCInstance { pub group: *mut uws::SocketGroup, #[cfg(not(unix))] pub group: (), - pub data: crate::ipc::SendQueue, + /// Owning handle; `IpcRef::drop` (via `deinit` on the error path) tears + /// the socket down and releases the ref. In normal operation the instance + /// lives for the process. + pub data: crate::ipc::IpcRef, pub has_disconnect_called: bool, } @@ -2835,8 +2822,15 @@ impl IPCInstance { pub fn new(v: IPCInstance) -> *mut IPCInstance { bun_core::heap::into_raw(Box::new(v)) } - pub fn ipc(&mut self) -> Option<&mut crate::ipc::SendQueue> { - Some(&mut self.data) + /// Single audited `JsCell` projection (same discipline as + /// `Subprocess::ipc`). + /// + /// # Safety-adjacent note: single JS thread; callers must not hold the + /// borrow across re-entry that touches the same cell. + #[allow(clippy::mut_from_ref)] + pub fn queue(&self) -> &mut crate::ipc::SendQueue { + // SAFETY: see doc above (JsCell::get_mut contract). + unsafe { self.data.queue_mut() } } pub fn get_global_this(&self) -> Option<*mut JSGlobalObject> { Some(self.global_this) @@ -2848,6 +2842,8 @@ impl IPCInstance { /// not yet freed or aliased. pub unsafe fn deinit(this: *mut IPCInstance) { // SAFETY: caller contract — `this` is a live heap::alloc'd box. + // `IpcRef::drop` runs the owner teardown before releasing the ref + // (the `SendQueue.owner` backref targets `*this`, still live here). drop(unsafe { bun_core::heap::take(this) }); } @@ -4508,7 +4504,8 @@ impl VirtualMachine { // once on the same thread; `self` is the live per-thread VM. unsafe { (hooks.deinit_runtime_state)(std::ptr::from_mut(self), state) }; } - self.has_terminated = true; + self.has_terminated + .store(true, core::sync::atomic::Ordering::SeqCst); } /// Note: takes the concrete /// `bun_core::io::Writer` since every call site passes @@ -6453,54 +6450,48 @@ impl VirtualMachine { (*rare).spawn_ipc_group(&*this) }; - // Box the instance first so `data.owner` can name its final - // address. + // Box the instance first so the queue's `owner` backref can name + // its final address. let instance = IPCInstance::new(IPCInstance { global_this: self.global, group, - data: crate::ipc::SendQueue::init( + data: crate::ipc::IpcRef::new( mode, // Patched below once the box address is fixed. core::ptr::null_mut::() as *mut dyn crate::ipc::SendQueueOwner, - crate::ipc::SocketUnion::Uninitialized, ), has_disconnect_called: false, }); - // PROVENANCE: `from_fd` STORES the `*mut SendQueue` in the socket - // ext slot for the socket's lifetime, so that pointer must derive - // from the root raw `instance` (SharedReadWrite tag, never popped), - // NOT from a `&mut IPCInstance` reborrow whose Unique tag would be - // invalidated by later writes through `instance`. Per-use raw deref - // also avoids holding a live `&mut` across `deinit` on the failure - // branch. // SAFETY: `instance` was just boxed by `IPCInstance::new`. - unsafe { (*instance).data.owner = instance as *mut dyn crate::ipc::SendQueueOwner }; + unsafe { &(*instance).data } + .with_queue(|q| q.owner = instance as *mut dyn crate::ipc::SendQueueOwner); self.ipc = Some(IPCInstanceUnion::Initialized(instance)); - // SAFETY: `group` is the live per-VM SocketGroup; `instance.data` - // is the freshly-initialized SendQueue stored inline in `*instance`. - let socket = unsafe { - crate::ipc::Socket::from_fd::( - &mut *group, - uws::SocketKind::SpawnIpc, - fd, - core::ptr::addr_of_mut!((*instance).data), - true, - ) - }; + // Transfers a strong ref to the socket core (released at the + // terminal callback / `detach_owner`). + // SAFETY: `group` is the live per-VM SocketGroup; `instance` is + // the live boxed IPCInstance. + let socket = crate::ipc::Socket::from_fd_owned( + unsafe { &mut *group }, + uws::SocketKind::SpawnIpc, + fd, + unsafe { &(*instance).data }.dupe_ref(), + /*is_ipc=*/ true, + ); let Some(socket) = socket else { + self.ipc = None; // SAFETY: `instance` was produced by `IPCInstance::new` // (heap::alloc) above and is not yet aliased. unsafe { IPCInstance::deinit(instance) }; - self.ipc = None; bun_core::warn!("Unable to start IPC socket"); return None; }; socket.set_timeout(0); // SAFETY: `instance` is the live boxed IPCInstance. - unsafe { (*instance).data.socket = crate::ipc::SocketUnion::Open(socket) }; + unsafe { &(*instance).data } + .with_queue(|q| q.socket = crate::ipc::SocketUnion::Open(socket)); instance }; @@ -6510,41 +6501,33 @@ impl VirtualMachine { let instance = IPCInstance::new(IPCInstance { global_this: self.global, group: (), - data: crate::ipc::SendQueue::init( + data: crate::ipc::IpcRef::new( mode, // Patched below once the box address is fixed. core::ptr::null_mut::() as *mut dyn crate::ipc::SendQueueOwner, - crate::ipc::SocketUnion::Uninitialized, ), has_disconnect_called: false, }); - // Per-use raw deref — do NOT bind a `&mut IPCInstance` here: it - // would remain live across `deinit(instance)` on the failure - // branch (live `&mut T` to freed memory violates the validity - // invariant even if never dereferenced). // SAFETY: `instance` was just boxed by `IPCInstance::new`. - unsafe { (*instance).data.owner = instance as *mut dyn crate::ipc::SendQueueOwner }; + unsafe { &(*instance).data } + .with_queue(|q| q.owner = instance as *mut dyn crate::ipc::SendQueueOwner); self.ipc = Some(IPCInstanceUnion::Initialized(instance)); // PROVENANCE: `windows_configure_client` STORES the `*mut SendQueue` - // in `uv_handle_t.data` for the pipe's lifetime, so that pointer - // must derive from the root raw `instance` (SharedReadWrite tag, - // never popped), NOT from a `&mut SendQueue` auto-ref whose Unique - // tag would be invalidated by `(*instance).data.write_version_packet` - // below — every later libuv read callback would then deref a popped - // pointer (UB under Stacked Borrows). Mirror the POSIX branch's - // `addr_of_mut!` treatment. + // in `uv_handle_t.data` for the pipe's lifetime; `queue_ptr()` is + // the root-provenance projection through the heap `IpcData`'s + // `JsCell` (UnsafeCell) interior, never popped by later borrows. // SAFETY: `instance` is the live boxed IPCInstance. - let data_ptr = unsafe { core::ptr::addr_of_mut!((*instance).data) }; - // SAFETY: `data_ptr` points at the freshly-initialized SendQueue - // stored inline in `*instance`; no other live `&mut` aliases it. + let data_ptr = unsafe { &(*instance).data }.queue_ptr(); + // SAFETY: `data_ptr` points at the live SendQueue in the heap + // `IpcData`; no other live `&mut` aliases it. if let Err(_) = unsafe { crate::ipc::SendQueue::windows_configure_client(data_ptr, fd) } { + self.ipc = None; // SAFETY: `instance` was produced by `IPCInstance::new` // (heap::alloc) above and is not yet aliased. unsafe { IPCInstance::deinit(instance) }; - self.ipc = None; bun_core::output::warn(&format_args!("Unable to start IPC pipe '{:?}'", fd)); return None; } @@ -6553,7 +6536,7 @@ impl VirtualMachine { }; // SAFETY: `instance` is the live boxed IPCInstance. - unsafe { (*instance).data.write_version_packet(self.global()) }; + unsafe { &(*instance).data }.with_queue(|q| q.write_version_packet(self.global())); Some(instance) } diff --git a/src/jsc/bindings/bindings.cpp b/src/jsc/bindings/bindings.cpp index e694c218f38b..49f209bb14b8 100644 --- a/src/jsc/bindings/bindings.cpp +++ b/src/jsc/bindings/bindings.cpp @@ -103,7 +103,6 @@ #include #include #include -#include #include "IDLTypes.h" #include "JSDOMBinding.h" #include "JSDOMConstructor.h" diff --git a/src/jsc/error.rs b/src/jsc/error.rs index fde9f4b5b91e..e9d22f7f599d 100644 --- a/src/jsc/error.rs +++ b/src/jsc/error.rs @@ -159,9 +159,9 @@ impl From for Error { } } -impl From for Error { +impl From for Error { #[inline] - fn from(_: bun_uws::ConnectError) -> Self { + fn from(_: bun_uws_shim::ConnectError) -> Self { Self::FailedToOpenSocket } } diff --git a/src/jsc/event_loop.rs b/src/jsc/event_loop.rs index 2dc0652ae279..d4a10ec4ec5a 100644 --- a/src/jsc/event_loop.rs +++ b/src/jsc/event_loop.rs @@ -10,10 +10,10 @@ //! poll deadline). See PORTING.md §Dispatch. use core::ptr::NonNull; -use core::sync::atomic::{AtomicI32, AtomicPtr, Ordering}; +use core::sync::atomic::{AtomicBool, AtomicI32, AtomicPtr, AtomicU64, Ordering}; use bun_io::{self as Async, Waker}; -use bun_uws as uws; +use bun_usockets as uws; use crate::js_promise::Status as PromiseStatus; use crate::virtual_machine::VirtualMachine; @@ -77,7 +77,7 @@ pub struct EventLoop { pub waker: Option, // see `hold_forever_poll` #[cfg(windows)] - pub forever_timer: Option>, + pub forever_timer: Option>, #[cfg(not(windows))] pub holds_forever_poll: bool, pub deferred_tasks: DeferredTaskQueue::DeferredTaskQueue, @@ -89,6 +89,14 @@ pub struct EventLoop { pub entered_event_loop_count: isize, pub concurrent_ref: AtomicI32, + /// Rundown gate: set by worker shutdown right after the VM is unpublished. + /// Cross-thread producers that observe it back out without touching the + /// queues (the tasks are dropped — the VM will never tick again). + pub terminating: AtomicBool, + /// Count of in-flight cross-thread posts (`enqueue_task_concurrent`, + /// `ref_concurrently`, …). Worker shutdown spins this to 0 after setting + /// `terminating` so no producer still touches `*self` when the VM is freed. + pub external_posts: AtomicU64, /// Atomic nullable pointer to the next-due `WTFTimer`. /// /// Note (§Dispatch): payload is `*mut ()` — the real @@ -129,6 +137,8 @@ impl Default for EventLoop { uws_loop: (), entered_event_loop_count: 0, concurrent_ref: AtomicI32::new(0), + terminating: AtomicBool::new(false), + external_posts: AtomicU64::new(0), imminent_gc_timer: AtomicPtr::new(core::ptr::null_mut()), #[cfg(unix)] signal_handler: None, @@ -342,11 +352,13 @@ impl EventLoop { self.deferred_tasks.run(); vm.is_inside_deferred_task_queue.set(false); - // Guard on `event_loop_handle` being set, but drain via `uws_loop_mut()`: + // Guard on `event_loop_handle` being set, but drain via `uws_loop()`: // on Windows the uSockets loop (`uws::Loop::get()`) is NOT - // `event_loop_handle` (which is the libuv loop). + // `event_loop_handle` (which is the libuv loop). `*mut Loop`, never + // `&mut`: the flush can dispatch stream callbacks that re-derive + // loop borrows (C17). if vm.event_loop_handle.is_some() { - vm.uws_loop_mut().drain_quic_if_necessary(); + uws::Loop::drain_quic_if_necessary(vm.uws_loop()); } Ok(()) @@ -380,10 +392,9 @@ impl EventLoop { this_value: JSValue, arguments: &[JSValue], ) { - // A prior callback's microtasks can tear the worker down - // (worker.terminate()), leaving the termination exception pending; - // entering JS then trips executeCallImpl's `assertNoException`. Same - // gate as `tick_with_count()`; guarding here covers all 50+ callers. + // A prior callback's microtasks can tear the worker down, leaving the + // termination exception pending; entering JS trips assertNoException. + // Same gate as `tick_with_count()`; guarding here covers all callers. if global_object.has_exception() { return; } @@ -541,12 +552,14 @@ impl EventLoop { // Do NOT silently drop the swapped delta when the handle is // missing — refs queued via `ref_concurrently()` would be lost forever. let delta = self.concurrent_ref.swap(0, Ordering::SeqCst); - let loop_ = self - .vm_ref() - .platform_loop_opt() - .expect("event_loop_handle"); #[cfg(windows)] { + // Windows: `PlatformEventLoop` is the libuv loop; counters live + // in `uv_loop.active_handles` behind its own accessors. + let loop_ = self + .vm_ref() + .platform_loop_opt() + .expect("event_loop_handle"); if delta > 0 { loop_.add_active(u32::try_from(delta).expect("int cast")); } else { @@ -555,16 +568,13 @@ impl EventLoop { } #[cfg(not(windows))] { + // Raw-place twins: a `&mut Loop` would span `pending_wakeups`, + // which waker threads `fetch_add` concurrently. + let loop_ = self.vm_ref().event_loop_handle.expect("event_loop_handle"); if delta > 0 { - loop_.num_polls += delta; - loop_.active = loop_ - .active - .saturating_add(u32::try_from(delta).expect("int cast")); + uws::Loop::ref_count_raw(loop_, delta); } else { - loop_.num_polls -= -delta; - loop_.active = loop_ - .active - .saturating_sub(u32::try_from(-delta).expect("int cast")); + uws::Loop::unref_count_raw(loop_, -delta); } } } @@ -900,10 +910,8 @@ impl EventLoop { } } // Note: `EventLoopHandle` lives in `bun_event_loop` (lower tier), - // which cannot name `jsc::EventLoop`, so it stores `*mut ()`. The - // typed `set_parent_event_loop` extension trait in `bun_uws` expects - // a `ParentEventLoopHandle` impl, but `EventLoopHandle` already - // exposes `into_tag_ptr()` — go straight to the sys-level setter. + // which cannot name `jsc::EventLoop`, so it stores `*mut ()`; + // `into_tag_ptr()` erases to the `(tag, ptr)` pair the loop stores. // `self` is the live per-thread `jsc::EventLoop` (mut ref) — non-null. let self_ptr = core::ptr::from_mut(self).cast::<()>(); let (tag, ptr) = EventLoopHandle::init(self_ptr).into_tag_ptr(); @@ -957,22 +965,29 @@ impl EventLoop { } pub fn wakeup(&self) { + // Cross-thread callers (enqueue_task_concurrent, worker terminate) + // reach here while the loop thread may be parked inside a tick — + // use the raw `us_wakeup_loop(*mut Loop)`, never a `&mut Loop`. + // Liveness contract: the caller's `&self` must pin the VM. vm_lock + // readers (notify_need_termination) get that from the lock; pool + // producers must not outlive worker shutdown (unenforced today — + // a terminate racing an in-flight completion is a known gap). #[cfg(windows)] { if let Some(loop_) = self.uws_loop { - // SAFETY: uws_loop is a valid live uws::Loop handle - unsafe { (*loop_.as_ptr()).wakeup() }; + uws::us_wakeup_loop(loop_.as_ptr()); } return; } #[cfg(not(windows))] { - // Route through the single audited `platform_loop_opt()` accessor - // (set-once `Option<*mut>` deref) instead of open-coding the raw - // `(*event_loop_handle).wakeup()` here. Same `&mut Loop` is formed - // either way (autoref), so no soundness change vs the prior code. - if let Some(loop_) = self.vm_ref().platform_loop_opt() { - loop_.wakeup(); + let vm = self.virtual_machine.expect("virtual_machine").as_ptr(); + // SAFETY: same raw-place projection as `uv_loop` — no + // `&VirtualMachine` is formed; cross-thread callers race with a + // JS-thread `&mut VM` held across a tick. + let handle = unsafe { core::ptr::addr_of!((*vm).event_loop_handle).read() }; + if let Some(loop_) = handle { + uws::us_wakeup_loop(loop_); } } } @@ -982,23 +997,44 @@ impl EventLoop { /// freshly-allocated or struct-embedded task — never null. pub fn enqueue_task_concurrent(&self, task: core::ptr::NonNull) { if cfg!(debug_assertions) { - if self.vm_ref().has_terminated { + if self.vm_ref().has_terminated.load(Ordering::SeqCst) { panic!("EventLoop.enqueueTaskConcurrent: VM has terminated"); } } + self.external_posts.fetch_add(1, Ordering::SeqCst); + if self.terminating.load(Ordering::SeqCst) { + // Shutdown raced this post: the loop never ticks again, so free + // the node instead of queueing (payload release needs the JS + // thread — deliberately leaked for this terminate window). + // SAFETY: ownership was transferred to us; never linked anywhere. + if unsafe { task.as_ref() }.auto_delete() { + drop(unsafe { bun_core::heap::take(task.as_ptr()) }); + } + self.external_posts.fetch_sub(1, Ordering::SeqCst); + return; + } self.concurrent_tasks.push(task); self.wakeup(); + self.external_posts.fetch_sub(1, Ordering::SeqCst); } pub fn ref_concurrently(&self) { - let _ = self.concurrent_ref.fetch_add(1, Ordering::SeqCst); - self.wakeup(); + self.external_posts.fetch_add(1, Ordering::SeqCst); + if !self.terminating.load(Ordering::SeqCst) { + let _ = self.concurrent_ref.fetch_add(1, Ordering::SeqCst); + self.wakeup(); + } + self.external_posts.fetch_sub(1, Ordering::SeqCst); } pub fn unref_concurrently(&self) { // TODO maybe this should be AcquireRelease - let _ = self.concurrent_ref.fetch_sub(1, Ordering::SeqCst); - self.wakeup(); + self.external_posts.fetch_add(1, Ordering::SeqCst); + if !self.terminating.load(Ordering::SeqCst) { + let _ = self.concurrent_ref.fetch_sub(1, Ordering::SeqCst); + self.wakeup(); + } + self.external_posts.fetch_sub(1, Ordering::SeqCst); } // ──────────── private helpers ──────────── @@ -1047,6 +1083,17 @@ impl EventLoop { /// `done` must point to a live `bool`; C++ writes `true` through it from a /// callback inside `tick()`, so it cannot be a Rust `&mut` (would alias). pub unsafe fn tick_while_paused(&mut self, done: *const bool) { + #[cfg(not(windows))] + { + // The tick takes `*mut Loop` (re-entrant callbacks re-fetch the + // same loop); no `&mut Loop` is held across it. + let loop_ = self.vm_ref().event_loop_handle.expect("event_loop_handle"); + // SAFETY: see fn contract — `done` is a live FFI bool written by C++. + while !unsafe { done.read_volatile() } { + uws::Loop::tick(loop_); + } + } + #[cfg(windows)] // SAFETY: see fn contract — `done` is a live FFI bool written by C++. while !unsafe { done.read_volatile() } { self.vm_ref() @@ -1074,48 +1121,44 @@ impl EventLoop { /// Keep one poll registered with the loop so `us_loop_run_bun_tick` parks /// instead of returning immediately on `num_polls == 0`. #[cfg(not(windows))] - fn hold_forever_poll(&mut self, loop_: &mut uws::Loop) { + fn hold_forever_poll(&mut self, loop_: *mut uws::Loop) { if !self.holds_forever_poll { - loop_.inc(); + uws::Loop::inc_raw(loop_); self.holds_forever_poll = true; } } #[cfg(windows)] - fn hold_forever_poll(&mut self, loop_: &mut uws::Loop) { + fn hold_forever_poll(&mut self, loop_: *mut uws::Loop) { if self.forever_timer.is_none() { - let mut t = uws::Timer::create( - loop_, - std::ptr::from_mut::(self).cast::(), + let t = uws::backend::libuv::Timer::create(loop_, false, 0); + uws::backend::libuv::Timer::set( + t, + Some(noop_forever_timer), + 1000 * 60 * 4, + 1000 * 60 * 4, ); - // SAFETY: t is a fresh non-null timer handle - unsafe { - t.as_mut().set( - std::ptr::from_mut::(self).cast::(), - Some(noop_forever_timer), - 1000 * 60 * 4, - 1000 * 60 * 4, - ) - }; - self.forever_timer = Some(t); + self.forever_timer = NonNull::new(t); } } pub fn tick_possibly_forever(&mut self) { let loop_ptr = self.usockets_loop(); - // SAFETY: usockets_loop() returns a live uws loop for the VM lifetime. - let loop_ = unsafe { &mut *loop_ptr }; #[cfg(unix)] { let pending_unref = self.vm_ref().take_pending_unref(); if pending_unref > 0 { - loop_.unref_count(pending_unref); + // Raw-place twin — a `&mut Loop` would span `pending_wakeups`, + // which waker threads mutate concurrently. + uws::Loop::unref_count_raw(loop_ptr, pending_unref); } } - if !loop_.is_active() { - self.hold_forever_poll(loop_); + // SAFETY: usockets_loop() returns a live uws loop for the VM lifetime; + // short-lived shared borrow of loop-thread-owned counters. + if !unsafe { (*loop_ptr).is_active() } { + self.hold_forever_poll(loop_ptr); } self.process_gc_timer(); @@ -1123,9 +1166,8 @@ impl EventLoop { // `tick()` below can start work (e.g. a --hot reload) whose only wake // source is a cross-thread `wakeup()`; bound the park, same as the GC // timerfd used to. libuv's `tick_with_timeout` ignores the argument. - loop_.tick_with_timeout(Some(&bun_core::Timespec { sec: 1, nsec: 0 })); + uws::Loop::tick_with_timeout(loop_ptr, Some(&bun_core::Timespec { sec: 1, nsec: 0 })); - self.vm_ref().as_mut().on_after_event_loop(); self.tick_concurrent(); self.tick(); } @@ -1166,7 +1208,7 @@ impl EventLoop { batch: bun_threading::unbounded_queue::Batch, ) { if cfg!(debug_assertions) { - if self.vm_ref().has_terminated { + if self.vm_ref().has_terminated.load(Ordering::SeqCst) { panic!("EventLoop.enqueueTaskConcurrent: VM has terminated"); } } @@ -1176,6 +1218,25 @@ impl EventLoop { !batch.front.is_null() && !batch.last.is_null(), "enqueue_task_concurrent_batch: empty batch", ); + self.external_posts.fetch_add(1, Ordering::SeqCst); + if self.terminating.load(Ordering::SeqCst) { + // Same rundown rule as `enqueue_task_concurrent`: free the nodes, + // never touch the queue of a VM that is being torn down. + let mut iter = bun_threading::unbounded_queue::BatchIterator { batch }; + loop { + let node = iter.next(); + if node.is_null() { + break; + } + // SAFETY: batch nodes are live and owned by us; the iterator + // already advanced past `node`, so freeing it is sound. + if unsafe { (*node).auto_delete() } { + drop(unsafe { bun_core::heap::take(node) }); + } + } + self.external_posts.fetch_sub(1, Ordering::SeqCst); + return; + } // SAFETY: asserted non-null above; `batch` was produced by `pop_batch`, // so `last` is reachable from `front` and every node is live. unsafe { @@ -1185,6 +1246,7 @@ impl EventLoop { ) }; self.wakeup(); + self.external_posts.fetch_sub(1, Ordering::SeqCst); } } @@ -1222,7 +1284,7 @@ pub fn get_active_tasks(global_object: &JSGlobalObject, _frame: &CallFrame) -> J } #[cfg(windows)] -extern "C" fn noop_forever_timer(_: *mut uws::Timer) { +extern "C" fn noop_forever_timer(_: *mut uws::backend::libuv::Timer) { // do nothing } @@ -1318,23 +1380,6 @@ bun_event_loop::link_impl_JsEventLoop! { .get_or_insert_with(|| Box::new(Async::file_poll::Store::init())) .as_mut(), ), - put_file_poll(poll, was_ever_registered) => { - // `Store::put` only needs the VM as an opaque `EventLoopCtx`; reach it - // via the JS-ctx hook so we don't form a competing `&mut VirtualMachine` - // while holding the store. - let store = core::ptr::from_mut( - (*this) - .vm_ref() - .as_mut() - .rare_data() - .file_polls_ - .get_or_insert_with(|| Box::new(Async::file_poll::Store::init())) - .as_mut(), - ); - let ctx = Async::posix_event_loop::get_vm_ctx(Async::AllocatorType::Js); - // `poll` is a live hive-slot pointer (vtable contract) — non-null. - (*store).put(core::ptr::NonNull::new_unchecked(poll), ctx, was_ever_registered); - }, uws_loop() => (*this).usockets_loop(), pipe_read_buffer() => core::ptr::from_mut::<[u8]>((*this).pipe_read_buffer()), tick() => (*this).tick(), diff --git a/src/jsc/ipc.rs b/src/jsc/ipc.rs index b2fe7e561ef5..db940a055844 100644 --- a/src/jsc/ipc.rs +++ b/src/jsc/ipc.rs @@ -1,4 +1,4 @@ -use core::ffi::{c_int, c_void}; +use core::ffi::c_void; use core::mem::size_of; use crate as jsc; @@ -20,7 +20,7 @@ use bun_sys::ReturnCodeExt as _; use bun_sys::windows::libuv as uv; #[cfg(windows)] use bun_sys::windows::libuv::{UvHandle as _, UvStream as _}; -use bun_uws; +use bun_usockets; // `bun.cpp.*` — generated C++ dispatch shims for IPC handle (de)serialization // (`IPCSerialize` / `IPCParse`) are declared once in `crate::cpp` and called @@ -34,8 +34,9 @@ use bun_uws; // (tier-6), so the concrete type cannot be named here. Instead of a hand- // rolled fn-pointer table, the owner is stored as a raw `*mut dyn` trait // object: `IPCInstance` (this crate) and `Subprocess` (`bun_runtime`) both -// impl [`SendQueueOwner`], and the SendQueue is embedded inline in each, so -// the pointer is a BACKREF (cleared before the owner drops). +// impl [`SendQueueOwner`]; each holds an `IpcRef` to the heap `IpcData` owning +// the SendQueue, and the pointer is a BACKREF kept valid by `IpcRef::drop`'s +// teardown ordering (socket detach + task cancellation before the owner frees). // // The JS host fns that need the concrete `Subprocess` / `Listener` types // (`do_send`, `emit_handle_ipc_message`, `Bun__Process__send`) live in @@ -662,9 +663,191 @@ pub fn get_nack_packet(mode: Mode) -> &'static [u8] { } } -// `bun_uws::SocketHandler` is an alias for `NewSocketHandler` -// (uws_sys/socket.rs); `` is the non-SSL handler. -pub type Socket = bun_uws::SocketHandler; +// `bun_usockets::SocketHandler` is an alias for `NewSocketHandler`; +// `` is the non-SSL handler. +pub type Socket = bun_usockets::SocketHandler; + +/// Protocol v2 owner for `SocketKind::SpawnIpc` (Protocol v2 — src/usockets/docs/design.md): a +/// refcounted heap cell owning the [`SendQueue`]. Refs: the embedder +/// (`Subprocess` / `IPCInstance`) holds one, released after +/// [`IpcData::owner_teardown`]; the socket core holds one from +/// `from_fd_owned` until the terminal callback (or `detach_owner`). +#[derive(bun_ptr::RefCounted)] +pub struct IpcData { + ref_count: bun_ptr::RefCount, + q: crate::JsCell, +} + +/// Owning handle to an [`IpcData`]: the embedder's single strong ref. +/// `Drop` runs [`IpcData::owner_teardown`] and then releases the ref, so +/// every embedder drop path (finalizer, spawn error paths, struct drop) +/// tears the socket down before the `SendQueue.owner` backref dangles. +pub struct IpcRef(bun_ptr::RefPtr); + +impl IpcRef { + pub fn new(mode: Mode, owner: *mut dyn SendQueueOwner) -> IpcRef { + let this = IpcRef(bun_ptr::RefPtr::new(IpcData { + ref_count: bun_ptr::RefCount::init(), + q: crate::JsCell::new(SendQueue::init(mode, owner, SocketUnion::Uninitialized)), + })); + // Stamp the root-provenance self pointer for queued-task capture + // (see `SendQueue.cell_root` doc). + let root = this.queue_ptr(); + this.with_queue(|q| q.cell_root = root); + this + } + + /// A new strong ref (for transfer to the socket core at adoption). + pub fn dupe_ref(&self) -> bun_ptr::RefPtr { + self.0.dupe_ref() + } +} + +impl core::ops::Deref for IpcRef { + type Target = IpcData; + fn deref(&self) -> &IpcData { + self.0.data() + } +} + +impl Drop for IpcRef { + fn drop(&mut self) { + self.0.owner_teardown(); + // Inherent `RefPtr::deref` (refcount release), not `Deref::deref`. + self.0.deref(); + } +} + +impl IpcData { + /// Shared read of the queue (e.g. `close_event_sent` / `is_connected`). + #[inline] + pub fn queue(&self) -> &SendQueue { + self.q.get() + } + + /// Closure-scoped mutable access (the safe `JsCell` spelling). + #[inline] + pub fn with_queue(&self, f: impl FnOnce(&mut SendQueue) -> R) -> R { + self.q.with_mut(f) + } + + /// Single audited `JsCell` projection for the paths (host fns, protocol + /// handlers) that hold the borrow across JS re-entry — the pre-migration + /// inline-storage aliasing discipline, deliberately kept `unsafe`. + /// + /// # Safety + /// Single JS thread; caller must not hold another live `&mut SendQueue` + /// obtained from this cell across this borrow's uses. + #[allow(clippy::mut_from_ref)] + #[inline] + pub unsafe fn queue_mut(&self) -> &mut SendQueue { + // SAFETY: forwarded to caller (JsCell::get_mut contract). + unsafe { self.q.get_mut() } + } + + /// Root-provenance raw pointer to the queue (Windows `uv_handle_t.data`). + #[inline] + pub fn queue_ptr(&self) -> *mut SendQueue { + self.q.as_ptr() + } + + /// Owner-side teardown: close the socket (detaching dispatch), close any + /// unconsumed SCM_RIGHTS fd, cancel queued tasks pointing back into this + /// cell. The embedder MUST call this before releasing its ref — the + /// `SendQueue.owner` backref becomes dangling once the embedder is freed. + pub fn owner_teardown(&self) { + self.q.with_mut(|q| q.teardown()); + } +} + +/// Protocol v2 registration tag for [`SocketKind::SpawnIpc`]; the same owner +/// type serves the parent side (`Bun.spawn({ipc})`) and the child side +/// (`process.send`). +pub struct SpawnIpcProtocol; + +impl bun_usockets::Protocol for SpawnIpcProtocol { + type Owner = IpcData; + const KIND: bun_usockets::SocketKind = bun_usockets::SocketKind::SpawnIpc; + + fn on_open(_o: &IpcData, _s: bun_usockets::AnySocket, _is_client: bool, _ip: &[u8]) { + log!("onOpen"); + // The adopter writes the version packet itself (covered by the + // `has_written_version` assertion); nothing to do at open. + } + + fn on_data(o: &IpcData, _s: bun_usockets::AnySocket, data: &mut [u8]) { + // SAFETY: this borrow spans user-JS dispatch, which may re-enter the + // cell (`Subprocess::ipc`/`IPCInstance::queue`, nested `on_close` via + // close_all) — audited `queue_mut`; safe `with_mut` forbids re-entry. + let q = unsafe { o.queue_mut() }; + let global_this = q.get_global_this(); + // RAII: `enter()` now, `exit()` on drop. + let _scope = global_this.bun_vm().enter_event_loop_scope(); + on_data2(q, data); + } + + fn on_fd(o: &IpcData, _s: bun_usockets::AnySocket, fd: Fd) { + log!("onFd: {:?}", fd); + // SAFETY: fires on the same readable dispatch as `on_data`, so it can + // nest under a live borrow — same audited `queue_mut` discipline. + let q = unsafe { o.queue_mut() }; + if let Some(existing_fd) = q.incoming_fd.take() { + log!("onFd: incoming_fd already set; overwriting"); + FdExt::close(existing_fd); + } + q.incoming_fd = Some(fd); + } + + fn on_writable(o: &IpcData, _s: bun_usockets::AnySocket) { + log!("onWritable"); + // SAFETY: `continue_send` completes messages and can cross into + // paths that re-project this cell; same audited `queue_mut` + // discipline as `on_data`. + let q = unsafe { o.queue_mut() }; + let global_this = q.get_global_this(); + // RAII: see `on_data`. + let _scope = global_this.bun_vm().enter_event_loop_scope(); + log!("IPC call continueSend() from onWritable"); + q.continue_send(&global_this, ContinueSendReason::OnWritable); + } + + fn on_close( + o: &IpcData, + _s: bun_usockets::AnySocket, + _code: bun_usockets::CloseCode2, + _errno: i32, + ) { + // uSockets has already freed the underlying socket. + log!("SpawnIpcProtocol#onClose"); + // SAFETY: can run nested under a live `on_data`/`on_writable` borrow + // (user JS triggering group close_all), so it must use the audited + // `queue_mut` projection, not safe `with_mut`. + unsafe { o.queue_mut() }._socket_closed(); + } + + fn on_end(o: &IpcData, _s: bun_usockets::AnySocket) { + log!("onEnd"); + // No half-close: a peer FIN closes the socket outright. + // SAFETY: can run nested under a live `on_data`/`on_writable` borrow + // (peer FIN surfacing while user JS pumps the event loop), so it must + // use the audited `queue_mut` projection, not safe `with_mut`. + unsafe { o.queue_mut() }.close_socket(CloseReason::Failure, CloseFrom::User); + } + + fn on_timeout(_o: &IpcData, _s: bun_usockets::AnySocket) { + log!("onTimeout"); + } + + fn on_long_timeout(_o: &IpcData, _s: bun_usockets::AnySocket) { + log!("onLongTimeout"); + } + + fn on_connect_error(o: &IpcData, _err: bun_usockets::ConnectFailure) { + log!("onConnectError"); + // SAFETY: same audited `queue_mut` discipline as `on_close`/`on_end`. + unsafe { o.queue_mut() }.close_socket(CloseReason::Failure, CloseFrom::User); + } +} pub struct Handle { pub fd: Fd, @@ -748,7 +931,8 @@ pub struct SendHandle { // when a message has a handle, make sure it has a new SendHandle - so that if we retry sending it, // we only retry sending the message with the handle, not the original message. pub data: StreamBuffer, - /// keep sending the handle until data is drained (assume it hasn't sent until data is fully drained) + /// fd is attached only to the message's first write (cursor == 0); the + /// Handle is retained afterwards for NACK retransmission from cursor 0. pub handle: Option, pub callbacks: CallbackList, } @@ -839,18 +1023,19 @@ pub struct SendQueue { pub incoming_fd: Option, pub socket: SocketUnion, - /// BACKREF to the embedding owner (`Subprocess` or `IPCInstance`). The - /// SendQueue is stored inline in its owner, so this is a self-referential - /// raw pointer; never reborrow as `&mut dyn` while a `&mut SendQueue` is - /// live (every access goes through `unsafe { &mut *self.owner }` at the - /// call site). + /// BACKREF to the embedding owner (`Subprocess` or `IPCInstance`), kept + /// valid by `IpcRef::drop` running `owner_teardown` (socket detach + task + /// cancellation) before the embedder frees. Deref per use; never stored as `&mut dyn`. pub owner: *mut dyn SendQueueOwner, + /// Root-provenance pointer to this queue's `JsCell` interior (set once in + /// `IpcRef::new`). Queued `ManagedTask`s capture THIS, not `from_mut(self)`, + /// whose `&mut`-derived tag later cell projections would pop. + cell_root: *mut SendQueue, pub close_next_tick: Option, /// Set while an `_onAfterIPCClosed` task is queued. Cleared when the task - /// runs. Tracked so `deinit` can cancel it; the task captures a raw - /// `*SendQueue` into the owner's inline storage, which is freed right - /// after `deinit` returns. + /// runs. Tracked so `teardown` can cancel it before the heap `IpcData`'s + /// last ref (and the `owner` backref target) goes away. pub after_close_task: Option, pub write_in_progress: bool, pub close_event_sent: bool, @@ -891,16 +1076,13 @@ pub enum SocketUnion { impl SendQueue { /// Safe `&dyn SendQueueOwner` accessor — wraps the per-use raw deref + /// autoref for `&self`-taking trait methods (`kind`, `this_jsvalue`, - /// `global_this`). The owner embeds this - /// `SendQueue` inline, so the formed `&Owner` overlaps `self` — but the - /// caller already holds at most `&SendQueue` here (shared/shared), so - /// there is no exclusive alias. NOT for `handle_ipc_*` (those take - /// `&mut dyn`; see field doc). + /// `global_this`). NOT for `handle_ipc_*` (those take `&mut dyn`; see + /// field doc). #[inline] fn owner_ref(&self) -> &dyn SendQueueOwner { - // SAFETY: BACKREF — owner embeds this SendQueue inline and outlives it; - // `owner` is set in `init()` / by the embedder before first use and - // never null afterward. + // SAFETY: BACKREF — set by the embedder before first use, live here + // because `IpcRef::drop` tears this queue down (socket detach + task + // cancellation) before the embedder frees (see `owner` field doc). unsafe { &*self.owner } } @@ -919,6 +1101,7 @@ impl SendQueue { incoming_fd: None, socket, owner, + cell_root: core::ptr::null_mut(), close_next_tick: None, after_close_task: None, write_in_progress: false, @@ -963,9 +1146,13 @@ impl SendQueue { } #[cfg(not(windows))] { + // Detach the core-held owner ref first: the close below + // dispatches `on_close` synchronously and this path + // notifies via `_socket_closed` itself (C17). + s.detach_owner(); s.close(match reason { - CloseReason::Normal => bun_uws::CloseCode::Normal, - CloseReason::Failure => bun_uws::CloseCode::Failure, + CloseReason::Normal => bun_usockets::CloseCode::Normal, + CloseReason::Failure => bun_usockets::CloseCode::Failure, }); self._socket_closed(); } @@ -1001,7 +1188,8 @@ impl SendQueue { if was_open && self.after_close_task.is_none() { // Note: `bun_event_loop::JsResult` erases the error to `*mut ()`; // adapt the jsc-crate `JsResult` via a non-capturing closure (coerces to fn ptr). - let task = ManagedTask::new(std::ptr::from_mut::(self), |p| { + debug_assert!(!self.cell_root.is_null()); + let task = ManagedTask::new(self.cell_root, |p| { let _ = Self::_on_after_ipc_closed(p); Ok(()) }); @@ -1056,7 +1244,8 @@ impl SendQueue { return; } // Note: see `_socket_closed` — adapt `bun_event_loop::JsResult` via closure. - let task = ManagedTask::new(std::ptr::from_mut::(self), |p| { + debug_assert!(!self.cell_root.is_null()); + let task = ManagedTask::new(self.cell_root, |p| { let _ = Self::_close_socket_task(p); Ok(()) }); @@ -1069,8 +1258,8 @@ impl SendQueue { } fn _close_socket_task(this: *mut SendQueue) -> JsResult<()> { - // SAFETY: `this` was the live `*mut SendQueue` passed to ManagedTask::new; - // the task is cancelled in Drop before the storage is freed. + // SAFETY: `this` is the root-provenance `cell_root` captured at + // enqueue; `teardown` cancels the task before the storage is freed. let this = unsafe { &mut *this }; log!("SendQueue#closeSocketTask"); debug_assert!(this.close_next_tick.is_some()); @@ -1088,7 +1277,8 @@ impl SendQueue { return Ok(()); } this.close_event_sent = true; - // SAFETY: BACKREF — owner embeds this SendQueue inline and outlives it. + // SAFETY: BACKREF — live because `owner_teardown` cancels this task + // before the embedder frees (see `owner` field doc). unsafe { (*this.owner).handle_ipc_close() }; Ok(()) } @@ -1193,6 +1383,9 @@ impl SendQueue { } // consume the message and continue sending let item = self.waiting_for_ack.take().unwrap(); + // Node parity: the retransmission counter is per pending handle + // message, so the next handle send starts fresh. + self.retry_count = 0; item.complete(global); // call the callback & deinit log!("IPC call continueSend() from onAckNack success"); self.continue_send(global, ContinueSendReason::NewMessageAppended); @@ -1273,7 +1466,14 @@ impl SendQueue { } debug_assert!(!self.write_in_progress); self.write_in_progress = true; - let fd = self.queue[0].handle.as_ref().map(|h| h.fd); + // SCM_RIGHTS rides the first byte of the message (POSIX sendmsg): once + // any bytes are out (cursor > 0) the fd was already delivered, so a + // partial-write continuation must be data-only (libuv does the same). + let fd = if self.queue[0].data.cursor == 0 { + self.queue[0].handle.as_ref().map(|h| h.fd) + } else { + None + }; // `_write` re-slices `self.queue[0]` internally so we never hand a // borrow of `self` into a `&mut self` method (PORTING.md aliased-&mut). self._write(fd); @@ -1314,7 +1514,8 @@ impl SendQueue { return; } else if n > 0 && n < i32::try_from(first.data.list.len()).expect("int cast") { // the item was partially sent; update the cursor and wait for writable to send the rest - // (if we tried to send a handle, a partial write means the handle wasn't sent yet.) + // (for a handle message the fd went out with those first bytes; + // continue_send skips the fd once cursor > 0.) first.data.cursor += usize::try_from(n).expect("int cast"); self.update_ref(&global_this); return; @@ -1561,10 +1762,10 @@ impl SendQueue { } fn get_global_this(&self) -> crate::GlobalRef { // Note: lifetime detached from `&self` so callers can hold the - // global across `&mut self` borrows. The owner (Subprocess / IPCInstance) - // outlives this SendQueue and the JSGlobalObject is heap-allocated by - // JSC for the VM's lifetime. `opaque_ref` is the safe ZST-handle deref - // (panics on null) — see `bun_opaque::opaque_deref`. + // global across `&mut self` borrows. The owner backref is live for + // every dispatch (teardown ordering; see `owner` field doc) and the + // JSGlobalObject is heap-allocated by JSC for the VM's lifetime. + // `opaque_ref` is the safe ZST-handle deref (panics on null). crate::GlobalRef::from(JSGlobalObject::opaque_ref(self.owner_ref().global_this())) } @@ -1704,8 +1905,11 @@ impl uv::StreamReader for SendQueue { } } -impl Drop for SendQueue { - fn drop(&mut self) { +impl SendQueue { + /// Full owner-side teardown; idempotent. Runs from `Drop` and from + /// [`IpcData::owner_teardown`] (which the embedder calls before releasing + /// its ref, while the `owner` backref target is still alive). + fn teardown(&mut self) { log!("SendQueue#deinit"); // must go first self.close_socket(CloseReason::Failure, CloseFrom::Deinit); @@ -1719,7 +1923,7 @@ impl Drop for SendQueue { } // if there is a close next tick task, cancel it so it doesn't get called and then UAF - if let Some(close_next_tick_task) = self.close_next_tick { + if let Some(close_next_tick_task) = self.close_next_tick.take() { // SAFETY: the task was created via `ManagedTask::new` (tag == // ManagedTask) and `Task.ptr` is the heap-allocated ManagedTask. let managed: &mut ManagedTask = @@ -1730,16 +1934,21 @@ impl Drop for SendQueue { // just enqueued this (VM-shutdown path with the socket still open), // or it may be left over from an earlier `_socketClosed` that hasn't // drained yet; either way the owner is about to free our storage. - if let Some(after_close_task) = self.after_close_task { + if let Some(after_close_task) = self.after_close_task.take() { // SAFETY: see above. let managed: &mut ManagedTask = unsafe { &mut *(after_close_task.ptr.cast::()) }; managed.cancel(); - self.after_close_task = None; } } } +impl Drop for SendQueue { + fn drop(&mut self) { + self.teardown(); + } +} + const MAX_HANDLE_RETRANSMISSIONS: u32 = 3; enum IPCCommand { @@ -1876,11 +2085,57 @@ fn handle_ipc_message( } } } else { - // SAFETY: BACKREF — owner embeds this SendQueue inline and outlives it. + // SAFETY: BACKREF — live during dispatch; `IpcRef::drop` detaches the + // socket before the embedder frees (see `owner` field doc). unsafe { (*send_queue.owner).handle_ipc_message(message, JSValue::UNDEFINED) }; } } +/// Drain complete newline-delimited JSON messages from `send_queue.incoming` +/// (must be `IncomingBuffer::Json`). Re-derives the buffer each iteration — +/// `handle_ipc_message` runs JS that can mutate `send_queue`. +fn drain_json_messages(send_queue: &mut SendQueue, global_this: &JSGlobalObject) { + loop { + let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { + unreachable!() + }; + if json_buf.overflowed() { + Output::print_errorln("IPC message is too long."); + send_queue.close_socket(CloseReason::Failure, CloseFrom::User); + return; + } + let Some(msg) = json_buf.next() else { return }; + let result = + match decode_ipc_message(Mode::Json, msg.data, global_this, Some(msg.newline_pos)) { + Ok(r) => r, + Err(IPCDecodeError::NotEnoughBytes) => { + log!("hit NotEnoughBytes"); + return; + } + Err( + IPCDecodeError::InvalidFormat + | IPCDecodeError::JSError + | IPCDecodeError::JSTerminated, + ) => { + send_queue.close_socket(CloseReason::Failure, CloseFrom::User); + return; + } + Err(IPCDecodeError::OutOfMemory) => { + Output::print_errorln("IPC message is too long."); + send_queue.close_socket(CloseReason::Failure, CloseFrom::User); + return; + } + }; + + let bytes_consumed = result.bytes_consumed; + handle_ipc_message(send_queue, result.message, global_this); + let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { + unreachable!() + }; + json_buf.consume(bytes_consumed); + } +} + fn on_data2(send_queue: &mut SendQueue, all_data: &[u8]) { let mut data = all_data; @@ -1895,50 +2150,12 @@ fn on_data2(send_queue: &mut SendQueue, all_data: &[u8]) { match &mut send_queue.incoming { IncomingBuffer::Json(_) => { // JSON mode: append to buffer (scans only new data for newline), - // then process complete messages using next(). + // then process complete messages. let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { unreachable!() }; json_buf.append(data); - - loop { - let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { - unreachable!() - }; - let Some(msg) = json_buf.next() else { break }; - let result = match decode_ipc_message( - Mode::Json, - msg.data, - &global_this, - Some(msg.newline_pos), - ) { - Ok(r) => r, - Err(IPCDecodeError::NotEnoughBytes) => { - log!("hit NotEnoughBytes"); - return; - } - Err( - IPCDecodeError::InvalidFormat - | IPCDecodeError::JSError - | IPCDecodeError::JSTerminated, - ) => { - send_queue.close_socket(CloseReason::Failure, CloseFrom::User); - return; - } - Err(IPCDecodeError::OutOfMemory) => { - Output::print_errorln("IPC message is too long."); - send_queue.close_socket(CloseReason::Failure, CloseFrom::User); - return; - } - }; - - let bytes_consumed = result.bytes_consumed; - handle_ipc_message(send_queue, result.message, &global_this); - let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { - unreachable!() - }; - json_buf.consume(bytes_consumed); - } + drain_json_messages(send_queue, &global_this); } IncomingBuffer::Advanced(_) => { // Advanced mode: uses length-prefix, no newline scanning needed. @@ -2035,90 +2252,11 @@ fn on_data2(send_queue: &mut SendQueue, all_data: &[u8]) { } } -/// Used on POSIX +// POSIX socket events are the `Protocol for SpawnIpcProtocol` impl above. #[allow(non_snake_case)] pub mod IPCHandlers { use super::*; - pub mod PosixSocket { - use super::*; - - pub fn on_open(_: *mut c_void, _: Socket) { - log!("onOpen"); - // it is NOT safe to use the first argument here because it has not been initialized yet. - // ideally we would call .ipc.writeVersionPacket() here, and we need that to handle the - // theoretical write failure, but since the .ipc.outgoing buffer isn't available, that - // data has nowhere to go. - // - // therefore, initializers of IPC handlers need to call .ipc.writeVersionPacket() themselves - // this is covered by an assertion. - } - - pub fn on_close(send_queue: &mut SendQueue, _: Socket, _: c_int, _: Option<*mut c_void>) { - // uSockets has already freed the underlying socket - log!("NewSocketIPCHandler#onClose\n"); - send_queue._socket_closed(); - } - - pub fn on_data(send_queue: &mut SendQueue, _: Socket, all_data: &[u8]) { - let global_this = send_queue.get_global_this(); - // RAII: `enter()` now, `exit()` on drop. The guard holds the raw - // `*mut EventLoop` so `&mut EventLoop` isn't held across `on_data2`. - let _scope = global_this.bun_vm().enter_event_loop_scope(); - on_data2(send_queue, all_data); - } - - pub fn on_fd(send_queue: &mut SendQueue, _: Socket, fd: c_int) { - // SCM_RIGHTS is POSIX-only; on Windows this arm is unreachable but - // still type-checked, and `FD.fromNative` takes `*anyopaque` there. - #[cfg(windows)] - { - let _ = (send_queue, fd); - return; - } - #[cfg(not(windows))] - { - log!("onFd: {}", fd); - if let Some(existing_fd) = send_queue.incoming_fd.take() { - log!("onFd: incoming_fd already set; overwriting"); - FdExt::close(existing_fd); - } - send_queue.incoming_fd = Some(Fd::from_native(fd)); - } - } - - pub fn on_writable(send_queue: &mut SendQueue, _: Socket) { - log!("onWritable"); - - let global_this = send_queue.get_global_this(); - // RAII: see `on_data`. - let _scope = global_this.bun_vm().enter_event_loop_scope(); - log!("IPC call continueSend() from onWritable"); - send_queue.continue_send(&global_this, ContinueSendReason::OnWritable); - } - - pub fn on_timeout(_: &mut SendQueue, _: Socket) { - log!("onTimeout"); - // unref if needed - } - - pub fn on_long_timeout(_: &mut SendQueue, _: Socket) { - log!("onLongTimeout"); - // onLongTimeout - } - - pub fn on_connect_error(send_queue: &mut SendQueue, _: Socket, _: c_int) { - log!("onConnectError"); - // context has not been initialized - send_queue.close_socket(CloseReason::Failure, CloseFrom::User); - } - - pub fn on_end(send_queue: &mut SendQueue, _: Socket) { - log!("onEnd"); - send_queue.close_socket(CloseReason::Failure, CloseFrom::User); - } - } - pub mod WindowsNamedPipe { use super::*; @@ -2158,57 +2296,15 @@ pub mod IPCHandlers { match &mut send_queue.incoming { IncomingBuffer::Json(_) => { - // For JSON mode on Windows, use notifyWritten to update length and scan for newlines let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { unreachable!() }; debug_assert!(json_buf.data.len() + nread <= json_buf.data.capacity()); - // libuv wrote `nread` bytes at `data[old_len..]` via the - // slice returned from `on_read_alloc`. Only the *count* - // is forwarded — re-deriving a `&[u8]` over that region - // and handing it to a `&mut self` method would alias - // `json_buf.data`, undoing the Stacked-Borrows fix above. + // Only the *count* is forwarded — re-deriving a `&[u8]` over + // libuv's write region and handing it to a `&mut self` method + // would alias `json_buf.data` (Stacked Borrows, see above). json_buf.notify_written(nread); - - // Process complete messages using next() - avoids O(n²) re-scanning - loop { - let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { - unreachable!() - }; - let Some(msg) = json_buf.next() else { break }; - let result = match decode_ipc_message( - Mode::Json, - msg.data, - &global_this, - Some(msg.newline_pos), - ) { - Ok(r) => r, - Err(IPCDecodeError::NotEnoughBytes) => { - log!("hit NotEnoughBytes3"); - return; - } - Err( - IPCDecodeError::InvalidFormat - | IPCDecodeError::JSError - | IPCDecodeError::JSTerminated, - ) => { - send_queue.close_socket(CloseReason::Failure, CloseFrom::User); - return; - } - Err(IPCDecodeError::OutOfMemory) => { - Output::print_errorln("IPC message is too long."); - send_queue.close_socket(CloseReason::Failure, CloseFrom::User); - return; - } - }; - - let bytes_consumed = result.bytes_consumed; - handle_ipc_message(send_queue, result.message, &global_this); - let IncomingBuffer::Json(json_buf) = &mut send_queue.incoming else { - unreachable!() - }; - json_buf.consume(bytes_consumed); - } + drain_json_messages(send_queue, &global_this); } IncomingBuffer::Advanced(_) => { let IncomingBuffer::Advanced(adv_buf) = &mut send_queue.incoming else { diff --git a/src/jsc/lib.rs b/src/jsc/lib.rs index 85c8c8df5f3c..30e896d7b2af 100644 --- a/src/jsc/lib.rs +++ b/src/jsc/lib.rs @@ -941,6 +941,8 @@ pub mod __macro_support { // the expansions type-check against the real `JSGlobalObject`/`CallFrame`/ // `JSValue`/`JsResult` shapes and that the `JsClass` trait impl wires up). #[cfg(test)] +// Type-check-only: nothing constructs `Smoke` or calls its methods at runtime. +#[allow(dead_code, unreachable_pub)] mod __macro_smoke { use super::{CallFrame, JSGlobalObject, JSValue, JsResult}; @@ -1560,7 +1562,7 @@ pub use self::event_loop::{ Task, WorkPool, WorkPoolTask, WorkTask, WorkTaskContext, }; #[cfg(unix)] -pub type PlatformEventLoop = bun_uws::Loop; +pub type PlatformEventLoop = bun_usockets::Loop; #[cfg(not(unix))] pub type PlatformEventLoop = bun_io::Loop; diff --git a/src/jsc/rare_data.rs b/src/jsc/rare_data.rs index 3fbe8da8052d..449dbb50fe83 100644 --- a/src/jsc/rare_data.rs +++ b/src/jsc/rare_data.rs @@ -15,7 +15,7 @@ use bun_http::MimeType as mime_type; use bun_io::{self as Async}; use bun_paths::MAX_PATH_BYTES; use bun_sys::{self as syscall, Fd, FdExt as _, Mode}; -use bun_uws::{self as uws, SocketGroup, SslCtx}; +use bun_usockets::{SocketGroup, SslCtx}; use bun_event_loop::SpawnSyncEventLoop::SpawnSyncEventLoop; @@ -716,6 +716,14 @@ impl RareData { .push(CleanupHook::from(global_this, ctx, func)); } + /// Unregister a hook whose `ctx` is about to be freed (Node's + /// `RemoveCleanupHook` equivalent). No-op if it already ran or was + /// never pushed. + pub fn remove_cleanup_hook(&mut self, ctx: *mut c_void, func: CleanupHookFunction) { + self.cleanup_hooks + .retain(|h| !(h.ctx == ctx && core::ptr::fn_addr_eq(h.func, func))); + } + pub fn spawn_sync_event_loop(&mut self, vm: &mut VirtualMachine) -> &mut SpawnSyncEventLoop { if self.spawn_sync_event_loop_.is_none() { // In-place out-param init: `event_loop` inside captures the @@ -851,8 +859,10 @@ impl RareData { // just drained. Loop until every group is observed empty in the same pass // (bounded — each retry only happens if a JS callback opened a *new* // socket, and the cap stops a deliberately-spinning on_close from wedging - // teardown; the post-close force-drain in close_all handles whatever's - // left after the cap). + // teardown). Each close_all force-drains its own group (sockets AND + // connecting sockets) before returning, so past the cap only sockets a + // spinning callback opened after its group's final drain can remain — + // those are abandoned, not closed. // Walk the loop's linked-group list rather than just our 14 embedded // fields: Listener/uWS-App groups own their own SocketGroup, and accepted // sockets land *there*, not in RareData. Iterating only the embedded @@ -862,9 +872,10 @@ impl RareData { let _ = self; let mut rounds: u8 = 0; while rounds < 8 { - // `uws_loop_mut()` is the centralised BACKREF accessor for the - // per-VM uSockets loop (live for the VM lifetime). - if !vm.uws_loop_mut().close_all_groups() { + // `*mut Loop`, never `&mut`: on_close dispatches into JS which can + // re-derive loop borrows (Bun.connect) — a receiver held across + // the dispatch would alias them (C17). + if !bun_usockets::Loop::close_all_groups(vm.uws_loop()) { break; } rounds += 1; @@ -874,7 +885,7 @@ impl RareData { // every us_socket_t is libc-allocated and otherwise becomes an LSAN leak // (the only pointer into it lives in mimalloc-backed RareData, which LSAN // can't trace once we unregister the root region). - vm.uws_loop_mut().drain_closed_sockets(); + bun_usockets::Loop::drain_closed_sockets(vm.uws_loop()); } } @@ -1036,7 +1047,7 @@ fn get_tls_default_ciphers_from_js( let rare = global_this.bun_vm().as_mut().rare_data(); let bytes = match rare.tls_default_ciphers() { Some(c) => c, - None => uws::get_default_ciphers().as_bytes(), + None => bun_usockets::tls::context::default_ciphers().to_bytes(), }; crate::bun_string_jsc::create_utf8_for_js(global_this, bytes) } @@ -1060,7 +1071,7 @@ impl Drop for RareData { if let Some(s) = self.default_client_ssl_ctx.take() { // SAFETY: returned by ssl_ctx_cache.get_or_create_opts with +1 ref. - unsafe { boring::SSL_CTX_free(s) }; + unsafe { boring::SSL_CTX_free(s.cast()) }; } // After the default-ctx free so the tombstone callback still finds a live // map; ssl_ctx_cache itself lives in `RuntimeState` and is dropped there. diff --git a/src/jsc/virtual_machine_exports.rs b/src/jsc/virtual_machine_exports.rs index 89258ef3d574..bcf10ae6979d 100644 --- a/src/jsc/virtual_machine_exports.rs +++ b/src/jsc/virtual_machine_exports.rs @@ -65,7 +65,7 @@ pub fn global_object_connected_ipc(global: &JSGlobalObject) -> bool { Some(IPCInstanceUnion::Initialized(inst)) => { // SAFETY: `inst` was produced by `IPCInstance::new` (heap::alloc) // and remains live until `handleIPCClose` swaps `vm.ipc` to `None`. - unsafe { (**inst).data.is_connected() } + unsafe { (**inst).data.queue().is_connected() } } Some(IPCInstanceUnion::Waiting { .. }) => true, None => false, diff --git a/src/jsc/web_worker.rs b/src/jsc/web_worker.rs index e94c6266d17b..e5e65af660c0 100644 --- a/src/jsc/web_worker.rs +++ b/src/jsc/web_worker.rs @@ -1232,10 +1232,24 @@ impl WebWorker { // vm_lock held; this is the unpublish point. let vm_ptr = self.vm.replace(core::ptr::null_mut()); self.vm_lock.unlock(); - let mut loop_: Option<*mut bun_uws::Loop> = None; + let mut loop_: Option<*mut bun_usockets::Loop> = None; if !vm_ptr.is_null() { // SAFETY: vm_ptr was published under vm_lock; sole owner now. loop_ = Some(unsafe { &*vm_ptr }.uws_loop()); + + // Rundown gate: producers that already entered a cross-thread + // post (enqueue_task_concurrent / ref_concurrently) bumped + // `external_posts` before checking `terminating`. Set the flag, + // then spin until every in-flight post has left the queues — the + // release below (and the VM free at step 5) must not race them. + // SAFETY: vm_ptr is live; EventLoop is a value field of the VM, + // freed only at step 5 after this drain completes. + let el = unsafe { &*vm_ptr }.event_loop_shared(); + el.terminating + .store(true, core::sync::atomic::Ordering::SeqCst); + while el.external_posts.load(core::sync::atomic::Ordering::SeqCst) != 0 { + core::hint::spin_loop(); + } } // ---- 2. User exit handlers ----------------------------------------- @@ -1368,7 +1382,7 @@ impl WebWorker { // skipped on glibc; under BUN_DESTRUCT_VM_ON_EXIT it would also gate // on `!bun_is_exiting()`. Everything that registers polls on the loop // (gc_controller, sockets, timers) has been deinit'd above. - bun_uws::on_thread_exit(); + bun_usockets::on_thread_exit(); drop(arena.take()); // We MUST NOT call `pthread_exit` here — diff --git a/src/libuv_sys/libuv.rs b/src/libuv_sys/libuv.rs index e1cdaba47f8a..7a952b7d7852 100644 --- a/src/libuv_sys/libuv.rs +++ b/src/libuv_sys/libuv.rs @@ -477,6 +477,24 @@ impl Loop { log!("dec"); self.active_handles = self.active_handles.saturating_sub(1); } + /// Raw-place twins of `inc`/`dec` for callers holding only `*mut Loop` + /// (a `&mut Loop` on a published loop would alias; see bun_usockets). + #[inline] + pub fn inc_raw(this: *mut Self) { + log!("inc_raw"); + unsafe { + let p = &raw mut (*this).active_handles; + *p = (*p).saturating_add(1); + } + } + #[inline] + pub fn dec_raw(this: *mut Self) { + log!("dec_raw"); + unsafe { + let p = &raw mut (*this).active_handles; + *p = (*p).saturating_sub(1); + } + } /// `ref`/`unref` aliases for `inc`/`dec`. #[inline] pub fn ref_(&mut self) { diff --git a/src/react_compiler/lowering/build_hir/mod.rs b/src/react_compiler/lowering/build_hir/mod.rs index 0ac36973a54e..06e0addc32ab 100644 --- a/src/react_compiler/lowering/build_hir/mod.rs +++ b/src/react_compiler/lowering/build_hir/mod.rs @@ -1,7 +1,7 @@ //! Port of `react_compiler_lowering/build_hir.rs` reading `bun_ast` directly. //! //! Upstream is one 7.4k-line file; here it is split by function group so the -//! port can be sharded and reviewed independently. The split is purely +//! port can be split up and reviewed independently. The split is purely //! organisational — function bodies, names, and call graph stay 1:1 with //! upstream so `/sync-react-compiler` can re-port hunk by hunk. //! diff --git a/src/resolver/lib.rs b/src/resolver/lib.rs index 7c33992c09f0..b7c20141b56e 100644 --- a/src/resolver/lib.rs +++ b/src/resolver/lib.rs @@ -2222,7 +2222,7 @@ pub mod cache { // `ptr` is non-null, aligned, and `ptr[..len]` is initialized // and valid for shared reads for at least `'_`. Cannot be a // `bun_ptr::RawSlice` field without breaking `src/bundler/` - // struct-literal constructors (out-of-shard). + // struct-literal constructors. Contents::SharedBuffer { ptr, len } | Contents::External { ptr, len } => unsafe { core::slice::from_raw_parts(*ptr, *len) }, diff --git a/src/router/lib.rs b/src/router/lib.rs index 797365348028..dbf65a5bbec8 100644 --- a/src/router/lib.rs +++ b/src/router/lib.rs @@ -1971,9 +1971,15 @@ pub use pattern::Pattern; // ────────────────────────────────────────────────────────────────────────── #[cfg(test)] +// The fixture harness (`Test::make`/`make_routes`, mocks) ports the Zig router +// test scaffolding; the route-loading tests that consume it are not ported +// yet, so it stays allowed-dead until they land. +#[allow(dead_code, unreachable_pub)] mod tests { use super::*; + use bun_core::output as Output; + struct MockRequestContextType { controlled: bool, url: URLPath, @@ -2102,7 +2108,7 @@ mod tests { make_test(test_name.as_bytes(), data)?; bun_ast::initialize_store(); // const fs = try FileSystem.init(null); - let _ = bun_resolver::fs::FileSystem::init(None)?; + let fs = bun_resolver::fs::FileSystem::init(None)?; let top_level_dir = bun_resolver::fs::FileSystem::get().top_level_dir; // var pages_parts = [_]string{ top_level_dir, "pages" }; @@ -2131,7 +2137,9 @@ mod tests { // still flushes diagnostics on early-return for parity. let _err_dump = scopeguard::guard(core::ptr::from_mut(&mut log), |log| { // SAFETY: pointer to a stack local that outlives this guard. - let _ = unsafe { &*log }.print(bun_core::output::error_writer()); + let _ = unsafe { &*log }.print(core::ptr::from_mut::( + bun_core::output::error_writer(), + )); }); // const opts = Options.BundleOptions{ .target = .browser, ... }; @@ -2178,7 +2186,7 @@ mod tests { make_test(test_name.as_bytes(), data)?; bun_ast::initialize_store(); // const fs = try FileSystem.initWithForce(null, true); - let _ = bun_resolver::fs::FileSystem::init_with_force::(None)?; + let fs = bun_resolver::fs::FileSystem::init_with_force::(None)?; let top_level_dir = bun_resolver::fs::FileSystem::get().top_level_dir; let pages_parts: [&[u8]; 2] = [top_level_dir, b"pages"]; @@ -2202,7 +2210,9 @@ mod tests { let mut log = bun_ast::Log::init(); let _err_dump = scopeguard::guard(core::ptr::from_mut(&mut log), |log| { // SAFETY: pointer to a stack local that outlives this guard. - let _ = unsafe { &*log }.print(bun_core::output::error_writer()); + let _ = unsafe { &*log }.print(core::ptr::from_mut::( + bun_core::output::error_writer(), + )); }); let opts = bun_resolver::options::BundleOptions { diff --git a/src/runtime/Cargo.toml b/src/runtime/Cargo.toml index 96e7474f213a..7b912bac710f 100644 --- a/src/runtime/Cargo.toml +++ b/src/runtime/Cargo.toml @@ -94,8 +94,8 @@ bun_tcc_sys.workspace = true bun_threading.workspace = true bun_transpiler.workspace = true bun_url.workspace = true -bun_uws.workspace = true -bun_uws_sys.workspace = true +bun_usockets.workspace = true +bun_uws_shim.workspace = true bun_valkey.workspace = true bun_watcher.workspace = true bun_which.workspace = true @@ -116,3 +116,6 @@ show_crash_trace = ["bun_bundler/show_crash_trace"] error_return_tracing = [] # Mirrors Zig `bun.FeatureFlags.bake_debugging_features` — DevServer dump flags. bake_debugging_features = [] +# Socket syscall fault injection: the `bun:internal-for-testing` control +# surface here plus the hooks in bun_usockets — enabled together. +socket_fault_injection = ["bun_usockets/socket_fault_injection"] diff --git a/src/runtime/api/bun/SSLContextCache.rs b/src/runtime/api/bun/SSLContextCache.rs index 92a9401d0717..8147cfb5d662 100644 --- a/src/runtime/api/bun/SSLContextCache.rs +++ b/src/runtime/api/bun/SSLContextCache.rs @@ -2,7 +2,7 @@ //! //! The map holds **zero** refs on the cached `SSL_CTX*`. An `SSL_CTX` ex_data //! slot stores a back-pointer to the heap `Entry`; BoringSSL's `CRYPTO_EX_free` -//! callback (registered once in `openssl.c`'s `us_ex_idx_init`) tombstones the +//! callback (registered once in `bun_usockets`' `bssl::ex_indices`) tombstones the //! entry (`entry.ctx = null`) when the real refcount hits 0. The next //! `get_or_create` for that digest sees the tombstone and rebuilds. //! @@ -25,8 +25,8 @@ use core::ptr; use bun_boringssl_sys as boringssl; use bun_collections::array_hash_map::{ArrayHashContext, ArrayHashMap}; use bun_threading::Mutex; -use bun_uws as uws; -use bun_uws::create_bun_socket_error_t; +use bun_usockets::create_bun_socket_error_t; +use bun_usockets::tls::context::BunSocketContextOptions; // `jsc.API.ServerConfig.SSLConfig` — re-exported from src/runtime/socket/SSLConfig.rs use crate::api::server::server_config::SSLConfig; @@ -84,7 +84,7 @@ impl SSLContextCache { /// (e.g. via `as_usockets_for_client_verification()`). pub fn get_or_create_opts( &mut self, - opts: &uws::SocketContext::BunSocketContextOptions, + opts: &BunSocketContextOptions, err: &mut create_bun_socket_error_t, ) -> Option<*mut boringssl::SSL_CTX> { self.get_or_create_digest(opts, opts.digest(), err) @@ -95,7 +95,7 @@ impl SSLContextCache { /// instead of three times on a miss. pub fn get_or_create_digest( &mut self, - opts: &uws::SocketContext::BunSocketContextOptions, + opts: &BunSocketContextOptions, d: Digest, err: &mut create_bun_socket_error_t, ) -> Option<*mut boringssl::SSL_CTX> { @@ -118,7 +118,9 @@ impl SSLContextCache { // file I/O / cert parsing and on Windows the system-CA load — none of // which has a reason to serialize, and holding a non-reentrant SRWLock // across an SSL_CTX_free that *did* tombstone would self-deadlock. - let ctx = opts.create_ssl_context(err)?; + // Same C type, distinct Rust nominal (`bssl_sys` vs `bun_boringssl_sys`); + // TLS pointers cross the crate boundary as opaque casts. + let ctx = opts.create_ssl_context(err)?.cast::(); let _guard = self.mutex.lock_guard(); @@ -150,7 +152,7 @@ impl SSLContextCache { if unsafe { boringssl::SSL_CTX_set_ex_data( ctx, - c::us_ssl_ctx_cache_ex_idx(), + cache_ex_idx(), std::ptr::from_mut::(entry).cast::(), ) } != 1 @@ -167,13 +169,8 @@ impl SSLContextCache { })); *gop.value_ptr = entry; // SAFETY: ctx is a valid SSL_CTX*; entry is a fresh non-null heap pointer. - if unsafe { - boringssl::SSL_CTX_set_ex_data( - ctx, - c::us_ssl_ctx_cache_ex_idx(), - entry.cast::(), - ) - } != 1 + if unsafe { boringssl::SSL_CTX_set_ex_data(ctx, cache_ex_idx(), entry.cast::()) } + != 1 { self.map.swap_remove(&d); // SAFETY: entry was just heap-allocated above and not yet published to ex_data. @@ -254,11 +251,7 @@ impl Drop for SSLContextCache { if !e.ctx.is_null() { // SAFETY: ctx non-null; clearing the ex_data slot we set. unsafe { - boringssl::SSL_CTX_set_ex_data( - e.ctx, - c::us_ssl_ctx_cache_ex_idx(), - ptr::null_mut(), - ); + boringssl::SSL_CTX_set_ex_data(e.ctx, cache_ex_idx(), ptr::null_mut()); } } // SAFETY: entry was heap-allocated in get_or_create_digest and is removed @@ -269,11 +262,8 @@ impl Drop for SSLContextCache { } } -pub mod c { - use core::ffi::c_int; - unsafe extern "C" { - /// Registered alongside the other usockets ex_data slots in - /// `us_ex_idx_init` (pthread_once-guarded). - pub safe fn us_ssl_ctx_cache_ex_idx() -> c_int; - } +/// Cache ex_data slot index — registered (with `bun_ssl_ctx_cache_on_free` as +/// its `CRYPTO_EX_free`) by `bun_usockets`' one-time `bssl::ex_indices()` init. +fn cache_ex_idx() -> c_int { + bun_usockets::unsafe_core::bssl::ex_indices().ctx_cache } diff --git a/src/runtime/api/bun/SecureContext.rs b/src/runtime/api/bun/SecureContext.rs index ab44fd62145d..b68a3cf60163 100644 --- a/src/runtime/api/bun/SecureContext.rs +++ b/src/runtime/api/bun/SecureContext.rs @@ -19,7 +19,7 @@ use crate::socket::{SSLConfig, SSLConfigFromJs}; use bun_boringssl_sys as boringssl; use bun_jsc::JsClass as _; use bun_jsc::{CallFrame, JSGlobalObject, JSValue, JsResult}; -use bun_uws as uws; +use bun_usockets as uws; /// Re-export the codegen-emitted module so /// `$rust(SecureContext.rs, js.getConstructor)` in @@ -47,9 +47,9 @@ pub struct SecureContext { /// `SSL_CTX_new` was called O(1) times, not O(connections). #[bun_jsc::host_fn] pub(crate) fn js_live_count(_global: &JSGlobalObject, _callframe: &CallFrame) -> JsResult { - // `us_ssl_ctx_live_count` is declared `safe fn` (reads a global atomic - // counter, no preconditions). - Ok(JSValue::js_number(c::us_ssl_ctx_live_count() as f64)) + Ok(JSValue::js_number( + uws::tls::context::ssl_ctx_live_count() as f64 + )) } impl SecureContext { @@ -120,68 +120,28 @@ impl SecureContext { if pfx_bytes.is_empty() { return Err(global.throw(format_args!("PFX certificate argument is mandatory"))); } - let mut out_key: *mut core::ffi::c_char = core::ptr::null_mut(); - let mut out_cert: *mut core::ffi::c_char = core::ptr::null_mut(); - let mut out_ca: *mut core::ffi::c_char = core::ptr::null_mut(); - let mut key_len = 0usize; - let mut cert_len = 0usize; - let mut ca_len = 0usize; - let mut err_reason: *const core::ffi::c_char = core::ptr::null(); - // SAFETY: the buffers are live for the call; the out-pointers are - // freed below with libc free per the helper's contract. - let ok = unsafe { - c::us_ssl_parse_pkcs12( - pfx_bytes.as_ptr().cast(), - pfx_bytes.len(), - pass_owned - .as_ref() - .map_or(core::ptr::null(), |v| v.as_ptr().cast()), - &raw mut out_key, - &raw mut key_len, - &raw mut out_cert, - &raw mut cert_len, - &raw mut out_ca, - &raw mut ca_len, - &raw mut err_reason, - ) + // Interior NULs truncate the passphrase — same as the old C helper's + // `const char*` view of this buffer. + let pass_cstr = pass_owned + .as_deref() + .map(|v| core::ffi::CStr::from_bytes_until_nul(v).expect("NUL appended above")); + let pem = match uws::tls::context::parse_pkcs12(pfx_bytes, pass_cstr) { + Ok(pem) => pem, + Err(reason) => { + let message = match reason { + "key" => "Unable to load private key from PFX data", + "cert" => "Unable to load certificate from PFX data", + "mac" => "PFX MAC verification failed - is the passphrase correct?", + _ => "Unable to load PFX certificate", + }; + return Err(global.throw(format_args!("{message}"))); + } }; - unsafe extern "C" { - fn free(ptr: *mut core::ffi::c_void); - } - if ok == 0 { - let reason = if err_reason.is_null() { - "" - } else { - // SAFETY: the helper sets a static NUL-terminated tag on failure. - unsafe { core::ffi::CStr::from_ptr(err_reason) } - .to_str() - .unwrap_or("") - }; - let message = match reason { - "key" => "Unable to load private key from PFX data", - "cert" => "Unable to load certificate from PFX data", - "mac" => "PFX MAC verification failed - is the passphrase correct?", - _ => "Unable to load PFX certificate", - }; - return Err(global.throw(format_args!("{message}"))); - } let result = JSValue::create_empty_object(global, 0); - // SAFETY: the helper returned NUL-terminated PEM strings of the given - // lengths; ZigString::to_js copies into the JS heap before `free`. - unsafe { - let key_slice = core::slice::from_raw_parts(out_key.cast::(), key_len); - result.put(global, b"key", ZigString::init(key_slice).to_js(global)); - let cert_slice = core::slice::from_raw_parts(out_cert.cast::(), cert_len); - result.put(global, b"cert", ZigString::init(cert_slice).to_js(global)); - if !out_ca.is_null() && ca_len > 0 { - let ca_slice = core::slice::from_raw_parts(out_ca.cast::(), ca_len); - result.put(global, b"ca", ZigString::init(ca_slice).to_js(global)); - } - free(out_key.cast()); - free(out_cert.cast()); - if !out_ca.is_null() { - free(out_ca.cast()); - } + result.put(global, b"key", ZigString::init(&pem.key).to_js(global)); + result.put(global, b"cert", ZigString::init(&pem.cert).to_js(global)); + if let Some(ca) = &pem.ca { + result.put(global, b"ca", ZigString::init(ca).to_js(global)); } Ok(result) } @@ -209,7 +169,12 @@ impl SecureContext { let d = ctx_opts.digest(); let mut err = uws::create_bun_socket_error_t::none; - let Some(ctx) = ctx_opts.create_ssl_context(&mut err) else { + // Same C type, distinct Rust nominal (`bssl_sys` vs `bun_boringssl_sys`); + // TLS pointers cross the crate boundary as opaque casts. + let Some(ctx) = ctx_opts + .create_ssl_context(&mut err) + .map(|p| p.cast::()) + else { if err == uws::create_bun_socket_error_t::none || err == uws::create_bun_socket_error_t::invalid_ciphers { @@ -282,7 +247,7 @@ impl SecureContext { fn create_with_digest( global: &JSGlobalObject, - ctx_opts: &uws::socket_context::BunSocketContextOptions, + ctx_opts: &uws::BunSocketContextOptions, d: [u8; 32], ) -> JsResult> { let mut err = uws::create_bun_socket_error_t::none; @@ -361,14 +326,12 @@ impl SecureContext { global.throw_invalid_arguments(format_args!("addCACert requires a certificate")) ); } - // The C side wants a NUL-terminated PEM document. + // The helper wants a NUL-terminated PEM document; an interior NUL + // truncates it, same as the old C helper's `const char*` view. let mut owned = bytes.to_vec(); owned.push(0); - // SAFETY: `this.ctx` is the live SSL_CTX this object owns a reference - // to, and `owned` is a NUL-terminated buffer valid for the call. - let ok = unsafe { - c::us_ssl_ctx_add_ca_cert(this.ctx, owned.as_ptr().cast::()) - }; + let pem = core::ffi::CStr::from_bytes_until_nul(&owned).expect("NUL appended above"); + let ok = uws::tls::context::ssl_ctx_add_ca_cert(this.ctx.cast(), pem); if ok == 0 { return Err(global.throw(format_args!("Invalid CA certificate"))); } @@ -393,7 +356,6 @@ const SSL_CTX_BASE_COST: usize = 50 * 1024; use bun_jsc::ZigStringJsc as _; use bun_jsc::zig_string::ZigString; -use bun_uws_sys::socket_context::c; mod cpp { use super::*; diff --git a/src/runtime/api/bun/Terminal.rs b/src/runtime/api/bun/Terminal.rs index 5935cc6534c9..f51fdba880c0 100644 --- a/src/runtime/api/bun/Terminal.rs +++ b/src/runtime/api/bun/Terminal.rs @@ -1909,7 +1909,7 @@ impl BufferedReaderParent for Terminal { unsafe fn loop_(this: *mut Self) -> *mut bun_io::pipe_reader::Loop { // Delegate to the inherent `Terminal::loop_()` which is cfg-split: // on Windows it projects `.uv_loop()` (the `*mut uv_loop_t` field of - // `WindowsLoop`), NOT a raw cast of the `bun_uws::Loop` wrapper. + // `WindowsLoop`), NOT a raw cast of the `bun_usockets::Loop` wrapper. Self::from_parent_ptr(this).loop_().cast() } unsafe fn event_loop(this: *mut Self) -> bun_io::EventLoopHandle { @@ -1943,7 +1943,7 @@ impl bun_io::pipe_writer::PosixStreamingWriterParent for Terminal { .event_loop_handle .as_event_loop_ctx() } - unsafe fn loop_(this: *mut Self) -> *mut bun_uws_sys::Loop { + unsafe fn loop_(this: *mut Self) -> *mut bun_usockets::Loop { Self::from_parent_ptr(this).event_loop_handle.r#loop() } } diff --git a/src/runtime/api/bun/h2_frame_parser.rs b/src/runtime/api/bun/h2_frame_parser.rs index 19c76ed46777..b40af03fc7c6 100644 --- a/src/runtime/api/bun/h2_frame_parser.rs +++ b/src/runtime/api/bun/h2_frame_parser.rs @@ -1246,7 +1246,7 @@ thread_local! { // copying 16 KB per frame into the batch. static BATCH_SEGMENTS: RefCell> = const { RefCell::new(Vec::new()) }; // Reused iovec scratch for the vectored flush. - static BATCH_IOVECS: RefCell> = const { RefCell::new(Vec::new()) }; + static BATCH_IOVECS: RefCell> = const { RefCell::new(Vec::new()) }; static CORKED_H2: Cell> = const { Cell::new(None) }; // `ManuallyDrop` inside the `Box`: the TLS destructor runs after // `WebWorker::destroy` has raw-deallocated the VM, so `HiveArray::Drop` @@ -3273,7 +3273,7 @@ impl H2FrameParser { continue; } total += len; - iov.push(bun_uws_sys::UsIoVec { + iov.push(bun_usockets::UsIoVec { base: ptr.cast(), len, }); diff --git a/src/runtime/api/bun/js_bun_spawn_bindings.rs b/src/runtime/api/bun/js_bun_spawn_bindings.rs index 078fb83e2a3b..fc618a0fa40b 100644 --- a/src/runtime/api/bun/js_bun_spawn_bindings.rs +++ b/src/runtime/api/bun/js_bun_spawn_bindings.rs @@ -114,10 +114,10 @@ impl IPC::SendQueueOwner for SubprocessT<'static> { #[inline] fn subprocess_ipc_owner(ptr: *mut SubprocessT<'_>) -> *mut dyn IPC::SendQueueOwner { - // `SendQueue.owner` is a BACKREF — the SendQueue is stored inline in - // `Subprocess.ipc_data` and dropped before the Subprocess is freed. - // Erase the borrowed `'a` (raw-pointer lifetimes are not enforced) so the - // unsizing coercion to `dyn SendQueueOwner + 'static` is well-formed. + // `SendQueue.owner` is a BACKREF — `IpcRef::drop` (via `finalize` or the + // Subprocess field drop) tears the queue down before the Subprocess is + // freed. Erase the borrowed `'a` (raw-pointer lifetimes are not enforced) + // so the unsizing coercion to `dyn SendQueueOwner + 'static` is well-formed. ptr.cast::>() as *mut dyn IPC::SendQueueOwner } @@ -1352,10 +1352,9 @@ pub(crate) fn spawn_maybe_sync( #[cfg(windows)] if !IS_SYNC { if let Some(ipc_mode) = maybe_ipc_mode { - subprocess.ipc_data.set(Some(IPC::SendQueue::init( + subprocess.ipc_data.set(Some(IPC::IpcRef::new( ipc_mode, subprocess_ipc_owner(subprocess_ptr), - IPC::SocketUnion::Uninitialized, ))); } } @@ -1496,99 +1495,92 @@ pub(crate) fn spawn_maybe_sync( return Err(global_this.throw_value(err)); } - // Note: Option (rather than an uninitialized value) since `IPC::Socket` - // is a tagged union (zeroed enum is UB) and it is only read on the - // assigned path. - #[cfg(unix)] - let mut posix_ipc_info: Option = None; #[cfg(unix)] if !IS_SYNC { if let Some(mode) = maybe_ipc_mode { + let ipc = IPC::IpcRef::new(mode, subprocess_ipc_owner(subprocess_ptr)); // SAFETY: re-borrow `jsc_vm` through the raw pointer for the nested // `vm` arg while `rare_data()` holds the outer &mut. - let raw_socket = unsafe { &mut *jsc_vm_ptr } + let group = unsafe { &mut *jsc_vm_ptr } .rare_data() - .spawn_ipc_group(unsafe { &mut *jsc_vm_ptr }) - .from_fd( - bun_uws::SocketKind::SpawnIpc, - None, - core::mem::size_of::<*mut IPC::SendQueue>() as core::ffi::c_int, - posix_ipc_fd.native(), - true, - ); - if !raw_socket.is_null() { - let socket = raw_socket; - subprocess.ipc_data.set(Some(IPC::SendQueue::init( - mode, - subprocess_ipc_owner(subprocess_ptr), - IPC::SocketUnion::Uninitialized, - ))); - posix_ipc_info = Some(IPC::Socket::from(socket)); + .spawn_ipc_group(unsafe { &mut *jsc_vm_ptr }); + // Transfers a strong ref to the socket core (released at the + // terminal callback / `detach_owner`); the other ref stays in + // `subprocess.ipc_data` until `finalize`. + match IPC::Socket::from_fd_owned( + group, + bun_usockets::SocketKind::SpawnIpc, + posix_ipc_fd, + ipc.dupe_ref(), + /*is_ipc=*/ true, + ) { + Some(socket) => { + ipc.with_queue(|q| q.socket = IPC::SocketUnion::Open(socket)); + subprocess.ipc_data.set(Some(ipc)); + // uws owns the fd now (owns_fd=1); neutralize the slot so + // finalizeStreams doesn't double-close. + subprocess.stdio_pipes.with_mut(|v| { + v[usize::try_from(ipc_channel).expect("int cast")] = ExtraPipe::Unavailable; + }); + } + None => { + // from_fd does not take ownership on failure (C14); the + // stdio_pipes slot still owns the fd and finalizeStreams + // closes it. `ipc` (IpcRef) drops here. + drop(ipc); + } } } } - // `Subprocess::ipc()` centralises the single unsafe `JsCell` deref; - // `ipc_data` is inline in the freshly-boxed Subprocess and no other borrow - // is live (single JS thread). - if let Some(ipc_data) = subprocess.ipc() { - #[cfg(unix)] - { - if let Some(posix_ipc_info) = posix_ipc_info { - if let Some(ctx) = posix_ipc_info.ext::<*mut IPC::SendQueue>() { - // SAFETY: `ctx` is the live ext-slot pointer returned by uSockets; - // it stays valid for the socket's lifetime. - unsafe { *ctx = std::ptr::from_mut(ipc_data) }; - ipc_data.socket = IPC::SocketUnion::Open(posix_ipc_info); + #[cfg(not(unix))] + if subprocess.ipc_data.get().is_some() { + use crate::node::MaybeExt as _; + let idx = usize::try_from(ipc_channel).expect("int cast"); + // The IPC channel is always a `buffer` pipe on Windows. + // Ownership of the heap `uv::Pipe` transfers to the queue's socket; + // neutralize the slot up front so `finalizeStreams` can't + // double-close it (the Box would otherwise drop on reassignment). + let ipc_pipe: *mut bun_libuv_sys::Pipe = subprocess.stdio_pipes.with_mut(|pipes| { + match core::mem::take(&mut pipes[idx]) { + spawn::WindowsStdioResult::Buffer(pipe) => bun_core::heap::into_raw(pipe), + other => { + // Restore the slot before panicking so the + // `Subprocess` finalizer still sees the original + // variant. Use + // `unreachable!` (NOT `debug_assert!` — that would + // compile out in release and feed null to + // `windows_configure_server`, which immediately + // dereferences it). + pipes[idx] = other; + unreachable!("IPC channel stdio is not a buffer pipe"); } } - // uws owns the fd now (owns_fd=1); neutralize the slot so finalizeStreams doesn't double-close. - subprocess.stdio_pipes.with_mut(|v| { - v[usize::try_from(ipc_channel).expect("int cast")] = ExtraPipe::Unavailable; - }); - } - #[cfg(not(unix))] + }); + // PROVENANCE: `windows_configure_server` STORES this pointer in + // `uv_handle_t.data` for the pipe's lifetime; `queue_ptr()` is the heap + // `IpcData`'s `JsCell` root, mirroring `windows_configure_client`. + let queue_root: *mut IPC::SendQueue = subprocess + .ipc_data + .get() + .as_ref() + .expect("checked is_some above") + .queue_ptr(); + // SAFETY: `queue_root` points at the live SendQueue in the heap + // `IpcData`; no `&mut SendQueue` is live in this scope. + if let Some(err) = + unsafe { IPC::SendQueue::windows_configure_server(queue_root, ipc_pipe) }.as_err() { - use crate::node::MaybeExt as _; - let idx = usize::try_from(ipc_channel).expect("int cast"); - // The IPC channel is always a `buffer` pipe on Windows. - // Ownership of the heap `uv::Pipe` transfers to `ipc_data.socket`; - // neutralize the slot up front so `finalizeStreams` can't - // double-close it (the Box would otherwise drop on reassignment). - let ipc_pipe: *mut bun_libuv_sys::Pipe = subprocess.stdio_pipes.with_mut(|pipes| { - match core::mem::take(&mut pipes[idx]) { - spawn::WindowsStdioResult::Buffer(pipe) => bun_core::heap::into_raw(pipe), - other => { - // Restore the slot before panicking so the - // `Subprocess` finalizer still sees the original - // variant. Use - // `unreachable!` (NOT `debug_assert!` — that would - // compile out in release and feed null to - // `windows_configure_server`, which immediately - // dereferences it). - pipes[idx] = other; - unreachable!("IPC channel stdio is not a buffer pipe"); - } - } - }); - // PROVENANCE: `windows_configure_server` STORES the `*mut SendQueue` - // in `uv_handle_t.data` for the pipe's lifetime, so it takes a raw - // pointer (not `&mut self`) — see its safety doc. NOTE: this still - // derives from the `ipc_data` reborrow (same as the unix branch's - // `ptr::from_mut(ipc_data)` above); a true root-raw projection - // through `Option` is tracked separately. - // SAFETY: `ipc_data` points at the live SendQueue inline in - // `*subprocess_ptr`; no other `&mut` to it is live in this scope. - if let Some(err) = unsafe { - IPC::SendQueue::windows_configure_server(core::ptr::from_mut(ipc_data), ipc_pipe) - } - .as_err() - { - let err_js = err.to_js(global_this); - subprocess.deref(); - return Err(global_this.throw_value(err_js)); - } + let err_js = err.to_js(global_this); + subprocess.deref(); + return Err(global_this.throw_value(err_js)); } + } + + // `Subprocess::ipc()` centralises the single unsafe `JsCell` deref; + // `ipc_data` lives in the heap `IpcData` cell and no other borrow + // is live (single JS thread). + if let Some(ipc_data) = subprocess.ipc() { ipc_data.write_version_packet(global_this); } diff --git a/src/runtime/api/bun/subprocess.rs b/src/runtime/api/bun/subprocess.rs index 7e0d6e51cde4..825c9cd268d3 100644 --- a/src/runtime/api/bun/subprocess.rs +++ b/src/runtime/api/bun/subprocess.rs @@ -143,8 +143,10 @@ pub struct Subprocess<'a> { pub closed: Cell>, pub this_value: JsCell, - /// `None` indicates all of the IPC data is uninitialized. - pub ipc_data: JsCell>, + /// `None` indicates all of the IPC data is uninitialized. `IpcRef::drop` + /// (finalize, or any error-path Subprocess drop) tears the socket down + /// and releases the ref; the socket core holds its own ref. + pub ipc_data: JsCell>, pub flags: Cell, /// Weak observer of the stdin `FileSink` — holds no ownership/ref. `onStdinDestroyed` @@ -319,7 +321,7 @@ macro_rules! assert_stdio_result { pub(crate) use assert_stdio_result; impl Subprocess<'_> { - #[bun_uws::uws_callback(thunk = "on_abort_signal_c")] + #[bun_uws_shim::uws_callback(thunk = "on_abort_signal_c")] fn handle_abort_signal(&self, _reason: JSValue) { self.clear_abort_signal(); let _ = self.try_kill(self.kill_signal); @@ -413,7 +415,7 @@ impl Subprocess<'_> { // window where the socket is already `.closed` but the task holding a // raw `*SendQueue` into `ipc_data` is still queued. if let Some(ipc) = self.ipc_data.get() { - if !ipc.close_event_sent { + if !ipc.queue().close_event_sent { return true; } } @@ -821,7 +823,7 @@ impl Subprocess<'_> { .ipc_data .get() .as_ref() - .map(|d| d.is_connected()) + .map(|d| d.queue().is_connected()) .unwrap_or(false); JSValue::from(connected) } @@ -1298,10 +1300,10 @@ impl Subprocess<'_> { if let Some(ipc_data) = this.ipc_data.replace(None) { // In normal operation the socket is already `.closed` by the time we // get here (that is what allowed `computeHasPendingActivity` to drop - // to false and let GC collect us). `disconnectIPC` would be a no-op - // in that state and would leak the SendQueue's buffers; deinit it - // instead. `SendQueue.deinit` handles the VM-shutdown case where the - // socket is still open. + // to false and let GC collect us). `IpcRef::drop` runs the owner + // teardown (covering the VM-shutdown case where the socket is + // still open) before releasing the ref — required while this + // Subprocess, the `SendQueue.owner` backref target, is alive. drop(ipc_data); } @@ -1439,10 +1441,13 @@ impl Subprocess<'_> { #[allow(clippy::mut_from_ref)] pub fn ipc(&self) -> Option<&mut IPC::SendQueue> { - // SAFETY: single JS-mutator thread; the SendQueue is inline in the - // `JsCell` and callers do not hold the borrow across JS re-entry that - // touches `ipc_data` itself. - unsafe { self.ipc_data.get_mut() }.as_mut() + // SAFETY: single JS-mutator thread; the heap `IpcData` outlives this + // borrow (we hold a ref in `ipc_data`) and callers do not hold the + // borrow across JS re-entry that touches `ipc_data` itself. + self.ipc_data + .get() + .as_ref() + .map(|r| unsafe { r.queue_mut() }) } pub fn get_global_this(&self) -> Option<&JSGlobalObject> { diff --git a/src/runtime/api/bun/subprocess/SubprocessPipeReader.rs b/src/runtime/api/bun/subprocess/SubprocessPipeReader.rs index 91a58ac4dada..32b9179e87fe 100644 --- a/src/runtime/api/bun/subprocess/SubprocessPipeReader.rs +++ b/src/runtime/api/bun/subprocess/SubprocessPipeReader.rs @@ -356,7 +356,7 @@ impl PipeReader { #[cfg(windows)] { // SAFETY: uws loop pointer is live for the VM lifetime. - unsafe { (*uws).uv_loop } + unsafe { (*uws).uv_loop.cast() } } #[cfg(not(windows))] { diff --git a/src/runtime/api/cron.rs b/src/runtime/api/cron.rs index 5170a8c32e57..783a1a1c71ab 100644 --- a/src/runtime/api/cron.rs +++ b/src/runtime/api/cron.rs @@ -82,7 +82,7 @@ trait CronJobBase: Sized { fn loop_(&self) -> *mut AsyncLoop { // `VirtualMachine::uv_loop` already returns the native loop on both // targets (jsc/VirtualMachine.rs:2975); the prior POSIX arm's - // `bun_uws::Loop::get()` named the same per-thread singleton. + // `bun_uws_shim::Loop::get()` named the same per-thread singleton. vm_mut().uv_loop() } diff --git a/src/runtime/bake/DevServer.rs b/src/runtime/bake/DevServer.rs index 4e2646dc4e57..cd4312a81de0 100644 --- a/src/runtime/bake/DevServer.rs +++ b/src/runtime/bake/DevServer.rs @@ -29,7 +29,7 @@ use bun_jsc::{self as jsc, CallFrame, JSGlobalObject, JSValue, JsResult}; use bun_paths::MAX_PATH_BYTES; use bun_paths::{self as paths, PathBuffer}; use bun_sys as sys; -use bun_uws::{self as uws, AnyResponse, Opcode, Request, WebSocketUpgradeContext}; +use bun_uws_shim::{self as uws, AnyResponse, Opcode, Request, WebSocketUpgradeContext}; use bun_watcher::WatchItemColumns as _; use bun_wyhash::{Wyhash, hash}; @@ -1573,8 +1573,8 @@ fn origin_forbidden(resp: AnyResponse) { /// `extern "C"` trampoline: recovers `&mut DevServer` from user-data and wraps /// the raw `uws_res` as `AnyResponse`, then calls the handler for `ID`. extern "C" fn dev_route_tramp( - res: *mut bun_uws_sys::uws_res, - req: *mut bun_uws_sys::Request, + res: *mut bun_uws_shim::uws_res, + req: *mut bun_uws_shim::Request, ud: *mut c_void, ) { // SAFETY: `ud`/`req`/`res` were registered by `set_routes` and outlive the @@ -1583,9 +1583,9 @@ extern "C" fn dev_route_tramp( // SAFETY: see above; uWS passes a non-null `Request*` valid for the callback. let req = unsafe { &mut *req.cast::() }; let resp = if SSL { - AnyResponse::SSL(res.cast::()) + AnyResponse::SSL(res.cast::()) } else { - AnyResponse::TCP(res.cast::()) + AnyResponse::TCP(res.cast::()) }; if !is_allowed_dev_host(dev, req) { return host_forbidden(resp); @@ -1611,41 +1611,41 @@ extern "C" fn dev_route_tramp( } fn on_report_error_request(dev: &mut DevServer, req: &mut Request, resp: AnyResponse) { - use bun_uws_sys::thunk::OpaqueHandle as _; + use bun_uws_shim::thunk::OpaqueHandle as _; match resp { AnyResponse::SSL(r) => { - ErrorReportRequest::run(dev, req, bun_uws_sys::response::TLSResponse::as_handle(r)) + ErrorReportRequest::run(dev, req, bun_uws_shim::response::TLSResponse::as_handle(r)) } AnyResponse::TCP(r) => { - ErrorReportRequest::run(dev, req, bun_uws_sys::response::TCPResponse::as_handle(r)) + ErrorReportRequest::run(dev, req, bun_uws_shim::response::TCPResponse::as_handle(r)) } AnyResponse::H3(_) => not_found(resp), } } fn on_unref_source_map_request(dev: &mut DevServer, req: &mut Request, resp: AnyResponse) { - use bun_uws_sys::thunk::OpaqueHandle as _; + use bun_uws_shim::thunk::OpaqueHandle as _; match resp { AnyResponse::SSL(r) => { - UnrefSourceMapRequest::run(dev, req, bun_uws_sys::response::TLSResponse::as_handle(r)) + UnrefSourceMapRequest::run(dev, req, bun_uws_shim::response::TLSResponse::as_handle(r)) } AnyResponse::TCP(r) => { - UnrefSourceMapRequest::run(dev, req, bun_uws_sys::response::TCPResponse::as_handle(r)) + UnrefSourceMapRequest::run(dev, req, bun_uws_shim::response::TCPResponse::as_handle(r)) } AnyResponse::H3(_) => not_found(resp), } } /// `WebSocketBehavior.Wrap(DevServer, HmrSocket, ssl).apply(.{})`. -fn hmr_socket_behavior() -> bun_uws_sys::WebSocketBehavior { - bun_uws_sys::web_socket::Wrap::::apply(&Default::default()) +fn hmr_socket_behavior() -> bun_uws_shim::WebSocketBehavior { + bun_uws_shim::web_socket::Wrap::::apply(&Default::default()) } // `WebSocketBehavior.Wrap(ServerType, Type, ssl)` requires `Type` (= `HmrSocket`) // to be a `WebSocketHandler` and `ServerType` (= `DevServer`) to be a // `WebSocketUpgradeServer`. The trait is wired explicitly and forward to the inherent method bodies in // `dev_server::hmr_socket`. -impl bun_uws_sys::web_socket::WebSocketHandler for HmrSocket { +impl bun_uws_shim::web_socket::WebSocketHandler for HmrSocket { // `Wrap.apply` leaves the drain/ping/pong C callbacks `null` when // `HAS_ON_* == false`. const HAS_ON_DRAIN: bool = false; @@ -1658,34 +1658,34 @@ impl bun_uws_sys::web_socket::WebSocketHandler for HmrSocket { // re-derive a fresh `&mut *this` here (not carried in from a `noalias` // dispatch-frame borrow). #[inline] - unsafe fn on_open(this: *mut Self, ws: bun_uws_sys::AnyWebSocket) { + unsafe fn on_open(this: *mut Self, ws: bun_uws_shim::AnyWebSocket) { // SAFETY: `this` is the live user-data pointer (per trait contract). HmrSocket::on_open(unsafe { &mut *this }, ws) } #[inline] unsafe fn on_message( this: *mut Self, - ws: bun_uws_sys::AnyWebSocket, + ws: bun_uws_shim::AnyWebSocket, message: &[u8], - opcode: bun_uws_sys::Opcode, + opcode: bun_uws_shim::Opcode, ) { // SAFETY: see `on_open`. HmrSocket::on_message(unsafe { &mut *this }, ws, message, opcode) } #[inline] - unsafe fn on_close(this: *mut Self, ws: bun_uws_sys::AnyWebSocket, code: i32, message: &[u8]) { + unsafe fn on_close(this: *mut Self, ws: bun_uws_shim::AnyWebSocket, code: i32, message: &[u8]) { // SAFETY: see `on_open`. HmrSocket::on_close(this, ws, code, message) } - unsafe fn on_drain(_this: *mut Self, _ws: bun_uws_sys::AnyWebSocket) {} - unsafe fn on_ping(_this: *mut Self, _ws: bun_uws_sys::AnyWebSocket, _message: &[u8]) {} - unsafe fn on_pong(_this: *mut Self, _ws: bun_uws_sys::AnyWebSocket, _message: &[u8]) {} + unsafe fn on_drain(_this: *mut Self, _ws: bun_uws_shim::AnyWebSocket) {} + unsafe fn on_ping(_this: *mut Self, _ws: bun_uws_shim::AnyWebSocket, _message: &[u8]) {} + unsafe fn on_pong(_this: *mut Self, _ws: bun_uws_shim::AnyWebSocket, _message: &[u8]) {} } -impl bun_uws_sys::web_socket::WebSocketUpgradeServer for DevServer { +impl bun_uws_shim::web_socket::WebSocketUpgradeServer for DevServer { unsafe fn on_websocket_upgrade( this: *mut Self, - res: *mut bun_uws_sys::NewAppResponse, + res: *mut bun_uws_shim::NewAppResponse, req: &mut Request, upgrade_ctx: &mut WebSocketUpgradeContext, id: usize, @@ -1718,23 +1718,23 @@ impl bun_uws_sys::web_socket::WebSocketUpgradeServer for D // `ResponseLike` for the concrete `Response` so `HmrSocket::new` can be // called from `on_websocket_upgrade`. -impl ResponseLike for bun_uws_sys::response::Response { +impl ResponseLike for bun_uws_shim::response::Response { fn write_status(&mut self, status: &[u8]) { - bun_uws_sys::response::Response::::write_status(self, status) + bun_uws_shim::response::Response::::write_status(self, status) } fn end(&mut self, data: &[u8], close_connection: bool) { - bun_uws_sys::response::Response::::end(self, data, close_connection) + bun_uws_shim::response::Response::::end(self, data, close_connection) } - fn as_any_response(&mut self) -> bun_uws::AnyResponse { + fn as_any_response(&mut self) -> bun_uws_shim::AnyResponse { if SSL { - bun_uws::AnyResponse::SSL(std::ptr::from_mut::(self).cast()) + bun_uws_shim::AnyResponse::SSL(std::ptr::from_mut::(self).cast()) } else { - bun_uws::AnyResponse::TCP(std::ptr::from_mut::(self).cast()) + bun_uws_shim::AnyResponse::TCP(std::ptr::from_mut::(self).cast()) } } - fn get_remote_socket_info(&mut self) -> Option { - bun_uws_sys::response::Response::::get_remote_socket_info(self).map(|a| { - bun_uws::SocketAddress { + fn get_remote_socket_info(&mut self) -> Option { + bun_uws_shim::response::Response::::get_remote_socket_info(self).map(|a| { + bun_uws_shim::SocketAddress { ip: a.ip().to_vec().into_boxed_slice(), port: a.port, is_ipv6: a.is_ipv6, @@ -1747,10 +1747,10 @@ impl ResponseLike for bun_uws_sys::response::Response { sec_web_socket_key: &[u8], sec_web_socket_protocol: &[u8], sec_web_socket_extensions: &[u8], - ctx: &mut bun_uws::WebSocketUpgradeContext, + ctx: &mut bun_uws_shim::WebSocketUpgradeContext, ) { let boxed = bun_core::heap::into_raw(Box::new(data)); - let _ = bun_uws_sys::response::Response::::upgrade( + let _ = bun_uws_shim::response::Response::::upgrade( self, boxed, sec_web_socket_key, @@ -1834,7 +1834,7 @@ fn on_js_request(dev: &mut DevServer, req: &mut Request, resp: AnyResponse) { // SAFETY: `init_from_any_blob` returns a fresh ref_count=1 box. scopeguard::defer! { unsafe { StaticRoute::deref_(response) } }; // SAFETY: `response` is live until `_deref` runs after this returns. - unsafe { StaticRoute::on_request(response, bun_uws::AnyRequest::H1(req), resp) }; + unsafe { StaticRoute::on_request(response, bun_uws_shim::AnyRequest::H1(req), resp) }; return; } @@ -6608,8 +6608,8 @@ struct UnrefSourceMapRequest { } bun_core::intrusive_field!(UnrefSourceMapRequest, body: uws::BodyReaderMixin); -impl bun_uws_sys::body_reader_mixin::BodyReaderHandler for UnrefSourceMapRequest { - unsafe fn on_body(this: *mut Self, body: &[u8], resp: AnyResponse) -> bun_uws_sys::Result<()> { +impl bun_uws_shim::body_reader_mixin::BodyReaderHandler for UnrefSourceMapRequest { + unsafe fn on_body(this: *mut Self, body: &[u8], resp: AnyResponse) -> bun_uws_shim::Result<()> { // SAFETY: caller (BodyReaderMixin) passes the original heap-allocated // pointer with full-allocation provenance and no live borrows. unsafe { Self::run_with_body(this, body, resp) }.map_err(Into::into) @@ -6624,7 +6624,7 @@ impl bun_uws_sys::body_reader_mixin::BodyReaderHandler for UnrefSourceMapRequest impl UnrefSourceMapRequest { fn run(dev: &mut DevServer, _: &mut Request, resp: &mut R) where - R: bun_uws_sys::body_reader_mixin::BodyResponse, + R: bun_uws_shim::body_reader_mixin::BodyResponse, { dev.server .as_mut() diff --git a/src/runtime/bake/dev_server/error_report_request.rs b/src/runtime/bake/dev_server/error_report_request.rs index 43aaed631675..97fedb425d31 100644 --- a/src/runtime/bake/dev_server/error_report_request.rs +++ b/src/runtime/bake/dev_server/error_report_request.rs @@ -28,8 +28,8 @@ use bun_jsc::{ ZigStackFramePosition, ZigStackTrace, }; use bun_paths::path_buffer_pool; -use bun_uws::{self as uws, AnyResponse, Request}; -use bun_uws_sys::body_reader_mixin::{BodyReaderHandler, BodyResponse}; +use bun_uws_shim::body_reader_mixin::{BodyReaderHandler, BodyResponse}; +use bun_uws_shim::{self as uws, AnyResponse, Request}; use super::source_map_store::{self, GetResult, Key as SourceMapKey}; use super::{CLIENT_PREFIX, DevServer}; @@ -48,7 +48,7 @@ pub(crate) struct ErrorReportRequest { bun_core::intrusive_field!(ErrorReportRequest, body: uws::BodyReaderMixin); impl BodyReaderHandler for ErrorReportRequest { - unsafe fn on_body(this: *mut Self, body: &[u8], resp: AnyResponse) -> bun_uws_sys::Result<()> { + unsafe fn on_body(this: *mut Self, body: &[u8], resp: AnyResponse) -> bun_uws_shim::Result<()> { // SAFETY: caller (BodyReaderMixin) passes the original heap-allocated // pointer with full-allocation provenance and no live borrows. unsafe { ErrorReportRequest::run_with_body(this, body, resp) }.map_err(Into::into) diff --git a/src/runtime/bake/dev_server/hmr_socket.rs b/src/runtime/bake/dev_server/hmr_socket.rs index 836370c9826e..cdeab101e26f 100644 --- a/src/runtime/bake/dev_server/hmr_socket.rs +++ b/src/runtime/bake/dev_server/hmr_socket.rs @@ -1,8 +1,8 @@ use bun_collections::HashMap; use bun_core::strings; use bun_core::{Output, feature_flags}; -use bun_uws::AnyWebSocket; -use bun_uws_sys::{Opcode, SendStatus}; +use bun_uws_shim::AnyWebSocket; +use bun_uws_shim::{Opcode, SendStatus}; use crate::timer::EventLoopTimerState; @@ -220,7 +220,7 @@ impl HmrSocket { dev.publish( HmrTopic::TestingWatchSynchronization, &[MessageId::TestingWatchSynchronization.char(), 0], - bun_uws::Opcode::BINARY, + bun_uws_shim::Opcode::BINARY, ); } } @@ -243,7 +243,7 @@ impl HmrSocket { dev.publish( HmrTopic::TestingWatchSynchronization, &[MessageId::TestingWatchSynchronization.char(), 2], - bun_uws::Opcode::BINARY, + bun_uws_shim::Opcode::BINARY, ); return; } diff --git a/src/runtime/bake/dev_server/mod.rs b/src/runtime/bake/dev_server/mod.rs index 2add0fdb68a4..273d4341df66 100644 --- a/src/runtime/bake/dev_server/mod.rs +++ b/src/runtime/bake/dev_server/mod.rs @@ -299,21 +299,21 @@ pub use serialized_failure::SerializedFailure; pub use source_map_store::SourceMapStore; /// Local response trait — the response type is a generic bound. -/// Method shapes mirror `bun_uws_sys::Response` so the `R`-generic -/// bodies type-check. `bun_uws` exposes no equivalent trait; if it ever +/// Method shapes mirror `bun_uws_shim::Response` so the `R`-generic +/// bodies type-check. `bun_uws_shim` exposes no equivalent trait; if it ever /// grows one, this can be replaced by it. pub trait ResponseLike { fn write_status(&mut self, status: &[u8]); fn end(&mut self, data: &[u8], close_connection: bool); - fn as_any_response(&mut self) -> bun_uws::AnyResponse; - fn get_remote_socket_info(&mut self) -> Option; + fn as_any_response(&mut self) -> bun_uws_shim::AnyResponse; + fn get_remote_socket_info(&mut self) -> Option; fn upgrade( &mut self, data: D, sec_web_socket_key: &[u8], sec_web_socket_protocol: &[u8], sec_web_socket_extensions: &[u8], - ctx: &mut bun_uws::WebSocketUpgradeContext, + ctx: &mut bun_uws_shim::WebSocketUpgradeContext, ); } @@ -321,21 +321,21 @@ pub trait ResponseLike { // trivially. The trait methods take `&mut self` (matching `Response`'s // shape); `AnyResponse` is `Copy`, so the inherent by-value methods are called // on `*self`. -impl ResponseLike for bun_uws::AnyResponse { +impl ResponseLike for bun_uws_shim::AnyResponse { fn write_status(&mut self, status: &[u8]) { (*self).write_status(status) } fn end(&mut self, data: &[u8], close_connection: bool) { (*self).end(data, close_connection) } - fn as_any_response(&mut self) -> bun_uws::AnyResponse { + fn as_any_response(&mut self) -> bun_uws_shim::AnyResponse { *self } - fn get_remote_socket_info(&mut self) -> Option { - // Re-box into the owned `bun_uws::SocketAddress` shape this trait uses. + fn get_remote_socket_info(&mut self) -> Option { + // Re-box into the owned `bun_uws_shim::SocketAddress` shape this trait uses. (*self) .get_remote_socket_info() - .map(|a| bun_uws::SocketAddress { + .map(|a| bun_uws_shim::SocketAddress { ip: a.ip().to_vec().into_boxed_slice(), port: a.port, is_ipv6: a.is_ipv6, @@ -347,7 +347,7 @@ impl ResponseLike for bun_uws::AnyResponse { sec_web_socket_key: &[u8], sec_web_socket_protocol: &[u8], sec_web_socket_extensions: &[u8], - ctx: &mut bun_uws::WebSocketUpgradeContext, + ctx: &mut bun_uws_shim::WebSocketUpgradeContext, ) { let boxed = bun_core::heap::into_raw(Box::new(data)); let _ = (*self).upgrade( @@ -366,7 +366,7 @@ pub struct HmrSocket { /// BACKREF: owned by `dev.active_websocket_connections`; destroyed via /// `remove` + `heap::take` in `on_close`. pub dev: bun_ptr::BackRef, - pub underlying: Option, + pub underlying: Option, pub subscriptions: super::dev_server_body::HmrTopicBits, /// Allows actions which inspect or mutate sensitive DevServer state. pub is_from_localhost: bool, @@ -560,7 +560,7 @@ impl HotReloadEvent { dev.publish( HmrTopic::TestingWatchSynchronization, &[MessageId::TestingWatchSynchronization.char(), 1], - bun_uws::Opcode::BINARY, + bun_uws_shim::Opcode::BINARY, ); return; } @@ -710,7 +710,7 @@ impl HotReloadEvent { dev_ref.publish( HmrTopic::TestingWatchSynchronization, &[MessageId::TestingWatchSynchronization.char(), 1], - bun_uws::Opcode::BINARY, + bun_uws_shim::Opcode::BINARY, ); return; } diff --git a/src/runtime/cli/audit_command.rs b/src/runtime/cli/audit_command.rs index 3cdde918267d..ce91edb4ddb0 100644 --- a/src/runtime/cli/audit_command.rs +++ b/src/runtime/cli/audit_command.rs @@ -493,10 +493,10 @@ fn send_audit_request( } }; - if res.status_code >= 400 { + if res.response().status_code >= 400 { bun_core::pretty_errorln!( "error: audit request failed (status {})", - res.status_code + res.response().status_code ); Global::crash(); } diff --git a/src/runtime/cli/create_command.rs b/src/runtime/cli/create_command.rs index 572840ca716b..1a1288200af4 100644 --- a/src/runtime/cli/create_command.rs +++ b/src/runtime/cli/create_command.rs @@ -2318,7 +2318,7 @@ impl Example { let response = async_http.send_sync()?; - match response.status_code { + match response.response().status_code { 404 => return Err(crate::Error::GitHubRepositoryNotFound), 403 => return Err(crate::Error::HTTPForbidden), 429 => return Err(crate::Error::HTTPTooManyRequests), @@ -2327,7 +2327,11 @@ impl Example { _ => return Err(crate::Error::HTTPError), } - let content_type: &[u8] = response.headers.get(b"content-type").unwrap_or(b""); + let content_type: &[u8] = response + .response() + .headers + .get(b"content-type") + .unwrap_or(b""); let is_expected_content_type = content_type == b"application/x-gzip"; if !is_expected_content_type { @@ -2421,7 +2425,7 @@ impl Example { let mut response = async_http.send_sync()?; - match response.status_code { + match response.response().status_code { 404 => return Err(crate::Error::ExampleNotFound), 403 => return Err(crate::Error::HTTPForbidden), 429 => return Err(crate::Error::HTTPTooManyRequests), @@ -2519,12 +2523,12 @@ impl Example { refresher.maybe_refresh(); - if response.status_code != 200 { + if response.response().status_code != 200 { progress.end(); refresher.refresh(); bun_core::pretty_errorln!( "Error fetching tarball: {}", - response.status_code, + response.response().status_code, ); Global::exit(1); } @@ -2580,10 +2584,10 @@ impl Example { } }; - if response.status_code != 200 { + if response.response().status_code != 200 { bun_core::pretty_errorln!( "{} {} fetching examples :( ", - response.status_code, + response.response().status_code, bstr::BStr::new(mutable.list.as_slice()), ); Global::exit(1); diff --git a/src/runtime/cli/pm_view_command.rs b/src/runtime/cli/pm_view_command.rs index 517dc2fd0f17..f09d2643187d 100644 --- a/src/runtime/cli/pm_view_command.rs +++ b/src/runtime/cli/pm_view_command.rs @@ -141,8 +141,13 @@ pub(crate) fn view( } }; - if res.status_code >= 400 { - npm::response_error::(&req, &res, Some((name, version)), &mut response_buf)?; + if res.response().status_code >= 400 { + npm::response_error::( + &req, + res.response(), + Some((name, version)), + &mut response_buf, + )?; } let mut log = bun_ast::Log::init(); diff --git a/src/runtime/cli/publish_command.rs b/src/runtime/cli/publish_command.rs index 56429e745fb1..e4d7137c704b 100644 --- a/src/runtime/cli/publish_command.rs +++ b/src/runtime/cli/publish_command.rs @@ -852,7 +852,7 @@ impl PublishCommand { let Ok(res) = req.send_sync() else { return false; }; - if res.status_code != 200 { + if res.response().status_code != 200 { return false; } @@ -985,14 +985,15 @@ impl PublishCommand { } }; - match res.status_code { + match res.response().status_code { 400..=u32::MAX => { let prompt_for_otp = 'prompt_for_otp: { - if res.status_code != 401 { + if res.response().status_code != 401 { break 'prompt_for_otp false; } - if let Some(www_authenticate) = res.headers.get(b"www-authenticate") { + if let Some(www_authenticate) = res.response().headers.get(b"www-authenticate") + { let mut iter = strings::split(www_authenticate, b","); while let Some(part) = iter.next() { let trimmed = strings::trim(part, &strings::WHITESPACE_CHARS); @@ -1024,7 +1025,7 @@ impl PublishCommand { // general error Npm::response_error::( &req, - &res, + res.response(), Some((&ctx.package_name, &ctx.package_version)), &mut response_buf, )?; @@ -1033,6 +1034,7 @@ impl PublishCommand { // https://github.com/npm/cli/blob/534ad7789e5c61f579f44d782bdd18ea3ff1ee20/node_modules/npm-registry-fetch/lib/check-response.js#L14 // ignore if x-local-cache exists if let Some(notice) = res + .response() .headers .get_if_other_is_absent(b"npm-notice", b"x-local-cache") { @@ -1082,11 +1084,11 @@ impl PublishCommand { } }; - match otp_res.status_code { + match otp_res.response().status_code { 400..=u32::MAX => { Npm::response_error::( &otp_req, - &otp_res, + otp_res.response(), Some((&ctx.package_name, &ctx.package_version)), &mut response_buf, )?; @@ -1095,6 +1097,7 @@ impl PublishCommand { // https://github.com/npm/cli/blob/534ad7789e5c61f579f44d782bdd18ea3ff1ee20/node_modules/npm-registry-fetch/lib/check-response.js#L14 // ignore if x-local-cache exists if let Some(notice) = otp_res + .response() .headers .get_if_other_is_absent(b"npm-notice", b"x-local-cache") { @@ -1301,11 +1304,11 @@ impl PublishCommand { } }; - match res.status_code { + match res.response().status_code { 202 => { // retry let nanoseconds: u64 = 'nanoseconds: { - if let Some(retry) = res.headers.get(b"retry-after") { + if let Some(retry) = res.response().headers.get(b"retry-after") { 'default: { let trimmed = strings::trim(retry, &strings::WHITESPACE_CHARS); @@ -1360,6 +1363,7 @@ impl PublishCommand { // https://github.com/npm/cli/blob/534ad7789e5c61f579f44d782bdd18ea3ff1ee20/node_modules/npm-registry-fetch/lib/check-response.js#L14 // ignore if x-local-cache exists if let Some(notice) = res + .response() .headers .get_if_other_is_absent(b"npm-notice", b"x-local-cache") { @@ -1373,7 +1377,7 @@ impl PublishCommand { _ => { Npm::response_error::( &req, - &res, + res.response(), Some((&ctx.package_name, &ctx.package_version)), response_buf, )?; diff --git a/src/runtime/cli/test/parallel/Channel.rs b/src/runtime/cli/test/parallel/Channel.rs index 5b9584ad5b41..8858327c434e 100644 --- a/src/runtime/cli/test/parallel/Channel.rs +++ b/src/runtime/cli/test/parallel/Channel.rs @@ -4,28 +4,31 @@ //! kernel buffer never truncates a frame. The owner type provides //! `on_channel_frame(kind, &mut Frame::Reader)` and `on_channel_done()`. //! -//! POSIX backend: `uws::NewSocketHandler` adopted from a socketpair fd. +//! POSIX backend: Protocol v2 (`SocketKind::TestChannel`) over a socketpair +//! fd; the refcounted [`ChannelState`] is the socket owner, so the dispatch +//! trampoline holds it alive across every callback and no raw ext-slot +//! pointer exists. //! Windows backend: `uv::Pipe` over the inherited duplex named-pipe end (same //! mechanism as `Bun.spawn({ipc})` / `process.send()`). //! //! Lifetime: a `Channel` is embedded as a field in an owner that outlives all //! uv/usockets callbacks (the coordinator's `Worker[]`, or the worker's -//! `WorkerLoop` which lives for the process). The owner is recovered via -//! `container_of` (field offset) so the channel default-inits without a -//! self-pointer. `Drop` assumes no write is in flight — true for both call -//! sites (start() errdefer and reap_worker after the peer has exited). +//! `WorkerLoop` which lives for the process). Frame delivery goes through the +//! `ChannelState.owner` backref (set at adopt via `IntrusiveField::OFFSET`, +//! cleared in `Drop`); everything socket-facing lives in the refcounted state. -#[cfg(not(windows))] -use core::ffi::c_void; +use core::cell::Cell; use core::marker::PhantomData; +#[cfg(not(windows))] use bun_collections::VecExt; +use bun_jsc::JsCell; use bun_jsc::virtual_machine::VirtualMachine; use bun_sys::Fd; #[cfg(not(windows))] use bun_sys::FdExt as _; #[cfg(not(windows))] -use bun_uws as uws; +use bun_usockets as uws; #[cfg(windows)] use bun_libuv_sys::{UvHandle as _, UvStream as _}; @@ -43,97 +46,286 @@ pub trait ChannelOwner: bun_core::IntrusiveField> { fn on_channel_done(&mut self); } -// The struct itself carries no `ChannelOwner` bound so that owners -// (Worker, WorkerCommands) can embed `Channel` as a field before their -// `impl ChannelOwner` is in scope. Method impls that recover the owner via -// `IntrusiveField::OFFSET` keep the bound. (Rust also forbids a stricter bound -// on `Drop` than on the struct, so Drop/Default below are unbounded too.) -pub struct Channel { +#[cfg(not(windows))] +pub type Socket = uws::NewSocketHandler; +#[cfg(windows)] +pub type Socket = (); + +/// Monomorphized per-`Owner` frame-delivery hooks; set at adopt alongside +/// the erased backref, cleared with it in `Channel::drop`. Type erasure here +/// keeps [`ChannelState`] non-generic, so the single `TestChannel` kind has +/// exactly one owner type in the link-time kind table. +struct OwnerHooks { + /// SAFETY (caller of both): `p` is the live erased owner stored next to + /// these hooks (module-doc lifetime: the owner outlives all callbacks). + frame: unsafe fn(*mut (), frame::Kind, &mut frame::Reader<'_>), + done: unsafe fn(*mut ()), +} + +/// SAFETY: `p` is the live `Owner` these monomorphized hooks were built for. +unsafe fn frame_thunk( + p: *mut (), + kind: frame::Kind, + rd: &mut frame::Reader<'_>, +) { + // SAFETY: caller contract above. + unsafe { &mut *p.cast::() }.on_channel_frame(kind, rd); +} + +/// SAFETY: `p` is the live `Owner` these monomorphized hooks were built for. +unsafe fn done_thunk(p: *mut ()) { + // SAFETY: caller contract above. + unsafe { &mut *p.cast::() }.on_channel_done(); +} + +/// Refcounted transport state; on POSIX this is the Protocol v2 socket owner +/// for `SocketKind::TestChannel`. Refs: the embedding [`Channel`] holds one +/// (released in its `Drop`); the socket core holds one from `from_fd_owned` +/// until the terminal callback. +#[derive(bun_ptr::RefCounted)] +pub struct ChannelState { + ref_count: bun_ptr::RefCount, + /// Erased backref for frame delivery only (owner dispatch, not socket + /// lifecycle); null before `adopt` and after `Channel::drop`. + owner: Cell<*mut ()>, + /// Delivery hooks for the erased owner; set/cleared with `owner`. + hooks: Cell>, /// Incoming bytes that don't yet form a complete frame. - pub r#in: Vec, + incoming: JsCell>, /// Outgoing bytes the kernel didn't accept yet. - pub out: Vec, - pub done: bool, + out: JsCell>, + done: Cell, + #[cfg(not(windows))] + socket: Cell, +} - pub backend: Backend, +impl ChannelState { + fn new() -> bun_ptr::RefPtr { + bun_ptr::RefPtr::new(ChannelState { + ref_count: bun_ptr::RefCount::init(), + owner: Cell::new(core::ptr::null_mut()), + hooks: Cell::new(None), + incoming: JsCell::new(Vec::new()), + out: JsCell::new(Vec::new()), + done: Cell::new(false), + #[cfg(not(windows))] + socket: Cell::new(Socket::DETACHED), + }) + } - _owner: PhantomData<*mut Owner>, -} + fn deliver_frame(&self, kind: frame::Kind, rd: &mut frame::Reader<'_>) { + let owner = self.owner.get(); + if !owner.is_null() + && let Some(hooks) = self.hooks.get() + { + // SAFETY: the owner embeds the `Channel` holding this state and + // outlives all callbacks (module doc); nulled in `Channel::drop`, + // and the hooks were monomorphized for exactly this owner type. + unsafe { (hooks.frame)(owner, kind, rd) }; + } + } -#[cfg(windows)] -pub type Backend = WindowsBackend; -#[cfg(not(windows))] -pub type Backend = PosixBackend; + fn mark_done(&self) { + if self.done.replace(true) { + return; + } + let owner = self.owner.get(); + if !owner.is_null() + && let Some(hooks) = self.hooks.get() + { + // SAFETY: see `deliver_frame`. + unsafe { (hooks.done)(owner) }; + } + } -impl Default for Channel { - fn default() -> Self { - Self { - r#in: Vec::new(), - out: Vec::new(), - done: false, - backend: Backend::default(), - _owner: PhantomData, + // -- frame decode (shared) ------------------------------------------- + + fn ingest(&self, data: &[u8]) { + if self.done.get() { + return; + } + self.incoming.with_mut(|v| v.extend_from_slice(data)); + // One frame per iteration, split out of the cell BEFORE delivery: the + // undecoded tail stays in the cell, so a re-entrant ingest (owner + // callback pumping the loop) decodes from a frame boundary, in order. + loop { + enum Step { + Incomplete, + Corrupt, + Frame(Vec), + } + let step = self.incoming.with_mut(|v| { + if v.len() < 5 { + return Step::Incomplete; + } + let len = u32::from_le_bytes(v[..4].try_into().unwrap()); + if len > frame::MAX_PAYLOAD { + return Step::Corrupt; + } + let total = 5usize + len as usize; + if v.len() < total { + return Step::Incomplete; + } + let rest = v.split_off(total); + Step::Frame(core::mem::replace(v, rest)) + }); + match step { + Step::Incomplete => return, + Step::Corrupt => { + self.mark_done(); + return; + } + Step::Frame(frame_bytes) => { + if let Ok(kind) = frame::Kind::try_from(frame_bytes[4]) { + let mut rd = frame::Reader { + p: &frame_bytes[5..], + }; + self.deliver_frame(kind, &mut rd); + } + } + } } } -} -impl Channel { - #[inline] - fn owner(&mut self) -> &mut Owner { - // SAFETY: `self` is always embedded at `Owner::OFFSET` inside an - // `Owner` that outlives all callbacks (see module doc). - unsafe { &mut *Owner::from_field_ptr(std::ptr::from_mut(self)) } + // -- POSIX write path -------------------------------------------------- + + #[cfg(not(windows))] + fn send_bytes(&self, frame_bytes: &[u8]) { + if self.done.get() { + return; + } + let queued = self.out.with_mut(|out| { + if out.is_empty() { + false + } else { + out.extend_from_slice(frame_bytes); + true + } + }); + if queued { + return; + } + let wrote = self.socket.get().write(frame_bytes); + let w: usize = if wrote > 0 { + usize::try_from(wrote).unwrap() + } else { + 0 + }; + if w < frame_bytes.len() { + self.out + .with_mut(|out| out.extend_from_slice(&frame_bytes[w..])); + } + } + + /// Best-effort drain of buffered writes (`write` never dispatches, so the + /// cell borrow is safe across it). + #[cfg(not(windows))] + fn flush(&self) { + self.out.with_mut(|out| { + while !out.is_empty() && !self.done.get() { + let wrote = self.socket.get().write(out.as_slice()); + if wrote <= 0 { + return; + } + out.drain_front(usize::try_from(wrote).unwrap()); + } + }); } } -// -- POSIX (usockets) -------------------------------------------------------- +/// Protocol v2 tag for the single `TestChannel` kind-table row; the owner +/// dispatch is type-erased through [`OwnerHooks`], so coordinator and worker +/// share this one non-generic protocol. +#[cfg(not(windows))] +pub struct ChannelProtocol; #[cfg(not(windows))] -pub type Socket = uws::NewSocketHandler; -#[cfg(windows)] -pub type Socket = (); +impl uws::Protocol for ChannelProtocol { + type Owner = ChannelState; + const KIND: uws::SocketKind = uws::SocketKind::TestChannel; + + fn on_data(o: &ChannelState, _s: uws::AnySocket, data: &mut [u8]) { + o.ingest(data); + } + + fn on_writable(o: &ChannelState, _s: uws::AnySocket) { + o.flush(); + } + + fn on_close(o: &ChannelState, _s: uws::AnySocket, _code: uws::CloseCode2, _errno: i32) { + o.socket.set(Socket::DETACHED); + o.mark_done(); + } -pub struct PosixBackend { - pub socket: Socket, + fn on_end(o: &ChannelState, _s: uws::AnySocket) { + // No half-close: peer FIN closes the socket outright. + o.socket.get().close(uws::CloseCode::Normal); + } } -#[cfg(not(windows))] -impl Default for PosixBackend { +// The struct itself carries no `ChannelOwner` bound so that owners +// (Worker, WorkerCommands) can embed `Channel` as a field before their +// `impl ChannelOwner` is in scope. (Rust also forbids a stricter bound +// on `Drop` than on the struct, so Drop/Default below are unbounded too.) +pub struct Channel { + /// Owned ref (`RefPtr` has no `Drop`): released in `Channel::drop` after + /// the owner backref is cleared. + state: bun_ptr::RefPtr, + #[cfg(windows)] + pub backend: WindowsBackend, + _owner: PhantomData<*mut Owner>, +} + +impl Default for Channel { fn default() -> Self { Self { - socket: Socket::DETACHED, + state: ChannelState::new(), + #[cfg(windows)] + backend: WindowsBackend::default(), + _owner: PhantomData, } } } -#[cfg(not(windows))] -impl Channel { - /// Shared embedded group for this channel. Uses `.dynamic` kind + - /// per-Owner vtable because the test-parallel channel is an internal-only - /// one-off whose ext type (`*mut Self`) varies by Owner — not worth a - /// `SocketKind` value of its own. The per-file isolation swap skips - /// `rare.test_parallel_ipc_group` so the coordinator link survives. - fn ensure_posix_group(vm: &mut VirtualMachine) -> &mut uws::SocketGroup { - // borrowck split — `rare_data()` mutably borrows `vm`, but - // the group accessor needs `vm` again for `uws_loop()`. The two touch - // disjoint storage (the `Box` payload vs the loop pointer - // field), so a raw-pointer reborrow is sound here. - let rd: *mut bun_jsc::rare_data::RareData = vm.rare_data(); - // SAFETY: `rd` points into `vm`'s boxed RareData, which outlives this - // call; the accessor only reads `vm.uws_loop()` (a separate field). - let g = unsafe { (*rd).test_parallel_ipc_group(vm) }; - // First Owner to call wins the vtable; coordinator and worker run in - // separate processes so there's never more than one Owner type sharing - // this group. - if g.vtable.is_none() { - // cannot use `uws::vtable::make::>()` - // because `bun_uws_sys::vtable::Handler` requires `Self: 'static` - // and one owner (`WorkerCommands<'a>`) carries a lifetime. The - // hand-rolled `PosixHandlers::::VTABLE` const below mirrors - // exactly what `vtable::make` would produce. - g.vtable = Some(&PosixHandlers::::VTABLE); - } - g +impl Channel { + /// True once the channel is dead (clean close, protocol error, or failed + /// adopt marked via [`Self::set_done`]). + pub fn done(&self) -> bool { + self.state.done.get() + } + + /// Mark dead without firing `on_channel_done` (failed-adopt bookkeeping). + pub fn set_done(&mut self) { + self.state.done.set(true); + } + + /// True while the underlying socket/pipe is still open. When `done` is set + /// with the transport still attached, it was a protocol error (corrupt + /// frame), not a clean close. + pub fn is_attached(&self) -> bool { + #[cfg(windows)] + { + return self.backend.pipe.is_some(); + } + #[cfg(not(windows))] + { + !self.state.socket.get().is_detached() + } + } + + /// True while any encoded bytes are still queued or in flight. + pub fn has_pending_writes(&self) -> bool { + if !self.state.out.get().is_empty() { + return true; + } + #[cfg(windows)] + { + return self.backend.write.is_some(); + } + #[cfg(not(windows))] + { + false + } } } @@ -144,12 +336,31 @@ pub struct WindowsBackend { pub pipe: Option>, /// Read scratch — libuv asks us to allocate before each read. pub read_chunk: [u8; 16 * 1024], - /// Payload owned by the in-flight uv_write; must stay stable until the - /// callback. New writes go to `out` until this completes, then the buffers - /// swap. - pub inflight: Vec, + /// Non-owning: the in-flight write req. `heap::into_raw`'d in + /// `submit_windows_write`, freed exactly once by the write callback. + pub write: Option<*mut ChannelWrite>, +} + +/// Heap-owned uv_write request (same orphaning pattern as `ipc.rs` +/// `WindowsWrite`): libuv owns it until the callback; `Channel::drop` nulls +/// `owner` so a post-drop ECANCELED callback never touches the dead channel. +#[cfg(windows)] +pub struct ChannelWrite { pub write_req: uv::uv_write_t, pub write_buf: uv::uv_buf_t, + /// Payload; the heap allocation is address-stable until the callback. + pub payload: Vec, + /// Type-erased BACKREF to the owning `Channel`; `None` once orphaned. + pub owner: Option<*mut ()>, +} + +#[cfg(windows)] +impl ChannelWrite { + fn destroy(this: *mut ChannelWrite) { + // SAFETY: `this` was produced by heap::into_raw in + // `submit_windows_write`; the write callback fires exactly once. + let _ = unsafe { bun_core::heap::take(this) }; + } } #[cfg(windows)] @@ -158,16 +369,34 @@ impl Default for WindowsBackend { Self { pipe: None, read_chunk: [0u8; 16 * 1024], - inflight: Vec::new(), - write_req: bun_core::ffi::zeroed::(), - write_buf: uv::uv_buf_t::init(b""), + write: None, } } } -// -- adopt ------------------------------------------------------------------- +// -- adopt / send / close ------------------------------------------------------ + +impl Channel { + /// The erased delivery hooks for this `Owner` instantiation. + const OWNER_HOOKS: &'static OwnerHooks = &OwnerHooks { + frame: frame_thunk::, + done: done_thunk::, + }; + + /// Shared embedded group for this channel. The per-file isolation swap + /// skips `rare.test_parallel_ipc_group` so the coordinator link survives. + #[cfg(not(windows))] + fn ensure_posix_group(vm: &mut VirtualMachine) -> &mut uws::SocketGroup { + // borrowck split — `rare_data()` mutably borrows `vm`, but + // the group accessor needs `vm` again for `uws_loop()`. The two touch + // disjoint storage (the `Box` payload vs the loop pointer + // field), so a raw-pointer reborrow is sound here. + let rd: *mut bun_jsc::rare_data::RareData = vm.rare_data(); + // SAFETY: `rd` points into `vm`'s boxed RareData, which outlives this + // call; the accessor only reads `vm.uws_loop()` (a separate field). + unsafe { (*rd).test_parallel_ipc_group(vm) } + } -impl Channel { /// Adopt a duplex fd into the channel and start reading. POSIX: the /// socketpair end. Windows: the inherited named-pipe end (worker side). // callers (`runner.rs`, `Worker.rs`) only hold `&VirtualMachine`; @@ -182,8 +411,15 @@ impl Channel { // thread here; route through the safe singleton accessor. let _ = vm; let vm: &mut VirtualMachine = VirtualMachine::get().as_mut(); + // Frame-delivery backref (cleared in `Drop`). + // SAFETY: `self` is always embedded at `Owner::OFFSET` inside an + // `Owner` that outlives all callbacks (see module doc). + let owner_ptr: *mut Owner = unsafe { Owner::from_field_ptr(std::ptr::from_mut(self)) }; + self.state.owner.set(owner_ptr.cast::<()>()); + self.state.hooks.set(Some(Self::OWNER_HOOKS)); #[cfg(windows)] { + let _ = vm; // With ipc=true // libuv wraps reads/writes in its own framing; both ends use it so // the wrapping is transparent and our payload bytes pass through @@ -214,7 +450,7 @@ impl Channel { return false; } let pipe = bun_core::heap::into_raw(pipe); - if !self.adopt_pipe(vm, pipe) { + if !self.adopt_pipe(core::ptr::null(), pipe) { // Caller still owns `pipe` on adopt_pipe failure. // SAFETY: Box-allocated; close_and_destroy reclaims via heap::take. unsafe { uv::Pipe::close_and_destroy(pipe) }; @@ -225,19 +461,21 @@ impl Channel { #[cfg(not(windows))] { let g = Self::ensure_posix_group(vm); - let Some(sock) = Socket::from_fd( + // Transfers a strong ref to the socket core (released at the + // terminal callback); the other ref stays in `self.state`. + let Some(sock) = Socket::from_fd_owned( g, - uws::SocketKind::Dynamic, + uws::SocketKind::TestChannel, fd, - std::ptr::from_mut(self), - true, + self.state.dupe_ref(), + /*is_ipc=*/ true, ) else { // us_socket_from_fd does NOT take ownership on failure; leaving // the inherited IPC endpoint open keeps the peer process alive. fd.close(); return false; }; - self.backend.socket = sock; + self.state.socket.set(sock); sock.set_timeout(0); true } @@ -256,6 +494,13 @@ impl Channel { /// returning, so the extra ref never holds the process open. #[cfg(windows)] pub fn adopt_pipe(&mut self, _vm: *const VirtualMachine, pipe: *mut uv::Pipe) -> bool { + // Frame-delivery backref (cleared in `Drop`); also set here for the + // coordinator path that calls `adopt_pipe` directly. + // SAFETY: `self` is embedded at `Owner::OFFSET` inside an `Owner` that + // outlives all callbacks (see module doc). + let owner_ptr: *mut Owner = unsafe { Owner::from_field_ptr(std::ptr::from_mut(self)) }; + self.state.owner.set(owner_ptr.cast::<()>()); + self.state.hooks.set(Some(Self::OWNER_HOOKS)); // The read callbacks are expressed via the `StreamReader` trait impl // below and routed through `read_start_ctx`, which stashes `self` in // `handle.data`. @@ -283,7 +528,7 @@ impl Channel { /// part of it (or there's already a backlog), the remainder lands in `out` /// and the writable callback finishes it. pub fn send(&mut self, frame_bytes: &[u8]) { - if self.done { + if self.state.done.get() { return; } #[cfg(windows)] @@ -292,27 +537,17 @@ impl Channel { } #[cfg(not(windows))] { - if !self.out.is_empty() { - self.out.extend_from_slice(frame_bytes); - return; - } - let wrote = self.backend.socket.write(frame_bytes); - let w: usize = if wrote > 0 { - usize::try_from(wrote).unwrap() - } else { - 0 - }; - if w < frame_bytes.len() { - self.out.extend_from_slice(&frame_bytes[w..]); - } + self.state.send_bytes(frame_bytes); } } #[cfg(windows)] fn send_windows(&mut self, frame_bytes: &[u8]) { // A uv_write is in flight — queue behind it. - if !self.backend.inflight.is_empty() { - self.out.extend_from_slice(frame_bytes); + if self.backend.write.is_some() { + self.state + .out + .with_mut(|out| out.extend_from_slice(frame_bytes)); return; } let Some(pipe) = self.backend.pipe.as_mut() else { @@ -331,7 +566,7 @@ impl Channel { if e.get_errno() == bun_sys::E::AGAIN { 0 } else { - self.mark_done(); + self.state.mark_done(); return; } } @@ -339,70 +574,71 @@ impl Channel { if w >= frame_bytes.len() { return; } - self.out.extend_from_slice(&frame_bytes[w..]); + self.state + .out + .with_mut(|out| out.extend_from_slice(&frame_bytes[w..])); self.submit_windows_write(); } #[cfg(windows)] fn submit_windows_write(&mut self) { - if self.out.is_empty() || !self.backend.inflight.is_empty() || self.done { + if self.state.out.get().is_empty() || self.backend.write.is_some() || self.state.done.get() + { return; } - // Capture the raw self pointer for uv_write's `data` field before - // taking any field borrows below (the borrow used by from_mut ends - // immediately; raw pointers carry no lifetime). + // Capture the raw self pointer for the write req's owner backref + // before taking any field borrows below (the borrow used by from_mut + // ends immediately; raw pointers carry no lifetime). let this: *mut Self = core::ptr::from_mut(self); - let Some(pipe) = self.backend.pipe.as_mut() else { - return; + let stream = match self.backend.pipe.as_mut() { + Some(p) => p.as_stream(), + None => return, }; - // Swap: out → inflight (stable for uv_write), out becomes empty. - core::mem::swap(&mut self.backend.inflight, &mut self.out); - self.backend.write_buf = uv::uv_buf_t::init(self.backend.inflight.as_slice()); - if self - .backend - .write_req - .write( - pipe.as_stream(), - &self.backend.write_buf, - this, - // SAFETY: `p` was `this: *mut Self`; libuv invokes on the loop - // thread with no other Rust borrow live, so `&mut *p` is unique. - |p, s| unsafe { WindowsHandlers::::on_write(&mut *p, s) }, - ) - .is_err() - { - self.backend.inflight.clear(); - self.mark_done(); - } - } - - /// True while the underlying socket/pipe is still open. When `done` is set - /// with the transport still attached, it was a protocol error (corrupt - /// frame), not a clean close. - pub fn is_attached(&self) -> bool { - #[cfg(windows)] - { - return self.backend.pipe.is_some(); - } - #[cfg(not(windows))] - { - !self.backend.socket.is_detached() + let mut wr = Box::new(ChannelWrite { + write_req: bun_core::ffi::zeroed(), + write_buf: uv::uv_buf_t::init(b""), // re-init below once the payload address is final + payload: self.state.out.with_mut(core::mem::take), + owner: Some(this.cast::<()>()), + }); + wr.write_buf = uv::uv_buf_t::init(wr.payload.as_slice()); + // Hand ownership to libuv; reclaimed exactly once by `on_write_complete`. + let wr: *mut ChannelWrite = bun_core::heap::into_raw(wr); + self.backend.write = Some(wr); + // SAFETY: `wr` is a freshly-leaked Box; libuv owns it until the write + // callback fires (raw ctx, not `&mut` — the callback frees it). + let rc = unsafe { + (*wr) + .write_req + .write(stream, &(*wr).write_buf, wr, Self::on_write_complete) + }; + if rc.is_err() { + ChannelWrite::destroy(wr); + self.backend.write = None; + self.state.mark_done(); } } - /// True while any encoded bytes are still queued or in flight. - pub fn has_pending_writes(&self) -> bool { - if !self.out.is_empty() { - return true; - } - #[cfg(windows)] - { - return !self.backend.inflight.is_empty(); + #[cfg(windows)] + fn on_write_complete(wr: *mut ChannelWrite, status: uv::ReturnCode) { + // SAFETY: `wr` was handed to uv_write as ctx; libuv returns it here + // exactly once (including the ECANCELED close path). + let owner = unsafe { (*wr).owner }; + ChannelWrite::destroy(wr); + let Some(owner) = owner else { + return; // channel dropped while the write was queued + }; + // SAFETY: `Channel::drop` nulls the backref before the channel's + // memory goes away, so a non-null owner is live. + let this = unsafe { &mut *owner.cast::() }; + this.backend.write = None; + if this.state.done.get() { + return; } - #[cfg(not(windows))] - { - false + if status.is_err() { + this.state.mark_done(); + return; } + this.submit_windows_write(); } /// Best-effort drain of any buffered writes. @@ -413,19 +649,12 @@ impl Channel { } #[cfg(not(windows))] { - while !self.out.is_empty() && !self.done { - let wrote = self.backend.socket.write(self.out.as_slice()); - if wrote <= 0 { - return; - } - let w: usize = usize::try_from(wrote).unwrap(); - self.out.drain_front(w); - } + self.state.flush(); } } pub fn close(&mut self) { - if self.done { + if self.state.done.get() { return; } self.flush(); @@ -444,173 +673,54 @@ impl Channel { } #[cfg(not(windows))] { - self.backend.socket.close(uws::CloseCode::Normal); - } - self.mark_done(); - } - - // -- frame decode (shared) ----------------------------------------------- - - fn ingest(&mut self, data: &[u8]) { - if self.done { - return; + self.state.socket.get().close(uws::CloseCode::Normal); } - self.r#in.extend_from_slice(data); - let mut head: usize = 0; - while self.r#in.len() - head >= 5 { - let len = u32::from_le_bytes(self.r#in[head..][..4].try_into().unwrap()); - if len > frame::MAX_PAYLOAD { - self.mark_done(); - return; - } - if self.r#in.len() - head < 5usize + len as usize { - break; - } - let Ok(kind) = frame::Kind::try_from(self.r#in[head + 4]) else { - head += 5usize + len as usize; - continue; - }; - // borrowck split — `rd` borrows `self.r#in` while - // `owner()` would re-borrow `*self` mutably. Capture the owner raw - // pointer *before* forming `rd` (so the `&mut *self` reborrow ends - // immediately), then recover `&mut Owner` from it after. Same - // `container_of` arithmetic as `owner()`. The callback never - // touches `self.r#in` (it only reads `rd` and may write other - // channel fields / call `send()`), so the aliasing is sound. - // SAFETY: `self` is embedded at `Owner::OFFSET` inside an `Owner` - // that outlives all callbacks (see `Channel::owner()` / module doc). - let owner_ptr: *mut Owner = unsafe { Owner::from_field_ptr(std::ptr::from_mut(self)) }; - let mut rd = frame::Reader { - p: &self.r#in[head + 5..][..len as usize], - }; - // SAFETY: see `Channel::owner()` — `self` is embedded at - // `Owner::OFFSET` inside an `Owner` that outlives all callbacks. - let owner: &mut Owner = unsafe { &mut *owner_ptr }; - owner.on_channel_frame(kind, &mut rd); - head += 5usize + len as usize; - } - self.r#in.drain_front(head); - } - - fn mark_done(&mut self) { - if self.done { - return; - } - self.done = true; - self.owner().on_channel_done(); + self.state.mark_done(); } } impl Drop for Channel { fn drop(&mut self) { - self.done = true; + // Suppress owner callbacks first: the owner may be mid-drop, so a + // close-triggered `on_channel_done` must not form `&mut Owner`. + self.state.done.set(true); + self.state.owner.set(core::ptr::null_mut()); + self.state.hooks.set(None); #[cfg(windows)] { + // Orphan any queued write: libuv still owns the heap req and will + // fire its (possibly ECANCELED) callback, which frees the req and + // must not touch this dying channel. + if let Some(wr) = self.backend.write.take() { + // SAFETY: `wr` stays live until its callback fires (libuv owns it). + unsafe { (*wr).owner = None }; + } if let Some(p) = self.backend.pipe.take() { // SAFETY: Box-allocated; close_and_destroy reclaims via heap::take. unsafe { uv::Pipe::close_and_destroy(bun_core::heap::into_raw(p)) }; } - // `inflight` Vec drops automatically. } #[cfg(not(windows))] { - if !self.backend.socket.is_detached() { - self.backend.socket.close(uws::CloseCode::Normal); - self.backend.socket = Socket::DETACHED; + let sock = self.state.socket.get(); + if !sock.is_detached() { + sock.close(uws::CloseCode::Normal); + self.state.socket.set(Socket::DETACHED); } } - // `in` / `out` Vec drop automatically. + // Release the channel's ref; the socket core's ref (if the terminal + // hasn't run yet) keeps the state alive until dispatch finishes. + self.state.deref(); } } -// -- platform callbacks ------------------------------------------------------ - -/// `vtable.make()` shape: `(ext: **Self, *us_socket_t, …)`. Hand-rolled here -/// instead of `uws::vtable::make::>()` because the -/// upstream `bun_uws_sys::vtable::Handler` trait is `'static`-bounded and one -/// owner (`WorkerCommands<'a>`) carries a lifetime. The trampolines below are -/// the exact shape `vtable::make` would have produced. -#[cfg(not(windows))] -pub(crate) struct PosixHandlers(PhantomData); - -/// Ext slot type for the usockets vtable: the slot holds a `*mut Channel`. -// Inherent associated types are unstable in Rust, so this lives as a free alias. -#[cfg(not(windows))] -pub(crate) type PosixExt = *mut Channel; - -#[cfg(not(windows))] -impl PosixHandlers { - /// Per-Owner static vtable. `&Self::VTABLE` const-promotes to - /// `&'static SocketGroupVTable` (all fields are `Option`; no Drop). - pub(crate) const VTABLE: uws::SocketGroupVTable = uws::SocketGroupVTable { - on_open: None, - on_data: Some(Self::raw_on_data), - on_fd: None, - on_writable: Some(Self::raw_on_writable), - on_close: Some(Self::raw_on_close), - on_timeout: None, - on_long_timeout: None, - on_end: Some(Self::raw_on_end), - on_connect_error: None, - on_connecting_error: None, - on_handshake: None, - }; - - /// Recover `&mut Channel` from the socket ext slot. - /// - /// # Safety - /// `s` is a live us_socket_t whose ext was sized for and stamped with - /// `*mut Channel` in `adopt()`; the owner outlives all usockets - /// callbacks (see module doc). - #[inline(always)] - unsafe fn chan<'a>(s: *mut uws::us_socket_t) -> &'a mut Channel { - // SAFETY: caller upholds this fn's contract — `s` is live and its ext - // slot was stamped with `*mut Channel` in `adopt()`. - unsafe { &mut **(*s).ext::>() } - } - - unsafe extern "C" fn raw_on_data( - s: *mut uws::us_socket_t, - data: *mut u8, - len: core::ffi::c_int, - ) -> *mut uws::us_socket_t { - // SAFETY: usockets guarantees `data[0..len]` is valid for the call. - let slice = unsafe { bun_core::ffi::slice(data, len as usize) }; - // SAFETY: see `chan` doc. - unsafe { Self::chan(s) }.ingest(slice); - s - } - - unsafe extern "C" fn raw_on_writable(s: *mut uws::us_socket_t) -> *mut uws::us_socket_t { - // SAFETY: see `chan` doc. - unsafe { Self::chan(s) }.flush(); - s - } - - unsafe extern "C" fn raw_on_close( - s: *mut uws::us_socket_t, - _code: core::ffi::c_int, - _reason: *mut c_void, - ) -> *mut uws::us_socket_t { - // SAFETY: see `chan` doc. - let chan = unsafe { Self::chan(s) }; - chan.backend.socket = Socket::DETACHED; - chan.mark_done(); - s - } - - unsafe extern "C" fn raw_on_end(s: *mut uws::us_socket_t) -> *mut uws::us_socket_t { - // SAFETY: `s` is a live us_socket_t passed by usockets. - unsafe { (*s).close(bun_uws_sys::CloseCode::normal) }; - s - } -} +// -- Windows read/write callbacks --------------------------------------------- #[cfg(windows)] pub(crate) struct WindowsHandlers(PhantomData); #[cfg(windows)] -impl WindowsHandlers { +impl WindowsHandlers { pub(crate) fn on_alloc(self_: &mut Channel, suggested: usize) -> &mut [u8] { let _ = suggested; &mut self_.backend.read_chunk[..] @@ -623,25 +733,14 @@ impl WindowsHandlers { // SAFETY: Box-allocated; close_and_destroy reclaims via heap::take. unsafe { uv::Pipe::close_and_destroy(bun_core::heap::into_raw(p)) }; } - self_.mark_done(); - } - pub(crate) fn on_write(self_: &mut Channel, status: uv::ReturnCode) { - self_.backend.inflight.clear(); - if self_.done { - return; - } - if status.is_err() { - self_.mark_done(); - return; - } - self_.submit_windows_write(); + self_.state.mark_done(); } } /// Adapter from `UvStream::read_start_ctx` to `WindowsHandlers`; expressed as /// a trait impl so the `extern "C"` trampoline stays zero-alloc. #[cfg(windows)] -impl uv::StreamReader for Channel { +impl uv::StreamReader for Channel { #[inline] fn on_read_alloc(this: &mut Self, suggested_size: usize) -> &mut [u8] { WindowsHandlers::::on_alloc(this, suggested_size) @@ -656,18 +755,21 @@ impl uv::StreamReader for Channel { // `data` points into `(*this).backend.read_chunk` (returned from // `on_read_alloc`). Forming `&mut *this` retags every byte Unique and // pops `data`'s SharedRW tag, so capture the length, drop `data`, then - // re-derive the bytes from the freshly-retagged `this` via a disjoint - // field split (read_chunk → r#in). + // re-derive the bytes from the freshly-retagged `this`. let n = data.len(); let _ = data; // SAFETY: `this` is the live `Channel` stashed in `handle.data` by // `read_start_ctx`; `data` is no longer live so the retag is sound. let this = unsafe { &mut *this }; - if this.done { + if this.state.done.get() { return; } - this.r#in.extend_from_slice(&this.backend.read_chunk[..n]); + // Copy into the state buffer first so no borrow of `read_chunk` + // (a Channel field) is live across the frame callbacks. + this.state + .incoming + .with_mut(|v| v.extend_from_slice(&this.backend.read_chunk[..n])); // Run the shared decode loop; the empty append is a no-op. - this.ingest(&[]); + this.state.ingest(&[]); } } diff --git a/src/runtime/cli/test/parallel/Coordinator.rs b/src/runtime/cli/test/parallel/Coordinator.rs index e56603ed6590..c635fe86035e 100644 --- a/src/runtime/cli/test/parallel/Coordinator.rs +++ b/src/runtime/cli/test/parallel/Coordinator.rs @@ -129,9 +129,8 @@ impl<'a> Coordinator<'a> { nsec: (self.scale_up_after_ms % MS_PER_S) * bun_core::time::NS_PER_MS as i64, }; // SAFETY: event_loop()/usockets_loop() return live pointers for the VM lifetime. - unsafe { - (*(*self.vm.event_loop()).usockets_loop()).tick_with_timeout(Some(&ts)); - } + let loop_ = unsafe { (*self.vm.event_loop()).usockets_loop() }; + bun_usockets::Loop::tick_with_timeout(loop_, Some(&ts)); } else { self.vm.event_loop_ref().auto_tick(); } @@ -459,7 +458,7 @@ impl<'a> Coordinator<'a> { pub(crate) fn try_reap(&mut self, w: &mut Worker) { // SpawnStatus is not Copy (Err arm owns a path); take() // instead of pattern-match-by-copy. - if w.exit_status.is_none() || !w.ipc.done { + if w.exit_status.is_none() || !w.ipc.done() { return; } let status = w.exit_status.take().expect("checked above"); diff --git a/src/runtime/cli/test/parallel/Worker.rs b/src/runtime/cli/test/parallel/Worker.rs index 80541c9d433f..0d62dd36a797 100644 --- a/src/runtime/cli/test/parallel/Worker.rs +++ b/src/runtime/cli/test/parallel/Worker.rs @@ -182,7 +182,7 @@ impl Worker { return Err(crate::Error::ChannelAdoptFailed); } } else { - this.ipc.done = true; + this.ipc.set_done(); } } #[cfg(not(unix))] diff --git a/src/runtime/cli/test/parallel/runner.rs b/src/runtime/cli/test/parallel/runner.rs index 26e51fc4927b..21dfdea230dd 100644 --- a/src/runtime/cli/test/parallel/runner.rs +++ b/src/runtime/cli/test/parallel/runner.rs @@ -695,10 +695,10 @@ pub fn run_as_worker( worker_flush_aggregates(wloop.reporter, vm_ref, ctx, worker_tmp, &mut wloop.cmds); // Drain any backpressure-buffered frames before exit so the coordinator // sees repeat_bufs/junit_file/coverage_file. - while wloop.cmds.channel.has_pending_writes() && !wloop.cmds.channel.done { + while wloop.cmds.channel.has_pending_writes() && !wloop.cmds.channel.done() { // SAFETY: event_loop pointer is valid while vm lives. unsafe { (*vm_ref.event_loop()).tick() }; - if !wloop.cmds.channel.has_pending_writes() || wloop.cmds.channel.done { + if !wloop.cmds.channel.has_pending_writes() || wloop.cmds.channel.done() { break; } // SAFETY: event_loop pointer is valid while vm lives. diff --git a/src/runtime/cli/upgrade_command.rs b/src/runtime/cli/upgrade_command.rs index ebab8377c381..9a317bff6df6 100644 --- a/src/runtime/cli/upgrade_command.rs +++ b/src/runtime/cli/upgrade_command.rs @@ -306,7 +306,7 @@ impl UpgradeCommand { } let response = async_http.send_sync()?; - match response.status_code { + match response.response().status_code { 404 => return Err(crate::Error::HTTP404), 403 => return Err(crate::Error::HTTPForbidden), 429 => return Err(crate::Error::HTTPTooManyRequests), @@ -702,7 +702,7 @@ impl UpgradeCommand { let response = async_http.send_sync()?; - match response.status_code { + match response.response().status_code { 404 => { if use_canary { bun_core::pretty_errorln!( diff --git a/src/runtime/crypto/CryptoHasher.rs b/src/runtime/crypto/CryptoHasher.rs index eb19f059a3f7..6d82e39e7659 100644 --- a/src/runtime/crypto/CryptoHasher.rs +++ b/src/runtime/crypto/CryptoHasher.rs @@ -155,7 +155,7 @@ impl CryptoHasher { drop(unsafe { Box::from_raw(handle) }); } - #[bun_uws::uws_callback(export = "Bun__CryptoHasherExtern__update")] + #[bun_uws_shim::uws_callback(export = "Bun__CryptoHasherExtern__update")] pub fn extern_update(&self, input: &[u8]) -> bool { match self { CryptoHasher::Zig(zig) => { @@ -170,7 +170,7 @@ impl CryptoHasher { } } - #[bun_uws::uws_callback(export = "Bun__CryptoHasherExtern__digest")] + #[bun_uws_shim::uws_callback(export = "Bun__CryptoHasherExtern__digest")] pub fn extern_digest(&self, global: &JSGlobalObject, digest_buf: &mut [u8]) -> u32 { let buf_len = digest_buf.len(); match self { @@ -187,7 +187,7 @@ impl CryptoHasher { } } - #[bun_uws::uws_callback(export = "Bun__CryptoHasherExtern__getDigestSize", no_catch)] + #[bun_uws_shim::uws_callback(export = "Bun__CryptoHasherExtern__getDigestSize", no_catch)] pub fn extern_digest_size(&self) -> u32 { match self { CryptoHasher::Zig(inner) => inner.get().digest_length as u32, @@ -196,7 +196,7 @@ impl CryptoHasher { } } - #[bun_uws::uws_callback(export = "Bun__CryptoHasherExtern__isXof", no_catch)] + #[bun_uws_shim::uws_callback(export = "Bun__CryptoHasherExtern__isXof", no_catch)] pub fn extern_is_xof(&self) -> bool { match self { CryptoHasher::Zig(inner) => matches!( diff --git a/src/runtime/dispatch.rs b/src/runtime/dispatch.rs index cd8f29b32f70..1b52ad590051 100644 --- a/src/runtime/dispatch.rs +++ b/src/runtime/dispatch.rs @@ -28,7 +28,7 @@ use bun_event_loop::AnyTask::AnyTask; use bun_event_loop::ManagedTask::ManagedTask; use bun_event_loop::{Task, task_tag}; -// `FilePoll::on_update` dispatch is POSIX-only (the symbol is declared +// `__bun_run_file_poll` dispatch is POSIX-only (the symbol is declared // `extern "Rust"` in `aio::posix_event_loop` and never referenced on Windows, // where libuv drives I/O readiness directly). #[cfg(not(windows))] @@ -626,14 +626,15 @@ pub fn tick_queue_with_count( // FilePoll dispatch // ════════════════════════════════════════════════════════════════════════════ -/// Hot-path dispatcher for `bun_io::FilePoll::on_update`. Declared +/// Hot-path dispatcher for `bun_io` FilePoll registry events. Declared /// `extern "Rust"` in `bun_io::posix_event_loop`; the low-tier `FilePoll` /// calls this directly (link-time resolved) so it never names `Subprocess` / /// `FileSink` / `DNSResolver` / etc. /// /// # Safety -/// `poll` must point at a live [`FilePoll`] for the duration of the call -/// (guaranteed by `FilePoll::on_update`, the only caller). +/// `poll` must point at a live [`FilePoll`] at entry (guaranteed by the +/// registry-shim dispatch in `posix_event_loop`, the only caller). The +/// per-tag handler may deinit the poll; `poll` is dead after that. #[cfg(not(windows))] #[unsafe(no_mangle)] pub unsafe fn __bun_run_file_poll(poll: *mut FilePoll, size_or_offset: i64) { @@ -755,7 +756,7 @@ pub unsafe fn __bun_run_file_poll(poll: *mut FilePoll, size_or_offset: i64) { } poll_tag::NULL => { - // The low-tier `on_update` already logged before calling the hook + // The low-tier dispatch already logged before calling the hook // when it was null; here we just no-op the unknown tag. let _ = (size_or_offset, hup); } diff --git a/src/runtime/dns_jsc/dns.rs b/src/runtime/dns_jsc/dns.rs index c6cf21c38f93..a0b806efcf52 100644 --- a/src/runtime/dns_jsc/dns.rs +++ b/src/runtime/dns_jsc/dns.rs @@ -29,7 +29,7 @@ use bun_sys::windows::libuv; #[cfg(not(windows))] use bun_sys::{self as sys}; use bun_threading::thread_pool; -use bun_uws::{ConnectingSocket, Loop}; +use bun_usockets::{ConnectingSocket, Loop}; use bun_wyhash::hash as wyhash; use super::cares_jsc::error_to_deferred; @@ -289,8 +289,7 @@ pub(super) mod lib_info { // SAFETY: see above. let machport = unsafe { (*request).backend.as_libinfo().machport }; let rc = poll.register_with_fd( - // SAFETY: JS event loop is live for the resolver's lifetime. - unsafe { ctx.platform_event_loop() }, + ctx.loop_(), Async::PollKind::Machport, Async::posix_event_loop::OneShotFlag::OneShot, // bitcast u32 mach_port → i32 fd @@ -2521,7 +2520,8 @@ pub mod internal { } // `Request` is passed opaquely to usockets and round-tripped back into - // Rust; the C side never dereferences fields, so layout is irrelevant. + // this module; the callee (`bun_usockets` cabi.rs) never dereferences it, + // so layout is irrelevant. #[allow(improper_ctypes)] unsafe extern "C" { fn us_internal_dns_callback(socket: *mut ConnectingSocket, req: *mut Request); @@ -2723,10 +2723,20 @@ pub mod internal { notify }; - // is this correct, or should it go after the loop? + // Socket enqueues run under the lock: us_getaddrinfo_cancel linearizes + // on it, so a failed cancel proves the loop enqueue already happened — + // teardown after a failed cancel can't race a late cross-thread push. + let mut deferred = Vec::new(); + for query in notify { + match query { + DNSRequestOwner::Socket(_) => query.notify_threadsafe(req), + // Prefetch/Quic notify re-acquires this lock (freeRequest). + other => deferred.push(other), + } + } drop(guard); - for query in notify { + for query in deferred { query.notify_threadsafe(req); } } @@ -2835,7 +2845,7 @@ pub mod internal { Async::Owner::new(Async::posix_event_loop::poll_tag::REQUEST, req.cast::<()>()), ); // SAFETY: `poll` is a freshly-allocated hive slot; `loop_.r#loop()` is the live uws loop. - let rc = unsafe { (*poll).register(&mut *loop_.r#loop(), Async::PollKind::Machport, true) }; + let rc = unsafe { (*poll).register(loop_.r#loop(), Async::PollKind::Machport, true) }; if rc.is_err() { // SAFETY: `poll` is the freshly-allocated hive slot returned by @@ -2927,7 +2937,7 @@ pub mod internal { let poll = (*req).libinfo.file_poll.unwrap().as_mut(); // `as i32` is the same-width bitcast of the u32 mach port. poll.fd = sys::Fd::from_native(machport as i32); - match poll.register(&mut *Loop::get(), Async::PollKind::Machport, true) { + match poll.register(Loop::get(), Async::PollKind::Machport, true) { sys::Result::Err(_) => { bun_output::scoped_log!( dns, @@ -3057,7 +3067,6 @@ pub mod internal { #[cfg(target_os = "macos")] { - use bun_uws::InternalLoopDataExt as _; if !env_var::feature_flag::BUN_FEATURE_FLAG_DISABLE_DNS_CACHE_LIBINFO .get() .unwrap_or(false) @@ -3065,7 +3074,7 @@ pub mod internal { // SAFETY: `loop_` is the live uSockets loop; its parent tag/ptr // was set by `EventLoopHandle::set_as_parent_of` at startup. let handle = unsafe { - let (tag, ptr) = (*loop_).internal_loop_data.get_parent(); + let (tag, ptr) = (*loop_).internal_loop_data.get_parent_raw(); jsc::EventLoopHandle::from_tag_ptr(tag, ptr) }; let res = lookup_libinfo(req, handle); @@ -4852,7 +4861,11 @@ impl Resolver { // SAFETY: `Loop::get()` is the live per-thread uws loop; // `new_poll` is a fresh heap allocation with a zeroed `uv_poll_t`. if unsafe { - uv::uv_poll_init_socket((*Loop::get()).uv_loop, &mut (*new_poll).poll, fd as _) + uv::uv_poll_init_socket( + (*Loop::get()).uv_loop.cast(), + &mut (*new_poll).poll, + fd as _, + ) } < 0 { UvDnsPoll::destroy(new_poll); @@ -4900,8 +4913,9 @@ impl Resolver { Async::posix_event_loop::poll_tag::DNS_RESOLVER, self.as_ctx_ptr().cast::<()>(), ); - // SAFETY: `event_loop_handle` is set once VM is initialized; live for VM lifetime. - let loop_ = unsafe { &mut *self.vm().event_loop_handle.unwrap() }; + // `event_loop_handle` is set once VM is initialized; live for VM + // lifetime. Raw pointer through — register/unregister take *mut. + let loop_ = self.vm().event_loop_handle.unwrap(); // SAFETY: single-JS-thread; the `&mut PollsMap` borrow does not span // any re-entrant call (`FilePoll::register` is a syscall wrapper). let polls = unsafe { self.polls.get_mut() }; diff --git a/src/runtime/error.rs b/src/runtime/error.rs index 84720687203d..fa69019edd71 100644 --- a/src/runtime/error.rs +++ b/src/runtime/error.rs @@ -483,19 +483,19 @@ impl From for Error { } } -impl From for Error { +impl From for Error { #[inline] - fn from(_: bun_uws::ConnectError) -> Self { + fn from(_: bun_uws_shim::ConnectError) -> Self { Self::FailedToOpenSocket } } -impl From for Error { +impl From for Error { #[inline] - fn from(e: bun_uws::ssl_wrapper::InitError) -> Self { + fn from(e: bun_uws_shim::ssl_wrapper::InitError) -> Self { match e { - bun_uws::ssl_wrapper::InitError::OutOfMemory => Self::Alloc(bun_alloc::AllocError), - bun_uws::ssl_wrapper::InitError::InvalidOptions => Self::InvalidOptions, + bun_uws_shim::ssl_wrapper::InitError::OutOfMemory => Self::Alloc(bun_alloc::AllocError), + bun_uws_shim::ssl_wrapper::InitError::InvalidOptions => Self::InvalidOptions, } } } @@ -579,13 +579,13 @@ impl From for bun_jsc::CrateError { } } -impl From for bun_uws_sys::Error { +impl From for bun_uws_shim::Error { #[inline] fn from(e: Error) -> Self { match e { - Error::Alloc(a) => bun_uws_sys::Error::Alloc(a), - Error::Sys(s) => bun_uws_sys::Error::Sys(s), - _ => bun_uws_sys::Error::RequestBodyTooLarge, + Error::Alloc(a) => bun_uws_shim::Error::Alloc(a), + Error::Sys(s) => bun_uws_shim::Error::Sys(s), + _ => bun_uws_shim::Error::RequestBodyTooLarge, } } } diff --git a/src/runtime/ffi/ffi_body.rs b/src/runtime/ffi/ffi_body.rs index 0027fad813d5..5bae958c6b8b 100644 --- a/src/runtime/ffi/ffi_body.rs +++ b/src/runtime/ffi/ffi_body.rs @@ -22,7 +22,7 @@ use bun_paths::PathBuffer; use bun_resolver::fs as Fs; use bun_sys; -// ─── Local shims for upstream surfaces not yet wired (Phase D) ─────────────── +// ─── Local shims for upstream surfaces not yet wired ─────────────── /// `bun.sys.directoryExistsAt(FD.cwd(), path).isTrue()` — local helper while /// `bun_core::Fd` lacks an inherent forwarder. diff --git a/src/runtime/hw_exports.rs b/src/runtime/hw_exports.rs index dd343b1a658c..b04eaf566ac8 100644 --- a/src/runtime/hw_exports.rs +++ b/src/runtime/hw_exports.rs @@ -153,7 +153,9 @@ pub fn close_child_ipc(global: &JSGlobalObject) { let vm = global.bun_vm().as_mut(); if let Some(current_ipc) = vm.get_ipc_instance() { // SAFETY: `get_ipc_instance` returns the live boxed `IPCInstance`. - unsafe { (*current_ipc).data.close_socket_next_tick(true) }; + unsafe { &*current_ipc } + .queue() + .close_socket_next_tick(true); } } @@ -208,9 +210,9 @@ pub(crate) mod sql_hooks { } unsafe fn ssl_ctx_get_or_create( cache: *mut c_void, - opts: &bun_uws::us_bun_socket_context_options_t, - err: &mut bun_uws::create_bun_socket_error_t, - ) -> *mut bun_uws::SslCtx { + opts: &bun_uws_shim::us_bun_socket_context_options_t, + err: &mut bun_uws_shim::create_bun_socket_error_t, + ) -> *mut bun_uws_shim::SslCtx { // SAFETY: `cache` is `&runtime_state().ssl_ctx_cache`. let cache = unsafe { &mut *cache.cast::() }; cache @@ -236,7 +238,7 @@ pub(crate) mod sql_hooks { } unsafe fn ssl_config_as_usockets_client( this: *const c_void, - ) -> bun_uws::us_bun_socket_context_options_t { + ) -> bun_uws_shim::us_bun_socket_context_options_t { // SAFETY: `this` is a live boxed `SSLConfig` from `ssl_config_from_js`. unsafe { &*this.cast::() }.as_usockets_for_client_verification() } diff --git a/src/runtime/ipc_host.rs b/src/runtime/ipc_host.rs index 27d42668437d..5629f390e410 100644 --- a/src/runtime/ipc_host.rs +++ b/src/runtime/ipc_host.rs @@ -145,8 +145,8 @@ pub(crate) fn do_send( crate::socket::listener::ListenerType::Uws(socket_uws) => { // may need to handle ssl case // SAFETY: `socket_uws` is a live non-null `*mut ListenSocket` - // owned by uSockets; `get_socket` only reinterpret-casts to - // `&mut us_socket_t` and `get_fd` is a read-only FFI call. + // owned by uSockets; `get_socket` borrows the embedded + // header and `get_fd` is a read-only accessor. let fd = unsafe { &mut *socket_uws }.get_socket().get_fd(); zig_handle = Some(Handle::init(fd, handle)); } @@ -225,8 +225,8 @@ pub(crate) fn Bun__Process__send(global: &JSGlobalObject, frame: &CallFrame) -> // mutable); `get_ipc_instance` writes `self.ipc` on first call. let vm = global.bun_vm().as_mut(); // SAFETY: `get_ipc_instance` returns the live boxed `IPCInstance` (or - // `None`); the `&mut SendQueue` borrow is scoped to this call and does not - // alias `vm` (the instance is heap-allocated, not embedded in `vm`). - let ipc = vm.get_ipc_instance().map(|i| unsafe { &mut (*i).data }); + // `None`); `queue()` is the audited `JsCell` projection and the borrow is + // scoped to this call. + let ipc = vm.get_ipc_instance().map(|i| unsafe { &*i }.queue()); do_send(ipc, global, frame, FromEnum::Process) } diff --git a/src/runtime/jsc_hooks.rs b/src/runtime/jsc_hooks.rs index deafdd440bff..a76e01ef8667 100644 --- a/src/runtime/jsc_hooks.rs +++ b/src/runtime/jsc_hooks.rs @@ -47,6 +47,7 @@ use bun_resolve_builtins::Module as HardcodedModule; use bun_resolver::fs as Fs; use bun_resolver::node_fallbacks; use bun_resolver::{GlobalCache, ResultUnion as ResolveResultUnion}; +use bun_usockets::Loop as UwsLoop; use crate::cli::upgrade_command::FileSystemTmpdirExt as _; use crate::timer; @@ -227,11 +228,11 @@ pub(crate) unsafe fn runtime_state_of(vm: *mut VirtualMachine) -> *mut RuntimeSt /// /// # Safety /// `vm` must be the live per-thread VM; called only from the JS thread. -pub(crate) unsafe fn default_client_ssl_ctx(vm: *mut VirtualMachine) -> *mut bun_uws::SslCtx { +pub(crate) unsafe fn default_client_ssl_ctx(vm: *mut VirtualMachine) -> *mut bun_usockets::SslCtx { // SAFETY: per fn contract; `rare_data()` lazy-inits the box. let rare = unsafe { (*vm).rare_data() }; if rare.default_client_ssl_ctx.is_none() { - let mut err = bun_uws::create_bun_socket_error_t::none; + let mut err = bun_usockets::create_bun_socket_error_t::none; let state = runtime_state(); debug_assert!( !state.is_null(), @@ -249,7 +250,8 @@ pub(crate) unsafe fn default_client_ssl_ctx(vm: *mut VirtualMachine) -> *mut bun // digest. The +1 ref returned here is held for the VM's lifetime, so // the entry never tombstones. match cache.get_or_create_opts(&Default::default(), &mut err) { - Some(ctx) => rare.default_client_ssl_ctx = Some(ctx), + // boringssl-sys vs bssl-sys nominals of the same C struct. + Some(ctx) => rare.default_client_ssl_ctx = Some(ctx.cast()), None => bun_core::Output::panic(format_args!( "default client SSL_CTX init failed: {}", bun_core::fmt::s(err.message().unwrap_or(b"unknown")), @@ -267,9 +269,9 @@ pub(crate) unsafe fn default_client_ssl_ctx(vm: *mut VirtualMachine) -> *mut bun /// `vm` must be the live per-thread VM; called only from the JS thread. unsafe fn ssl_ctx_cache_get_or_create( _vm: *mut VirtualMachine, - opts: &bun_uws::SocketContext::BunSocketContextOptions, - err: &mut bun_uws::create_bun_socket_error_t, -) -> Option<*mut bun_uws::SslCtx> { + opts: &bun_usockets::BunSocketContextOptions, + err: &mut bun_usockets::create_bun_socket_error_t, +) -> Option<*mut bun_usockets::SslCtx> { let state = runtime_state(); debug_assert!( !state.is_null(), @@ -278,7 +280,8 @@ unsafe fn ssl_ctx_cache_get_or_create( // SAFETY: per-thread `RuntimeState`; `ssl_ctx_cache` has a stable // address for the VM's lifetime and is only touched from the JS thread. let cache = unsafe { &mut (*state).ssl_ctx_cache }; - cache.get_or_create_opts(opts, err) + // boringssl-sys vs bssl-sys nominals of the same C struct. + cache.get_or_create_opts(opts, err).map(|p| p.cast()) } // ════════════════════════════════════════════════════════════════════════════ @@ -914,8 +917,9 @@ unsafe fn auto_tick(vm: *mut VirtualMachine) { .pending_unref_counter .swap(0, core::sync::atomic::Ordering::Relaxed); if pending_unref > 0 { - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { (*loop_).unref_count(pending_unref) }; + // Raw-place twin: `loop_` is the live per-thread uws loop; a + // `&mut Loop` would span `pending_wakeups` (foreign fetch_add). + bun_usockets::Loop::unref_count_raw(loop_, pending_unref); } } @@ -942,11 +946,8 @@ unsafe fn auto_tick(vm: *mut VirtualMachine) { // poll. The uws loop must always be polled // (`tickWithTimeout`/`tickWithoutIdle`); `EventLoop::tick()` would only // drain JS tasks and never touch kqueue/epoll. - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { (*loop_).tick_without_idle() }; + UwsLoop::tick_without_idle(loop_); // Still run the post-poll hooks. - // SAFETY: per fn contract. - unsafe { (*vm).on_after_event_loop() }; // SAFETY: `vm.global` is set during `VirtualMachine::init` and outlives the VM. unsafe { (*(*vm).global).handle_rejected_promises() }; return; @@ -997,13 +998,9 @@ unsafe fn auto_tick(vm: *mut VirtualMachine) { vm.cast(), ) }; - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { - (*loop_).tick_with_timeout(if have_timeout { Some(×pec) } else { None }) - }; + UwsLoop::tick_with_timeout(loop_, if have_timeout { Some(×pec) } else { None }); } else { - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { (*loop_).tick_without_idle() }; + UwsLoop::tick_without_idle(loop_); } } @@ -1021,8 +1018,6 @@ unsafe fn auto_tick(vm: *mut VirtualMachine) { #[cfg(not(unix))] let _ = state; - // SAFETY: per fn contract. - unsafe { (*vm).on_after_event_loop() }; // SAFETY: `vm.global` is set during `VirtualMachine::init` and outlives the VM. unsafe { (*(*vm).global).handle_rejected_promises() }; } @@ -1060,8 +1055,9 @@ unsafe fn auto_tick_active(vm: *mut VirtualMachine) { .pending_unref_counter .swap(0, core::sync::atomic::Ordering::Relaxed); if pending_unref > 0 { - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { (*loop_).unref_count(pending_unref) }; + // Raw-place twin: `loop_` is the live per-thread uws loop; a + // `&mut Loop` would span `pending_wakeups` (foreign fetch_add). + bun_usockets::Loop::unref_count_raw(loop_, pending_unref); } } @@ -1076,10 +1072,7 @@ unsafe fn auto_tick_active(vm: *mut VirtualMachine) { } if state.is_null() { - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { (*loop_).tick_without_idle() }; - // SAFETY: per fn contract. - unsafe { (*vm).on_after_event_loop() }; + UwsLoop::tick_without_idle(loop_); return; } @@ -1111,13 +1104,9 @@ unsafe fn auto_tick_active(vm: *mut VirtualMachine) { vm.cast(), ) }; - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { - (*loop_).tick_with_timeout(if have_timeout { Some(×pec) } else { None }) - }; + UwsLoop::tick_with_timeout(loop_, if have_timeout { Some(×pec) } else { None }); } else { - // SAFETY: `loop_` is the live per-thread uws loop. - unsafe { (*loop_).tick_without_idle() }; + UwsLoop::tick_without_idle(loop_); } } @@ -1129,9 +1118,6 @@ unsafe fn auto_tick_active(vm: *mut VirtualMachine) { } #[cfg(not(unix))] let _ = state; - - // SAFETY: per fn contract. - unsafe { (*vm).on_after_event_loop() }; } /// `printException` / `printErrorlikeObject` — formats `value` to stderr via @@ -5259,7 +5245,7 @@ pub(crate) fn __bun_get_vm_ctx(kind: bun_io::AllocatorType) -> bun_io::EventLoop /// `dateForHeader`: wrap the header bytes in a /// `bun.String`, call `String.parseDate(&s, vm.global)`, return the integer /// value if finite and non-negative, else `None`. Lives in this crate (callers -/// are `server::FileRoute` / `server::StaticRoute`) so `bun_uws_sys` (T0) has +/// are `server::FileRoute` / `server::StaticRoute`) so `bun_uws_shim` (T0) has /// no upward hook into `bun_jsc`. pub fn parse_http_date(value: &[u8]) -> Option { let vm = bun_jsc::virtual_machine::VirtualMachine::get(); diff --git a/src/runtime/napi/napi_body.rs b/src/runtime/napi/napi_body.rs index 3110313dddd7..13a521da0be4 100644 --- a/src/runtime/napi/napi_body.rs +++ b/src/runtime/napi/napi_body.rs @@ -2378,6 +2378,10 @@ pub struct ThreadSafeFunction { pub blocking_condvar: Condvar, pub closing: AtomicU8, // ClosingState pub aborted: AtomicBool, + /// Cleared (under `lock`) by the VM-exit hook: addon threads may call in + /// after a worker frees its VM/`event_loop`. Once false, dispatch is + /// dropped and the TSF leaks (Node's best-effort post-teardown semantics). + pub event_loop_alive: AtomicBool, } pub enum TsfnCallback { @@ -2438,11 +2442,17 @@ impl ThreadSafeFunction { // // Dispatched via the event-loop task table (`dispatch.rs`), which hands us // a `*mut ThreadSafeFunction`; the signature is fixed by that registry. + // + // SAFETY NOTE (whole impl): a TSF is touched concurrently by addon + // threads and the JS thread, so no method may form `&Self`/`&mut Self` — + // every access is a field projection through `*mut Self` (atomics and + // the `lock`-guarded queue for cross-thread state; JS-thread-only fields + // like `callback`/`poll_ref` are projected on the JS thread only). #[allow(clippy::not_unsafe_ptr_arg_deref)] pub fn on_dispatch(this: *mut ThreadSafeFunction) { - // SAFETY: `this` is a live heap allocation owned by the event loop dispatch. - let self_ = unsafe { &mut *this }; - if self_.closing.load(Ordering::SeqCst) == ClosingState::Closed as u8 { + // SAFETY: `this` is a live heap allocation owned by the event loop + // dispatch; field projections only (see impl SAFETY NOTE). + if unsafe { (*this).closing.load(Ordering::SeqCst) } == ClosingState::Closed as u8 { // Finalize the ThreadSafeFunction. // SAFETY: `this` is the live heap allocation we own; closed state guarantees no other thread will touch it. unsafe { ThreadSafeFunction::destroy(this) }; @@ -2453,14 +2463,20 @@ impl ThreadSafeFunction { // Run the tasks. loop { - self_ - .dispatch_state - .store(DispatchState::Running as u8, Ordering::SeqCst); - if self_.dispatch_one(is_first) { - is_first = false; - self_ + // SAFETY: live TSF, field projection. + unsafe { + (*this) .dispatch_state - .store(DispatchState::Pending as u8, Ordering::SeqCst); + .store(DispatchState::Running as u8, Ordering::SeqCst); + } + if Self::dispatch_one(this, is_first) { + is_first = false; + // SAFETY: live TSF, field projection. + unsafe { + (*this) + .dispatch_state + .store(DispatchState::Pending as u8, Ordering::SeqCst); + } } else { // We're done running tasks, for now. Transition Running → Idle // via CAS instead of an unconditional store: between @@ -2472,15 +2488,16 @@ impl ThreadSafeFunction { // up. If we blindly stored Idle we'd overwrite that Pending // and the callback would be dropped (flaky lost-wakeup under // load). On CAS failure, loop and re-drain. - if self_ - .dispatch_state - .compare_exchange( + // SAFETY: live TSF, field projection. + if unsafe { + (*this).dispatch_state.compare_exchange( DispatchState::Running as u8, DispatchState::Idle as u8, Ordering::SeqCst, Ordering::SeqCst, ) - .is_ok() + } + .is_ok() { break; } @@ -2494,75 +2511,87 @@ impl ThreadSafeFunction { // not add unnecessary event loop ticks. } - pub fn is_closing(&self) -> bool { - self.closing.load(Ordering::SeqCst) != ClosingState::NotClosing as u8 + fn is_closing(this: *mut ThreadSafeFunction) -> bool { + // SAFETY: live TSF, field projection. + unsafe { (*this).closing.load(Ordering::SeqCst) != ClosingState::NotClosing as u8 } } - fn maybe_queue_finalizer(&mut self) { - let prev = self - .closing - .swap(ClosingState::Closed as u8, Ordering::SeqCst); - match prev { - x if x == ClosingState::Closing as u8 || x == ClosingState::NotClosing as u8 => { - // TODO: is this boolean necessary? Can we rely just on the closing value? - if !self.has_queued_finalizer { - self.has_queued_finalizer = true; - // Note: replace callback with a no-op variant to drop Strong now. - self.callback = TsfnCallback::Js(StrongOptional::empty()); - self.poll_ref.disable(); - let self_ptr: *mut Self = self; - // SAFETY: event_loop is the live JS-thread loop; single JS thread. - unsafe { self.event_loop.get_mut() }.enqueue_task(Task::init(self_ptr)); + /// JS thread only (`callback`/`poll_ref`/`has_queued_finalizer` are + /// JS-thread-owned). + fn maybe_queue_finalizer(this: *mut ThreadSafeFunction) { + // SAFETY: live TSF; field projections only (see impl SAFETY NOTE). + unsafe { + let prev = (*this) + .closing + .swap(ClosingState::Closed as u8, Ordering::SeqCst); + match prev { + x if x == ClosingState::Closing as u8 || x == ClosingState::NotClosing as u8 => { + // TODO: is this boolean necessary? Can we rely just on the closing value? + if !(*this).has_queued_finalizer { + (*this).has_queued_finalizer = true; + // Note: replace callback with a no-op variant to drop Strong now. + (*this).callback = TsfnCallback::Js(StrongOptional::empty()); + (*this).poll_ref.disable(); + // SAFETY: event_loop is the live JS-thread loop; single JS thread. + (*this).event_loop.get_mut().enqueue_task(Task::init(this)); + } + } + _ => { + // already scheduled. } - } - _ => { - // already scheduled. } } } - pub fn dispatch_one(&mut self, is_first: bool) -> bool { + pub fn dispatch_one(this: *mut ThreadSafeFunction, is_first: bool) -> bool { let mut queue_finalizer_after_call = false; + // SAFETY: live TSF; queue access serialized by the guard; field + // projections only (see impl SAFETY NOTE). let task = 'brk: { - // `MutexGuard` holds the lock by raw pointer, so it does not borrow - // `*self` across the `&mut self` calls below. - let _g = self.lock.lock_guard(); - let was_blocked = self.queue.is_blocked(); - let Some(t) = self.queue.data.read_item() else { + let _g = unsafe { (*this).lock.lock_guard() }; + let was_blocked = unsafe { (*this).queue.is_blocked() }; + let Some(t) = (unsafe { (*this).queue.data.read_item() }) else { // When there are no tasks and the number of threads that have // references reaches zero, we prepare to finalize the // ThreadSafeFunction. - if self.thread_count.load(Ordering::SeqCst) == 0 { - if self.queue.max_queue_size > 0 { - self.blocking_condvar.signal(); + // SAFETY: field projections (see above). + unsafe { + if (*this).thread_count.load(Ordering::SeqCst) == 0 { + if (*this).queue.max_queue_size > 0 { + (*this).blocking_condvar.signal(); + } + Self::maybe_queue_finalizer(this); } - self.maybe_queue_finalizer(); } return false; }; - if self.queue.count.fetch_sub(1, Ordering::SeqCst) == 1 - && self.thread_count.load(Ordering::SeqCst) == 0 - { - self.closing - .store(ClosingState::Closing as u8, Ordering::SeqCst); - if self.queue.max_queue_size > 0 { - self.blocking_condvar.signal(); + // SAFETY: field projections (see above). + unsafe { + if (*this).queue.count.fetch_sub(1, Ordering::SeqCst) == 1 + && (*this).thread_count.load(Ordering::SeqCst) == 0 + { + (*this) + .closing + .store(ClosingState::Closing as u8, Ordering::SeqCst); + if (*this).queue.max_queue_size > 0 { + (*this).blocking_condvar.signal(); + } + queue_finalizer_after_call = true; + } else if was_blocked && !(*this).queue.is_blocked() { + (*this).blocking_condvar.signal(); } - queue_finalizer_after_call = true; - } else if was_blocked && !self.queue.is_blocked() { - self.blocking_condvar.signal(); } break 'brk t; }; - if self.call(task, !is_first).is_err() { + if Self::call(this, task, !is_first).is_err() { return false; } if queue_finalizer_after_call { - self.maybe_queue_finalizer(); + Self::maybe_queue_finalizer(this); } // An item was dequeued: keep on_dispatch looping so remaining queued @@ -2573,19 +2602,26 @@ impl ThreadSafeFunction { /// This function can be called multiple times in one tick of the event loop. /// See: https://github.com/nodejs/node/pull/38506 /// In that case, we need to drain microtasks. - fn call(&mut self, task: *mut c_void, is_first: bool) -> Result<(), bun_jsc::JsTerminated> { - let env = self.env.get(); + fn call( + this: *mut ThreadSafeFunction, + task: *mut c_void, + is_first: bool, + ) -> Result<(), bun_jsc::JsTerminated> { + // SAFETY: live TSF on the JS thread; field projections only. + let env = unsafe { (*this).env.get() }; if !is_first { // SAFETY: event_loop is the live JS-thread loop; single JS thread. - // SAFETY: event_loop is the live JS-thread loop; single JS thread. - unsafe { self.event_loop.get_mut() }.drain_microtasks()?; + unsafe { (*this).event_loop.get_mut() }.drain_microtasks()?; } // SAFETY: env is valid while the TSF is live. let global_object = unsafe { &*env }.to_js(); - let _dispatch = self.tracker.dispatch(global_object); + // SAFETY: `tracker` is Copy; field projection. + let _dispatch = unsafe { (*this).tracker }.dispatch(global_object); - match &self.callback { + // SAFETY: `callback` is JS-thread-owned; only `maybe_queue_finalizer` + // (same thread, never re-entered while this borrow is live) writes it. + match unsafe { &(*this).callback } { TsfnCallback::Js(strong) => { let js: JSValue = strong.get().unwrap_or(JSValue::UNDEFINED); if js.is_empty_or_undefined_or_null() { @@ -2602,13 +2638,14 @@ impl ThreadSafeFunction { } => { let js: JSValue = cb_js.get().unwrap_or(JSValue::UNDEFINED); - // SAFETY: `env` is held alive by `self.env` (`NapiEnvRef`) for the TSF's lifetime. + // SAFETY: `env` is held alive by the TSF's `NapiEnvRef` for its lifetime. let env_ref = unsafe { &*env }; let _hs = NapiHandleScope::open_scoped(env_ref); napi_threadsafe_function_call_js( env, napi_value::create(env_ref, js), - self.ctx, + // SAFETY: plain field read. + unsafe { (*this).ctx }, task, ); } @@ -2616,59 +2653,117 @@ impl ThreadSafeFunction { Ok(()) } - pub fn enqueue(&mut self, ctx: *mut c_void, block: bool) -> napi_status { - let _g = self.lock.lock_guard(); + pub fn enqueue(this: *mut ThreadSafeFunction, ctx: *mut c_void, block: bool) -> napi_status { + // SAFETY (whole fn): live TSF; queue access serialized by the guard; + // field projections only (see impl SAFETY NOTE). + let _g = unsafe { (*this).lock.lock_guard() }; + // Dead event loop ⇒ no drainer will ever run this call: report + // `napi_closing` on every arm (non-blocking and blocking-with-space + // included), instead of queueing into a loop that never ticks again. + if !unsafe { (*this).event_loop_alive.load(Ordering::SeqCst) } { + return NapiStatus::closing as napi_status; + } if block { - while self.queue.is_blocked() && !self.is_closing() { - self.blocking_condvar.wait(&self.lock); + while unsafe { (*this).queue.is_blocked() } && !Self::is_closing(this) { + // Teardown may kill the drainer while we wait: bail with + // `closing` instead of blocking forever on a dead loop. + // SAFETY: field projections. + unsafe { + if !(*this).event_loop_alive.load(Ordering::SeqCst) { + return NapiStatus::closing as napi_status; + } + (*this).blocking_condvar.wait(&(*this).lock); + } } } else { - if self.queue.is_blocked() { + if unsafe { (*this).queue.is_blocked() } { // don't set the error on the env as this is run from another thread return NapiStatus::queue_full as napi_status; } } - if self.is_closing() { - if self.thread_count.load(Ordering::SeqCst) <= 0 { + if Self::is_closing(this) { + // SAFETY: field projection. + if unsafe { (*this).thread_count.load(Ordering::SeqCst) } <= 0 { return NapiStatus::invalid_arg as napi_status; } - let _ = self.release(napi_threadsafe_function_release_mode::release, true); + let _ = Self::release(this, napi_threadsafe_function_release_mode::release, true); return NapiStatus::closing as napi_status; } - let _ = self.queue.count.fetch_add(1, Ordering::SeqCst); - let _ = self.queue.data.write_item(ctx); // OOM/capacity failures are fire-and-forget - self.schedule_dispatch(); + // SAFETY: queue mutation under the guard; field projections. + unsafe { + let _ = (*this).queue.count.fetch_add(1, Ordering::SeqCst); + let _ = (*this).queue.data.write_item(ctx); // OOM/capacity failures are fire-and-forget + } + Self::schedule_dispatch(this); NapiStatus::ok as napi_status } - fn schedule_dispatch(&mut self) { - let prev = self - .dispatch_state - .swap(DispatchState::Pending as u8, Ordering::SeqCst); - match prev { - x if x == DispatchState::Idle as u8 => { - let self_ptr: *mut Self = self; - self.event_loop - .enqueue_task_concurrent(ConcurrentTask::create_from(self_ptr)); - } - x if x == DispatchState::Running as u8 => { - // it will check if it has more work to do + fn schedule_dispatch(this: *mut ThreadSafeFunction) { + // Callers hold the TSF lock, so this load is ordered against the + // cleanup hook's store: once observed false, the VM (and its + // event_loop) may already be freed — do not touch it. + // SAFETY (whole fn): live TSF; field projections only. + unsafe { + if !(*this).event_loop_alive.load(Ordering::SeqCst) { + return; } - _ => { - // we've already scheduled it to run + let prev = (*this) + .dispatch_state + .swap(DispatchState::Pending as u8, Ordering::SeqCst); + match prev { + x if x == DispatchState::Idle as u8 => { + (*this) + .event_loop + .enqueue_task_concurrent(ConcurrentTask::create_from(this)); + } + x if x == DispatchState::Running as u8 => { + // it will check if it has more work to do + } + _ => { + // we've already scheduled it to run + } } } } + /// VM-exit cleanup hook (drained by `vm.on_exit()`, which worker shutdown + /// runs BEFORE freeing the VM). `destroy()` unregisters it, so `ctx` is + /// always a live TSF here. + extern "C" fn mark_event_loop_dead(ctx: *mut c_void) { + let this = ctx.cast::(); + // SAFETY: registered with a live TSF pointer, removed in `destroy()` + // before the TSF is freed; field projections only — addon threads + // may be mutating the lock-guarded queue concurrently. + unsafe { + // The lock orders this store against a foreign thread mid-release(): + // in-flight releases finish against the still-alive VM first. + let _g = (*this).lock.lock_guard(); + (*this).event_loop_alive.store(false, Ordering::SeqCst); + // No drainer remains: wake every producer blocked on a full queue so + // it can observe the dead loop and return `napi_closing`. + (*this).blocking_condvar.broadcast(); + } + } + /// Consumes and frees a heap-allocated ThreadSafeFunction (allocated by `new`). /// SAFETY: `this` must be a live `*mut ThreadSafeFunction` returned from `heap::alloc` /// and not aliased; caller transfers ownership. pub unsafe fn destroy(this: *mut ThreadSafeFunction) { - // SAFETY: caller contract — `this` is a live heap allocation; we consume it here. + // destroy() only runs via event-loop dispatch, so the VM is alive; + // drop the exit hook that would otherwise fire on freed memory. + // SAFETY: `env` holds a ref, so the pointer is live. + unsafe { &*(*this).env.get() } + .to_js() + .bun_vm() + .as_mut() + .rare_data() + .remove_cleanup_hook(this.cast(), Self::mark_event_loop_dead); + Self::unref(this); + // SAFETY: caller contract — `this` is a live heap allocation; we + // consume it here (closed state: no other thread touches it). let self_ = unsafe { &mut *this }; - self_.unref(); if let Some(fun) = self_.finalizer_fun { // Note: ownership transfer of `env` into the Finalizer. We clone (bumps the @@ -2691,56 +2786,73 @@ impl ThreadSafeFunction { drop(unsafe { bun_core::heap::take(this) }); } - pub fn ref_(&mut self) { - self.poll_ref - .ref_concurrently_from_event_loop(bun_io::js_vm_ctx()); + /// JS thread only (`poll_ref` is JS-thread-owned). + pub fn ref_(this: *mut ThreadSafeFunction) { + // SAFETY: live TSF on the JS thread; field projection. + unsafe { + (*this) + .poll_ref + .ref_concurrently_from_event_loop(bun_io::js_vm_ctx()); + } } - pub fn unref(&mut self) { - self.poll_ref - .unref_concurrently_from_event_loop(bun_io::js_vm_ctx()); + /// JS thread only (`poll_ref` is JS-thread-owned). + pub fn unref(this: *mut ThreadSafeFunction) { + // SAFETY: live TSF on the JS thread; field projection. + unsafe { + (*this) + .poll_ref + .unref_concurrently_from_event_loop(bun_io::js_vm_ctx()); + } } - pub fn acquire(&mut self) -> napi_status { - let _g = self.lock.lock_guard(); - if self.is_closing() { + pub fn acquire(this: *mut ThreadSafeFunction) -> napi_status { + // SAFETY: live TSF; field projections only. + let _g = unsafe { (*this).lock.lock_guard() }; + if Self::is_closing(this) { return NapiStatus::closing as napi_status; } - let _ = self.thread_count.fetch_add(1, Ordering::SeqCst); + // SAFETY: field projection. + let _ = unsafe { (*this).thread_count.fetch_add(1, Ordering::SeqCst) }; NapiStatus::ok as napi_status } pub fn release( - &mut self, + this: *mut ThreadSafeFunction, mode: napi_threadsafe_function_release_mode, already_locked: bool, ) -> napi_status { - let _g = (!already_locked).then(|| self.lock.lock_guard()); + // SAFETY (whole fn): live TSF; field projections only. + let _g = (!already_locked).then(|| unsafe { (*this).lock.lock_guard() }); - if self.thread_count.load(Ordering::SeqCst) < 0 { + if unsafe { (*this).thread_count.load(Ordering::SeqCst) } < 0 { return NapiStatus::invalid_arg as napi_status; } - let prev_remaining = self.thread_count.fetch_sub(1, Ordering::SeqCst); + let prev_remaining = unsafe { (*this).thread_count.fetch_sub(1, Ordering::SeqCst) }; if mode == napi_threadsafe_function_release_mode::abort || prev_remaining == 1 { - if !self.is_closing() { + if !Self::is_closing(this) { if mode == napi_threadsafe_function_release_mode::abort { - self.closing - .store(ClosingState::Closing as u8, Ordering::SeqCst); - self.aborted.store(true, Ordering::SeqCst); - if self.queue.max_queue_size > 0 { - // Wake all producers blocked in enqueue()'s bounded - // queue wait so they observe is_closing and release. - self.blocking_condvar.broadcast(); + // SAFETY: field projections. + unsafe { + (*this) + .closing + .store(ClosingState::Closing as u8, Ordering::SeqCst); + (*this).aborted.store(true, Ordering::SeqCst); + if (*this).queue.max_queue_size > 0 { + // Wake all producers blocked in enqueue()'s bounded + // queue wait so they observe is_closing and release. + (*this).blocking_condvar.broadcast(); + } } } - self.schedule_dispatch(); + Self::schedule_dispatch(this); } else if prev_remaining == 1 { // Already closing from an earlier abort. The last release must // still reach dispatch_one's thread_count==0 path so the // finalizer runs and the event-loop keepalive is dropped. - self.schedule_dispatch(); + Self::schedule_dispatch(this); } } @@ -2812,14 +2924,22 @@ pub(super) extern "C" fn napi_create_threadsafe_function( blocking_condvar: Condvar::default(), closing: AtomicU8::new(ClosingState::NotClosing as u8), aborted: AtomicBool::new(true), + event_loop_alive: AtomicBool::new(true), }); - // SAFETY: function is non-null (just allocated). - let function_ref = unsafe { &mut *function }; + // Sever `event_loop` before the VM frees it: a worker's shutdown drains + // these hooks in `vm.on_exit()` while addon threads may still hold this + // TSF. `destroy()` removes the hook. + vm.rare_data().push_cleanup_hook( + env.to_js(), + function.cast(), + ThreadSafeFunction::mark_event_loop_dead, + ); // nodejs by default keeps the event loop alive until the thread-safe function is unref'd - function_ref.ref_(); - function_ref.tracker.did_schedule(vm.global()); + ThreadSafeFunction::ref_(function); + // SAFETY: function is non-null (just allocated); `tracker` is Copy. + unsafe { (*function).tracker }.did_schedule(vm.global()); *result = function; env.ok() @@ -2843,8 +2963,9 @@ pub(super) extern "C" fn napi_call_threadsafe_function( is_blocking: napi_threadsafe_function_call_mode, ) -> napi_status { bun_output::scoped_log!(napi, "napi_call_threadsafe_function"); - // SAFETY: func is non-null per N-API contract. - unsafe { &mut *func }.enqueue(data, is_blocking == NAPI_TSFN_BLOCKING) + // Raw pointer through: addon threads call this concurrently, so a + // `&mut ThreadSafeFunction` here would alias (methods project fields). + ThreadSafeFunction::enqueue(func, data, is_blocking == NAPI_TSFN_BLOCKING) } #[unsafe(no_mangle)] @@ -2852,8 +2973,8 @@ pub(super) extern "C" fn napi_acquire_threadsafe_function( func: napi_threadsafe_function, ) -> napi_status { bun_output::scoped_log!(napi, "napi_acquire_threadsafe_function"); - // SAFETY: func is non-null per N-API contract. - unsafe { &mut *func }.acquire() + // Raw pointer through — same aliasing rule as napi_call_threadsafe_function. + ThreadSafeFunction::acquire(func) } #[unsafe(no_mangle)] @@ -2862,8 +2983,8 @@ pub(super) extern "C" fn napi_release_threadsafe_function( mode: napi_threadsafe_function_release_mode, ) -> napi_status { bun_output::scoped_log!(napi, "napi_release_threadsafe_function"); - // SAFETY: func is non-null per N-API contract. - unsafe { &mut *func }.release(mode, false) + // Raw pointer through — same aliasing rule as napi_call_threadsafe_function. + ThreadSafeFunction::release(func, mode, false) } #[unsafe(no_mangle)] @@ -2873,13 +2994,12 @@ pub(super) extern "C" fn napi_unref_threadsafe_function( ) -> napi_status { bun_output::scoped_log!(napi, "napi_unref_threadsafe_function"); let env = get_env!(env_); - // SAFETY: func is non-null per N-API contract. - let func = unsafe { &mut *func }; + // SAFETY: func is non-null per N-API contract; field projection only. debug_assert!(core::ptr::eq( - (*func.event_loop).global.unwrap().as_ptr(), + unsafe { (*func).event_loop }.global.unwrap().as_ptr(), env.to_js() )); - func.unref(); + ThreadSafeFunction::unref(func); env.ok() } @@ -2890,13 +3010,12 @@ pub(super) extern "C" fn napi_ref_threadsafe_function( ) -> napi_status { bun_output::scoped_log!(napi, "napi_ref_threadsafe_function"); let env = get_env!(env_); - // SAFETY: func is non-null per N-API contract. - let func = unsafe { &mut *func }; + // SAFETY: func is non-null per N-API contract; field projection only. debug_assert!(core::ptr::eq( - (*func.event_loop).global.unwrap().as_ptr(), + unsafe { (*func).event_loop }.global.unwrap().as_ptr(), env.to_js() )); - func.ref_(); + ThreadSafeFunction::ref_(func); env.ok() } diff --git a/src/runtime/node/memory_pressure.rs b/src/runtime/node/memory_pressure.rs index eaf6337c9886..d8427627d630 100644 --- a/src/runtime/node/memory_pressure.rs +++ b/src/runtime/node/memory_pressure.rs @@ -182,10 +182,8 @@ mod posix { NonNull::<()>::dangling().as_ptr(), ), ); - // SAFETY: `poll` is the fresh hive slot; `platform_event_loop` is the live uws loop. - let result = unsafe { - (*poll).register(ctx.platform_event_loop(), Flags::MemoryPressure, false) - }; + // SAFETY: `poll` is the fresh hive slot; `loop_()` is the live uws loop. + let result = unsafe { (*poll).register(ctx.loop_(), Flags::MemoryPressure, false) }; if result.is_err() { // SAFETY: fresh hive slot never handed out. deinit_poll(unsafe { &mut *poll }); diff --git a/src/runtime/node/node_cluster_binding.rs b/src/runtime/node/node_cluster_binding.rs index 9da6e3777cb2..f7a25bf2b36d 100644 --- a/src/runtime/node/node_cluster_binding.rs +++ b/src/runtime/node/node_cluster_binding.rs @@ -110,7 +110,7 @@ pub(crate) fn send_helper_child(global: &JSGlobalObject, frame: &CallFrame) -> J Ok(JSValue::UNDEFINED) } - let good = ipc_instance.data.serialize_and_send( + let good = ipc_instance.queue().serialize_and_send( global, message, IsInternal::Internal, diff --git a/src/runtime/node/node_net_binding.rs b/src/runtime/node/node_net_binding.rs index 5f8f34eac4c5..5cc372566a79 100644 --- a/src/runtime/node/node_net_binding.rs +++ b/src/runtime/node/node_net_binding.rs @@ -6,7 +6,7 @@ use core::sync::atomic::{AtomicBool, Ordering}; use bun_io::KeepAlive; use bun_jsc::{self as jsc, CallFrame, JSFunction, JSGlobalObject, JSValue, JsCell, JsResult}; -use bun_uws as uws; +use bun_usockets as uws; use crate::node::util::validators; use crate::socket::{Listener, NativeCallbacks, NewSocket, SocketFlags, TCPSocket, TLSSocket}; diff --git a/src/runtime/node/node_os.rs b/src/runtime/node/node_os.rs index a418fb37d92a..fd20250e1f5f 100644 --- a/src/runtime/node/node_os.rs +++ b/src/runtime/node/node_os.rs @@ -53,7 +53,7 @@ mod _impl { use bun_sys::windows::{self, libuv}; use std::io::Write as _; - // ─── local shims for upstream API gaps (Phase D) ────────────────────────── + // ─── local shims for upstream API gaps ────────────────────────── /// Unified error for `cpus_impl_*` so `?` works on both `JsResult` and /// `crate::Error`/`bun_sys::Error`. The variant payload is discarded by diff --git a/src/runtime/server/AnyRequestContext.rs b/src/runtime/server/AnyRequestContext.rs index 088491a5fd89..4c3a3cedfcbd 100644 --- a/src/runtime/server/AnyRequestContext.rs +++ b/src/runtime/server/AnyRequestContext.rs @@ -3,7 +3,7 @@ use core::ffi::{c_uint, c_void}; -use bun_uws as uws; +use bun_uws_shim as uws; use crate::webcore::CookieMap; @@ -179,13 +179,13 @@ impl AnyRequestContext { }) } - pub fn get_request(self) -> Option<*mut uws::Request> { + pub fn get_request(self) -> Option<*mut bun_uws_shim::Request> { dispatch!(self, None, |T, ctx| { if T::IS_H3 { // url/headers already on the Request return None; } - ctx.req.map(|p| p.cast::()) + ctx.req.map(|p| p.cast::()) }) } diff --git a/src/runtime/server/FileResponseStream.rs b/src/runtime/server/FileResponseStream.rs index b77f829c93ea..91c4b7e048b6 100644 --- a/src/runtime/server/FileResponseStream.rs +++ b/src/runtime/server/FileResponseStream.rs @@ -18,7 +18,7 @@ use bun_io::{BufferedReader, FileType, ReadState}; #[cfg(unix)] use bun_io::{FilePollFlag, PosixFlags as ReaderFlags}; use bun_sys::{self as sys, Fd}; -use bun_uws::{AnyResponse, WriteResult}; +use bun_uws_shim::{AnyResponse, WriteResult}; use crate::server::jsc::{AnyTask, EventLoopHandle, Task, VirtualMachine}; @@ -515,7 +515,7 @@ impl FileResponseStream { { // SAFETY: `r#loop()` returns the live uws WindowsLoop; its `uv_loop` // is set by C `us_create_loop` and valid for the loop's lifetime. - return unsafe { (*self.event_loop().r#loop()).uv_loop }; + return unsafe { (*self.event_loop().r#loop()).uv_loop.cast() }; } #[cfg(not(windows))] { diff --git a/src/runtime/server/FileRoute.rs b/src/runtime/server/FileRoute.rs index 3cc3f4d9b2f3..851aa3d3fafb 100644 --- a/src/runtime/server/FileRoute.rs +++ b/src/runtime/server/FileRoute.rs @@ -11,7 +11,7 @@ use bun_io::Closer; use bun_io::FileType; use bun_resolver::fs::StatHash; use bun_sys::{self, Fd}; -use bun_uws::{AnyRequest, AnyResponse}; +use bun_uws_shim::{AnyRequest, AnyResponse}; use crate::node::types::PathOrFileDescriptor; use crate::server::file_response_stream::StartOptions as FileResponseStreamOptions; @@ -393,7 +393,7 @@ impl FileRoute { // unconditionally" — the RFC 9110 §13.1.3-correct behaviour. // // LAYERING: the parse step lives HERE (T6) because it needs `bun_jsc` — - // so `bun_uws_sys` (T0) carries no upward hook. + // so `bun_uws_shim` (T0) carries no upward hook. let input_if_modified_since_date: Option = req .header(b"if-modified-since") .and_then(crate::jsc_hooks::parse_http_date); diff --git a/src/runtime/server/HTMLBundle.rs b/src/runtime/server/HTMLBundle.rs index 315a34427a9e..70ecf4b9e482 100644 --- a/src/runtime/server/HTMLBundle.rs +++ b/src/runtime/server/HTMLBundle.rs @@ -15,7 +15,7 @@ use bun_http::Headers; use bun_http_types::Method::Method; use bun_jsc::JsCell; use bun_ptr::{AsCtxPtr, IntrusiveRc, RefCount}; -use bun_uws::{AnyRequest, AnyResponse}; +use bun_uws_shim::{AnyRequest, AnyResponse}; use crate::api::js_bundle_completion_task::{ JSBundleCompletionTask, create_and_schedule_completion_task, diff --git a/src/runtime/server/NodeHTTPResponse.rs b/src/runtime/server/NodeHTTPResponse.rs index 44467ad0e80d..3413edb1c6d2 100644 --- a/src/runtime/server/NodeHTTPResponse.rs +++ b/src/runtime/server/NodeHTTPResponse.rs @@ -11,8 +11,7 @@ use bun_core::{ZigString, ZigStringSlice}; use bun_http::Method as HttpMethod; use bun_jsc::JsCell; use bun_ptr::AsCtxPtr; -use bun_uws as uws; -use bun_uws_sys as uws_sys; +use bun_uws_shim as uws; use crate::server::jsc::{ self, CallFrame, ErrorCode, JSGlobalObject, JSValue, JsResult, StrongOptional, VirtualMachine, @@ -99,9 +98,9 @@ impl Flags { } pub struct UpgradeCTX { - pub context: *mut uws_sys::WebSocketUpgradeContext, + pub context: *mut uws::WebSocketUpgradeContext, // request will be detached when go async - pub request: *mut uws_sys::Request, + pub request: *mut uws::Request, // we need to store this, if we wanna to enable async upgrade pub sec_websocket_key: Box<[u8]>, @@ -2047,10 +2046,10 @@ pub unsafe extern "C" fn NodeHTTPResponse__createForJS( any_server_tag: u64, global_object: &JSGlobalObject, has_body: *mut bool, - request: *mut uws_sys::Request, + request: *mut uws::Request, is_ssl: i32, response_ptr: *mut c_void, - upgrade_ctx: *mut uws_sys::WebSocketUpgradeContext, + upgrade_ctx: *mut uws::WebSocketUpgradeContext, node_response_ptr: *mut *mut NodeHTTPResponse, ) -> JSValue { // SAFETY: all pointers are provided by C++ NodeHTTPServer and are live for the call. diff --git a/src/runtime/server/RangeRequest.rs b/src/runtime/server/RangeRequest.rs index ed5a271df205..43ad1498f3a4 100644 --- a/src/runtime/server/RangeRequest.rs +++ b/src/runtime/server/RangeRequest.rs @@ -4,7 +4,7 @@ //! (serve full body) rather than 416, matching common static-server behavior. use bun_core::strings; -use bun_uws::AnyRequest; +use bun_uws_shim::AnyRequest; #[derive(Copy, Clone, Eq, PartialEq, Debug)] pub enum Result { @@ -115,7 +115,7 @@ pub fn parse(header: &[u8], total: u64) -> Result { parse_raw(header).resolve(total) } -// `bun_uws::AnyRequest::header` borrows `&self` and returns `&[u8]` tied to +// `bun_uws_shim::AnyRequest::header` borrows `&self` and returns `&[u8]` tied to // it, so take `&AnyRequest` here. pub(crate) fn from_request(req: &AnyRequest, total: u64) -> Result { let Some(h) = req.header(b"range") else { diff --git a/src/runtime/server/RequestContext.rs b/src/runtime/server/RequestContext.rs index 43a8b24f750a..9be03104b093 100644 --- a/src/runtime/server/RequestContext.rs +++ b/src/runtime/server/RequestContext.rs @@ -5,7 +5,7 @@ use bun_sys::FdExt as _; use bun_core::String as BunString; use bun_http_types::Method::Method; -use bun_uws::{self as uws, WebSocketUpgradeContext}; +use bun_uws_shim::{self as uws, WebSocketUpgradeContext}; use crate::server::jsc::{self, JSGlobalObject, JSValue, JsResult, VirtualMachine}; use crate::server::{RangeRequest, ServerLike}; @@ -50,7 +50,7 @@ pub type Req = c_void; pub type Resp = c_void; // Surface gaps `AnyResponse` doesn't expose yet — hand-dispatched here so the -// state machine can call them without touching `bun_uws_sys`. +// state machine can call them without touching `bun_uws_shim`. pub trait AnyResponseExt { fn has_responded(self) -> bool; fn override_write_offset(self, offset: u64); @@ -551,7 +551,10 @@ impl) -> uws::AnyRequest { if HTTP3 { - uws::AnyRequest::H3(r.cast::()) + uws::AnyRequest::H3(r.cast::()) } else { - uws::AnyRequest::H1(r.cast::()) + uws::AnyRequest::H1(r.cast::()) } } @@ -1320,9 +1323,9 @@ where // the request callback; both surfaces return request-owned slices. unsafe { if HTTP3 { - (*r.cast::()).method() + (*r.cast::()).method() } else { - (*r.cast::()).method() + (*r.cast::()).method() } } } @@ -4188,8 +4191,8 @@ where pub fn get_remote_socket_info(&self) -> Option { let resp = self.resp?; - // `AnyResponse::get_remote_socket_info` returns the uws_sys - // variant; convert to the owned `bun_uws::SocketAddress`. + // `AnyResponse::get_remote_socket_info` returns a borrowed view; + // convert to the owned `bun_uws_shim::SocketAddress`. // SAFETY: FFI handle let info = resp.get_remote_socket_info()?; Some(uws::SocketAddress { @@ -4394,9 +4397,9 @@ where // SAFETY: req is the live uWS request handle. let url: &[u8] = unsafe { if H3 { - (*req.cast::()).url() + (*req.cast::()).url() } else { - (*req.cast::()).url() + (*req.cast::()).url() } }; return write!(writer, "{}", bstr::BStr::new(url)); diff --git a/src/runtime/server/ServerConfig.rs b/src/runtime/server/ServerConfig.rs index f9c57edb29c6..1af0219d26cf 100644 --- a/src/runtime/server/ServerConfig.rs +++ b/src/runtime/server/ServerConfig.rs @@ -4,7 +4,7 @@ use bun_core::ZBox; use bun_collections::StringHashMap; use bun_core::strings; -use bun_uws_sys as uws; +use bun_uws_shim as uws; use bun_wyhash::Wyhash; use bun_http_types::Method as http_method; @@ -352,14 +352,14 @@ pub(crate) fn apply_static_route( // `Response` is a `#[repr(C)]` opaque over `uws_res`; pointer cast // selects the matching `AnyResponse` variant for the const-generic SSL flag. let any_resp = if SSL { - bun_uws_sys::AnyResponse::SSL(resp.cast()) + bun_uws_shim::AnyResponse::SSL(resp.cast()) } else { - bun_uws_sys::AnyResponse::TCP(resp.cast()) + bun_uws_shim::AnyResponse::TCP(resp.cast()) }; // SAFETY: `route`, `req`, and `resp` are non-null and valid for the // duration of this uWS callback (see invariants established above); // `on_request` only dereferences them while this frame is live. - unsafe { T::on_request(route, bun_uws_sys::AnyRequest::H1(req), any_resp) }; + unsafe { T::on_request(route, bun_uws_shim::AnyRequest::H1(req), any_resp) }; } extern "C" fn head>( @@ -371,13 +371,13 @@ pub(crate) fn apply_static_route( let route = user_data.cast::(); let resp = uws::NewAppResponse::::cast_res(resp); let any_resp = if SSL { - bun_uws_sys::AnyResponse::SSL(resp.cast()) + bun_uws_shim::AnyResponse::SSL(resp.cast()) } else { - bun_uws_sys::AnyResponse::TCP(resp.cast()) + bun_uws_shim::AnyResponse::TCP(resp.cast()) }; // SAFETY: `route`, `req`, and `resp` validity is guaranteed by uWS for // the callback's duration — same invariants as `handler` above. - unsafe { T::on_head_request(route, bun_uws_sys::AnyRequest::H1(req), any_resp) }; + unsafe { T::on_head_request(route, bun_uws_shim::AnyRequest::H1(req), any_resp) }; } let user_data = entry.cast::(); @@ -440,8 +440,8 @@ pub(crate) fn apply_static_route_h3( unsafe { T::on_request( route, - bun_uws_sys::AnyRequest::H3(req), - bun_uws_sys::AnyResponse::H3(resp), + bun_uws_shim::AnyRequest::H3(req), + bun_uws_shim::AnyResponse::H3(resp), ) }; } @@ -454,8 +454,8 @@ pub(crate) fn apply_static_route_h3( unsafe { T::on_head_request( route, - bun_uws_sys::AnyRequest::H3(req), - bun_uws_sys::AnyResponse::H3(resp), + bun_uws_shim::AnyRequest::H3(req), + bun_uws_shim::AnyResponse::H3(resp), ) }; } @@ -486,22 +486,22 @@ pub(crate) trait StaticRouteLike: 'static { /// valid for the duration of the uWS callback. unsafe fn on_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ); /// SAFETY: see `on_request`. unsafe fn on_head_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ); } // NOTE (layering): the original `RequestUnion`/`ResponseUnion` placeholders -// were duplicates of `bun_uws_sys::AnyRequest`/`AnyResponse`. Re-export the +// were duplicates of `bun_uws_shim::AnyRequest`/`AnyResponse`. Re-export the // real types so any straggler reference resolves to the canonical opaque. -pub use bun_uws_sys::AnyRequest as RequestUnion; -pub use bun_uws_sys::AnyResponse as ResponseUnion; +pub use bun_uws_shim::AnyRequest as RequestUnion; +pub use bun_uws_shim::AnyResponse as ResponseUnion; impl StaticRouteLike for super::StaticRoute { unsafe fn set_server(this: *mut Self, server: AnyServer) { @@ -511,16 +511,16 @@ impl StaticRouteLike for super::StaticRoute { } unsafe fn on_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ) { // SAFETY: forwarded to the inherent impl with the same contract. unsafe { Self::on_request(this, req, resp) } } unsafe fn on_head_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ) { // SAFETY: forwarded to the inherent impl with the same contract. unsafe { Self::on_head_request(this, req, resp) } @@ -534,15 +534,15 @@ impl StaticRouteLike for super::FileRoute { } unsafe fn on_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ) { Self::on_request(this, req, resp) } unsafe fn on_head_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ) { Self::on_head_request(this, req, resp) } @@ -555,15 +555,15 @@ impl StaticRouteLike for super::html_bundle::Route { } unsafe fn on_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ) { Self::on_request(this, req, resp) } unsafe fn on_head_request( this: *mut Self, - req: bun_uws_sys::AnyRequest, - resp: bun_uws_sys::AnyResponse, + req: bun_uws_shim::AnyRequest, + resp: bun_uws_shim::AnyResponse, ) { Self::on_head_request(this, req, resp) } @@ -598,13 +598,13 @@ impl ServerConfig { pub fn get_usockets_options(&self) -> i32 { // Unlike Node.js, we set exclusive port in case reuse port is not set let mut out: i32 = if self.reuse_port { - bun_uws_sys::LIBUS_LISTEN_REUSE_PORT | bun_uws_sys::LIBUS_LISTEN_REUSE_ADDR + bun_uws_shim::LIBUS_LISTEN_REUSE_PORT | bun_uws_shim::LIBUS_LISTEN_REUSE_ADDR } else { - bun_uws_sys::LIBUS_LISTEN_EXCLUSIVE_PORT + bun_uws_shim::LIBUS_LISTEN_EXCLUSIVE_PORT }; if self.ipv6_only { - out |= bun_uws_sys::LIBUS_SOCKET_IPV6_ONLY; + out |= bun_uws_shim::LIBUS_SOCKET_IPV6_ONLY; } out diff --git a/src/runtime/server/ServerWebSocket.rs b/src/runtime/server/ServerWebSocket.rs index d1858f15e7ba..f4351d5ff8e2 100644 --- a/src/runtime/server/ServerWebSocket.rs +++ b/src/runtime/server/ServerWebSocket.rs @@ -4,9 +4,9 @@ use core::mem; use core::ptr::NonNull; use bun_jsc::JsCell; -use bun_uws::{self as uws, AnyWebSocket, WebSocketBehavior}; -use bun_uws_sys::web_socket::{WebSocketHandler, WebSocketUpgradeServer, Wrap}; -use bun_uws_sys::{Opcode, SendStatus}; +use bun_uws_shim::web_socket::{WebSocketHandler, WebSocketUpgradeServer, Wrap}; +use bun_uws_shim::{self as uws, AnyWebSocket, WebSocketBehavior}; +use bun_uws_shim::{Opcode, SendStatus}; use crate::server::WebSocketServerHandler; use crate::server::jsc::{ diff --git a/src/runtime/server/StaticRoute.rs b/src/runtime/server/StaticRoute.rs index 32dc3b5c18f8..fab921e3d543 100644 --- a/src/runtime/server/StaticRoute.rs +++ b/src/runtime/server/StaticRoute.rs @@ -12,7 +12,7 @@ use bun_http_types::ETag; use bun_http_types::MimeType::MimeType; use bun_jsc::HTTPHeaderName; -use bun_uws::{AnyRequest, AnyResponse}; +use bun_uws_shim::{AnyRequest, AnyResponse}; use crate::server::jsc::{JSGlobalObject, JSValue, JsResult}; use crate::server::{AnyServer, HTTPStatusText, write_status}; diff --git a/src/runtime/server/WebSocketServerContext.rs b/src/runtime/server/WebSocketServerContext.rs index 2548f670af85..5d7a8d712598 100644 --- a/src/runtime/server/WebSocketServerContext.rs +++ b/src/runtime/server/WebSocketServerContext.rs @@ -1,7 +1,7 @@ use core::ffi::c_void; use crate::server::jsc::{JSGlobalObject, JSValue, JsResult, VirtualMachine}; -use bun_uws as uws; +use bun_uws_shim as uws; pub struct WebSocketServerContext { // Set provisionally in `on_create`; the server overwrites it on diff --git a/src/runtime/server/mod.rs b/src/runtime/server/mod.rs index 3e1d47da473c..63cfc8842d89 100644 --- a/src/runtime/server/mod.rs +++ b/src/runtime/server/mod.rs @@ -28,9 +28,8 @@ pub(crate) fn server_js_create( } use bun_io::KeepAlive; -use bun_uws as uws; -use bun_uws_sys as uws_sys; -use bun_uws_sys::app::c as uws_app_c; +use bun_uws_shim as uws; +use bun_uws_shim::app::c as uws_app_c; use bun_jsc::{JSGlobalObject, JSValue, JsResult}; @@ -112,7 +111,7 @@ pub use server_body::{ }; // ─── write_status ──────────────────────────────────────────────────────────── -pub fn write_status(resp: *mut uws_sys::NewAppResponse, status: u16) { +pub fn write_status(resp: *mut uws::NewAppResponse, status: u16) { // The route handlers (`StaticRoute`/`FileRoute`) call here from completion // paths where the request may already be aborted/detached, so no-op on null. if resp.is_null() { @@ -229,11 +228,11 @@ bitflags::bitflags! { const N_HTTP_METHODS: usize = 36; pub struct NewServer { - pub app: Option<*mut uws_sys::NewApp>, - pub listener: Option<*mut uws_sys::app::ListenSocket>, + pub app: Option<*mut uws::NewApp>, + pub listener: Option<*mut uws::app::ListenSocket>, // Never set when !SSL. - pub h3_app: Option<*mut uws_sys::h3::App>, - pub h3_listener: Option<*mut uws_sys::h3::ListenSocket>, + pub h3_app: Option<*mut uws::h3::App>, + pub h3_listener: Option<*mut uws::h3::ListenSocket>, /// Cached `h3=":"; ma=86400` for Alt-Svc on H1 responses; formatted /// once in onH3Listen so renderMetadata doesn't reformat per-request. pub h3_alt_svc: Box<[u8]>, @@ -317,7 +316,7 @@ impl Drop for NewServer { /// implemented for the two concrete `SSL` values (overlap rules forbid a /// blanket impl alongside them), so dispatch at the call boundary. #[inline] -fn any_response_from(resp: *mut uws_sys::NewAppResponse) -> uws::AnyResponse { +fn any_response_from(resp: *mut uws::NewAppResponse) -> uws::AnyResponse { // `*mut Response` and `*mut Response` are // distinct types to rustc; route through `.cast()` (the underlying handle // is opaque and layout-identical for both instantiations). @@ -356,8 +355,8 @@ impl PreparedRequest { pub fn save( self, global: &jsc::JSGlobalObject, - req: &mut uws_sys::Request, - resp: *mut uws_sys::NewAppResponse, + req: &mut uws::Request, + resp: *mut uws::NewAppResponse, ) -> SavedRequest { // By saving a request, all information from `req` must be // copied since the provided uws.Request will be re-used for @@ -367,7 +366,7 @@ impl PreparedRequest { // `prepare_js_request_context` for this frame; no other borrow is live. unsafe { (*self.ctx).to_async( - std::ptr::from_mut::(req).cast::(), + std::ptr::from_mut::(req).cast::(), &mut *self.request_object, ); } @@ -573,7 +572,7 @@ impl NewServer { } /// The body ignores both arguments so a single non-generic shim suffices. - fn on_timeout_for_idle_warn(_: *mut c_void, _: &mut uws_sys::NewAppResponse) { + fn on_timeout_for_idle_warn(_: *mut c_void, _: &mut uws::NewAppResponse) { if DEBUG && !Self::did_send_idletimeout_warning_once().load(Ordering::Relaxed) { if !crate::cli::Command::get().debug.silent { Self::did_send_idletimeout_warning_once().store(true, Ordering::Relaxed); @@ -609,8 +608,8 @@ impl NewServer { /// the same frame. pub(crate) fn prepare_js_request_context( this: *mut Self, - req: &mut uws_sys::Request, - resp: *mut uws_sys::NewAppResponse, + req: &mut uws::Request, + resp: *mut uws::NewAppResponse, should_deinit_context: Option, create_js_request: CreateJsRequest, method: Option, @@ -691,7 +690,7 @@ impl NewServer { ServerRequestContext::::create( ctx_uninit, this, - std::ptr::from_mut::(req).cast::(), + std::ptr::from_mut::(req).cast::(), any_response_from::(resp), should_deinit_context, method, @@ -788,7 +787,7 @@ impl NewServer { resp_ref.on_data( |u: *mut ServerRequestContext, - _: &mut uws_sys::NewAppResponse, + _: &mut uws::NewAppResponse, chunk: &[u8], last: bool| { ServerRequestContext::::on_buffered_body_chunk(u, chunk, last) @@ -828,7 +827,7 @@ impl NewServer { pub(crate) fn on_saved_request( this: *mut Self, req: SavedRequestUnion<'_>, - resp: *mut uws_sys::NewAppResponse, + resp: *mut uws::NewAppResponse, callback: JSValue, extra_args: [JSValue; ARG_COUNT], ) { @@ -953,7 +952,7 @@ impl NewServer { this: *mut Self, should_deinit_context: &core::cell::Cell, prepared: &PreparedRequest, - req: &mut uws_sys::Request, + req: &mut uws::Request, response_value: JSValue, ) { let ctx = prepared.ctx; @@ -995,7 +994,7 @@ impl NewServer { // SAFETY: `req`/`request_object` live for this frame; `ctx` not freed. unsafe { (*ctx).to_async( - std::ptr::from_mut::(req).cast::(), + std::ptr::from_mut::(req).cast::(), &mut *request_object, ); } @@ -1009,8 +1008,8 @@ impl NewServer { /// request frame. pub(crate) fn on_request( this: *mut Self, - req: &mut uws_sys::Request, - resp: *mut uws_sys::NewAppResponse, + req: &mut uws::Request, + resp: *mut uws::NewAppResponse, ) { let should_deinit_context = core::cell::Cell::new(false); let Some(prepared) = Self::prepare_js_request_context( @@ -1054,8 +1053,8 @@ impl NewServer { /// live response handle for this request frame. pub(crate) fn on_user_route_request( user_route: *const UserRoute, - req: &mut uws_sys::Request, - resp: *mut uws_sys::NewAppResponse, + req: &mut uws::Request, + resp: *mut uws::NewAppResponse, ) { // SAFETY: `user_route` is the live entry in `server.user_routes` whose // address was registered as the uws callback userdata. @@ -1114,8 +1113,8 @@ impl NewServer { /// registered with uWS). pub fn on_node_http_request( this: *mut Self, - req: &mut uws_sys::Request, - resp: &mut uws_sys::NewAppResponse, + req: &mut uws::Request, + resp: &mut uws::NewAppResponse, ) { jsc::mark_binding!(); // `upgrade_ctx` null is valid (no upgrade). @@ -1139,9 +1138,9 @@ impl NewServer { /// context for this request. pub(crate) fn on_node_http_request_with_upgrade_ctx( this: *mut Self, - req: &mut uws_sys::Request, - resp: &mut uws_sys::NewAppResponse, - upgrade_ctx: *mut uws_sys::WebSocketUpgradeContext, + req: &mut uws::Request, + resp: &mut uws::NewAppResponse, + upgrade_ctx: *mut uws::WebSocketUpgradeContext, ) { use bun_http_jsc::method_jsc::MethodJsc as _; use node_http_response::Flags as NhrFlags; @@ -1214,7 +1213,7 @@ impl NewServer { callback, method_string, req, - std::ptr::from_mut::>(resp).cast(), + std::ptr::from_mut::>(resp).cast(), upgrade_ctx.cast(), &mut node_http_response, ) @@ -1703,7 +1702,7 @@ impl NewServer { )); } - pub fn on_listen(&mut self, socket: Option<*mut uws_sys::app::ListenSocket>) { + pub fn on_listen(&mut self, socket: Option<*mut uws::app::ListenSocket>) { let Some(socket) = socket else { return self.on_listen_failed(); }; @@ -1807,7 +1806,7 @@ impl NewServer { let _ = global.throw_value(error_instance); } - pub fn on_h3_listen(&mut self, socket: Option<*mut uws_sys::h3::ListenSocket>) { + pub fn on_h3_listen(&mut self, socket: Option<*mut uws::h3::ListenSocket>) { if !Self::HAS_H3 { return; } @@ -1852,12 +1851,12 @@ impl NewServer { if Self::HAS_H3 { if let Some(h3a) = this_ref.h3_app.take() { // SAFETY: live H3::App handle owned by this server. - unsafe { uws_sys::h3::App::destroy(h3a) }; + unsafe { uws::h3::App::destroy(h3a) }; } } if let Some(app) = this_ref.app.take() { // SAFETY: live uws App handle owned by this server. - unsafe { uws_sys::NewApp::::destroy(app) }; + unsafe { uws::NewApp::::destroy(app) }; } // SAFETY: paired with heap::alloc in `init()`. @@ -2482,7 +2481,7 @@ impl NewServer { // not `*this`. let global = this_ref.global_this(); - let app: *mut uws_sys::NewApp; + let app: *mut uws::NewApp; let route_list_value; if SSL { @@ -2498,7 +2497,7 @@ impl NewServer { return JSValue::ZERO; }; - app = match uws_sys::NewApp::::create(&ssl_options) { + app = match uws::NewApp::::create(&ssl_options) { Some(a) => a, None => { if !global.has_exception() && !throw_ssl_error_if_necessary(global) { @@ -2516,7 +2515,7 @@ impl NewServer { if Self::HAS_H3 && this_ref.config.http3 { let idle_timeout = this_ref.config.idle_timeout as u32; - let h3 = match uws_sys::h3::App::create(&ssl_options, idle_timeout) { + let h3 = match uws::h3::App::create(&ssl_options, idle_timeout) { Some(a) => Some(a), None => { if !global.has_exception() { @@ -2662,8 +2661,7 @@ impl NewServer { let _ = unsafe { &mut *this }.set_routes(); } } else { - app = match uws_sys::NewApp::::create(&uws_sys::BunSocketContextOptions::default()) - { + app = match uws::NewApp::::create(&uws::BunSocketContextOptions::default()) { Some(a) => a, None => { if !global.has_exception() { @@ -2779,10 +2777,10 @@ impl NewServer { // runs (the closure is capture-less). bun_opaque::opaque_deref_mut(h3_app).listen_with_config( this, - |s: &mut Self, ls: Option<&mut uws_sys::h3::ListenSocket>| { + |s: &mut Self, ls: Option<&mut uws::h3::ListenSocket>| { s.on_h3_listen(ls.map(std::ptr::from_mut)); }, - &uws_sys::h3::ListenConfig { + &uws::h3::ListenConfig { port: h3_port, host, options, @@ -2827,7 +2825,7 @@ impl NewServer { // an exotic transport nobody can reach. bun_core::warn!("http3: true with a unix socket — HTTP/3 listener skipped"); // SAFETY: h3a is a live H3::App handle just taken from self.h3_app. - unsafe { uws_sys::h3::App::destroy(h3a) }; + unsafe { uws::h3::App::destroy(h3a) }; } } // SAFETY: ptr/len reference `config.address`'s ZBox; NUL @@ -2897,7 +2895,7 @@ mod route_list_cached { // the bodies downcast `user_data` and forward into the typed method. mod trampoline { use super::*; - use bun_uws_sys::{ListenSocket as UwsListenSocket, Request as UwsRequest, uws_res}; + use bun_uws_shim::{ListenSocket as UwsListenSocket, Request as UwsRequest, uws_res}; pub(super) extern "C" fn on_listen( socket: *mut UwsListenSocket, @@ -2908,7 +2906,7 @@ mod trampoline { let socket = if socket.is_null() { None } else { - Some(socket.cast::>()) + Some(socket.cast::>()) }; server.on_listen(socket); } @@ -2928,7 +2926,7 @@ mod trampoline { _user_data: *mut c_void, ) { // S008: `Response` is a ZST opaque — safe `*mut → &mut` deref. - let resp = bun_opaque::opaque_deref_mut(res.cast::>()); + let resp = bun_opaque::opaque_deref_mut(res.cast::>()); resp.write_status(b"404 Not Found"); resp.end(b"", false); } @@ -2971,7 +2969,7 @@ mod trampoline { NewServer::::on_node_http_request( user_data.cast(), bun_opaque::opaque_deref_mut(req), - bun_opaque::opaque_deref_mut(res.cast::>()), + bun_opaque::opaque_deref_mut(res.cast::>()), ); } @@ -2985,7 +2983,7 @@ mod trampoline { unsafe { (*user_data.cast::>()).on_bun_info_request( bun_opaque::opaque_deref_mut(req), - bun_opaque::opaque_deref_mut(res.cast::>()), + bun_opaque::opaque_deref_mut(res.cast::>()), ) }; } @@ -3000,7 +2998,7 @@ mod trampoline { unsafe { (*user_data.cast::>()).on_chrome_dev_tools_json_request( bun_opaque::opaque_deref_mut(req), - bun_opaque::opaque_deref_mut(res.cast::>()), + bun_opaque::opaque_deref_mut(res.cast::>()), ) }; } @@ -3095,7 +3093,7 @@ mod ffi { this_value: jsc::JSValue, callback: jsc::JSValue, method_string: jsc::JSValue, - request: *mut uws_sys::Request, + request: *mut uws::Request, response: *mut c_void, // *uws.NewApp(false).Response upgrade_ctx: *mut c_void, node_response_ptr: &mut *mut NodeHTTPResponse, @@ -3107,7 +3105,7 @@ mod ffi { this_value: jsc::JSValue, callback: jsc::JSValue, method_string: jsc::JSValue, - request: *mut uws_sys::Request, + request: *mut uws::Request, response: *mut c_void, // *uws.NewApp(true).Response upgrade_ctx: *mut c_void, node_response_ptr: &mut *mut NodeHTTPResponse, @@ -3360,7 +3358,7 @@ macro_rules! any_server_dispatch_mut { /// /// Binds `$s: *mut NewServer` (raw, NOT `&`/`&mut` — the target /// fns take `this: *mut Self` and may re-enter JS) and `$r: *mut -/// uws_sys::Response`. Tag↔SSL invariant is enforced by +/// uws::Response`. Tag↔SSL invariant is enforced by /// `assert_ssl`/`assert_no_ssl` (panics on `AnyResponse::H3`, matching the /// hand-written arms this replaces). The body is monomorphized four times, so /// `NewServer::method($s, …, $r, …)` infers `` from `$s`. @@ -3491,7 +3489,7 @@ impl AnyServer { /// Dispatch the user `fetch` handler: /// un-erase the SSL bool from the tag and downcast /// `AnyResponse` to the matching `NewAppResponse` variant. - pub fn on_request(&self, req: &mut uws_sys::Request, resp: uws::AnyResponse) { + pub fn on_request(&self, req: &mut uws::Request, resp: uws::AnyResponse) { // `s` is the live `*mut NewServer` carried in `self.ptr`, // tagged at construction in `AnyServer::from`. any_server_dispatch_resp!(self, resp, |s, r| NewServer::on_request(s, req, r)) @@ -3565,7 +3563,7 @@ impl AnyServer { global: &jsc::JSGlobalObject, method: Option, ) -> jsc::JsResult> { - let req: &mut uws_sys::Request = req; + let req: &mut uws::Request = req; Ok(any_server_dispatch_resp!(self, resp, |s, r| { // `s` is the live `*mut NewServer` carried in `self.ptr`, // tagged at construction in `AnyServer::from`. diff --git a/src/runtime/server/server_body.rs b/src/runtime/server/server_body.rs index ffe6241f44be..bc19ab517131 100644 --- a/src/runtime/server/server_body.rs +++ b/src/runtime/server/server_body.rs @@ -34,8 +34,10 @@ use bun_resolver::fs::FileSystem; use bun_standalone_graph::StandaloneModuleGraph; use bun_sys as sys; use bun_url::URL; -use bun_uws::{self as uws, AnyWebSocket, ResponseKind, WebSocketUpgradeContext}; -use bun_uws_sys as uws_sys; +// ResponseKind stays bun_uws-typed: its only consumers here are unmigrated +// bun_uws FFI (`FetchHeaders::to_uws_response`, `CookieMap::write`). +use bun_uws_shim::ResponseKind; +use bun_uws_shim::{self as uws, AnyWebSocket, WebSocketUpgradeContext}; use bun_wyhash::hash; bun_output::declare_scope!(Server, visible); @@ -76,8 +78,8 @@ impl RequestCtx where NewRequestContext: super::any_request_context::CtxKind, { - type Req = uws_sys::Request; - type Resp = uws_sys::NewAppResponse; + type Req = uws::Request; + type Resp = uws::NewAppResponse; const IS_H3: bool = false; } impl RequestCtx @@ -85,8 +87,8 @@ impl RequestCtx where NewRequestContext: super::any_request_context::CtxKind, { - type Req = uws_sys::h3::Request; - type Resp = uws_sys::h3::Response; + type Req = uws::h3::Request; + type Resp = uws::h3::Response; const IS_H3: bool = true; } @@ -284,7 +286,7 @@ where // NOTE: local request/response trait so generic `Ctx::Req` / `Ctx::Resp` // call sites can dispatch to either uWS HTTP/1 or HTTP/3 handle types without -// touching `bun_uws_sys`. Only the surface `prepare_js_request_context_for` +// touching `bun_uws_shim`. Only the surface `prepare_js_request_context_for` // actually needs is exposed. pub trait ReqLike { fn header(&mut self, name: &[u8]) -> Option<&[u8]>; @@ -292,40 +294,40 @@ pub trait ReqLike { fn url(&mut self) -> &[u8]; fn set_yield(&mut self, y: bool); } -impl ReqLike for uws_sys::Request { +impl ReqLike for uws::Request { #[inline] fn header(&mut self, name: &[u8]) -> Option<&[u8]> { - uws_sys::Request::header(self, name) + uws::Request::header(self, name) } #[inline] fn method(&mut self) -> &[u8] { - uws_sys::Request::method(self) + uws::Request::method(self) } #[inline] fn url(&mut self) -> &[u8] { - uws_sys::Request::url(self) + uws::Request::url(self) } #[inline] fn set_yield(&mut self, y: bool) { - uws_sys::Request::set_yield(self, y) + uws::Request::set_yield(self, y) } } -impl ReqLike for uws_sys::h3::Request { +impl ReqLike for uws::h3::Request { #[inline] fn header(&mut self, name: &[u8]) -> Option<&[u8]> { - uws_sys::h3::Request::header(self, name) + uws::h3::Request::header(self, name) } #[inline] fn method(&mut self) -> &[u8] { - uws_sys::h3::Request::method(self) + uws::h3::Request::method(self) } #[inline] fn url(&mut self) -> &[u8] { - uws_sys::h3::Request::url(self) + uws::h3::Request::url(self) } #[inline] fn set_yield(&mut self, y: bool) { - uws_sys::h3::Request::set_yield(self, y) + uws::h3::Request::set_yield(self, y) } } @@ -336,26 +338,26 @@ pub trait RespLike { fn on_timeout_warn(&mut self, ud: *mut c_void); fn to_any_response(&mut self) -> uws::AnyResponse; } -impl RespLike for uws_sys::NewAppResponse { +impl RespLike for uws::NewAppResponse { #[inline] fn write_status(&mut self, s: &[u8]) { - uws_sys::NewAppResponse::::write_status(self, s) + uws::NewAppResponse::::write_status(self, s) } #[inline] fn end_without_body(&mut self, c: bool) { - uws_sys::NewAppResponse::::end_without_body(self, c) + uws::NewAppResponse::::end_without_body(self, c) } #[inline] fn timeout(&mut self, s: u8) { - uws_sys::NewAppResponse::::timeout(self, s) + uws::NewAppResponse::::timeout(self, s) } #[inline] fn on_timeout_warn(&mut self, ud: *mut c_void) { // The dev-mode idle-timeout warning ignores both args; the user-data // pointer is an opaque sentinel (any non-null value satisfies uWS). - uws_sys::NewAppResponse::::on_timeout( + uws::NewAppResponse::::on_timeout( self, - |_: *mut c_void, _: &mut uws_sys::NewAppResponse| on_timeout_for_idle_warn(), + |_: *mut c_void, _: &mut uws::NewAppResponse| on_timeout_for_idle_warn(), ud, ); } @@ -366,33 +368,33 @@ impl RespLike for uws_sys::NewAppResponse { // bool is checked at compile time so only one branch is reachable. if SSL { uws::AnyResponse::from( - std::ptr::from_mut::(self).cast::>(), + std::ptr::from_mut::(self).cast::>(), ) } else { uws::AnyResponse::from( - std::ptr::from_mut::(self).cast::>(), + std::ptr::from_mut::(self).cast::>(), ) } } } -impl RespLike for uws_sys::h3::Response { +impl RespLike for uws::h3::Response { #[inline] fn write_status(&mut self, s: &[u8]) { - uws_sys::h3::Response::write_status(self, s) + uws::h3::Response::write_status(self, s) } #[inline] fn end_without_body(&mut self, c: bool) { - uws_sys::h3::Response::end_without_body(self, c) + uws::h3::Response::end_without_body(self, c) } #[inline] fn timeout(&mut self, s: u8) { - uws_sys::h3::Response::timeout(self, s) + uws::h3::Response::timeout(self, s) } #[inline] fn on_timeout_warn(&mut self, ud: *mut c_void) { - uws_sys::h3::Response::on_timeout( + uws::h3::Response::on_timeout( self, - |_: &mut c_void, _: &mut uws_sys::h3::Response| on_timeout_for_idle_warn(), + |_: &mut c_void, _: &mut uws::h3::Response| on_timeout_for_idle_warn(), ud, ); } @@ -1298,7 +1300,7 @@ impl<'a, Ctx: RequestCtxOps> PreparedRequestFor<'a, Ctx> { // `WebSocketUpgradeServer` so `ServerWebSocket::behavior::` and // `app.ws(...)` accept `*mut Self` / `*mut UserRoute<..>` as the upgrade ctx. -impl uws_sys::web_socket::WebSocketUpgradeServer +impl uws::web_socket::WebSocketUpgradeServer for NewServer where // NOTE: see the bounded `impl NewServer` below for why these are @@ -1308,8 +1310,8 @@ where { unsafe fn on_websocket_upgrade( this: *mut Self, - res: *mut uws_sys::NewAppResponse, - req: &mut uws_sys::Request, + res: *mut uws::NewAppResponse, + req: &mut uws::Request, context: &mut WebSocketUpgradeContext, id: usize, ) { @@ -1351,7 +1353,7 @@ impl NewServer { /// `&mut` accessor for the live uws App. Only call from paths where the /// server is running (`self.app` set in `listen()`). #[inline] - fn app_mut(&self) -> &mut uws_sys::NewApp { + fn app_mut(&self) -> &mut uws::NewApp { // S008: `NewApp` is a ZST opaque — safe `*mut → &mut` deref via // const-asserted `bun_opaque::opaque_deref_mut`. `self.app` is `Some` // for the lifetime of any JS-reachable `Server` (set in `listen()`, @@ -1685,7 +1687,7 @@ where app, topic_slice.slice(), buffer.slice(), - uws_sys::Opcode::Binary, + uws::Opcode::Binary, compress, ); return Ok(super::server_web_socket::send_status_to_js( @@ -1711,7 +1713,7 @@ where app, topic_slice.slice(), buffer, - uws_sys::Opcode::Text, + uws::Opcode::Text, compress, ); let result = super::server_web_socket::send_status_to_js( @@ -1960,10 +1962,10 @@ where // (RequestContext.rs:82). `server.upgrade()` is HTTP/1-only — H3 // contexts have a distinct generic param and `request_context.get` // above would have returned None — so the concrete `Req` is always - // `uws_sys::Request` here. + // `uws::Request` here. // S008: `uws::Request` is an `opaque_ffi!` ZST — safe deref // (BACKREF; live while RequestContext.req is Some). - let r = bun_opaque::opaque_deref_mut(req_ptr.cast::()); + let r = bun_opaque::opaque_deref_mut(req_ptr.cast::()); if sec_websocket_key_str.len == 0 { sec_websocket_key_str = ZigString::init(r.header(b"sec-websocket-key").unwrap_or(b"")); @@ -2750,7 +2752,7 @@ where pub fn on_bun_info_request( &mut self, req: &mut uws::Request, - resp: &mut uws_sys::NewAppResponse, + resp: &mut uws::NewAppResponse, ) { jsc::mark_binding!(); if !matches!(self.config.address, server_config::Address::Unix(_)) @@ -3170,7 +3172,7 @@ where fn upgrade_web_socket_user_route( this: &mut UserRoute, - resp: &mut uws_sys::NewAppResponse, + resp: &mut uws::NewAppResponse, req: &mut uws::Request, upgrade_ctx: &mut WebSocketUpgradeContext, method: Option, @@ -3238,7 +3240,7 @@ where /// instant UB regardless of whether it is read). pub unsafe fn on_web_socket_upgrade( this: *mut Self, - resp: &mut uws_sys::NewAppResponse, + resp: &mut uws::NewAppResponse, req: &mut uws::Request, upgrade_ctx: &mut WebSocketUpgradeContext, id: usize, @@ -3377,7 +3379,7 @@ where pub(super) fn on_chrome_dev_tools_json_request( &mut self, req: &mut uws::Request, - resp: &mut uws_sys::NewAppResponse, + resp: &mut uws::NewAppResponse, ) { if cfg!(debug_assertions) { // NOTE: scoped_log! expands each arg twice (ANSI/no-ANSI branches); @@ -3465,11 +3467,7 @@ where resp.end(&json_string, resp.should_close_connection()); } - pub fn on404( - _this: &mut Self, - req: &mut uws::Request, - resp: &mut uws_sys::NewAppResponse, - ) { + pub fn on404(_this: &mut Self, req: &mut uws::Request, resp: &mut uws::NewAppResponse) { if cfg!(debug_assertions) { // NOTE: see on_chrome_dev_tools_json_request — scoped_log! double-evaluates args. let m = req.method().to_vec(); @@ -3485,7 +3483,7 @@ where pub fn on_client_error_callback( &mut self, - socket: &mut uws::Socket, + socket: *mut uws::Socket, error_code: u8, raw_packet: &[u8], ) { @@ -3498,7 +3496,7 @@ where let node_socket = match jsc::from_js_host_call(&global, || { Bun__createNodeHTTPServerSocketForClientError( is_ssl, - std::ptr::from_mut(socket).cast::(), + socket.cast::(), &global, ) }) { @@ -3638,12 +3636,12 @@ pub(super) fn server_set_on_client_error_( if let Some(app) = this.app { this.on_clienterror.deinit(); this.on_clienterror = StrongOptional::create(callback, global); - // uws_sys::App::on_client_error takes the raw C-ABI handler shape; + // uws::App::on_client_error takes the raw C-ABI handler shape; // wrap our typed callback in an extern "C" thunk that slices raw_packet. extern "C" fn thunk( user_data: *mut c_void, _ssl: c_int, - socket: *mut uws_sys::us_socket_t, + socket: *mut uws::us_socket_t, error_code: u8, raw_packet: *mut u8, raw_packet_len: c_int, @@ -3658,8 +3656,9 @@ pub(super) fn server_set_on_client_error_( } else { &[] }; - // S008: `us_socket_t` is an `opaque_ffi!` ZST — safe deref. - this.on_client_error_callback(bun_opaque::opaque_deref_mut(socket), error_code, packet); + // C17: never form `&mut` over the core's live socket header; + // the pointer only round-trips to C++ as an opaque handle. + this.on_client_error_callback(socket, error_code, packet); } // S008: `NewApp` is a ZST opaque — safe `*mut → &mut` deref. bun_opaque::opaque_deref_mut(app).on_client_error(thunk, core::ptr::from_mut::<$T>(this).cast::()); diff --git a/src/runtime/shell/IOWriter.rs b/src/runtime/shell/IOWriter.rs index c9b3b44bff16..d9838e1696df 100644 --- a/src/runtime/shell/IOWriter.rs +++ b/src/runtime/shell/IOWriter.rs @@ -1111,7 +1111,7 @@ bun_io::impl_buffered_writer_parent! { on_close = on_close, get_buffer = |this| (*this).get_buffer(), event_loop = |this| (*this).io_evtloop(), - uv_loop = |this| (*(*this).evtloop().loop_()).uv_loop, + uv_loop = |this| (*(*this).evtloop().loop_()).uv_loop.cast(), // INVARIANT: `this` is `Arc::as_ptr` stashed via `writer.set_parent` in // `IOWriter::init` (sole constructor); passing a non-Arc ptr is UB. ref_ = |this| std::sync::Arc::increment_strong_count(this as *const Self), diff --git a/src/runtime/shell/builtin/yes.rs b/src/runtime/shell/builtin/yes.rs index f8627dc5cc06..ddc019112fe3 100644 --- a/src/runtime/shell/builtin/yes.rs +++ b/src/runtime/shell/builtin/yes.rs @@ -227,7 +227,7 @@ impl YesTask { owner.enqueue_task_concurrent(ct); } EventLoopHandle::Mini(mut mini) => { - (*mini.loop_).tick(); + bun_usockets::Loop::tick(mini.loop_); let at = core::ptr::NonNull::new_unchecked(match &mut (*this).concurrent_task { EventLoopTask::Mini(at) => { diff --git a/src/runtime/shell/shell_body.rs b/src/runtime/shell/shell_body.rs index a7771abc9793..a2645735af46 100644 --- a/src/runtime/shell/shell_body.rs +++ b/src/runtime/shell/shell_body.rs @@ -425,7 +425,7 @@ impl<'a> GlobalMini<'a> { // SAFETY: see `MiniEventLoop::loop_ptr()` invariant; `uv_loop` is its // embedded libuv loop, set once by `us_create_loop` and immutable. unsafe { - return &*(*self.mini.loop_ptr()).uv_loop; + return &*(*self.mini.loop_ptr()).uv_loop.cast::(); } #[cfg(not(windows))] // SAFETY: see `MiniEventLoop::loop_ptr()` invariant. diff --git a/src/runtime/socket/Handlers.rs b/src/runtime/socket/Handlers.rs index a83944b4153c..1e6148f14673 100644 --- a/src/runtime/socket/Handlers.rs +++ b/src/runtime/socket/Handlers.rs @@ -10,7 +10,7 @@ use bun_jsc::generated::{ use bun_jsc::virtual_machine::VirtualMachine; use bun_jsc::{GlobalRef, JSGlobalObject, JSValue, JsResult, Strong}; use bun_sys::Fd; -use bun_uws as uws; +use bun_usockets as uws; use super::Listener as SocketListener; use super::SocketMode; diff --git a/src/runtime/socket/Listener.rs b/src/runtime/socket/Listener.rs index d6bd0ccfb32d..c43884a29345 100644 --- a/src/runtime/socket/Listener.rs +++ b/src/runtime/socket/Listener.rs @@ -14,8 +14,20 @@ use bun_jsc::virtual_machine::VirtualMachine; use bun_jsc::zig_string::ZigString; use bun_jsc::{self as jsc, CallFrame, JSGlobalObject, JSValue, JsCell, JsRef, JsResult}; use bun_sys::{self, Fd}; -use bun_uws as uws; -use bun_uws_sys as uws_sys; +use bun_usockets as uws; +use bun_usockets::unsafe_core::trampolines::with_socket_owner; + +use super::uws_dispatch::wrap; + +/// Reborrow a live listen socket. Valid only while the listener is linked +/// into its group's `head_listen_sockets` list (`ListenerType::Uws` guards +/// every call site; `do_stop`/`finalize` clear it before close). +#[inline] +fn ls_mut<'a>(ls: *mut uws::ListenSocket) -> &'a mut uws::ListenSocket { + debug_assert!(!ls.is_null()); + // SAFETY: per the contract above. + unsafe { &mut *ls } +} use crate::api::bun_secure_context::SecureContext; use crate::socket::{ @@ -97,7 +109,7 @@ pub struct Listener { #[derive(Clone, Copy, Default)] pub enum ListenerType { - Uws(*mut uws_sys::ListenSocket), + Uws(*mut uws::ListenSocket), /// Raw heap pointer (not `Box`) to a `WindowsNamedPipeListeningContext`. /// The context's address is registered with libuv (`uv_pipe.data`) for the /// lifetime of the handle, so we must never assert `noalias` over it via a @@ -366,10 +378,14 @@ impl Listener { } } } + // The kind passed to listen() is stamped on ACCEPTED sockets (the + // listener itself never dispatches — its header kind is Invalid), so + // accepted sockets are born with their final Protocol v2 kind; the + // old BunListener* restamp arm is gone. let kind: uws::SocketKind = if ssl_enabled { - uws::SocketKind::BunListenerTls + uws::SocketKind::BunSocketTls } else { - uws::SocketKind::BunListenerTcp + uws::SocketKind::BunSocketTcp }; // The `hostname` Box<[u8]> drops on error path automatically @@ -390,7 +406,7 @@ impl Listener { .map(|p| p.as_ptr().cast::()); let mut errno: c_int = 0; - let listen_socket: *mut uws_sys::ListenSocket = match &mut connection { + let listen_socket: *mut uws::ListenSocket = match &mut connection { UnixOrHost::Host { host, port } => { let hostz = bun_core::ZBox::from_bytes(&host[..]); let host_cstr = hostz.as_zstr().as_cstr(); @@ -406,9 +422,7 @@ impl Listener { ) }); if !ls.is_null() { - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - *port = u16::try_from(bun_opaque::opaque_deref_mut(ls).get_local_port()) - .expect("int cast"); + *port = u16::try_from(ls_mut(ls).get_local_port()).expect("int cast"); } ls } @@ -485,6 +499,11 @@ impl Listener { this_ref.connection = connection; this_ref.listener.set(ListenerType::Uws(listen_socket)); + // Protocol v2 accept hook: runs once per accepted socket BEFORE its + // on_open dispatch, attaching the owner. The listener strictly + // outlives its listen socket (`do_stop`/`finalize` close it first), + // so the context pointer stays valid for the hook's lifetime. + ls_mut(listen_socket).on_create(Listener::accept_hook_body, this.cast::()); if !default_data.is_empty() { this_ref .strong_data @@ -497,10 +516,9 @@ impl Listener { if let Some(server_name) = ssl_config.server_name_cstr() { if !server_name.to_bytes().is_empty() { // Registering the default cert under its own server_name is a - // hint for sni_cb, not load-bearing — sni_find() miss falls + // hint for sni_cb, not load-bearing — an SNI-map miss falls // through to the default SSL_CTX anyway. - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - let _ = bun_opaque::opaque_deref_mut(listen_socket).add_server_name( + let _ = ls_mut(listen_socket).add_server_name( server_name, secure.as_ptr().cast(), core::ptr::null_mut(), @@ -516,8 +534,7 @@ impl Listener { // addContext entries), then the default context; an asynchronous // resolution suspends the handshake until resumeSNI. if !this_ref.handlers.on_server_name().is_empty() { - // S008: `ListenSocket` is an `opaque_ffi!` ZST - safe deref. - bun_opaque::opaque_deref_mut(listen_socket).on_server_name(us_dispatch_server_name); + ls_mut(listen_socket).on_server_name(us_dispatch_server_name); } } @@ -581,23 +598,38 @@ impl Listener { s } - /// Called from `BunListener::on_open` (uws dispatch) for every accepted socket. - /// Allocates the `NewSocket` wrapper, stashes it in the socket ext, then - /// re-stamps the kind to `.bun_socket_{tcp,tls}` so subsequent events route - /// straight to `BunSocket` (the listener arm only fires once per accept). - pub fn on_create( - listener: &Listener, - socket: uws::NewSocketHandler, - ) -> bun_ptr::ThisPtr> { + /// `ListenSocket::on_create` trampoline: `ctx` is the accepting + /// `Listener`, which strictly outlives its listen socket. + fn accept_hook_body(ctx: *mut core::ffi::c_void, s: uws::AnySocket) { + // SAFETY: `ctx` was stamped from a live `&Listener` at `listen`; the + // listener outlives the listen socket (`do_stop`/`finalize` close it + // first), so it is live for every accept. + let l: &Listener = unsafe { &*ctx.cast::() }; + if l.ssl { + Listener::on_create::(l, s); + } else { + Listener::on_create::(l, s); + } + } + + /// Protocol v2 accept hook body (registered on the ListenSocket in + /// `listen` via [`accept_hook`]): allocates the `NewSocket` wrapper and + /// transfers one strong owner ref to core via `attach_owner`. Core + /// dispatches the socket's `on_open` right after this returns — same + /// tick as the accept. + pub fn on_create(listener: &Listener, socket: uws::AnySocket) { jsc::mark_binding!(); log!("onCreate"); debug_assert!(SSL == listener.ssl); + debug_assert!(SSL == socket.is_ssl()); let this_socket = NewSocket::::new(NewSocket:: { ref_count: bun_ptr::RefCount::init(), handlers: JsCell::new(Some(Rc::clone(&listener.handlers))), - socket: Cell::new(socket), + socket: Cell::new(uws::NewSocketHandler:: { + socket: *socket.socket(), + }), protos: JsCell::new(listener.protos.clone()), // `protos` is `Option>` so each accepted socket clones // the listener's slice; one small allocation per accept. @@ -616,26 +648,14 @@ impl Listener { verify_error: JsCell::new(None), }); let s = this_socket; - s.ref_(); - let default_data = listener.strong_data.get().get(); - if let Some(default_data) = default_data { + if let Some(default_data) = listener.strong_data.get().get() { let global = listener.handlers.global_object; NewSocket::::data_set_cached(s.get_this_value(&global), &global, default_data); } - if let Some(ctx) = socket.ext::<*mut c_void>() { - // SAFETY: ext storage is at least pointer-sized; we stash *mut NewSocket - unsafe { *ctx = this_socket.as_ptr().cast::() }; - } - if let uws::InternalSocket::Connected(s) = socket.socket { - // S008: `us_socket_t` is an `opaque_ffi!` ZST — safe deref. - bun_opaque::opaque_deref_mut(s).set_kind(if SSL { - uws_sys::SocketKind::BunSocketTls - } else { - uws_sys::SocketKind::BunSocketTcp - }); - } + // Transfer one strong ref to core; released exactly once at the + // socket's terminal (Protocol v2 owner contract). + socket.attach_owner(uws::owner_ref_of(s.get())); socket.set_timeout(120); - this_socket } pub fn add_server_name( @@ -707,9 +727,8 @@ impl Listener { return Ok(JSValue::UNDEFINED); }; - // The C SNI tree SSL_CTX_up_ref()s; drop our build/borrow ref once added. - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - let ls_ref = bun_opaque::opaque_deref_mut(ls); + // The SNI map SSL_CTX_up_ref()s; drop our build/borrow ref once added. + let ls_ref = ls_mut(ls); ls_ref.remove_server_name(server_name); let ok = ls_ref.add_server_name(server_name, sni_ctx.cast(), core::ptr::null_mut()); // SAFETY: FFI — drop the +1 ref we took via borrow()/get_or_create(); SNI tree up_ref'd its own @@ -776,8 +795,7 @@ impl Listener { } match listener { - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - ListenerType::Uws(socket) => bun_opaque::opaque_deref_mut(socket).close(), + ListenerType::Uws(socket) => ls_mut(socket).close(), #[cfg(windows)] ListenerType::NamedPipe(named_pipe) => { // SAFETY: named_pipe is the unique owner; close_pipe_and_deinit @@ -798,8 +816,7 @@ impl Listener { match listener { ListenerType::Uws(socket) => { Self::unlink_unix_socket_path(&self); - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - bun_opaque::opaque_deref_mut(socket).close(); + ls_mut(socket).close(); } #[cfg(windows)] ListenerType::NamedPipe(named_pipe) => { @@ -897,8 +914,7 @@ impl Listener { pub fn get_fd(this: &Self, _global: &JSGlobalObject) -> JSValue { match this.listener.get() { ListenerType::Uws(uws_listener) => { - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - let socket = bun_opaque::opaque_deref_mut(uws_listener).socket::(); + let socket = ls_mut(uws_listener).socket::(); // On Windows the listening socket fd is a system-kind SOCKET // handle; routing it through `.uv()` panics for anything but // stdio. The sys_jsc helper branches on kind @@ -1353,8 +1369,7 @@ impl Listener { let mut buf = [0u8; 64]; let mut text_buf = [0u8; 512]; - // S008: `ListenSocket` is an `opaque_ffi!` ZST — safe deref. - let socket_ref = bun_opaque::opaque_deref_mut(socket); + let socket_ref = ls_mut(socket); let address_bytes: &[u8] = match socket_ref.get_local_address(&mut buf) { Ok(b) => b, Err(_) => return Ok(JSValue::UNDEFINED), @@ -1464,8 +1479,9 @@ fn connect_finish( }) }; // Either the caller's JS-owned socket (reconnect) or the fresh one above. + // Core's owner ref (+1) is minted inside `do_connect` when it attaches + // the socket, so no optimistic ref is taken here. let socket_ref = socket; - socket_ref.ref_(); NewSocket::::data_set_cached(socket_ref.get_this_value(global), global, default_data); // On the reuse-prev path, `prev.this_value` was downgraded to Weak by the // previous close's `mark_inactive()`. `get_this_value()` returns the @@ -1524,12 +1540,9 @@ fn connect_finish( bun_sys::SystemErrno::ECONNREFUSED as c_int } }; - { - let this = socket; - let _ = NewSocket::::handle_connect_error(this, errno, 0); - // Balance the unconditional `socket_ref.ref_()` above. - NewSocket::deref(&this); - } + // `do_connect` failed before any owner ref transferred to core, so + // there is nothing to balance here. + let _ = NewSocket::::handle_connect_error(socket, errno, 0); return Ok(promise_value); } @@ -1795,7 +1808,7 @@ impl WindowsNamedPipeListeningContext { /// and `hostname` is a NUL-terminated string valid for the call. JS-thread /// only. pub(crate) extern "C" fn us_dispatch_server_name( - ls: *mut uws_sys::ListenSocket, + ls: *mut uws::ListenSocket, hostname: *const core::ffi::c_char, abort_handshake: *mut core::ffi::c_int, socket: *mut c_void, @@ -1805,8 +1818,8 @@ pub(crate) extern "C" fn us_dispatch_server_name( return core::ptr::null_mut(); } // The accept group's ext holds the owning `*mut Listener` for the lifetime - // of the listen socket. S008: `ListenSocket` is an `opaque_ffi!` ZST. - let listener_ptr: *mut Listener = bun_opaque::opaque_deref_mut(ls).group().owner::(); + // of the listen socket. + let listener_ptr: *mut Listener = ls_mut(ls).group().owner::(); if listener_ptr.is_null() { return core::ptr::null_mut(); } @@ -1847,18 +1860,14 @@ pub(crate) extern "C" fn us_dispatch_server_name( let socket_handle: JSValue = if socket.is_null() { JSValue::UNDEFINED } else { - // SAFETY: the C caller passes the live us_socket_t processing this - // ClientHello; for BunSocketTls sockets the ext slot holds the - // TLSSocket wrapper. - let s_ref = uws_sys::us_socket_t::opaque_mut(socket.cast()); - if s_ref.kind() == uws_sys::SocketKind::BunSocketTls { - match *s_ref.ext::>>() { - Some(tls) => tls.get_this_value(&global), - None => JSValue::UNDEFINED, - } - } else { - JSValue::UNDEFINED - } + // The core passes the live us_socket_t processing this ClientHello; + // the typed-owner lookup yields its TLSSocket wrapper (None for + // non-BunSocketTls kinds or an unstamped/detached owner word). + with_socket_owner::( + &wrap::(socket.cast::()), + |tls| tls.get_this_value(&global), + ) + .unwrap_or(JSValue::UNDEFINED) }; let result = match callback.call(&global, this_value, &[this_value, js_name, socket_handle]) { Ok(v) => v, diff --git a/src/runtime/socket/UpgradedDuplex.rs b/src/runtime/socket/UpgradedDuplex.rs index 3d0dedfe145a..8bfcd5738d5c 100644 --- a/src/runtime/socket/UpgradedDuplex.rs +++ b/src/runtime/socket/UpgradedDuplex.rs @@ -17,7 +17,7 @@ use core::ptr::NonNull; use bun_jsc::virtual_machine::VirtualMachine; use bun_jsc::{CallFrame, GlobalRef, JSGlobalObject, JSValue, JsResult, StrongOptional, host_fn}; -use bun_uws::{us_bun_verify_error_t, uws_callback}; +use bun_uws_shim::{us_bun_verify_error_t, uws_callback}; use super::ssl_wrapper::SSLWrapper; use crate::timer::{ElTimespec, EventLoopTimer, EventLoopTimerState, EventLoopTimerTag}; @@ -637,12 +637,12 @@ fn on_close_js(_global: &JSGlobalObject, frame: &CallFrame) -> JsResult } // ────────────────────────────────────────────────────────────────────────── -// `bun_uws::UpgradedDuplex` link-time-dispatch shims (cycle break). +// `bun_usockets::handle::UpgradedDuplex` link-time-dispatch shims (cycle break). // -// `src/uws_sys/lib.rs` declares `UpgradedDuplex` as an opaque handle and binds -// these symbols via `extern "C"` so the low-tier socket dispatch can call into -// the runtime without an upward crate dep. Signatures MUST match the -// `unsafe extern "C"` block there. +// `src/usockets/unsafe_core/ffi.rs` declares `UpgradedDuplex` as an opaque +// handle and binds these symbols via `extern "C"` so the low-tier socket +// dispatch can call into the runtime without an upward crate dep. Signatures +// MUST match the `unsafe extern "C"` block there. // // All but `ssl` are emitted by `#[uws_callback(export = "...")]` on the // inherent methods above; `ssl` keeps a hand-written shim because the safe @@ -652,7 +652,7 @@ fn on_close_js(_global: &JSGlobalObject, frame: &CallFrame) -> JsResult #[unsafe(no_mangle)] pub(crate) extern "C" fn UpgradedDuplex__ssl(this: *const c_void) -> *mut bun_boringssl_sys::SSL { - // SAFETY: `this` is a live `*const UpgradedDuplex` from the uws_sys opaque handle. + // SAFETY: `this` is a live `*const UpgradedDuplex` from the bun_usockets opaque handle. unsafe { (*this.cast::()) .ssl() diff --git a/src/runtime/socket/WindowsNamedPipe.rs b/src/runtime/socket/WindowsNamedPipe.rs index 42dd4074c08d..7162f3b8ae66 100644 --- a/src/runtime/socket/WindowsNamedPipe.rs +++ b/src/runtime/socket/WindowsNamedPipe.rs @@ -38,7 +38,7 @@ use bun_sys::ReturnCodeExt as _; #[cfg(windows)] use bun_sys::windows::libuv as uv; use bun_sys::{self, Fd}; -use bun_uws::us_bun_verify_error_t; +use bun_uws_shim::us_bun_verify_error_t; use crate::socket::SSLConfig; use crate::socket::ssl_wrapper::{self, SSLWrapper}; @@ -520,7 +520,7 @@ impl WindowsNamedPipe { self.call_write_or_end(Some(encoded_data), true); } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__resume_stream")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__resume_stream")] pub fn resume_stream(&mut self) -> bool { #[cfg(windows)] { @@ -543,7 +543,7 @@ impl WindowsNamedPipe { } } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__pause_stream")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__pause_stream")] pub fn pause_stream(&mut self) -> bool { #[cfg(windows)] { @@ -559,7 +559,7 @@ impl WindowsNamedPipe { } } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__flush")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__flush")] pub fn flush(&mut self) { if let Some(w) = self.wrapper_ptr() { // Re-entrancy guard: `SSLWrapper::flush → handle_traffic` can fire @@ -1104,7 +1104,7 @@ impl WindowsNamedPipe { unsafe { &mut *self.vm.uv_loop() } } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__encode_and_write")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__encode_and_write")] pub fn encode_and_write(&mut self, data: &[u8]) -> i32 { bun_output::scoped_log!(WindowsNamedPipe, "encodeAndWrite (len: {})", data.len()); if let Some(w) = self.wrapper_ptr() { @@ -1137,13 +1137,13 @@ impl WindowsNamedPipe { i32::try_from(data.len()).expect("int cast") } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__raw_write")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__raw_write")] pub fn raw_write(&mut self, encoded_data: &[u8]) -> i32 { self.internal_write(encoded_data); i32::try_from(encoded_data.len()).expect("int cast") } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__close")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__close")] pub fn close(&mut self) { // PORT_NOTES_PLAN R-2: `&mut self` carries LLVM `noalias`, but // `SSLWrapper::shutdown` re-enters via the handler vtable @@ -1192,7 +1192,7 @@ impl WindowsNamedPipe { unsafe { (*this).writer.end() }; } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__shutdown")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__shutdown")] pub fn shutdown(&mut self) { // PORT_NOTES_PLAN R-2: see `close` above — same `noalias`-cached-`flags` // miscompile across `(*w).shutdown(false)`'s re-entry (ASM-verified @@ -1238,7 +1238,7 @@ impl WindowsNamedPipe { } } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__shutdown_read")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__shutdown_read")] pub fn shutdown_read(&mut self) { if let Some(wrapper) = self.wrapper.as_mut() { let _ = wrapper.shutdown_read(); @@ -1252,7 +1252,7 @@ impl WindowsNamedPipe { } } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__is_shutdown", no_catch)] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__is_shutdown", no_catch)] pub fn is_shutdown(&self) -> bool { if let Some(wrapper) = &self.wrapper { return wrapper.is_shutdown(); @@ -1261,7 +1261,7 @@ impl WindowsNamedPipe { self.flags.disconnected() || self.writer.is_done } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__is_closed", no_catch)] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__is_closed", no_catch)] pub fn is_closed(&self) -> bool { if let Some(wrapper) = &self.wrapper { return wrapper.is_closed(); @@ -1269,7 +1269,7 @@ impl WindowsNamedPipe { self.flags.disconnected() } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__is_established", no_catch)] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__is_established", no_catch)] pub fn is_established(&self) -> bool { !self.is_closed() } @@ -1281,7 +1281,7 @@ impl WindowsNamedPipe { None } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__ssl_error", no_catch)] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__ssl_error", no_catch)] pub fn ssl_error(&self) -> us_bun_verify_error_t { us_bun_verify_error_t { error_no: self.ssl_error.error_no, @@ -1325,7 +1325,7 @@ impl WindowsNamedPipe { timer_all().insert(&raw mut self.event_loop_timer); } - #[bun_uws::uws_callback(export = "WindowsNamedPipe__set_timeout")] + #[bun_uws_shim::uws_callback(export = "WindowsNamedPipe__set_timeout")] pub fn set_timeout(&mut self, seconds: c_uint) { bun_output::scoped_log!(WindowsNamedPipe, "setTimeout({})", seconds); self.set_timeout_in_milliseconds(seconds * 1000); @@ -1408,13 +1408,13 @@ impl Drop for WindowsNamedPipe { } } -// Hand-written `ssl` shim for the `bun_uws` cycle-break extern — the safe +// Hand-written `ssl` shim for the `bun_usockets` cycle-break extern — the safe // method returns `Option<*mut SSL>` while the C ABI flattens to a nullable // raw pointer. All other `WindowsNamedPipe__*` symbols are emitted by // `#[uws_callback(export = …)]` on the inherent methods above. #[unsafe(no_mangle)] pub extern "C" fn WindowsNamedPipe__ssl(this: *const c_void) -> *mut boringssl::SSL { - // SAFETY: `this` is a live `*const WindowsNamedPipe` from the bun_uws opaque handle. + // SAFETY: `this` is a live `*const WindowsNamedPipe` from the bun_usockets opaque handle. unsafe { (*this.cast::()) .ssl() diff --git a/src/runtime/socket/WindowsNamedPipeContext.rs b/src/runtime/socket/WindowsNamedPipeContext.rs index 57086f4f0994..aed11c02be8e 100644 --- a/src/runtime/socket/WindowsNamedPipeContext.rs +++ b/src/runtime/socket/WindowsNamedPipeContext.rs @@ -16,7 +16,8 @@ use bun_paths::PathBuffer; #[cfg(windows)] use bun_sys::windows::libuv as uv; use bun_sys::{self, Error as SysError, Fd, SystemErrno}; -use bun_uws::{self as uws, us_bun_verify_error_t}; +use bun_usockets as uws; +use bun_uws_shim::us_bun_verify_error_t; bun_output::declare_scope!(WindowsNamedPipeContext, visible); diff --git a/src/runtime/socket/mod.rs b/src/runtime/socket/mod.rs index 4c152bb2ec35..2e8433cdda4e 100644 --- a/src/runtime/socket/mod.rs +++ b/src/runtime/socket/mod.rs @@ -30,13 +30,13 @@ pub mod windows_named_pipe; #[path = "WindowsNamedPipeContext.rs"] pub mod windows_named_pipe_context; -/// Re-export of the canonical `bun_uws::ssl_wrapper` plus the runtime-tier -/// `init(&SSLConfig, ..)` constructor that the lower tier can't see (it would -/// need to name `crate::server::server_config::SSLConfig`). The body is the -/// same `as_usockets() → init_from_options()` round-trip the old local copy -/// did; the duplicate module file is gone. +/// Re-export of the canonical `bun_uws_shim::ssl_wrapper` plus the +/// runtime-tier `init(&SSLConfig, ..)` constructor that the lower tier can't +/// see (it would need to name `crate::server::server_config::SSLConfig`). The +/// body is the same `as_usockets() → init_from_options()` round-trip the old +/// local copy did; the duplicate module file is gone. pub mod ssl_wrapper { - pub use bun_uws::ssl_wrapper::*; + pub use bun_uws_shim::ssl_wrapper::*; /// Thin wrapper over `SSLWrapper::init_from_options` so callers in this /// tier can keep passing `&SSLConfig` directly. @@ -114,65 +114,3 @@ pub mod socket { js_set_socket_options, js_upgrade_duplex_to_tls, js_upgrade_tls_deferred, testing_ap_is, }; } - -// ─── RawSocketEvents glue ──────────────────────────────────────────────────── -// `uws_handlers::RawSocketEvents` is the raw-pointer dispatch trait the -// vtable layer requires of `api::NewSocket` (routed via `RawPtrHandler`, -// not `PtrHandler`). The handlers take `ThisPtr` rather than `&mut self`: -// a JS callback can close the socket and drop its last ref mid-dispatch, and a -// `&mut` argument protector outliving the allocation is UB. -impl uws_handlers::RawSocketEvents for NewSocket { - const HAS_ON_OPEN: bool = true; - - #[inline] - fn on_open(this: bun_ptr::ThisPtr, s: bun_uws::NewSocketHandler) { - NewSocket::on_open(this, s); - } - #[inline] - fn on_data(this: bun_ptr::ThisPtr, s: bun_uws::NewSocketHandler, data: &[u8]) { - NewSocket::on_data(this, s, data); - } - #[inline] - fn on_writable(this: bun_ptr::ThisPtr, s: bun_uws::NewSocketHandler) { - NewSocket::on_writable(this, s); - } - #[inline] - fn on_close( - this: bun_ptr::ThisPtr, - s: bun_uws::NewSocketHandler, - code: i32, - reason: *mut core::ffi::c_void, - ) { - let _ = NewSocket::on_close( - this, - s, - code, - if reason.is_null() { None } else { Some(reason) }, - ); - } - #[inline] - fn on_timeout(this: bun_ptr::ThisPtr, s: bun_uws::NewSocketHandler) { - NewSocket::on_timeout(this, s); - } - #[inline] - fn on_end(this: bun_ptr::ThisPtr, s: bun_uws::NewSocketHandler) { - NewSocket::on_end(this, s); - } - #[inline] - fn on_connect_error( - this: bun_ptr::ThisPtr, - s: bun_uws::NewSocketHandler, - code: i32, - ) { - let _ = NewSocket::on_connect_error(this, s, code); - } - #[inline] - fn on_handshake( - this: bun_ptr::ThisPtr, - s: bun_uws::NewSocketHandler, - ok: i32, - err: bun_uws_sys::us_bun_verify_error_t, - ) { - let _ = NewSocket::on_handshake(this, s, ok, err); - } -} diff --git a/src/runtime/socket/socket_body.rs b/src/runtime/socket/socket_body.rs index a4452f57bef5..70a6203b210f 100644 --- a/src/runtime/socket/socket_body.rs +++ b/src/runtime/socket/socket_body.rs @@ -32,12 +32,11 @@ use bun_core::String as BunString; use bun_event_loop::AnyTask::AnyTask; use bun_jsc::virtual_machine::VirtualMachine; use bun_sys as sys; -use bun_uws as uws; +use bun_usockets as uws; -// `uws::NewSocketHandler::from_duplex` is now inherent on the canonical -// `bun_uws_sys::socket` impl; thin local wrapper that erases the concrete -// `runtime::socket::UpgradedDuplex` to the opaque `bun_uws_sys::UpgradedDuplex` -// handle (same allocation, different-crate newtype — see uws_sys/lib.rs §shim). +// Thin local wrapper that erases the concrete `runtime::socket::UpgradedDuplex` +// to the opaque `bun_usockets::handle::UpgradedDuplex` handle (same +// allocation, different-crate newtype — see usockets/unsafe_core/ffi.rs §duplex). #[inline] fn from_duplex(duplex: &mut UpgradedDuplex) -> uws::NewSocketHandler { uws::NewSocketHandler::::from_duplex(std::ptr::from_mut::(duplex).cast()) @@ -137,17 +136,10 @@ extern "C" fn select_alpn_callback( let name = unsafe { core::ffi::CStr::from_ptr(servername_ptr) }; ZigString::init(name.to_bytes()).to_js(&global) }; - // The user callback (and the error handler below) run from inside - // SSL_do_handshake on this socket: JS that writes to or destroys a - // different TLS socket on the same loop re-points the per-loop BIO - // routing state, and this handshake's next flight would land on - // that other socket's fd. Snapshot and restore it around every - // JS-running region. - let mut saved_loop_state: [*mut c_void; 5] = [core::ptr::null_mut(); 5]; - tls_socket_functions::ffi::us_internal_ssl_loop_state_save( - boringssl_sys::SSL::opaque_ref(ssl), - saved_loop_state.as_mut_ptr(), - ); + // The callback and error handler run from inside SSL_do_handshake; + // a same-socket re-entrant write clears the ciphertext read window, + // so bracket all JS with the §1.4 save/restore guard (drop restores). + let _window = uws::tls::SslWindowGuard::save(ssl.cast()); let result = match callback.call(&global, this_value, &[this_value, servername_js, buffer]) { Ok(v) => v, @@ -155,15 +147,9 @@ extern "C" fn select_alpn_callback( }; if let Some(err_value) = result.to_error() { let _ = handlers.call_error_handler(this_value, &[this_value, err_value]); - tls_socket_functions::ffi::us_internal_ssl_loop_state_restore( - saved_loop_state.as_mut_ptr(), - ); this.exit_scope(scope); return boringssl_sys::SSL_TLSEXT_ERR_ALERT_FATAL; } - tls_socket_functions::ffi::us_internal_ssl_loop_state_restore( - saved_loop_state.as_mut_ptr(), - ); this.exit_scope(scope); if !result.is_boolean() || result.to_boolean() { // The server has an ALPNCallback and it answered: a string @@ -368,9 +354,14 @@ impl Drop for PendingSystemError { } } -/// `needs_deref` releases the ref the now-detached native socket held. The idle -/// teardown is gated on the socket still holding the `Handlers` we entered with: -/// `onConnectError` can reconnect, and we must not tear that connection down. +/// `needs_deref` releases the +1 the caller transferred in (the Protocol v2 +/// adapter's bridge ref, or the duplex/named-pipe manual callers' owner pin); +/// it is false where no ref was transferred: the synchronous connect-failure +/// path, and detached dispatch (close()/terminate()/finalize set DETACHED +/// first; the adapter's `!is_detached()` gate then skips its bridge ref). +/// The idle teardown is gated on the socket still holding +/// the `Handlers` we entered with: `onConnectError` can reconnect, and we +/// must not tear that connection down. struct ConnectErrorTeardown { socket: bun_ptr::ThisPtr>, entered: Rc, @@ -551,8 +542,7 @@ impl NewSocket { /// doesn't need a disjoint borrow. pub fn do_connect(&self) -> crate::Result<()> { // Keep `self` alive across the re-entrant connect path. - // SAFETY: `self` is live for this call and outlives the sockets below. - let this = unsafe { bun_ptr::ThisPtr::new(self.as_ctx_ptr()) }; + let this = uws::this_ptr_of(self); let _guard = this.ref_guard(); let vm = self.get_handlers().vm; @@ -602,29 +592,33 @@ impl NewSocket { let local_z = local .as_ref() .map(|(h, p)| (bun_core::ZBox::from_bytes(h), *p)); - self.socket.set( - match group.connect( - kind, - ssl_ctx, - host_c, - c_int::from(port), - local_z.as_ref().map(|(z, p)| (z.as_zstr().as_cstr(), *p)), - flags, - core::mem::size_of::<*mut c_void>() as c_int, - ) { - uws::ConnectResult::Failed => { - return Err(crate::Error::FailedToOpenSocket); - } - uws::ConnectResult::Socket(s) => { - *uws::us_socket_t::opaque_mut(s).ext() = Some(this); - SocketHandler::::from(s) - } - uws::ConnectResult::Connecting(c) => { - *uws::ConnectingSocket::opaque_mut(c).ext() = Some(this); - SocketHandler::::from_connecting(c) - } - }, - ); + let handle = match group.connect( + kind, + ssl_ctx, + host_c, + c_int::from(port), + local_z.as_ref().map(|(z, p)| (z.as_zstr().as_cstr(), *p)), + flags, + core::mem::size_of::<*mut c_void>() as c_int, + ) { + uws::ConnectResult::Failed => { + return Err(crate::Error::FailedToOpenSocket); + } + uws::ConnectResult::Socket(s) => { + SocketHandler::::from(uws::SocketRef::from_live( + NonNull::new(s).expect("non-null connect socket"), + )) + } + uws::ConnectResult::Connecting(c) => { + SocketHandler::::from_connecting(uws::ConnectingRef::from_live( + NonNull::new(c).expect("non-null connecting socket"), + )) + } + }; + self.socket.set(handle); + // Transfer one strong ref to core; released exactly once at + // the socket's terminal (Protocol v2 owner contract). + handle.attach_owner(uws::owner_ref_of(self)); } Some(UnixOrHost::Unix(u)) => { let s = group.connect_unix( @@ -637,8 +631,11 @@ impl NewSocket { if s.is_null() { return Err(crate::Error::FailedToOpenSocket); } - *uws::us_socket_t::opaque_mut(s).ext() = Some(this); - self.socket.set(SocketHandler::::from(s)); + let handle = SocketHandler::::from(uws::SocketRef::from_live( + NonNull::new(s).expect("checked non-null above"), + )); + self.socket.set(handle); + handle.attach_owner(uws::owner_ref_of(self)); } Some(UnixOrHost::Fd(f)) => { // `LIBUS_SOCKET_DESCRIPTOR` is `c_int` on POSIX, `SOCKET` @@ -654,9 +651,12 @@ impl NewSocket { if s.is_null() { return Err(crate::Error::ConnectionFailed); } - *uws::us_socket_t::opaque_mut(s).ext() = Some(this); - let sock = SocketHandler::::from(s); + let sock = SocketHandler::::from(uws::SocketRef::from_live( + NonNull::new(s).expect("checked non-null above"), + )); self.socket.set(sock); + sock.attach_owner(uws::owner_ref_of(self)); + // `from_fd` never self-dispatches open — fire it here. Self::on_open(this, sock); } None => unreachable!("do_connect requires self.connection to be set"), @@ -1215,17 +1215,6 @@ impl NewSocket { Ok(()) } - /// Takes `ThisPtr` for the same re-entrancy reason as - /// `handle_connect_error`. - pub fn on_connect_error( - this: bun_ptr::ThisPtr, - socket: SocketHandler, - errno: c_int, - ) -> JsResult<()> { - jsc::mark_binding!(); - Self::handle_connect_error(this, errno, socket.dns_error()) - } - pub fn mark_active(&self) { if !self.flags.get().contains(Flags::IS_ACTIVE) { let handlers = self.get_handlers(); @@ -1256,22 +1245,25 @@ impl NewSocket { /// Discard a still-live native socket so this wrapper can be reused for a /// fresh connect. `node:net` permits `socket.connect()` on an /// already-connected socket; without this the previous `us_socket_t`'s - /// ext slot keeps pointing at `self` while `do_connect` overwrites - /// `self.socket`, aliasing two native sockets onto one wrapper. The ext - /// slot is nulled before closing so the synchronous `on_close` / - /// `on_connecting_error` dispatch early-returns and no JS callback fires; - /// `mark_inactive`/`deref` balance the refs the previous `connect_finish` - /// took. Caller must hold an independent +1 across this call. Only - /// handles Connected/Connecting; Pipe/UpgradedDuplex back-pointers do - /// not live in the ext slot so those are left for the caller's existing - /// `debug_assert!` to catch. + /// owner keeps pointing at `self` while `do_connect` overwrites + /// `self.socket`, aliasing two native sockets onto one wrapper. + /// `detach_owner` clears core's owner ref (releasing the connect-time +1) + /// so the synchronous `on_close` / `on_connecting_error` dispatch no-ops + /// and no JS callback fires. Caller must hold an independent +1 across + /// this call. Only handles Connected/Connecting; Pipe/UpgradedDuplex + /// back-pointers are not core owners so those are left for the caller's + /// existing `debug_assert!` to catch. pub fn detach_for_reconnect(&self) { let old = self.socket.get(); - let Some(ext) = old.ext::<*mut c_void>() else { + if !matches!( + old.socket, + uws::InternalSocket::Connected(_) | uws::InternalSocket::Connecting(_) + ) { return; - }; - // SAFETY: ext slot is sized for `*mut c_void`; single-threaded. - unsafe { *ext = core::ptr::null_mut() }; + } + // Releases core's owner ref immediately — the balance of the +1 + // transferred at connect (do_connect's attach_owner). + old.detach_owner(); self.socket.set(SocketHandler::::DETACHED); self.buffered_data_for_node_net .with_mut(|b| b.clear_and_free()); @@ -1286,7 +1278,19 @@ impl NewSocket { } } } - self.deref(); + // The silent close above suppressed dispatch, so the upgradeTLS raw + // twin never saw its own on_close — retire it here. Last: it runs JS. + self.retire_twin(old, 0, None); + } + + /// Retire the upgradeTLS raw twin: it shares this socket's `us_socket_t`, + /// so this dispatch is its only close. `on_close` consumes the twin's +1 + /// (`RefPtr` has no Drop; `into_this_ptr` hands it over exactly once). + fn retire_twin(&self, socket: SocketHandler, err: c_int, reason: Option<*mut c_void>) { + if let Some(raw) = self.twin.with_mut(|t| t.take()) { + // `raw.twin == None`, so this cannot recurse. + Self::on_close(raw.into_this_ptr(), socket, err, reason).ok(); + } } pub fn mark_inactive(&self) { @@ -1366,7 +1370,9 @@ impl NewSocket { // Add SNI support for TLS (mongodb and others requires this) if SSL { - if let Some(ssl_ptr) = this.socket.get().ssl() { + // `.cast()`: `bssl_sys::SSL` (bun_usockets) → `bun_boringssl_sys::SSL` + // — same C type, distinct Rust nominals. + if let Some(ssl_ptr) = this.socket.get().ssl().map(|p| p.cast()) { if tls_socket_functions::ffi::SSL_is_init_finished(boringssl_sys::SSL::opaque_ref( ssl_ptr, )) == 0 @@ -1444,10 +1450,9 @@ impl NewSocket { } } - if let Some(ctx) = socket.ext::<*mut c_void>() { - // SAFETY: ext slot is sized for `*mut anyopaque`. - unsafe { *ctx = this_ptr.cast::() }; - } + // No ext re-stamp needed on the connecting→connected transition: + // core transfers the owned owner word to the winner's header during + // promotion (`finish_promotion`). let handlers = this.get_handlers(); let callback = handlers.on_open(); @@ -1621,11 +1626,14 @@ impl NewSocket { if !this.has_handlers() { return Ok(()); } - this.update_flags(|f| f.insert(Flags::HANDSHAKE_COMPLETE)); - this.socket.set(s); + // Detached check BEFORE the re-stamp: close()/terminate() set DETACHED + // deliberately; a late handshake during the deferred-close window must + // not resurrect the handle. if this.socket.get().is_detached() { return Ok(()); } + this.update_flags(|f| f.insert(Flags::HANDSHAKE_COMPLETE)); + this.socket.set(s); // Keep the socket alive across the callbacks below (which re-enter JS) // and across `reject_unauthorized_connection`, whose close may // otherwise drop the last reference. @@ -1646,7 +1654,8 @@ impl NewSocket { let mut hostname_mismatch_message: Option> = None; if SSL && authorized && !this.acts_as_tls_server() { - if let Some(ssl_ptr) = this.socket.get().ssl() { + // `.cast()`: bssl_sys → bun_boringssl_sys nominal bridge. + if let Some(ssl_ptr) = this.socket.get().ssl().map(|p| p.cast()) { let hostname: &[u8] = if let Some(server_name) = this.server_name.get() { &server_name[..] } else if let Some(super::listener::UnixOrHost::Host { host, .. }) = @@ -1951,6 +1960,7 @@ impl NewSocket { if !this.has_handlers() { this.detach_native_callback(); this.socket.set(SocketHandler::::DETACHED); + this.retire_twin(socket, err, reason); this.get().deref(); return Ok(()); } @@ -1965,16 +1975,7 @@ impl NewSocket { ); this.detach_native_callback(); this.socket.set(SocketHandler::::DETACHED); - // The upgradeTLS raw twin shares the same us_socket_t so it never - // gets its own dispatch — fire its (pre-upgrade) close handler - // here, then retire it. `raw.twin == None` so this doesn't - // recurse, and `onClose` derefs the +1 we took at creation. - if let Some(raw) = this.twin.with_mut(|t| t.take()) { - // `on_close` consumes the twin's +1 via its `CloseTeardown`, so - // hand over the raw pointer rather than letting `IntrusiveRc::drop` - // release it a second time. - Self::on_close(raw.into_this_ptr(), socket, err, reason).ok(); - } + this.retire_twin(socket, err, reason); let cleanup = CloseTeardown { socket: this, entered: Rc::clone(&handlers), @@ -2041,10 +2042,11 @@ impl NewSocket { if !this.has_handlers() { return; } - this.socket.set(s); + // Detached check BEFORE the re-stamp — same invariant as on_handshake. if this.socket.get().is_detached() { return; } + this.socket.set(s); if this.native_callback.get().on_data(data) { return; } @@ -2375,7 +2377,7 @@ impl NewSocket { /// Vectored raw write for plain-TCP sockets: all chunks reach the fd in one /// writev. Callers guarantee this socket has no TLS layer (raw writes bypass /// SSL framing). Updates bytes_written like the scalar path. - pub fn write_vectored_raw(&self, iov: &[bun_uws_sys::UsIoVec]) -> i32 { + pub fn write_vectored_raw(&self, iov: &[uws::UsIoVec]) -> i32 { let socket = self.socket.get(); if socket.is_shutdown() || socket.is_closed() { return -1; @@ -2576,16 +2578,15 @@ impl NewSocket { #[cfg(unix)] if !SSL { // fast-ish path: use writev() to avoid cloning to another buffer. - if let uws::InternalSocket::Connected(connected) = socket.socket { + if let uws::InternalSocket::Connected(_) = socket.socket { if !buffer.slice().is_empty() { - // SAFETY: `connected` is a live `*mut us_socket_t` (guard above). - let rc = unsafe { - (*connected).write2( - self.buffered_data_for_node_net.get().slice(), - buffer.slice(), - ) - }; + let rc = socket.write2( + self.buffered_data_for_node_net.get().slice(), + buffer.slice(), + ); let written: usize = usize::try_from(rc.max(0)).expect("int cast"); + self.bytes_written + .set(self.bytes_written.get() + written as u64); let leftover = total_to_write.saturating_sub(written); if leftover == 0 { self.buffered_data_for_node_net @@ -2593,22 +2594,22 @@ impl NewSocket { break 'brk rc; } + // writev consumed the buffered prefix first, then the input. let buf_len = self.buffered_data_for_node_net.get().len() as usize; - let remaining_in_buffered_len = - self.buffered_data_for_node_net.get().slice()[written.min(buf_len)..] - .len(); + let written_from_buffered = written.min(buf_len); + let remaining_in_buffered_len = buf_len - written_from_buffered; let remaining_in_input_data = &buffer.slice() - [(buf_len.saturating_sub(written)).min(buffer.slice().len())..]; - - if written > 0 { - if remaining_in_buffered_len > 0 { - self.buffered_data_for_node_net.with_mut(|b| { - // `remaining_in_buffered_len > 0` ⇒ `written < b.len()`, - // so `written..` is in-bounds; safe overlapping memmove. - b.copy_within(written.., 0); - b.truncate(remaining_in_buffered_len); - }); - } + [(written.saturating_sub(buf_len)).min(buffer.slice().len())..]; + + if written_from_buffered > 0 { + self.buffered_data_for_node_net.with_mut(|b| { + if remaining_in_buffered_len > 0 { + // `written_from_buffered < b.len()` here, so the range + // is in-bounds; safe overlapping memmove. + b.copy_within(written_from_buffered.., 0); + } + b.truncate(remaining_in_buffered_len); + }); } if !remaining_in_input_data.is_empty() { @@ -2989,10 +2990,11 @@ impl NewSocket { jsc::mark_binding!(); // Capture the in-flight-connect state before close_and_detach() sets // DETACHED. Resetting a SEMI_SOCKET (Connected arm, handshake not yet - // established) dispatches no terminal callback in us_socket_close, so - // on_close/mark_inactive never runs — balance connect_finish's ref_(), - // downgrade the Strong this_value, and release the event-loop ref here, - // exactly as close() does. Without it those refs leak (LSan-caught). + // established) dispatches no terminal callback in us_socket_close — + // core still releases its owner ref exactly once on that silent close + // (Protocol v2 terminal contract) — so on_close/mark_inactive + // never runs: downgrade the Strong this_value and release the + // event-loop ref here, exactly as close() does. let socket = this.socket.get(); let is_semi_connect = socket.socket.get().is_some() && !socket.is_established(); this.close_and_detach(uws::CloseCode::Failure); @@ -3005,7 +3007,6 @@ impl NewSocket { if !matches!(this.this_value.get(), JsRef::Finalized) { this.this_value.with_mut(|r| r.downgrade()); } - this.deref(); } Ok(JSValue::UNDEFINED) } @@ -3039,27 +3040,20 @@ impl NewSocket { // SEMI_SOCKET — `us_socket_close` skips dispatch for those (firing // `on_close` without a prior `on_open` is wrong, and the natural // failure path delivers `on_connect_error` from the loop instead). - // Closing one here therefore runs *no* terminal callback, stranding - // the +1 `connect_finish` took on `this` (whose matching `deref()` - // lives in `on_close`/`handle_connect_error`) and the Strong - // `this_value` upgrade. node:net reaches this for every aborted / - // `autoSelectFamily`-timed-out attempt via `_handle.close()`. + // Closing one here therefore runs *no* terminal callback — core still + // releases its owner ref on the silent close, but the Strong + // `this_value` upgrade and event-loop ref must be settled here. + // node:net reaches this for every aborted / `autoSelectFamily`- + // timed-out attempt via `_handle.close()`. // // `socket.socket.get().is_some()` is `true` only for the - // `Connected(us_socket_t)` arm — the `Connecting` arm fires - // `on_connecting_error` synchronously inside `close()` and so does - // its own `deref()`; double-releasing it would underflow. + // `Connected(us_socket_t)` arm — the `Connecting` arm dispatches + // `on_connect_error` synchronously inside `close()`, which runs the + // full teardown itself. let is_semi_connect = socket.socket.get().is_some() && !socket.is_established(); - // `_handle.close()` is the net.Socket `_destroy()` path — Node emits close_notify - // once and closes the fd without waiting for the peer's reply. `.fast_shutdown` - // makes `ssl_handle_shutdown` take the fast branch so the raw close runs - // synchronously (with `.normal` the SSL layer defers waiting for the peer, but we - // detach + unref immediately below, orphaning the `us_socket_t`). NOT `.failure`: - // that arms SO_LINGER{1,0} → RST and drops any data still in the kernel send - // buffer, which `destroy()` after `write()` must not do. The SSL layer may - // briefly defer this close behind its own ciphertext write spill - // (`ssl_close_after_spill`); that waits only on our fd, not the peer. - socket.close(uws::CloseCode::FastShutdown); + // DETACH + unref BEFORE the close (same order as close_and_detach / + // terminate): the close dispatches its terminal callback synchronously, + // whose JS may reconnect this wrapper — the tail must not clobber it. this.socket.set(SocketHandler::::DETACHED); let _ = global; this.poll_ref.with_mut(|p| { @@ -3071,11 +3065,11 @@ impl NewSocket { if !matches!(this.this_value.get(), JsRef::Finalized) { this.this_value.with_mut(|r| r.downgrade()); } - // Balance `connect_finish`'s `socket_ref.ref_()`. The JS wrapper - // we were called through holds the remaining +1, so refcount - // stays ≥ 1 across this call. - this.deref(); } + // net.Socket `_destroy()`: FastShutdown raw-closes synchronously without + // waiting for the peer (we detached + unreffed above); Failure would RST + // and drop buffered writes. usockets docs/tls.md §CloseCode semantics. + socket.close(uws::CloseCode::FastShutdown); Ok(JSValue::UNDEFINED) } @@ -3149,6 +3143,12 @@ impl NewSocket { let this_ref: &Self = unsafe { &*this }; this_ref.mark_inactive(); this_ref.detach_native_callback(); + // `RefPtr` has no Drop: release the upgradeTLS twin's +1 if no close + // dispatch ever retired it (e.g. the fd was closed with dispatch + // suppressed), or the raw half leaks for the process lifetime. + if let Some(twin) = this_ref.twin.with_mut(|t| t.take()) { + twin.deref(); + } // Reset to empty (Strong drops on assign). this_ref.this_value.set(JsRef::empty()); @@ -3295,6 +3295,14 @@ impl NewSocket { "upgradeTLS requires an established socket" ))); }; + // Fail closed (C10): `group::adopt_socket` skips the kind restamp on + // shut-down sockets while `adopt_tls` still attaches TLS and returns + // `Some`. Generation-validated query, so stale handles bail here too. + if this.socket.get().is_shutdown() { + return Err(global.throw_invalid_arguments(format_args!( + "upgradeTLS requires an established socket" + ))); + } if opts.is_empty_or_undefined_or_null() || opts.is_boolean() || !opts.is_object() { return Err(global.throw(format_args!("Expected options object"))); } @@ -3485,21 +3493,34 @@ impl NewSocket { .as_mut() .rare_data() .bun_connect_group::(vm); - // SAFETY: `raw_socket` is the live `*mut us_socket_t` extracted from - // `InternalSocket::Connected` above; `owned_ssl_ctx` is the +1 ref - // taken from SecureContext/ssl_ctx_cache and never null here. - let new_raw: NonNull = match unsafe { - (*raw_socket).adopt_tls( + // Adoption is in-place (no relocation): on success `raw_socket` stays + // valid — same pointer, same generation — so no returned pointer needs + // re-stamping anywhere below. `adopt_tls_owned` swaps the core-held + // owner atomically: `tls` (one transferred +1) is stamped BEFORE the + // retired TCP wrapper's owner ref is released, so there is no window + // where dispatch sees a stale owner. + // Re-check shutdown after the JS coercions above (an option getter may + // have re-entered and shut the socket down) — same C10 hazard as the + // entry guard. Close mid-call is fine: `adopt_tls_owned` refuses it. + let adopted = if this.socket.get().is_shutdown() { + None + } else { + // SAFETY: `owned_ssl_ctx` is the +1 ref taken from + // SecureContext/ssl_ctx_cache (never null here); the adopt only + // reads it to construct the per-socket SSL. + let ctx = unsafe { &mut *(tls.owned_ssl_ctx.get().unwrap().cast::()) }; + uws::NewSocketHandler::::adopt_tls_owned( + raw_socket, group, uws::SocketKind::BunSocketTls, - &mut *(tls.owned_ssl_ctx.get().unwrap()), + ctx, sni, !is_server, - core::mem::size_of::<*mut c_void>() as i32, - core::mem::size_of::<*mut c_void>() as i32, + uws::owner_ref_of(tls.get()), ) - } { - Some(s) => s, + }; + let adopted_handle = match adopted { + Some(h) => h, None => { let err = boringssl_sys::ERR_get_error(); let _clear_err = ClearErrorQueue(err != 0); @@ -3540,19 +3561,14 @@ impl NewSocket { // active_connections=1 it holds is transferring to `raw`. this.this_value.with_mut(|r| r.downgrade()); } - // Release the retired TCP wrapper's ref on EVERY exit past this point, - // including the `?` early-returns below. - // SAFETY: `this` owns the outstanding ref this guard consumes; the JS - // wrapper's own +1 keeps the allocation alive across the whole call. - let _this_deref = unsafe { bun_ptr::ScopedRef::adopt(this.as_ctx_ptr()) }; + // The retired TCP wrapper's connect-time owner ref was already + // released inside `adopt_tls_owned` (the owner swap); the JS + // wrapper's own +1 keeps `this` alive for the rest of the call. this.detach_native_callback(); this.socket.set(SocketHandler::::DETACHED); - // Only NOW is it safe for dispatch to fire: ext + kind point at `tls`. - *uws::us_socket_t::opaque_mut(new_raw.as_ptr()).ext() = Some(tls); - tls.socket - .set(SocketHandler::::from(new_raw.as_ptr())); - tls.ref_(); + // Dispatch already routes to `tls` (owner stamped by the adopt). + tls.socket.set(adopted_handle); // The `raw` half — same `us_socket_t*`, ORIGINAL pre-upgrade // *Handlers, writes bypass SSL. Dispatch reaches it via the @@ -3560,7 +3576,7 @@ impl NewSocket { let raw = TLSSocket::new(TLSSocket { ref_count: bun_ptr::RefCount::init(), handlers: JsCell::new(raw_handlers), - socket: Cell::new(SocketHandler::::from(new_raw.as_ptr())), + socket: Cell::new(SocketHandler::::from(raw_socket)), owned_ssl_ctx: Cell::new(None), connection: JsCell::new(None), local_binding: JsCell::new(None), @@ -3585,8 +3601,11 @@ impl NewSocket { // SAFETY: `raw` came from `TLSSocket::new` (heap::alloc); intrusive +1 held. tls.twin .set(Some(unsafe { IntrusiveRc::from_raw(raw.as_ptr()) })); - // S008: `us_socket_t` is an `opaque_ffi!` ZST — safe deref. - bun_opaque::opaque_deref_mut(new_raw.as_ptr()).set_ssl_raw_tap(true); + // All post-adopt engine kicks below go through the raw-routed handle: + // they synchronously dispatch (decrypted on_data / on_handshake / + // ALPN+SNI JS), so no `&mut us_socket_t` may span them (C17). + let upgraded = SocketHandler::::from(raw_socket); + upgraded.set_ssl_raw_tap(true); let tls_js_value = tls.get_this_value(global); let raw_js_value = raw_ref.get_this_value(global); @@ -3608,17 +3627,17 @@ impl NewSocket { // it before ext was repointed would have ALPN/onOpen land in the // dead TCPSocket. TLSSocket::on_open(tls, tls.socket.get()); - bun_opaque::opaque_deref_mut(new_raw.as_ptr()).start_tls_handshake(); + upgraded.start_tls_handshake(); // The socket being wrapped may have had its readable interest off (an // accepted socket nobody was reading yet — its ClientHello is still in // the kernel buffer); make sure the adopted TLS socket is reading so // the handshake can be driven. A no-op when it was already reading. - bun_opaque::opaque_deref_mut(new_raw.as_ptr()).resume(); + upgraded.resume_stream(); // Feed bytes that arrived before the upgrade (already pulled off the fd // by the plain-TCP layer) into the TLS engine exactly as if they had // just been received — for a server-side wrap this is the ClientHello. if !initial_data.is_empty() { - bun_opaque::opaque_deref_mut(new_raw.as_ptr()).tls_feed(initial_data.as_slice()); + upgraded.tls_feed(initial_data.as_slice()); } let array = JSValue::create_empty_array(global, 2)?; @@ -4773,7 +4792,7 @@ pub mod testing_apis { _global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - Ok(JSValue::from(cfg!(socket_fault_injection))) + Ok(JSValue::from(cfg!(feature = "socket_fault_injection"))) } #[bun_jsc::host_fn] @@ -4781,13 +4800,13 @@ pub mod testing_apis { global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - #[cfg(socket_fault_injection)] + #[cfg(feature = "socket_fault_injection")] { let _ = global; - bun_uws_sys::fault_inject::us_fault_clear_all(); + bun_usockets::fault::us_fault_clear_all(); Ok(JSValue::UNDEFINED) } - #[cfg(not(socket_fault_injection))] + #[cfg(not(feature = "socket_fault_injection"))] Err(global.throw(format_args!( "socket fault injection was not compiled into this build (build with --socket-fault-injection=on)" ))) @@ -4796,16 +4815,16 @@ pub mod testing_apis { #[bun_jsc::host_fn] pub fn js_set_socket_fault(global: &JSGlobalObject, frame: &CallFrame) -> JsResult { jsc::mark_binding!(); - #[cfg(not(socket_fault_injection))] + #[cfg(not(feature = "socket_fault_injection"))] { let _ = frame; return Err(global.throw(format_args!( "socket fault injection was not compiled into this build (build with --socket-fault-injection=on)" ))); } - #[cfg(socket_fault_injection)] + #[cfg(feature = "socket_fault_injection")] { - use bun_uws_sys::fault_inject as fi; + use bun_usockets::fault as fi; let [opts] = frame.arguments_as_array::<1>(); if !opts.is_object() { @@ -4947,13 +4966,12 @@ pub mod testing_apis { target_fd, }; - // SAFETY: rule is a valid stack pointer for the duration of the call. - unsafe { fi::us_fault_set(syscall, &rule) }; + fi::us_fault_set(syscall, &rule); Ok(JSValue::TRUE) } } - #[cfg(socket_fault_injection)] + #[cfg(feature = "socket_fault_injection")] fn parse_errno_name(name: &bun_core::OwnedString) -> Option { macro_rules! map { ($($s:literal => $v:expr,)*) => { diff --git a/src/runtime/socket/tls_socket_functions.rs b/src/runtime/socket/tls_socket_functions.rs index 3cad8ade2d8d..2e700ce9dc0d 100644 --- a/src/runtime/socket/tls_socket_functions.rs +++ b/src/runtime/socket/tls_socket_functions.rs @@ -177,10 +177,6 @@ pub(super) mod ffi { out_len: &mut c_uint, ); pub(crate) safe fn SSL_get_ex_data(ssl: &SSL, idx: c_int) -> *mut c_void; - /// Save/restore the per-loop BIO routing state around in-handshake JS - /// callbacks (defined in usockets' openssl.c). - pub(crate) safe fn us_internal_ssl_loop_state_save(ssl: &SSL, out5: *mut *mut c_void); - pub(crate) safe fn us_internal_ssl_loop_state_restore(saved5: *mut *mut c_void); pub(crate) safe fn SSL_renegotiate(ssl: &SSL) -> c_int; pub(crate) safe fn SSL_set_renegotiate_mode( ssl: &SSL, @@ -243,9 +239,6 @@ pub(super) mod ffi { // object stack and `OPENSSL_sk_num(NULL)` returns 0. pub(crate) fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *mut c_void; pub(crate) fn OPENSSL_sk_num(sk: *const c_void) -> usize; - // The process-wide default root store; up-refs before returning, so - // the caller owns a reference it must release with X509_STORE_free. - pub(crate) fn us_get_shared_default_ca_store() -> *mut X509_STORE; pub(crate) fn X509_STORE_free(store: *mut X509_STORE); // X509_STORE_CTX lifecycle for issuer lookups; `new` allocates, // `init` borrows the store, `free` releases. Used to extend the peer @@ -279,12 +272,19 @@ use crate::node::StringOrBuffer; // `socket_body` instance. type This = super::TLSSocket; +/// `bssl_sys::SSL` (bun_usockets) → `bun_boringssl_sys::SSL` — same C type, +/// distinct Rust nominals. +#[inline(always)] +fn cast_ssl(p: *mut bun_usockets::SSL) -> *mut boringssl::SSL { + p.cast() +} + pub(super) fn get_servername( this: &This, global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; @@ -330,7 +330,7 @@ pub(super) fn set_servername( let host = this.server_name.get().as_deref().unwrap(); if !host.is_empty() { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; @@ -351,7 +351,7 @@ pub(super) fn get_peer_x509_certificate( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let cert = ffi::SSL_get_peer_certificate(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -366,7 +366,7 @@ pub(super) fn get_x509_certificate( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let cert = ffi::SSL_get_certificate(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -385,7 +385,7 @@ pub(super) fn get_tls_version( ) -> JsResult { jsc::mark_binding(); - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::NULL); }; let version = ffi::SSL_get_version(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -425,7 +425,7 @@ pub(super) fn set_max_send_fragment( return Err(global.throw(format_args!("Expected size to be less than 16385"))); } - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::FALSE); }; Ok(JSValue::from( @@ -453,7 +453,7 @@ pub(super) fn get_peer_certificate( abbreviated = arg.to_boolean(); } - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; @@ -555,7 +555,11 @@ pub(super) fn get_peer_certificate( // reference is released after the walk. let mut shared_store: *mut boringssl::X509_STORE = core::ptr::null_mut(); if store.is_null() || ffi::OPENSSL_sk_num(ffi::X509_STORE_get0_objects(store)) == 0 { - shared_store = ffi::us_get_shared_default_ca_store(); + // The process-wide default root store (up-refs before returning; + // released with X509_STORE_free below). Native successor of the + // old `us_get_shared_default_ca_store` C helper. + shared_store = bun_usockets::tls::context::shared_default_ca_store() + .cast::(); if !shared_store.is_null() { store = shared_store; } @@ -623,7 +627,7 @@ pub(super) fn get_certificate( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let cert = ffi::SSL_get_certificate(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -639,7 +643,7 @@ pub(super) fn get_tls_finished_message( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; // We cannot just pass nullptr to SSL_get_finished() @@ -677,7 +681,7 @@ pub(super) fn get_shared_sigalgs( ) -> JsResult { jsc::mark_binding(); - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::NULL); }; @@ -778,7 +782,7 @@ pub(super) fn get_cipher( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let cipher = ffi::SSL_get_current_cipher(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -831,7 +835,7 @@ pub(super) fn get_tls_peer_finished_message( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; // We cannot just pass nullptr to SSL_get_peer_finished() @@ -880,7 +884,7 @@ pub(crate) fn set_key_cert( let Some(sc) = SecureContext::from_js(args.ptr[0]) else { return Err(global.throw(format_args!("setKeyCert requires a SecureContext"))); }; - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; // SAFETY: `sc` is a live SecureContext; borrow() hands back an owned @@ -941,7 +945,7 @@ pub(crate) fn export_keying_material( let label = label_arg.to_slice_or_null(global)?; let label_slice = label.slice(); - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; @@ -1018,7 +1022,7 @@ pub(super) fn get_ephemeral_key_info( return Ok(JSValue::NULL); } - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::NULL); }; let result = JSValue::create_empty_object(global, 0); @@ -1086,7 +1090,7 @@ pub(super) fn get_alpn_protocol(this: &This, global: &JSGlobalObject) -> JsResul let mut alpn_proto: *const u8 = core::ptr::null(); let mut alpn_proto_len: u32 = 0; - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::FALSE); }; @@ -1115,7 +1119,7 @@ pub(super) fn get_session( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let session = ffi::SSL_get_session(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -1159,7 +1163,7 @@ pub(super) fn set_session( if let Some(sb) = StringOrBuffer::from_js(global, session_arg)? { let session_slice = sb.slice(); - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let mut tmp: *const u8 = session_slice.as_ptr(); @@ -1198,7 +1202,7 @@ pub(super) fn get_tls_ticket( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; let session = ffi::SSL_get_session(boringssl::SSL::opaque_ref(ssl_ptr)); @@ -1228,7 +1232,7 @@ pub(super) fn renegotiate( global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; boringssl::ERR_clear_error(); @@ -1243,7 +1247,7 @@ pub(super) fn disable_renegotiation( _global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; ffi::SSL_set_renegotiate_mode( @@ -1258,7 +1262,7 @@ pub(super) fn is_session_reused( _global: &JSGlobalObject, _frame: &CallFrame, ) -> JsResult { - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::FALSE); }; Ok(JSValue::from( @@ -1309,7 +1313,7 @@ pub(super) fn set_verify_mode( reject_unauthorized && (!acts_as_server || request_cert), ); }); - let Some(ssl_ptr) = this.socket.get().ssl() else { + let Some(ssl_ptr) = this.socket.get().ssl().map(cast_ssl) else { return Ok(JSValue::UNDEFINED); }; // we always allow and check the SSL certificate after the handshake or renegotiation diff --git a/src/runtime/socket/udp_socket.rs b/src/runtime/socket/udp_socket.rs index 970deedd6d61..1841ae7f6781 100644 --- a/src/runtime/socket/udp_socket.rs +++ b/src/runtime/socket/udp_socket.rs @@ -8,7 +8,7 @@ use bun_jsc::array_buffer::BinaryType; use bun_jsc::virtual_machine::VirtualMachine; use bun_jsc::{ CallFrame, JSGlobalObject, JSValue, JsRef, JsResult, MarkedArgumentBuffer, Ref as JscRef, - StringJsc, SysErrorJsc, SystemError, + StringJsc, Strong, SysErrorJsc, SystemError, }; use bun_ptr::BackRef; @@ -17,7 +17,7 @@ use bun_cares_sys::c_ares_draft as c_ares; #[cfg(windows)] use bun_libuv_sys::sockaddr_storage; use bun_sys::{self, SystemErrno}; -use bun_uws as uws; +use bun_usockets::udp; #[cfg(not(windows))] use libc::sockaddr_storage; #[cfg(not(windows))] @@ -68,6 +68,36 @@ fn errno_sys(rc: c_int, tag: bun_sys::Tag) -> Option { } } +/// The crate-side address type: `libc::sockaddr_storage` on POSIX; on Windows +/// `bun_usockets` defines its own ws2_32-layout mirror. +#[cfg(windows)] +use bun_usockets::udp::sockaddr_storage as UsSockaddrStorage; +#[cfg(not(windows))] +type UsSockaddrStorage = sockaddr_storage; + +/// Exclusive reborrow of the udp socket. Invariant: `socket` came from +/// `udp::Socket::create` and stays readable until the tick-postlude sweep of +/// `closed_udp_head` (C15); the JS thread is the sole accessor. +/// Residue: core UDP has no generation-checked handle (Protocol v2 is TCP-only). +#[inline] +fn udp_mut<'a>(socket: *mut udp::Socket) -> &'a mut udp::Socket { + // SAFETY: fn invariant above; callback-held pointers are provenance + // children of the crate's own `&mut` (close derives them before dispatch). + unsafe { &mut *socket } +} + +#[cfg(not(windows))] +#[inline] +fn to_us_addr(addr: &sockaddr_storage) -> &UsSockaddrStorage { + addr +} +#[cfg(windows)] +#[inline] +fn to_us_addr(addr: &sockaddr_storage) -> &UsSockaddrStorage { + // SAFETY: identical layout — 128 bytes, 8-aligned, leading c_ushort ss_family. + unsafe { &*std::ptr::from_ref(addr).cast::() } +} + use bun_core::strings::ares_inet_pton as inet_pton; unsafe extern "C" { @@ -77,7 +107,19 @@ unsafe extern "C" { safe fn htons(hshort: u16) -> u16; } -extern "C" fn on_close(socket: *mut uws::udp::Socket) { +/// Consumer-held stand-in for the Protocol-v2 core dispatch guard: pins the JS +/// wrapper (whose `finalize()` frees the `UDPSocket` box) so re-entrant close +/// plus a GC inside a handler cannot free the owner before dispatch returns. +#[inline] +fn dispatch_guard(this: &UDPSocket) -> Option<(Strong, JSValue)> { + let this_value = this.this_value.get().try_get()?; + Some(( + Strong::create(this_value, this.global_this.get()), + this_value, + )) +} + +extern "C" fn on_close(socket: *mut udp::Socket) { let this: &UDPSocket = UDPSocket::from_uws(socket); this.closed.set(true); this.poll_ref.with_mut(|p| p.disable()); @@ -85,7 +127,7 @@ extern "C" fn on_close(socket: *mut uws::udp::Socket) { this.socket.set(None); } -extern "C" fn on_recv_error(socket: *mut uws::udp::Socket, errno: c_int) { +extern "C" fn on_recv_error(socket: *mut udp::Socket, errno: c_int) { // Only called on Linux via IP_RECVERR — loop.c guards the recv-on-error // path with #if defined(__linux__) to preserve the pre-existing // close-on-error behavior on kqueue/Windows (where an error event is a @@ -93,15 +135,19 @@ extern "C" fn on_recv_error(socket: *mut uws::udp::Socket, errno: c_int) { // SystemError from the ICMP errno (ECONNREFUSED, EHOSTUNREACH, // ENETUNREACH, EMSGSIZE, ...) and dispatches through the 'error' handler. let this: &UDPSocket = UDPSocket::from_uws(socket); + // Guard before any JS: the error handler may close + drop the wrapper. + let Some((_guard, this_value)) = dispatch_guard(this) else { + return; + }; let sys_err = bun_sys::Error::from_code_int(errno, bun_sys::Tag::recv); let global_this = this.global_this.get(); let err_value = sys_err.to_js(global_this); - this.call_error_handler(JSValue::ZERO, err_value); + this.call_error_handler(this_value, err_value); } -extern "C" fn on_drain(socket: *mut uws::udp::Socket) { +extern "C" fn on_drain(socket: *mut udp::Socket) { let this: &UDPSocket = UDPSocket::from_uws(socket); - let Some(this_value) = this.this_value.get().try_get() else { + let Some((_guard, this_value)) = dispatch_guard(this) else { return; }; let Some(callback) = js::on_drain_get_cached(this_value) else { @@ -116,18 +162,17 @@ extern "C" fn on_drain(socket: *mut uws::udp::Socket) { let global_this = this.global_this.get(); let result = callback.call(global_this, this_value, &[this_value]); if let Err(err) = result { - this.call_error_handler(JSValue::ZERO, global_this.take_exception(err)); + this.call_error_handler(this_value, global_this.take_exception(err)); } event_loop.exit(); } -extern "C" fn on_data( - socket: *mut uws::udp::Socket, - buf: *mut uws::udp::PacketBuffer, - packets: c_int, -) { +extern "C" fn on_data(socket: *mut udp::Socket, buf: *mut udp::PacketBuffer, packets: c_int) { let udp_socket: &UDPSocket = UDPSocket::from_uws(socket); - let Some(this_value) = udp_socket.this_value.get().try_get() else { + // Guard before the batch loop: a mid-batch close downgrades `this_value`, + // after which a GC inside a later packet's callback could finalize the + // wrapper and free `udp_socket` while the `closed` recheck still reads it. + let Some((_guard, this_value)) = dispatch_guard(udp_socket) else { return; }; let Some(callback) = js::on_data_get_cached(this_value) else { @@ -138,7 +183,7 @@ extern "C" fn on_data( } let global_this = udp_socket.global_this.get(); - // SAFETY: buf valid for the duration of this callback per uws contract. + // SAFETY: buf valid for the duration of this callback per usockets contract. let buf = unsafe { &mut *buf }; let mut i: c_int = 0; @@ -237,7 +282,6 @@ extern "C" fn on_data( Ok(v) => v, Err(_) => { loop_.exit(); - this_value.ensure_still_alive(); return; } }; @@ -245,7 +289,6 @@ extern "C" fn on_data( Ok(v) => v, Err(_) => { loop_.exit(); - this_value.ensure_still_alive(); return; } }; @@ -262,16 +305,13 @@ extern "C" fn on_data( ], ); if let Err(err) = result { - udp_socket.call_error_handler(JSValue::ZERO, global_this.take_exception(err)); + udp_socket.call_error_handler(this_value, global_this.take_exception(err)); } - this_value.ensure_still_alive(); loop_.exit(); i += 1; } - - this_value.ensure_still_alive(); } pub struct ConnectConfig { @@ -467,8 +507,8 @@ pub mod js { pub struct UDPSocket { pub config: JsCell, - pub socket: Cell>, - pub loop_: *mut uws::Loop, + pub socket: Cell>, + pub loop_: *mut bun_usockets::Loop, // Read-only back-reference to the owning JS global; the VM/global strictly // outlives every socket it creates. @@ -488,17 +528,15 @@ impl UDPSocket { bun_core::heap::into_raw(Box::new(init)) } - /// Recover `&UDPSocket` from the uws user-data slot. Centralises the - /// `unsafe { &*(*socket).user().cast() }` back-ref deref shared by every - /// `extern "C"` callback below — the user pointer was set to the - /// heap-allocated `UDPSocket` in [`udp_socket`] via - /// `uws::udp::Socket::create(.., user_data = this_ptr)` and remains live - /// until `on_close` (uws guarantees no callback after close). All mutated - /// fields are `Cell`/`JsCell`, so a shared borrow is sufficient (R-2). + /// Owner recovery from the usockets user slot — live at dispatch entry + /// (C15: no callback after `on_close`); JS-running callbacks then extend + /// liveness across user JS via [`dispatch_guard`]. The raw deref is the + /// residue: core UDP keeps the C-shape surface (`user()` = `*mut c_void`, + /// no Protocol-v2 owner registry — the owner registry covers TCP kinds + /// only). Mutated fields are `Cell`/`JsCell`, so `&self` suffices (R-2). #[inline] - fn from_uws<'a>(socket: *mut uws::udp::Socket) -> &'a UDPSocket { - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let user = uws::udp::Socket::opaque_mut(socket).user(); + fn from_uws<'a>(socket: *mut udp::Socket) -> &'a UDPSocket { + let user = udp_mut(socket).user(); // SAFETY: `user` was set to `*mut UDPSocket` at creation; non-null and // live for the callback's duration (back-ref invariant). unsafe { &*user.cast::() } @@ -512,7 +550,7 @@ impl UDPSocket { socket: Cell::new(None), config: JsCell::new(UDPSocketConfig::default()), global_this: BackRef::new(global_this), - loop_: uws::Loop::get(), + loop_: bun_usockets::Loop::get(), vm, this_value: JsCell::new(JsRef::empty()), jsc_ref: JscRef::init(), @@ -540,20 +578,19 @@ impl UDPSocket { // R-2: shared borrow — mutation through `Cell`/`JsCell`. let this = unsafe { &*ptr }; this.closed.set(true); - // Hoist before `(*socket).close()`: that call SYNCHRONOUSLY re-enters - // `on_close` (udp.c `s->on_close(s)`), which re-derives `&UDPSocket` - // from the uws user pointer. `downgrade()` is idempotent (on_close - // repeats it), so ordering is unobservable. + // Hoist before `close()`: `udp::Socket::close` SYNCHRONOUSLY + // re-enters `on_close`, which re-derives `&UDPSocket` from the + // user pointer. `downgrade()` is idempotent (on_close repeats it), + // so ordering is unobservable. this.this_value.with_mut(|r| r.downgrade()); if let Some(socket) = this.socket.take() { - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - uws::udp::Socket::opaque_mut(socket).close(); + udp_mut(socket).close(); } }); // `JsClass::to_js(self)` boxes by value, but we already own // the heap allocation in `this_ptr` and need to keep that exact pointer - // (it is stashed as the uws user_data). Route through the + // (it is stashed as the usockets user_data). Route through the // `#[bun_jsc::JsClass]`-generated `to_js_ptr` inherent method, which // binds `UDPSocket__create` with the correct `jsc.conv` ABI // (`extern "sysv64"` on Windows-x64, `extern "C"` elsewhere — the C++ @@ -575,7 +612,7 @@ impl UDPSocket { let config = this.config.get(); let hostname_z = config.hostname.to_owned_slice_z(); - let created = uws::udp::Socket::create( + let created = udp::Socket::create( this.loop_, on_data, on_drain, @@ -624,8 +661,7 @@ impl UDPSocket { if let Some(connect) = &this.config.get().connect { let address_z = connect.address.to_owned_slice_z(); - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let ret = uws::udp::Socket::opaque_mut(this.socket.get().unwrap()) + let ret = udp_mut(this.socket.get().unwrap()) .connect(address_z.as_ptr(), connect.port as u32); if ret != 0 { if let Some(sys_err) = errno_sys(ret, bun_sys::Tag::connect) { @@ -657,15 +693,8 @@ impl UDPSocket { )) } - pub fn call_error_handler(&self, this_value_: JSValue, err: JSValue) { - let this_value = if this_value_.is_empty() { - match self.this_value.get().try_get() { - Some(v) => v, - None => return, - } - } else { - this_value_ - }; + /// `this_value` is non-empty and pinned by the caller's [`dispatch_guard`]. + pub fn call_error_handler(&self, this_value: JSValue, err: JSValue) { let callback = js::on_error_get_cached(this_value).unwrap_or(JSValue::ZERO); let global_this = self.global_this.get(); let vm = global_this.bun_vm().as_mut(); @@ -721,8 +750,7 @@ impl UDPSocket { .to_js(global_this), )); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let res = uws::udp::Socket::opaque_mut(socket).set_broadcast(enabled); + let res = udp_mut(socket).set_broadcast(enabled); if let Some(err) = get_us_error::(res, bun_sys::Tag::setsockopt) { return Err(global_this.throw_value(err.to_js(global_this))); @@ -769,8 +797,7 @@ impl UDPSocket { .to_js(global_this), )); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let res = uws::udp::Socket::opaque_mut(socket).set_multicast_loopback(enabled); + let res = udp_mut(socket).set_multicast_loopback(enabled); if let Some(err) = get_us_error::(res, bun_sys::Tag::setsockopt) { return Err(global_this.throw_value(err.to_js(global_this))); @@ -837,10 +864,9 @@ impl UDPSocket { "Family mismatch between address and interface" ))); } - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - uws::udp::Socket::opaque_mut(socket).set_membership(&addr, Some(&interface), drop) + udp_mut(socket).set_membership(to_us_addr(&addr), Some(to_us_addr(&interface)), drop) } else { - uws::udp::Socket::opaque_mut(socket).set_membership(&addr, None, drop) + udp_mut(socket).set_membership(to_us_addr(&addr), None, drop) }; if let Some(err) = get_us_error::(res, bun_sys::Tag::setsockopt) { @@ -951,17 +977,16 @@ impl UDPSocket { "Family mismatch among source, group and interface addresses" ))); } - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - uws::udp::Socket::opaque_mut(socket).set_source_specific_membership( - &source_addr, - &group_addr, - Some(&interface), + udp_mut(socket).set_source_specific_membership( + to_us_addr(&source_addr), + to_us_addr(&group_addr), + Some(to_us_addr(&interface)), drop, ) } else { - uws::udp::Socket::opaque_mut(socket).set_source_specific_membership( - &source_addr, - &group_addr, + udp_mut(socket).set_source_specific_membership( + to_us_addr(&source_addr), + to_us_addr(&group_addr), None, drop, ) @@ -1038,8 +1063,7 @@ impl UDPSocket { return Err(global_this.throw(format_args!("Socket is closed"))); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let res = uws::udp::Socket::opaque_mut(socket).set_multicast_interface(&addr); + let res = udp_mut(socket).set_multicast_interface(to_us_addr(&addr)); if let Some(err) = get_us_error::(res, bun_sys::Tag::setsockopt) { return Err(global_this.throw_value(err.to_js(global_this))); @@ -1054,12 +1078,7 @@ impl UDPSocket { global_this: &JSGlobalObject, callframe: &CallFrame, ) -> JsResult { - Self::set_any_ttl( - this, - global_this, - callframe, - uws::udp::Socket::set_unicast_ttl, - ) + Self::set_any_ttl(this, global_this, callframe, udp::Socket::set_unicast_ttl) } #[bun_jsc::host_fn(method)] @@ -1068,19 +1087,14 @@ impl UDPSocket { global_this: &JSGlobalObject, callframe: &CallFrame, ) -> JsResult { - Self::set_any_ttl( - this, - global_this, - callframe, - uws::udp::Socket::set_multicast_ttl, - ) + Self::set_any_ttl(this, global_this, callframe, udp::Socket::set_multicast_ttl) } fn set_any_ttl( this: &Self, global_this: &JSGlobalObject, callframe: &CallFrame, - function: fn(&mut uws::udp::Socket, i32) -> c_int, + function: fn(&mut udp::Socket, i32) -> c_int, ) -> JsResult { if this.closed.get() { return Err(global_this.throw_value( @@ -1104,8 +1118,7 @@ impl UDPSocket { let Some(socket) = this.socket.get() else { return Err(global_this.throw(format_args!("Socket is closed"))); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let res = function(uws::udp::Socket::opaque_mut(socket), ttl); + let res = function(udp_mut(socket), ttl); if let Some(err) = get_us_error::(res, bun_sys::Tag::setsockopt) { return Err(global_this.throw_value(err.to_js(global_this))); @@ -1321,8 +1334,7 @@ impl UDPSocket { let Some(socket) = this.socket.get() else { return Err(global_this.throw(format_args!("Socket is closed"))); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let res = uws::udp::Socket::opaque_mut(socket).send(&payloads, &lens, &addr_ptrs); + let res = udp_mut(socket).send(&payloads, &lens, &addr_ptrs); if let Some(err) = get_us_error::(res, bun_sys::Tag::send) { return Err(global_this.throw_value(err.to_js(global_this))); } @@ -1418,12 +1430,7 @@ impl UDPSocket { let Some(socket) = this.socket.get() else { return Err(global_this.throw(format_args!("Socket is closed"))); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let res = uws::udp::Socket::opaque_mut(socket).send( - &[payload.as_ptr()], - &[payload.len()], - &[addr_ptr], - ); + let res = udp_mut(socket).send(&[payload.as_ptr()], &[payload.len()], &[addr_ptr]); drop(payload_str); if let Some(err) = get_us_error::(res, bun_sys::Tag::send) { return Err(global_this.throw_value(err.to_js(global_this))); @@ -1583,14 +1590,12 @@ impl UDPSocket { let Some(socket) = this.socket.take() else { return Ok(JSValue::UNDEFINED); }; - // `(*socket).close()` SYNCHRONOUSLY invokes `on_close` (udp.c:110 - // `s->on_close(s)`), which re-derives `&UDPSocket` from the uws - // user pointer. R-2: with `&self` + `Cell`/`JsCell` the sibling - // shared borrow is sound; the (idempotent) downgrade is hoisted - // because `on_close` repeats it. + // `udp::Socket::close` SYNCHRONOUSLY invokes `on_close`, which + // re-derives `&UDPSocket` from the user pointer. R-2: with `&self` + // + `Cell`/`JsCell` the sibling shared borrow is sound; the + // (idempotent) downgrade is hoisted because `on_close` repeats it. this.this_value.with_mut(|r| r.downgrade()); - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - uws::udp::Socket::opaque_mut(socket).close(); + udp_mut(socket).close(); } Ok(JSValue::UNDEFINED) @@ -1637,8 +1642,7 @@ impl UDPSocket { let Some(socket) = this.socket.get() else { return JSValue::UNDEFINED; }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - JSValue::js_number(uws::udp::Socket::opaque_mut(socket).bound_port() as f64) + JSValue::js_number(udp_mut(socket).bound_port() as f64) } fn create_sock_addr(global_this: &JSGlobalObject, address_bytes: &[u8], port: u16) -> JSValue { @@ -1659,8 +1663,7 @@ impl UDPSocket { }; let mut buf = [0u8; 64]; let mut length: i32 = 64; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - let socket = uws::udp::Socket::opaque_mut(socket); + let socket = udp_mut(socket); socket.bound_ip(buf.as_mut_ptr(), &mut length); let address_bytes = &buf[..usize::try_from(length).expect("int cast")]; @@ -1685,8 +1688,7 @@ impl UDPSocket { }; let mut buf = [0u8; 64]; let mut length: i32 = 64; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - uws::udp::Socket::opaque_mut(socket).remote_ip(buf.as_mut_ptr(), &mut length); + udp_mut(socket).remote_ip(buf.as_mut_ptr(), &mut length); let address_bytes = &buf[..usize::try_from(length).expect("int cast")]; Self::create_sock_addr(global_this, address_bytes, connect_info.port) @@ -1716,15 +1718,15 @@ impl UDPSocket { debug_assert!(this_ref.closed.get() || VirtualMachine::get().is_shutting_down()); // VM-shutdown path: `lastChanceToFinalize` can finalize the wrapper // while the underlying poll is still open (the Strong in `this_value` - // kept it GC-rooted until now). Close it so the `us_udp_socket_t` - // lands on `closed_udp_head` for the post-destruct - // `drain_closed_sockets()` sweep instead of leaking. `on_close` - // re-derives `&UDPSocket` from the uws user pointer (= `this`, still - // live) and only touches `Cell`/`JsCell` fields; `this_value` is - // already `Finalized` so its `downgrade()` is a no-op. + // kept it GC-rooted until now). Close it so the `udp::Socket` lands on + // `closed_udp_head` for the post-destruct `drain_closed_sockets()` + // sweep instead of leaking. `on_close` re-derives `&UDPSocket` from + // the user pointer (= `this`, still live) and only touches + // `Cell`/`JsCell` fields; `this_value` is already `Finalized` so its + // `downgrade()` is a no-op. if let Some(socket) = this_ref.socket.take() { this_ref.closed.set(true); - uws::udp::Socket::opaque_mut(socket).close(); + udp_mut(socket).close(); } this_ref.poll_ref.with_mut(|p| p.disable()); // config drop handled by heap::take below. @@ -1779,8 +1781,7 @@ impl UDPSocket { let Some(socket) = this.socket.get() else { return Err(global_this.throw(format_args!("Socket is closed"))); }; - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - if uws::udp::Socket::opaque_mut(socket).connect(connect_host.as_ptr(), port as u32) == -1 { + if udp_mut(socket).connect(connect_host.as_ptr(), port as u32) == -1 { return Err(global_this.throw(format_args!("Failed to connect socket"))); } this.connect_info.set(Some(ConnectInfo { port })); @@ -1812,8 +1813,7 @@ impl UDPSocket { return Err(global_object.throw(format_args!("Socket is closed"))); } - // `Socket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - if uws::udp::Socket::opaque_mut(this.socket.get().unwrap()).disconnect() == -1 { + if udp_mut(this.socket.get().unwrap()).disconnect() == -1 { return Err(global_object.throw(format_args!("Failed to disconnect socket"))); } this.connect_info.set(None); diff --git a/src/runtime/socket/uws_dispatch.rs b/src/runtime/socket/uws_dispatch.rs index 508b43ab029c..36d434414f34 100644 --- a/src/runtime/socket/uws_dispatch.rs +++ b/src/runtime/socket/uws_dispatch.rs @@ -1,279 +1,153 @@ -//! Socket event dispatch. `loop.c` calls these `us_dispatch_*` exports for -//! every readable/writable/close/etc; we switch on `s->kind` and direct-call -//! the right Rust handler with the ext already typed. C++ kinds (uWS) and -//! `.dynamic` go through `s->group->vtable`. -//! -//! This file is the ONLY place that knows the kind→handler mapping. Adding a -//! kind to `SocketKind` forces a compile error here until every event has an -//! arm — no silent fallthrough. - -use core::ffi::{c_int, c_void}; - -use bun_uws::NewSocketHandler; -// `SocketKind` / `us_bun_verify_error_t` must come from `bun_uws_sys` — that's -// what `us_socket_t::kind()` and the `VTable` callback signatures use. The -// `bun_uws` crate defines its own (distinct) mirrors of both; mixing them is a -// type error. -use bun_uws_sys::socket_group::VTable; -use bun_uws_sys::{ConnectingSocket, SocketKind, us_bun_verify_error_t, us_socket_t, vtable}; +//! Socket event dispatch wiring. This module is the ONLY place that knows +//! the kind→handler mapping: `BUN_UWS_KIND_TABLE` is the fully +//! const-initialized kind table (one monomorphized Protocol v2 row per Rust +//! `SocketKind`) plus the TLS side-channel hooks (raw ciphertext tap / +//! deferred session / keylog delivery). `bun_usockets` resolves both +//! `no_mangle` statics at link time — no runtime registration exists, and a +//! missing/misplaced kind is a compile error (array shape + +//! `validate_kind_table`). + +use core::ptr::NonNull; + +use bun_usockets as uws; +use bun_usockets::unsafe_core::trampolines::with_socket_owner; +use bun_usockets::us_socket_t; +use uws::{KindEntry, KindTable, SOCKET_KIND_COUNT, TlsSideChannelHooks, kind_entry}; use super::uws_handlers as handlers; -/// kind → vtable. Rust kinds get a monomorphized `Trampolines` vtable -/// (so the call is *still* indirect by one pointer, but the table itself is -/// `.rodata` and there's exactly one per kind — not one per connection). C++ -/// kinds use the per-group vtable since the handler closure differs per App. -/// -/// `Invalid` is intentionally null so a missed `kind` stamp crashes here -/// instead of dispatching into the wrong handler. -// PERF: `LazyLock` adds a -// once-init branch; once `vtable::make` is `const fn`, switch to a plain -// `static`/`const`. -// -// `SocketKind` is `#[repr(u8)]` with dense 0..N discriminants (see uws/lib.rs), -// so a plain array indexed by `kind as usize` works — no `enum_map` -// derive needed on the upstream type. -const SOCKET_KIND_COUNT: usize = SocketKind::UwsWsTls as usize + 1; - -static TABLES: std::sync::LazyLock<[Option<&'static VTable>; SOCKET_KIND_COUNT]> = - std::sync::LazyLock::new(|| { - let mut t: [Option<&'static VTable>; SOCKET_KIND_COUNT] = [None; SOCKET_KIND_COUNT]; - - // Bun.connect / Bun.listen - t[SocketKind::BunSocketTcp as usize] = Some(vtable::make::>()); - t[SocketKind::BunSocketTls as usize] = Some(vtable::make::>()); - t[SocketKind::BunListenerTcp as usize] = - Some(vtable::make::>()); - t[SocketKind::BunListenerTls as usize] = - Some(vtable::make::>()); - - // HTTP client thread - t[SocketKind::HttpClient as usize] = Some(vtable::make::>()); - t[SocketKind::HttpClientTls as usize] = Some(vtable::make::>()); - - // WebSocket client - t[SocketKind::WsClientUpgrade as usize] = - Some(vtable::make::>()); - t[SocketKind::WsClientUpgradeTls as usize] = - Some(vtable::make::>()); - t[SocketKind::WsClient as usize] = Some(vtable::make::>()); - t[SocketKind::WsClientTls as usize] = Some(vtable::make::>()); - - // SQL drivers - t[SocketKind::Postgres as usize] = Some(vtable::make::>()); - t[SocketKind::PostgresTls as usize] = Some(vtable::make::>()); - t[SocketKind::Mysql as usize] = Some(vtable::make::>()); - t[SocketKind::MysqlTls as usize] = Some(vtable::make::>()); - t[SocketKind::Valkey as usize] = Some(vtable::make::>()); - t[SocketKind::ValkeyTls as usize] = Some(vtable::make::>()); - - // IPC - t[SocketKind::SpawnIpc as usize] = Some(vtable::make::()); - - t - }); - +/// Wrap a raw dispatch pointer in a generation-carrying handle. #[inline] -fn vt(s: *mut us_socket_t) -> &'static VTable { - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref - // (loop.c only dispatches live, non-null sockets). - let s = us_socket_t::opaque_mut(s); - let kind = s.kind(); - match kind { - SocketKind::Invalid => { - panic!("us_socket_t with kind=invalid (group={:p})", s.raw_group()) - } - // Per-group vtable: uWS C++ installs a different `HttpContext*` - // closure per server, so the table can't be static per kind. - SocketKind::Dynamic - | SocketKind::UwsHttp - | SocketKind::UwsHttpTls - | SocketKind::UwsWs - | SocketKind::UwsWsTls => { - // `raw_group()` already returns `&mut SocketGroup` for `us_socket_t`. - s.raw_group().vtable.expect("group vtable") - } - _ => TABLES[kind as usize].expect("kind vtable"), - } +pub(crate) fn wrap(s: *mut us_socket_t) -> uws::NewSocketHandler { + uws::NewSocketHandler::from(uws::SocketRef::from_live( + NonNull::new(s).expect("dispatch socket is non-null"), + )) } -#[inline] -fn vtc(c: *mut ConnectingSocket) -> &'static VTable { - // `ConnectingSocket` is an `opaque_ffi!` ZST — `opaque_mut` is the safe - // deref (loop.c only dispatches live, non-null connecting sockets). - let c = ConnectingSocket::opaque_mut(c); - let kind = c.kind(); - match kind { - SocketKind::Invalid => { - panic!("us_connecting_socket_t with kind=invalid") - } - SocketKind::Dynamic - | SocketKind::UwsHttp - | SocketKind::UwsHttpTls - | SocketKind::UwsWs - | SocketKind::UwsWsTls => { - // SAFETY: raw_group() is non-null for any socket with a valid kind. - unsafe { (*c.raw_group()).vtable.expect("group vtable") } - } - _ => TABLES[kind as usize].expect("kind vtable"), - } -} +// ── the link-time kind table ───────────────────────────────────────────────── +// One const row per Rust-handled kind. `kind_entry` const-eval traps a row +// built for the wrong kind; `validate_kind_table` traps a row placed at the +// wrong index; the array shape traps a missing kind when SOCKET_KIND_COUNT +// grows. Group-vtable kinds (Dynamic, UwsHttp*/UwsWs*) and the ABI-reserved +// listener kinds stay `None` — their routing is fixed in core. + +use bun_usockets::SocketKind as K; + +const E_BUN_TCP: KindEntry = kind_entry::>(K::BunSocketTcp); +const E_BUN_TLS: KindEntry = kind_entry::>(K::BunSocketTls); +const E_HTTP: KindEntry = kind_entry::>(K::HttpClient); +const E_HTTP_TLS: KindEntry = + kind_entry::>(K::HttpClientTls); +const E_WS_UPGRADE: KindEntry = kind_entry::< + bun_http_jsc::websocket_client::websocket_upgrade_client::HTTPClient, +>(K::WsClientUpgrade); +const E_WS_UPGRADE_TLS: KindEntry = kind_entry::< + bun_http_jsc::websocket_client::websocket_upgrade_client::HTTPClient, +>(K::WsClientUpgradeTls); +const E_WS: KindEntry = kind_entry::>(K::WsClient); +const E_WS_TLS: KindEntry = + kind_entry::>(K::WsClientTls); +const E_POSTGRES: KindEntry = + kind_entry::(K::Postgres); +const E_POSTGRES_TLS: KindEntry = + kind_entry::(K::PostgresTls); +const E_MYSQL: KindEntry = + kind_entry::(K::Mysql); +const E_MYSQL_TLS: KindEntry = + kind_entry::(K::MysqlTls); +const E_VALKEY: KindEntry = kind_entry::(K::Valkey); +const E_VALKEY_TLS: KindEntry = + kind_entry::(K::ValkeyTls); +const E_SPAWN_IPC: KindEntry = kind_entry::(K::SpawnIpc); +#[cfg(not(windows))] +const E_TEST_CHANNEL: KindEntry = + kind_entry::(K::TestChannel); + +const KIND_TABLE: KindTable = [ + /* Invalid (trap) */ None, + /* Dynamic (group vtable) */ None, + Some(&E_BUN_TCP), + Some(&E_BUN_TLS), + /* BunListenerTcp (ABI-reserved) */ None, + /* BunListenerTls (ABI-reserved) */ None, + Some(&E_HTTP), + Some(&E_HTTP_TLS), + Some(&E_WS_UPGRADE), + Some(&E_WS_UPGRADE_TLS), + Some(&E_WS), + Some(&E_WS_TLS), + Some(&E_POSTGRES), + Some(&E_POSTGRES_TLS), + Some(&E_MYSQL), + Some(&E_MYSQL_TLS), + Some(&E_VALKEY), + Some(&E_VALKEY_TLS), + Some(&E_SPAWN_IPC), + /* UwsHttp (group vtable) */ None, + /* UwsHttpTls (group vtable) */ None, + /* UwsWs (group vtable) */ None, + /* UwsWsTls (group vtable) */ None, + /* TestChannel (uv pipes on Windows) */ + #[cfg(not(windows))] + Some(&E_TEST_CHANNEL), + #[cfg(windows)] + None, +]; + +// Compile-time: every row sits at its own kind's index (KIND_TABLE cannot be +// a static for this check — const eval cannot read statics). +const _: () = uws::validate_kind_table(&KIND_TABLE); +const _: () = assert!(KIND_TABLE.len() == SOCKET_KIND_COUNT); + +/// The one definition `bun_usockets` dispatch resolves at link time. +#[unsafe(no_mangle)] +static BUN_UWS_KIND_TABLE: KindTable = KIND_TABLE; -/// Stamps `#[no_mangle] extern "C"` shims that look up an `Option` in a -/// vtable and tail-call it (or return a fallback). The callback arg list is -/// spelled separately from the fn param list so a row can append extras the C -/// ABI doesn't pass us (e.g. handshake's trailing null userdata). -macro_rules! us_dispatch_shims { - ($( - fn $name:ident($recv:ident: *mut $Recv:ty $(, $a:ident: $t:ty)* $(,)?) -> $ret:ty - = $lookup:ident.$field:ident($($call:expr),* $(,)?) or $default:expr; - )*) => {$( - /// # Safety - /// `loop.c` must pass a live, non-null socket pointer (and any data/len - /// buffer must be valid for the duration of the call). - #[unsafe(no_mangle)] - #[allow(clippy::unused_unit)] - pub unsafe extern "C" fn $name($recv: *mut $Recv $(, $a: $t)*) -> $ret { - match $lookup($recv).$field { - Some(f) => { - // SAFETY: `f` is the vtable callback for this socket kind; loop.c - // guarantees `$recv` and any data/len buffers are live for the call, - // and the vtable entry's signature matches this shim's C ABI exactly. - unsafe { f($($call),*) } - } - None => $default, - } - } - )*}; -} +// ── TLS side-channel hooks (only `BunSocketTls` sockets reach these; the +// dispatch driver gates on kind + slot liveness before calling). Same +// link-time seam as the kind table. ────────────────────────────────────────── -us_dispatch_shims! { - fn us_dispatch_open(s: *mut us_socket_t, is_client: c_int, ip: *mut u8, ip_len: c_int) -> *mut us_socket_t - = vt.on_open(s, is_client, ip, ip_len) or s; - fn us_dispatch_data(s: *mut us_socket_t, data: *mut u8, len: c_int) -> *mut us_socket_t - = vt.on_data(s, data, len) or s; - fn us_dispatch_fd(s: *mut us_socket_t, fd: c_int) -> *mut us_socket_t - = vt.on_fd(s, fd) or s; - fn us_dispatch_writable(s: *mut us_socket_t) -> *mut us_socket_t - = vt.on_writable(s) or s; - fn us_dispatch_close(s: *mut us_socket_t, code: c_int, reason: *mut c_void) -> *mut us_socket_t - = vt.on_close(s, code, reason) or s; - fn us_dispatch_timeout(s: *mut us_socket_t) -> *mut us_socket_t - = vt.on_timeout(s) or s; - fn us_dispatch_long_timeout(s: *mut us_socket_t) -> *mut us_socket_t - = vt.on_long_timeout(s) or s; - fn us_dispatch_end(s: *mut us_socket_t) -> *mut us_socket_t - = vt.on_end(s) or s; - fn us_dispatch_connect_error(s: *mut us_socket_t, code: c_int) -> *mut us_socket_t - = vt.on_connect_error(s, code) or s; - fn us_dispatch_connecting_error(c: *mut ConnectingSocket, code: c_int) -> *mut ConnectingSocket - = vtc.on_connecting_error(c, code) or c; - fn us_dispatch_handshake(s: *mut us_socket_t, ok: c_int, err: us_bun_verify_error_t) -> () - = vt.on_handshake(s, ok, err, core::ptr::null_mut()) or (); -} +#[unsafe(no_mangle)] +static BUN_UWS_TLS_SIDE_CHANNEL: TlsSideChannelHooks = TlsSideChannelHooks { + ssl_raw_tap: ssl_raw_tap_hook, + session: session_hook, + keylog: keylog_hook, +}; + +type TLSSocket = super::NewSocket; /// Ciphertext tap for `socket.upgradeTLS()` — fires on the `[raw, _]` half of -/// the returned pair before decryption. Only `bun_socket_tls` ever sets the -/// `ssl_raw_tap` bit, so this isn't part of the per-kind vtable. -/// -/// # Safety -/// `loop.c` must pass a live, non-null `s` whose ext slot holds a valid -/// `*mut TLSSocket`, and `data` must point to `len` readable bytes. -#[unsafe(no_mangle)] -pub(crate) unsafe extern "C" fn us_dispatch_ssl_raw_tap( - s: *mut us_socket_t, - data: *mut u8, - len: c_int, -) -> *mut us_socket_t { - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref - // (`s` is non-null per loop.c contract). - let s_ref = us_socket_t::opaque_mut(s); - debug_assert!(s_ref.kind() == SocketKind::BunSocketTls); - // `bun.jsc.API.NewSocket(true)` → the runtime-local `socket::NewSocket`. - type TLSSocket = super::NewSocket; - // The ext slot for `BunSocketTls` always holds a live `TLSSocket`, stamped - // at construction. - let tls: bun_ptr::ThisPtr = - s_ref.ext::>>().unwrap(); - if let Some(raw) = tls.twin.get().as_ref() { - // `twin` is `IntrusiveRc` (intrusive ref-counted heap pointer); - // grab the raw `*mut` without consuming the ref so the +1 stays put. - let raw: *mut TLSSocket = raw.as_ptr(); - // A negative length from the C side means there is nothing to deliver; - // never panic across the `extern "C"` boundary. - let Ok(len) = usize::try_from(len) else { - return s; - }; - // SAFETY: `data` points to `len` readable bytes from the TLS BIO; loop.c - // guarantees the buffer outlives this call. - let slice = unsafe { core::slice::from_raw_parts(data, len) }; - // SAFETY: `twin` holds a live +1 ref to the `[raw, _]` half, so `raw` - // is live for `ThisPtr::new`; dispatch is single-threaded so no - // aliasing `&mut` exists. - unsafe { - TLSSocket::on_data( - bun_ptr::ThisPtr::new(raw), - NewSocketHandler::::from(s), - slice, - ) - }; - } - s +/// the returned pair before decryption. Only `BunSocketTls` sockets with the +/// `ssl_raw_tap` bit set produce this event; delivery goes to the `twin` +/// TLSSocket's `on_data`. +fn ssl_raw_tap_hook(s: *mut us_socket_t, data: &[u8]) { + let sock = wrap::(s); + // upgradeTLS sets the tap bit only after the owner-swapping adopt, so an + // unstamped/mistyped owner here is an invariant violation — loud in debug. + let twin = + with_socket_owner::(&sock, |tls| tls.twin.get().as_ref().cloned()); + debug_assert!(twin.is_some(), "ssl_raw_tap on unstamped ext"); + // Hold our own +1 on the `[raw, _]` twin across the handler: `on_data` + // may re-enter JS and drop the `tls.twin` ref mid-call. + let Some(Some(twin)) = twin else { return }; + TLSSocket::on_data(uws::this_ptr_of(twin.data()), sock, data); + twin.deref(); } -/// A new (resumable) TLS session is ready. BoringSSL's new-session callback -/// parks the serialized session while `SSL_read`/`SSL_do_handshake` runs; -/// `ssl_flush_pending_session()` dispatches it here once that stack has -/// unwound. Mirrors Node's `NewSessionCallback` → `onnewsession` flow. Only -/// `bun_socket_tls` sockets reach this. -/// -/// # Safety -/// `openssl.c` must pass a live, non-null `s` whose ext slot holds a valid -/// `*mut TLSSocket`, and `data` must point to `len` readable bytes. -#[unsafe(no_mangle)] -pub unsafe extern "C" fn us_dispatch_session(s: *mut us_socket_t, data: *const u8, len: c_int) { - let s_ref = us_socket_t::opaque_mut(s); - if s_ref.kind() != SocketKind::BunSocketTls { - return; - } - type TLSSocket = super::NewSocket; - let Some(tls) = *s_ref.ext::>>() else { - return; - }; - // A negative length from the C side means there is nothing to deliver; - // never panic across the `extern "C"` boundary. - let Ok(len) = usize::try_from(len) else { - return; - }; - // SAFETY: `data` points to `len` readable bytes owned by the caller for the - // duration of this call. - let slice = unsafe { core::slice::from_raw_parts(data, len) }; - let _ = TLSSocket::on_session(tls, slice); +/// A new (resumable) TLS session is ready. The core parks the serialized +/// session while `SSL_read`/`SSL_do_handshake` runs and delivers it here once +/// that stack has unwound (contract C11). Mirrors Node's `NewSessionCallback` +/// → `onnewsession` flow. +fn session_hook(s: *mut us_socket_t, session: &[u8]) { + let _ = with_socket_owner::(&wrap::(s), |tls| { + let _ = TLSSocket::on_session(uws::this_ptr_of(tls), session); + }); } /// Hands an NSS key-log line parked by the keylog callback to the JS -/// `keylog` handler. -/// -/// # Safety -/// `openssl.c` must pass a live, non-null `s` whose ext slot holds a valid -/// `*mut TLSSocket`, and `data` must point to `len` readable bytes. -#[unsafe(no_mangle)] -pub unsafe extern "C" fn us_dispatch_keylog(s: *mut us_socket_t, data: *const u8, len: c_int) { - let s_ref = us_socket_t::opaque_mut(s); - if s_ref.kind() != SocketKind::BunSocketTls { - return; - } - type TLSSocket = super::NewSocket; - let Some(tls) = *s_ref.ext::>>() else { - return; - }; - // A negative length from the C side means there is nothing to deliver; - // never panic across the `extern "C"` boundary. - let Ok(len) = usize::try_from(len) else { - return; - }; - // SAFETY: `data` points to `len` readable bytes owned by the caller for the - // duration of this call. - let slice = unsafe { core::slice::from_raw_parts(data, len) }; - let _ = TLSSocket::on_keylog(tls, slice); +/// `keylog` handler (deferred like sessions — contract C11). +fn keylog_hook(s: *mut us_socket_t, line: &[u8]) { + let _ = with_socket_owner::(&wrap::(s), |tls| { + let _ = TLSSocket::on_keylog(uws::this_ptr_of(tls), line); + }); } diff --git a/src/runtime/socket/uws_handlers.rs b/src/runtime/socket/uws_handlers.rs index 5293f83e79f7..89a8aacaaf53 100644 --- a/src/runtime/socket/uws_handlers.rs +++ b/src/runtime/socket/uws_handlers.rs @@ -1,891 +1,98 @@ -//! Per-`SocketKind` handler adapters. Each one names the ext payload type and -//! forwards events into the existing `on_open`/`on_data`/… methods on that type, -//! re-wrapping the raw `*us_socket_t` in the `NewSocketHandler` shim those -//! methods already expect. +//! Protocol v2 adapter for the `Bun.listen`/`Bun.connect` socket kinds. //! -//! This is the *only* call-site coupling between the dispatcher and the rest -//! of Bun — everything below here is unchanged consumer code. It replaces the -//! old `NewSocketHandler.configure`/`unsafeConfigure` machinery, which built -//! the same trampolines at runtime per `us_socket_context_t`. +//! The core trampoline recovers the owner type-safely, holds a strong ref +//! across every handler call, and releases its ext-held owner ref exactly +//! once at the terminal (on_close / on_connect_error / silent SEMI_SOCKET +//! close) — so none of the old raw-ext machinery (`RawPtrHandler`, +//! `NsHandler`, `BunListener`, `SpawnIPC`) survives here: every other +//! consumer now owns its own `uws::Protocol` impl in its own crate. -use bun_ptr::ThisPtr; -use core::ffi::{c_int, c_void}; -use core::ptr::NonNull; - -use bun_uws::{ConnectingSocket, NewSocketHandler}; -use bun_uws_sys::thunk; -use bun_uws_sys::thunk::ExtSlot; -use bun_uws_sys::vtable::Handler as VHandler; -use bun_uws_sys::{CloseCode, us_bun_verify_error_t, us_socket_t}; +use bun_usockets as uws; use crate::api; -use crate::valkey_jsc::js_valkey; -use bun_http_jsc::websocket_client; -use bun_http_jsc::websocket_client::websocket_upgrade_client; -use bun_jsc::ipc as IPC; -use bun_sql_jsc::mysql; -use bun_sql_jsc::postgres; - -/// Some consumer methods are `bun.JSError!void` (they can throw into JS), -/// some are plain `void`. The old `configure()` trampolines hand-unrolled the -/// catch per call site; here we do it once. JS errors are already on the -/// pending-exception slot — there's nowhere for the C event loop to propagate -/// them — so we just don't lose the unwind. -/// -/// A tiny trait specialised on `()` and `Result<(), E>` handles both shapes. -#[inline] -fn swallow(result: R) { - result.swallow(); -} - -trait Swallow { - fn swallow(self); -} -impl Swallow for () { - #[inline] - fn swallow(self) {} -} -impl Swallow for Result<(), E> { - #[inline] - fn swallow(self) { - let _ = self; - } -} - -/// A trait with default no-op methods that each owner type overrides for the -/// events it actually handles. The `` parameter lets a type -/// opt into different behaviour per transport (and so `NewSocketHandler` -/// is nameable in signatures). -/// -/// All methods default to `Ok(())`; `swallow` collapses both `()` and -/// `Result<(), _>` so consumer impls may return either — but to avoid -/// associated-type contortions every default returns `bun_jsc::JsResult<()>` -/// and plain-`void` consumers just `Ok(())`. -pub trait SocketEvents { - fn on_open(&mut self, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_data(&mut self, _s: NewSocketHandler, _data: &[u8]) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_writable(&mut self, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_close( - &mut self, - _s: NewSocketHandler, - _code: i32, - _reason: Option<*mut c_void>, - ) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_timeout(&mut self, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_long_timeout(&mut self, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_end(&mut self, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_connect_error(&mut self, _s: NewSocketHandler, _code: i32) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_handshake( - &mut self, - _s: NewSocketHandler, - _ok: i32, - _err: us_bun_verify_error_t, - ) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_fd(&mut self, _s: NewSocketHandler, _fd: c_int) -> bun_jsc::JsResult<()> { - Ok(()) - } -} - -/// `Ext = *?*T`: the socket ext stores a single pointer to the heap-allocated -/// owner (matching the old `socket.ext(**anyopaque).* = this` pattern). It is -/// optional because a connect/accept can fail and dispatch `on_close` / -/// `on_connect_error` BEFORE the caller has had a chance to stash `this` in the -/// freshly-calloc'd ext slot — pretending it's `**T` there is a NULL deref the -/// type system can't see. -pub struct PtrHandler(core::marker::PhantomData); +/// Extract the SSL-typed handle the legacy `NewSocket::on_*` methods expect +/// (kind stamp and `SSL` always agree for these kinds). #[inline(always)] -fn wrap(s: *mut us_socket_t) -> NewSocketHandler { - NewSocketHandler::::from(s) -} - -impl VHandler for PtrHandler -where - T: SocketEvents + 'static, -{ - /// `?*T` — the slot lives in C-allocated (`calloc`) memory; the trampoline - /// hands it to us by `&mut`. `ExtSlot` (vs. raw `Option>`) - /// encodes the non-re-entrancy contract so `owner_mut()` is a safe call. - type Ext = ExtSlot; - - const HAS_ON_OPEN: bool = true; - const HAS_ON_DATA: bool = true; - const HAS_ON_WRITABLE: bool = true; - const HAS_ON_CLOSE: bool = true; - const HAS_ON_TIMEOUT: bool = true; - const HAS_ON_LONG_TIMEOUT: bool = true; - const HAS_ON_END: bool = true; - const HAS_ON_CONNECT_ERROR: bool = true; - const HAS_ON_CONNECTING_ERROR: bool = true; - const HAS_ON_HANDSHAKE: bool = true; - const HAS_ON_FD: bool = true; - - fn on_open(ext: &mut Self::Ext, s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_open(wrap::(s))); - } - fn on_data(ext: &mut Self::Ext, s: *mut us_socket_t, data: &[u8]) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_data(wrap::(s), data)); - } - fn on_writable(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_writable(wrap::(s))); - } - fn on_close(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32, reason: Option<*mut c_void>) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_close(wrap::(s), code, reason)); - } - fn on_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_timeout(wrap::(s))); - } - fn on_long_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_long_timeout(wrap::(s))); - } - fn on_end(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_end(wrap::(s))); - } - fn on_connect_error(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32) { - // Close FIRST, then notify — same order `main`'s `configure()` - // trampoline used. The handler may re-enter `connectInner` - // synchronously (node:net `autoSelectFamily` falls back to the - // next address from inside the JS `connectError` callback); on - // Windows/libuv, starting the next attempt's `uv_poll_t` while - // this half-open one is still active and then closing it - // *afterwards* leaves the second poll never delivering - // writable/error → process hang (Win11-aarch64 - // double-connect.test, test-net-server-close). - // - // Safe for TLS too: `us_internal_ssl_close` short-circuits - // SEMI_SOCKET straight to `close_raw`, and `close_raw` skips - // dispatch for SEMI_SOCKET, so no `on_handshake`/`on_close` lands - // in JS before we read `ext`/`this`. - let this = ext.get(); - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe - // deref (`s` is a live socket passed by the trampoline). - us_socket_t::opaque_mut(s).close(CloseCode::failure); - // SAFETY: snapshot of the ext slot taken before close; unique heap - // owner, single-threaded dispatch (same contract as `ExtSlot::owner_mut`, - // but the slot storage may have been freed by `close` so we deref the - // snapshot rather than re-borrowing `ext`). - if let Some(t) = unsafe { thunk::ext_owner(&this) } { - swallow(t.on_connect_error(wrap::(s), code)); - } - } - fn on_connecting_error(c: *mut ConnectingSocket, code: i32) { - let Some(this) = ConnectingSocket::opaque_mut(c) - .ext::>() - .owner_mut() - else { - return; - }; - swallow(this.on_connect_error(NewSocketHandler::::from_connecting(c), code)); - } - fn on_handshake( - ext: &mut Self::Ext, - s: *mut us_socket_t, - ok: bool, - err: us_bun_verify_error_t, - ) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_handshake(wrap::(s), ok as i32, err)); - } - fn on_fd(ext: &mut Self::Ext, s: *mut us_socket_t, fd: c_int) { - let Some(this) = ext.owner_mut() else { return }; - swallow(this.on_fd(wrap::(s), fd)); - } -} - -// ── RawSocketEvents / RawPtrHandler ───────────────────────────────────────── -// -// These handlers may free or re-enter `Self` mid-call (a JS callback closing -// the socket, the refcount reaching zero), so they cannot take `&mut self` — -// a `&mut` argument protector outliving the allocation is UB. They take -// [`ThisPtr`](bun_ptr::ThisPtr) instead: `Copy + Deref`, so each field -// access is its own short-lived shared borrow and none spans a callback. -// -// The ext slot stores that `ThisPtr` directly, so recovering it is safe and -// the `unsafe` lives once, in the vtable's ext read. -pub trait RawSocketEvents: Sized { - const HAS_ON_OPEN: bool = false; - - fn on_open(_this: ThisPtr, _s: NewSocketHandler) {} - fn on_data(_this: ThisPtr, _s: NewSocketHandler, _data: &[u8]) {} - fn on_writable(_this: ThisPtr, _s: NewSocketHandler) {} - fn on_close(_this: ThisPtr, _s: NewSocketHandler, _code: i32, _reason: *mut c_void) { - } - fn on_timeout(_this: ThisPtr, _s: NewSocketHandler) {} - fn on_long_timeout(_this: ThisPtr, _s: NewSocketHandler) {} - fn on_end(_this: ThisPtr, _s: NewSocketHandler) {} - fn on_connect_error(_this: ThisPtr, _s: NewSocketHandler, _code: i32) {} - fn on_handshake( - _this: ThisPtr, - _s: NewSocketHandler, - _ok: i32, - _err: bun_uws::us_bun_verify_error_t, - ) { - } -} - -pub struct RawPtrHandler(core::marker::PhantomData); - -impl VHandler for RawPtrHandler -where - T: RawSocketEvents + 'static, -{ - type Ext = Option>; - - const HAS_ON_OPEN: bool = T::HAS_ON_OPEN; - const HAS_ON_DATA: bool = true; - const HAS_ON_WRITABLE: bool = true; - const HAS_ON_CLOSE: bool = true; - const HAS_ON_TIMEOUT: bool = true; - const HAS_ON_LONG_TIMEOUT: bool = true; - const HAS_ON_END: bool = true; - const HAS_ON_CONNECT_ERROR: bool = true; - const HAS_ON_CONNECTING_ERROR: bool = true; - const HAS_ON_HANDSHAKE: bool = true; - - fn on_open(ext: &mut Self::Ext, s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - let Some(this) = *ext else { return }; - T::on_open(this, wrap::(s)); - } - fn on_data(ext: &mut Self::Ext, s: *mut us_socket_t, data: &[u8]) { - let Some(this) = *ext else { return }; - T::on_data(this, wrap::(s), data); - } - fn on_writable(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = *ext else { return }; - T::on_writable(this, wrap::(s)); - } - fn on_close(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32, reason: Option<*mut c_void>) { - let Some(this) = *ext else { return }; - T::on_close( - this, - wrap::(s), - code, - reason.unwrap_or(core::ptr::null_mut()), - ); - } - fn on_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = *ext else { return }; - T::on_timeout(this, wrap::(s)); - } - fn on_long_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = *ext else { return }; - T::on_long_timeout(this, wrap::(s)); - } - fn on_end(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = *ext else { return }; - T::on_end(this, wrap::(s)); - } - fn on_connect_error(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32) { - // Close first, then notify — see `PtrHandler::on_connect_error`. - let this = *ext; - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe - // deref (`s` is a live socket passed by the trampoline). - us_socket_t::opaque_mut(s).close(CloseCode::failure); - if let Some(t) = this { - T::on_connect_error(t, wrap::(s), code); - } - } - fn on_connecting_error(c: *mut ConnectingSocket, code: i32) { - let Some(this) = *ConnectingSocket::opaque_mut(c).ext::>>() else { - return; - }; - T::on_connect_error(this, NewSocketHandler::::from_connecting(c), code); - } - fn on_handshake( - ext: &mut Self::Ext, - s: *mut us_socket_t, - ok: bool, - err: us_bun_verify_error_t, - ) { - let Some(this) = *ext else { return }; - T::on_handshake(this, wrap::(s), ok as i32, err); - } -} - -impl RawSocketEvents for websocket_upgrade_client::NewHttpUpgradeClient { - const HAS_ON_OPEN: bool = true; - - fn on_open(this: ThisPtr, s: NewSocketHandler) { - Self::handle_open(this, s) - } - fn on_data(this: ThisPtr, s: NewSocketHandler, data: &[u8]) { - Self::handle_data(this, s, data) - } - fn on_writable(this: ThisPtr, s: NewSocketHandler) { - Self::handle_writable(this, s) - } - fn on_close(this: ThisPtr, s: NewSocketHandler, code: i32, reason: *mut c_void) { - Self::handle_close(this, s, code, reason) - } - fn on_timeout(this: ThisPtr, s: NewSocketHandler) { - Self::handle_timeout(this, s) - } - fn on_long_timeout(this: ThisPtr, s: NewSocketHandler) { - Self::handle_timeout(this, s) - } - fn on_end(this: ThisPtr, s: NewSocketHandler) { - Self::handle_end(this, s) - } - fn on_connect_error(this: ThisPtr, s: NewSocketHandler, code: i32) { - Self::handle_connect_error(this, s, code) - } - fn on_handshake( - this: ThisPtr, - s: NewSocketHandler, - ok: i32, - err: bun_uws::us_bun_verify_error_t, - ) { - Self::handle_handshake(this, s, ok, err) - } -} - -impl RawSocketEvents for websocket_client::WebSocket { - // No `on_open` override — adoption of an already-connected socket. - - fn on_data(this: ThisPtr, _s: NewSocketHandler, data: &[u8]) { - Self::handle_data(this, data) - } - fn on_writable(this: ThisPtr, s: NewSocketHandler) { - let _guard = this.ref_guard(); - this.handle_writable(s) - } - fn on_close(this: ThisPtr, s: NewSocketHandler, code: i32, reason: *mut c_void) { - let _guard = this.ref_guard(); - this.handle_close(s, code, reason) - } - fn on_timeout(this: ThisPtr, s: NewSocketHandler) { - let _guard = this.ref_guard(); - this.handle_timeout(s) - } - fn on_long_timeout(this: ThisPtr, s: NewSocketHandler) { - let _guard = this.ref_guard(); - this.handle_timeout(s) - } - fn on_end(this: ThisPtr, s: NewSocketHandler) { - let _guard = this.ref_guard(); - this.handle_end(s) - } - fn on_connect_error(this: ThisPtr, s: NewSocketHandler, code: i32) { - let _guard = this.ref_guard(); - this.handle_connect_error(s, code) - } - fn on_handshake( - this: ThisPtr, - s: NewSocketHandler, - ok: i32, - err: bun_uws::us_bun_verify_error_t, - ) { - let _guard = this.ref_guard(); - this.handle_handshake(s, ok, err) +fn sock(s: uws::AnySocket) -> uws::NewSocketHandler { + uws::NewSocketHandler:: { + socket: *s.socket(), } } -// ── SocketEvents / NsSocketEvents impls ───────────────────────────────────── -// -// A trait with default -// no-ops; each consumer type opts in with an `impl` that overrides only the -// events it actually handles. `api::NewSocket`'s real impl lives in -// `socket/mod.rs` (bridges to inherent methods). - -/// Forwards `NsSocketEvents` to the inherent `on_*` methods on a driver's -/// `SocketHandler` namespace type. `swallow()` (specialised on `()` and -/// `Result<(), E>` above) absorbs both infallible and fallible -/// returns, so one expansion covers drivers whose inherent fns are -/// infallible (postgres, mysql) and those returning `JsTerminatedResult<()>` -/// (valkey). The dispatcher (`NsHandler: VHandler`) `swallow`s the trait -/// result anyway, so swallowing one frame earlier is behaviour-preserving. -/// -/// `on_long_timeout` is intentionally NOT forwarded — no driver defines it, -/// so the trait default fires. -/// -/// `on_handshake` reads the inherent `ON_HANDSHAKE: Option` const — -/// `None` means "leave the slot unbound" so the dispatcher's -/// no-op default fires for plain TCP. -macro_rules! impl_ns_socket_events_forward { - ($Owner:ty, $Handler:ty) => { - impl NsSocketEvents<$Owner, SSL> for $Handler { - fn on_open(this: &mut $Owner, s: NewSocketHandler) -> bun_jsc::JsResult<()> { - swallow(Self::on_open(this, s)); - Ok(()) - } - fn on_data( - this: &mut $Owner, - s: NewSocketHandler, - data: &[u8], - ) -> bun_jsc::JsResult<()> { - swallow(Self::on_data(this, s, data)); - Ok(()) - } - fn on_writable(this: &mut $Owner, s: NewSocketHandler) -> bun_jsc::JsResult<()> { - swallow(Self::on_writable(this, s)); - Ok(()) - } - fn on_close( - this: &mut $Owner, - s: NewSocketHandler, - code: i32, - reason: Option<*mut c_void>, - ) -> bun_jsc::JsResult<()> { - swallow(Self::on_close(this, s, code, reason)); - Ok(()) - } - fn on_timeout(this: &mut $Owner, s: NewSocketHandler) -> bun_jsc::JsResult<()> { - swallow(Self::on_timeout(this, s)); - Ok(()) - } - fn on_end(this: &mut $Owner, s: NewSocketHandler) -> bun_jsc::JsResult<()> { - swallow(Self::on_end(this, s)); - Ok(()) - } - fn on_connect_error( - this: &mut $Owner, - s: NewSocketHandler, - code: i32, - ) -> bun_jsc::JsResult<()> { - swallow(Self::on_connect_error(this, s, code)); - Ok(()) - } - fn on_handshake( - this: &mut $Owner, - s: NewSocketHandler, - ok: i32, - err: us_bun_verify_error_t, - ) -> bun_jsc::JsResult<()> { - if let Some(f) = Self::ON_HANDSHAKE { - swallow(f(this, s, ok, err)); - } - Ok(()) - } - } +/// Rebuild the overloaded v1 close code (0/1/2 = self-initiated CloseCode, +/// >2 = real read/poll errno — contract C3) for `NewSocket::on_close`. +#[inline(always)] +fn wire_close_code(code: uws::CloseCode2, errno: i32) -> i32 { + match code { + uws::CloseCode2::Normal => 0, + uws::CloseCode2::Failure => 1, + uws::CloseCode2::FastShutdown => 2, + uws::CloseCode2::Error => errno, + } +} + +/// Protocol v2 handler set for `api::NewSocket`. The core-held dispatch +/// guard pins the owner for the whole handler frame, so `&Owner` is live; +/// `this_ptr_of` bridges to the legacy `ThisPtr`-shaped methods (still +/// invoked manually by the duplex / named-pipe / upgradeTLS-twin paths). +pub struct BunSocket; + +impl uws::Protocol for BunSocket { + type Owner = api::NewSocket; + const KIND: uws::SocketKind = if SSL { + uws::SocketKind::BunSocketTls + } else { + uws::SocketKind::BunSocketTcp }; -} - -impl_ns_socket_events_forward!( - postgres::PostgresSQLConnection, - postgres::postgres_sql_connection::SocketHandler -); -impl_ns_socket_events_forward!( - mysql::js_my_sql_connection::JSMySQLConnection, - mysql::js_my_sql_connection::SocketHandler -); -impl_ns_socket_events_forward!(js_valkey::JSValkeyClient, js_valkey::SocketHandler); - -// ── Bun.connect / Bun.listen ──────────────────────────────────────────────── -// Noalias re-entrancy: routed through `RawPtrHandler`, not -// `PtrHandler`. `NewSocket::on_*` re-enter JS (`socket.write/end/reload`) which -// re-derives `&mut NewSocket` via the wrapper's `m_ptr`; a `&mut NewSocket` -// argument formed by `PtrHandler` and protected through the dispatch frame -// would alias that re-entrant borrow (Stacked-Borrows UB + `noalias` -// dead-store of the re-entrant write). `RawPtrHandler` passes `ThisPtr`. -pub type BunSocket = RawPtrHandler, SSL>; - -/// Listener accept path: the ext is uninitialised at on_open time (the C accept -/// loop just calloc'd it), so we read the `*Listener` off `group->ext` and let -/// `on_create` allocate the `NewSocket` and stash it in the ext. After that the -/// socket is re-stamped as `.bun_socket_{tcp,tls}` and routes through -/// `BunSocket` above. -pub struct BunListener; - -impl VHandler for BunListener -where - api::NewSocket: RawSocketEvents, -{ - // No `Ext` decl — owner comes from `s.group().owner(Listener)`. - type Ext = (); - const HAS_EXT: bool = false; - - const HAS_ON_OPEN: bool = true; - const HAS_ON_DATA: bool = true; - const HAS_ON_WRITABLE: bool = true; - const HAS_ON_CLOSE: bool = true; - const HAS_ON_TIMEOUT: bool = true; - const HAS_ON_END: bool = true; - const HAS_ON_HANDSHAKE: bool = true; - - fn on_open_no_ext(s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe - // deref; `group()` is non-null for accepted sockets and `owner` was - // stashed at listen time. - let listener = us_socket_t::opaque_mut(s).group().owner::(); - // on_create allocates the NewSocket, stashes it in ext, and - // restamps kind → .bun_socket_*. Fire the user `open` handler - // (markActive, ALPN, JS callback) before returning so the same - // dispatch tick that accepted the fd sees an open socket — the - // old `configure({onCreate, onOpen})` path did this in one - // on_open call. - // - // SAFETY: `owner::()` returns the back-pointer stashed by - // `Listener::listen`; the listener strictly outlives every accepted - // socket and is read-only here. - let ns = api::Listener::on_create::(unsafe { &*listener }, wrap::(s)); - api::NewSocket::on_open(ns, wrap::(s)); - } - // Accepted sockets reach the remaining events as `.bun_socket_*` once - // on_create has restamped them; if anything fires before that, route to - // the freshly stashed NewSocket. - fn on_close_no_ext(s: *mut us_socket_t, code: i32, reason: Option<*mut c_void>) { - if let Some(ns) = *us_socket_t::opaque_mut(s).ext::>>>() - { - // `ns` is the live heap `NewSocket` stashed by `on_create`. The - // `on_*` handlers may free it, so they take `ThisPtr`, never `&mut`. - swallow(api::NewSocket::on_close(ns, wrap::(s), code, reason)); - } - } - fn on_data_no_ext(s: *mut us_socket_t, data: &[u8]) { - if let Some(ns) = *us_socket_t::opaque_mut(s).ext::>>>() - { - api::NewSocket::on_data(ns, wrap::(s), data); - } - } - fn on_writable_no_ext(s: *mut us_socket_t) { - if let Some(ns) = *us_socket_t::opaque_mut(s).ext::>>>() - { - api::NewSocket::on_writable(ns, wrap::(s)); - } - } - fn on_end_no_ext(s: *mut us_socket_t) { - if let Some(ns) = *us_socket_t::opaque_mut(s).ext::>>>() - { - api::NewSocket::on_end(ns, wrap::(s)); - } - } - fn on_timeout_no_ext(s: *mut us_socket_t) { - if let Some(ns) = *us_socket_t::opaque_mut(s).ext::>>>() - { - api::NewSocket::on_timeout(ns, wrap::(s)); - } - } - fn on_handshake_no_ext(s: *mut us_socket_t, ok: bool, err: us_bun_verify_error_t) { - if let Some(ns) = *us_socket_t::opaque_mut(s).ext::>>>() - { - swallow(api::NewSocket::on_handshake( - ns, - wrap::(s), - ok as i32, - err, - )); - } - } -} - -/// Like `PtrHandler` but the callbacks live on a separate namespace `H` (the -/// driver's pre-existing `SocketHandler(ssl)` adapter) rather than as methods -/// on the owner type itself. Ext stores `*Owner` (optional for the same reason -/// as `PtrHandler`). -/// -/// In Rust the "separate namespace" becomes a trait `NsSocketEvents` whose -/// methods take `&mut Owner` as the first parameter; each driver's -/// `SocketHandler` zero-sized type implements it. -pub trait NsSocketEvents { - fn on_open(_this: &mut Owner, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_data( - _this: &mut Owner, - _s: NewSocketHandler, - _data: &[u8], - ) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_writable(_this: &mut Owner, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_close( - _this: &mut Owner, - _s: NewSocketHandler, - _code: i32, - _reason: Option<*mut c_void>, - ) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_timeout(_this: &mut Owner, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_long_timeout(_this: &mut Owner, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_end(_this: &mut Owner, _s: NewSocketHandler) -> bun_jsc::JsResult<()> { - Ok(()) - } - fn on_connect_error( - _this: &mut Owner, - _s: NewSocketHandler, - _code: i32, - ) -> bun_jsc::JsResult<()> { - Ok(()) - } - /// Default no-op covers adapters that leave the handshake slot unbound. - fn on_handshake( - _this: &mut Owner, - _s: NewSocketHandler, - _ok: i32, - _err: us_bun_verify_error_t, - ) -> bun_jsc::JsResult<()> { - Ok(()) - } -} - -pub struct NsHandler(core::marker::PhantomData<(Owner, H)>); - -impl VHandler for NsHandler -where - Owner: 'static, - H: NsSocketEvents + 'static, -{ - type Ext = ExtSlot; - - const HAS_ON_OPEN: bool = true; - const HAS_ON_DATA: bool = true; - const HAS_ON_WRITABLE: bool = true; - const HAS_ON_CLOSE: bool = true; - const HAS_ON_TIMEOUT: bool = true; - const HAS_ON_LONG_TIMEOUT: bool = true; - const HAS_ON_END: bool = true; - const HAS_ON_CONNECT_ERROR: bool = true; - const HAS_ON_CONNECTING_ERROR: bool = true; - const HAS_ON_HANDSHAKE: bool = true; - fn on_open(ext: &mut Self::Ext, s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_open(this, wrap::(s))); - } - fn on_data(ext: &mut Self::Ext, s: *mut us_socket_t, data: &[u8]) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_data(this, wrap::(s), data)); - } - fn on_writable(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_writable(this, wrap::(s))); - } - fn on_close(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32, reason: Option<*mut c_void>) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_close(this, wrap::(s), code, reason)); - } - fn on_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_timeout(this, wrap::(s))); - } - fn on_long_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_long_timeout(this, wrap::(s))); - } - fn on_end(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_end(this, wrap::(s))); - } - fn on_connect_error(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32) { - // Close before notify — see PtrHandler::on_connect_error. - let this = ext.get(); - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe - // deref (`s` is a live socket passed by the trampoline). - us_socket_t::opaque_mut(s).close(CloseCode::failure); - // SAFETY: snapshot of the ext slot taken before close; unique heap - // owner, single-threaded dispatch (same contract as `ExtSlot::owner_mut`). - if let Some(t) = unsafe { thunk::ext_owner(&this) } { - swallow(H::on_connect_error(t, wrap::(s), code)); - } - } - fn on_connecting_error(c: *mut ConnectingSocket, code: i32) { - let Some(this) = ConnectingSocket::opaque_mut(c) - .ext::>() - .owner_mut() - else { - return; - }; - swallow(H::on_connect_error( - this, - NewSocketHandler::::from_connecting(c), - code, - )); - } - fn on_handshake( - ext: &mut Self::Ext, - s: *mut us_socket_t, - ok: bool, - err: us_bun_verify_error_t, - ) { - let Some(this) = ext.owner_mut() else { return }; - swallow(H::on_handshake(this, wrap::(s), ok as i32, err)); - } -} - -// ── HTTP client thread (fetch) ────────────────────────────────────────────── -// -// Unlike every other consumer the fetch ext slot does NOT hold a `*Owner`. It -// holds an `ActiveSocket` — a `bun.TaggedPointerUnion` *value* packed into one -// word (`.ptr()` → `*anyopaque` with the tag in the high bits). Dereferencing -// it as a real pointer is UB; `Handler.on*` decode it via `ActiveSocket.from`. -// This adapter just lifts the word out of the slot, so the `*anyopaque` here -// is intentional and irreducible — it IS the tagged-pointer encoding, not a -// type we forgot to name. -pub struct HTTPClient; - -// Each event is written out by hand; `HAS_ON_*` is simply left unset -// for events the upstream `Handler` doesn't define. -type HttpH = bun_http::http_context::Handler; - -impl VHandler for HTTPClient { - type Ext = Option>; - - const HAS_ON_OPEN: bool = true; - const HAS_ON_DATA: bool = true; - const HAS_ON_WRITABLE: bool = true; - const HAS_ON_CLOSE: bool = true; - const HAS_ON_TIMEOUT: bool = true; - const HAS_ON_LONG_TIMEOUT: bool = true; - const HAS_ON_END: bool = true; - const HAS_ON_CONNECT_ERROR: bool = true; - const HAS_ON_CONNECTING_ERROR: bool = true; - const HAS_ON_HANDSHAKE: bool = true; - - fn on_open(ext: &mut Self::Ext, s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - // The word read out is a packed `ActiveSocket` tagged-pointer value, - // not dereferenced here. - let Some(owner) = *ext else { return }; - HttpH::::on_open(owner.as_ptr(), wrap::(s)); - } - fn on_data(ext: &mut Self::Ext, s: *mut us_socket_t, data: &[u8]) { - let Some(owner) = *ext else { return }; - HttpH::::on_data(owner.as_ptr(), wrap::(s), data); - } - fn on_writable(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(owner) = *ext else { return }; - HttpH::::on_writable(owner.as_ptr(), wrap::(s)); - } - fn on_close(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32, reason: Option<*mut c_void>) { - let Some(owner) = *ext else { return }; - HttpH::::on_close(owner.as_ptr(), wrap::(s), code, reason); - } - fn on_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(owner) = *ext else { return }; - HttpH::::on_timeout(owner.as_ptr(), wrap::(s)); - } - fn on_long_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(owner) = *ext else { return }; - HttpH::::on_long_timeout(owner.as_ptr(), wrap::(s)); - } - fn on_end(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(owner) = *ext else { return }; - HttpH::::on_end(owner.as_ptr(), wrap::(s)); - } - fn on_connect_error(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32) { - // Close before notify — see PtrHandler::on_connect_error. SEMI_SOCKET - // close skips dispatch, so the tagged owner survives the close. - let owner = *ext; - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe - // deref (`s` is a live socket passed by the trampoline). - us_socket_t::opaque_mut(s).close(CloseCode::failure); - let Some(owner) = owner else { return }; - HttpH::::on_connect_error(owner.as_ptr(), wrap::(s), code); - } - fn on_connecting_error(cs: *mut ConnectingSocket, code: i32) { - let Some(owner) = *ConnectingSocket::opaque_mut(cs).ext::>>() else { - return; - }; - HttpH::::on_connect_error( - owner.as_ptr(), - NewSocketHandler::::from_connecting(cs), - code, + fn on_open(o: &Self::Owner, s: uws::AnySocket, _is_client: bool, _ip: &[u8]) { + api::NewSocket::on_open(uws::this_ptr_of(o), sock::(s)); + } + fn on_data(o: &Self::Owner, s: uws::AnySocket, data: &mut [u8]) { + api::NewSocket::on_data(uws::this_ptr_of(o), sock::(s), data); + } + fn on_writable(o: &Self::Owner, s: uws::AnySocket) { + api::NewSocket::on_writable(uws::this_ptr_of(o), sock::(s)); + } + fn on_close(o: &Self::Owner, s: uws::AnySocket, code: uws::CloseCode2, errno: i32) { + // Legacy `on_close` consumes one ref (the convention shared with the + // manual duplex/named-pipe/twin callers, which transfer a +1 in). + // Take that ref here: core releases its OWN ext-held owner ref after + // this returns, so the two conventions stay balanced. + o.ref_(); + let _ = api::NewSocket::on_close( + uws::this_ptr_of(o), + sock::(s), + wire_close_code(code, errno), + None, ); } - fn on_handshake( - ext: &mut Self::Ext, - s: *mut us_socket_t, - ok: bool, - err: us_bun_verify_error_t, - ) { - let Some(owner) = *ext else { return }; - HttpH::::on_handshake(owner.as_ptr(), wrap::(s), ok as i32, err); - } -} - -// ── WebSocket client ──────────────────────────────────────────────────────── -pub type WSUpgrade = - RawPtrHandler, SSL>; -pub type WSClient = RawPtrHandler, SSL>; - -// ── SQL drivers ───────────────────────────────────────────────────────────── -pub type Postgres = NsHandler< - postgres::PostgresSQLConnection, - postgres::postgres_sql_connection::SocketHandler, - SSL, ->; -pub type MySQL = NsHandler< - mysql::js_my_sql_connection::JSMySQLConnection, - mysql::js_my_sql_connection::SocketHandler, - SSL, ->; -pub type Valkey = - NsHandler, SSL>; - -// ── Bun.spawn IPC / process.send() ────────────────────────────────────────── -// Ext is `*IPC.SendQueue` for both child-side `process.send` and parent-side -// `Bun.spawn({ipc})`. The IPC handlers are free functions, not -// methods on SendQueue, so we adapt manually instead of via PtrHandler. -pub struct SpawnIPC; - -use IPC::IPCHandlers::PosixSocket as IpcH; -type IpcS = NewSocketHandler; - -impl VHandler for SpawnIPC { - type Ext = ExtSlot; - - const HAS_ON_OPEN: bool = true; - const HAS_ON_DATA: bool = true; - const HAS_ON_FD: bool = true; - const HAS_ON_WRITABLE: bool = true; - const HAS_ON_CLOSE: bool = true; - const HAS_ON_TIMEOUT: bool = true; - const HAS_ON_END: bool = true; - - fn on_open(_ext: &mut Self::Ext, _s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) {} - fn on_data(ext: &mut Self::Ext, s: *mut us_socket_t, data: &[u8]) { - let Some(this) = ext.owner_mut() else { return }; - IpcH::on_data(this, IpcS::from(s), data); - } - fn on_fd(ext: &mut Self::Ext, s: *mut us_socket_t, fd: c_int) { - let Some(this) = ext.owner_mut() else { return }; - IpcH::on_fd(this, IpcS::from(s), fd); - } - fn on_writable(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - IpcH::on_writable(this, IpcS::from(s)); - } - fn on_close(ext: &mut Self::Ext, s: *mut us_socket_t, code: i32, reason: Option<*mut c_void>) { - let Some(this) = ext.owner_mut() else { return }; - IpcH::on_close(this, IpcS::from(s), code, reason); - } - fn on_timeout(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - IpcH::on_timeout(this, IpcS::from(s)); + fn on_timeout(o: &Self::Owner, s: uws::AnySocket) { + api::NewSocket::on_timeout(uws::this_ptr_of(o), sock::(s)); + } + fn on_end(o: &Self::Owner, s: uws::AnySocket) { + api::NewSocket::on_end(uws::this_ptr_of(o), sock::(s)); + } + fn on_connect_error(o: &Self::Owner, err: uws::ConnectFailure) { + // The owner-held handle is the only route to the socket here. + let s = o.socket.get(); + let dns_error = s.dns_error(); + // Close FIRST, then notify — the handler may re-enter `connectInner` + // synchronously (node:net autoSelectFamily); on Windows/libuv a new + // attempt started before this half-open one is closed hangs. Safe: + // SEMI_SOCKET / already-closed-connecting closes dispatch nothing (C1). + s.close(uws::CloseCode::Failure); + // Same +1 bridge as `on_close`: `handle_connect_error` consumes one + // ref exactly when the owner-held handle is still attached + // (`needs_deref`), and core releases its own ext ref after we return. + if !s.is_detached() { + o.ref_(); + } + let _ = api::NewSocket::handle_connect_error(uws::this_ptr_of(o), err.errno, dns_error); } - fn on_end(ext: &mut Self::Ext, s: *mut us_socket_t) { - let Some(this) = ext.owner_mut() else { return }; - IpcH::on_end(this, IpcS::from(s)); + fn on_handshake(o: &Self::Owner, s: uws::AnySocket, ok: bool, err: uws::VerifyError) { + let _ = api::NewSocket::on_handshake(uws::this_ptr_of(o), sock::(s), ok as i32, err); } + // on_long_timeout / on_fd: default no-ops (never armed for Bun sockets). } diff --git a/src/runtime/socket/uws_jsc.rs b/src/runtime/socket/uws_jsc.rs index c67dea4333b2..db58b2e97b6b 100644 --- a/src/runtime/socket/uws_jsc.rs +++ b/src/runtime/socket/uws_jsc.rs @@ -1,15 +1,14 @@ -//! JSC bridges for `src/uws/` types. Keeps `uws/` free of JSC types. -//! Exports here are referenced via aliases on the original structs so call -//! sites do not change. +//! JSC bridges for `bun_usockets` / `bun_uws_shim` types. Keeps those crates +//! free of JSC types. Exports here are referenced via aliases on the original +//! structs so call sites do not change. use bun_jsc::{JSGlobalObject, JSValue}; -use bun_uws::{ - AnyWebSocket, RawWebSocket, create_bun_socket_error_t, us_socket_stream_buffer_t, us_socket_t, -}; +use bun_usockets::{create_bun_socket_error_t, us_socket_t}; +use bun_uws_shim::{AnyWebSocket, RawWebSocket, us_socket_stream_buffer_t}; use crate::node::{BlobOrStringOrBuffer, StringOrBuffer}; -// ── local extension: StreamBuffer accessors (upstream `bun_uws_sys::us_socket::StreamBuffer` +// ── local extension: StreamBuffer accessors (upstream `bun_uws_shim::us_socket::StreamBuffer` // is a bare `{ list: Vec, cursor: usize }`; mirror `bun_io::StreamBuffer` API here) ── trait StreamBufferExt { fn is_not_empty(&self) -> bool; @@ -17,7 +16,7 @@ trait StreamBufferExt { fn wrote(&mut self, amount: usize); fn write(&mut self, buffer: &[u8]); } -impl StreamBufferExt for bun_uws_sys::us_socket::StreamBuffer { +impl StreamBufferExt for bun_uws_shim::us_socket::StreamBuffer { #[inline] fn is_not_empty(&self) -> bool { self.list.len() > self.cursor @@ -80,13 +79,13 @@ pub fn create_bun_socket_error_to_js( pub use bun_jsc::system_error::verify_error_to_js; // ── AnyWebSocket.getTopicsAsJSArray ──────────────────────────────────────── -// Declared inline; migrate into `bun_uws_sys` with the rest of the +// Declared inline; migrate into `bun_uws_shim` with the rest of the // WebSocket FFI surface. unsafe extern "C" { // Opaque-handle (`RawWebSocket` is an `opaque_ffi!` ZST — `&mut` carries no // `noalias`, dereferences zero bytes) + live `&JSGlobalObject` // (UnsafeCell-backed, FFI may mutate VM state). No caller-side precondition; - // matches `uws_ws_close` / `uws_ws_get_user_data` in `bun_uws_sys::WebSocket`. + // matches `uws_ws_close` / `uws_ws_get_user_data` in `bun_uws_shim::web_socket`. safe fn uws_ws_get_topics_as_js_array( ssl: i32, ws: &mut RawWebSocket, @@ -179,11 +178,11 @@ pub(crate) unsafe extern "C" fn us_socket_buffered_js_write( // exit path without a scopeguard borrow conflict. let result: JSValue = 'body: { let data_slice = node_buffer.slice(); - // `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the safe deref. - // No JS executes between here and `JSValue::TRUE/FALSE` below, so the + // SAFETY: the C++ caller passes a live slab-resident socket. No JS + // executes between here and `JSValue::TRUE/FALSE` below, so the // single `&mut` does not alias the re-entrant write path documented at // the top of this fn (raw `socket` is still kept for that reason). - let socket_ref = us_socket_t::opaque_mut(socket); + let socket_ref: &mut us_socket_t = unsafe { &mut *socket }; if stream_buffer.is_not_empty() { let to_flush = stream_buffer.slice(); let to_flush_len = to_flush.len(); diff --git a/src/runtime/test_runner/diff/diff_match_patch.rs b/src/runtime/test_runner/diff/diff_match_patch.rs index 8eb3737cabaf..4d30f1752c20 100644 --- a/src/runtime/test_runner/diff/diff_match_patch.rs +++ b/src/runtime/test_runner/diff/diff_match_patch.rs @@ -1437,10 +1437,10 @@ mod tests { let equal_b = d(Operation::Equal, b"b"); let delete_b = d(Operation::Delete, b"b"); - assert!(equal_a.eql(&equal_a)); - assert!(!insert_a.eql(&equal_a)); - assert!(!equal_a.eql(&equal_b)); - assert!(!equal_a.eql(&delete_b)); + assert!(equal_a == equal_a); + assert!(insert_a != equal_a); + assert!(equal_a != equal_b); + assert!(equal_a != delete_b); } #[test] @@ -1475,28 +1475,15 @@ mod tests { ); // Unicode } - fn rebuildtexts(diffs: &DiffList) -> [Box<[u8]>; 2] { - let mut text: [Vec; 2] = [Vec::new(), Vec::new()]; - for my_diff in diffs.iter() { - if my_diff.operation != Operation::Insert { - text[0].extend_from_slice(&my_diff.text); - } - if my_diff.operation != Operation::Delete { - text[1].extend_from_slice(&my_diff.text); - } - } - [ - text[0].clone().into_boxed_slice(), - text[1].clone().into_boxed_slice(), - ] - } - #[test] fn test_diff_bisect() { - let this = Dmp::new(Config { - diff_timeout: 0, - ..Config::default() - }); + let this = Dmp { + config: Config { + diff_timeout: 0, + ..Config::default() + }, + ..Dmp::default() + }; let a = b"cat"; let b = b"map"; @@ -1520,7 +1507,7 @@ mod tests { #[test] fn test_diff_half_match_leak_regression() { - let dmp = Dmp::DEFAULT; + let dmp = Dmp::default(); let text1 = b"The quick brown fox jumps over the lazy dog."; let text2 = b"That quick brown fox jumped over a lazy dog."; let _diffs = dmp.diff(text2, text1, true).unwrap(); @@ -1528,10 +1515,13 @@ mod tests { #[test] fn test_diff_basic() { - let this = Dmp::new(Config { - diff_timeout: 0, - ..Config::default() - }); + let this = Dmp { + config: Config { + diff_timeout: 0, + ..Config::default() + }, + ..Dmp::default() + }; // Null case. let diffs = this.diff(b"", b"", false).unwrap(); diff --git a/src/runtime/timer/DateHeaderTimer.rs b/src/runtime/timer/DateHeaderTimer.rs index 195fbf15489f..84a0fee31771 100644 --- a/src/runtime/timer/DateHeaderTimer.rs +++ b/src/runtime/timer/DateHeaderTimer.rs @@ -14,7 +14,7 @@ //! Note that we only check for potential updates ot this timer once per event loop tick. use bun_jsc::virtual_machine::VirtualMachine; -use bun_uws::Loop; +use bun_usockets::Loop; use crate::jsc_hooks::timer_all; diff --git a/src/runtime/timer/Timer.rs b/src/runtime/timer/Timer.rs index 26c235420cc1..63aa96262986 100644 --- a/src/runtime/timer/Timer.rs +++ b/src/runtime/timer/Timer.rs @@ -13,7 +13,7 @@ use bun_core::String as BunString; use bun_core::{Timespec, TimespecMockMode}; use bun_jsc::virtual_machine::VirtualMachine; use bun_jsc::{CallFrame, JSGlobalObject, JSValue, JsClass as _, JsResult, StringJsc as _}; -use bun_uws::Loop as UwsLoop; +use bun_usockets::Loop as UwsLoop; use super::{ All, CountdownOverflowBehavior, DateHeaderTimer, EventLoopTimer, EventLoopTimerState, @@ -479,7 +479,7 @@ impl DateHeaderTimer { // updateDate() is an expensive function. // SAFETY: `vm` is the live per-thread VM; `uws_loop()` returns its // owned uws loop, which outlives this call. - unsafe { (*(*vm).uws_loop()).update_date() }; + unsafe { bun_usockets::Loop::update_date((*vm).uws_loop()) }; let elt: *mut EventLoopTimer = &raw mut self.event_loop_timer; // SAFETY: single JS thread; `All::update` only touches `lock`/`timers`/ diff --git a/src/runtime/timer/WTFTimer.rs b/src/runtime/timer/WTFTimer.rs index c0ee848c43c3..13f84850a70f 100644 --- a/src/runtime/timer/WTFTimer.rs +++ b/src/runtime/timer/WTFTimer.rs @@ -102,7 +102,7 @@ impl WTFTimer { RunLoopTimer::fire(self.run_loop_timer); } - #[bun_uws::uws_callback(export = "WTFTimer__isActive", no_catch)] + #[bun_uws_shim::uws_callback(export = "WTFTimer__isActive", no_catch)] pub fn is_active(&self) -> bool { if self.event_loop_timer.state == EventLoopTimerState::ACTIVE { return true; @@ -113,7 +113,7 @@ impl WTFTimer { loaded.cast_const().cast::() == ptr::from_ref(self) } - #[bun_uws::uws_callback(export = "WTFTimer__secondsUntilTimer", no_catch)] + #[bun_uws_shim::uws_callback(export = "WTFTimer__secondsUntilTimer", no_catch)] pub fn seconds_until_timer(&self) -> f64 { let _g = self.lock.lock_guard(); if self.event_loop_timer.state == EventLoopTimerState::ACTIVE { diff --git a/src/runtime/timer/mod.rs b/src/runtime/timer/mod.rs index 9e0aab5c4459..1ed941a2ded9 100644 --- a/src/runtime/timer/mod.rs +++ b/src/runtime/timer/mod.rs @@ -396,10 +396,9 @@ impl DateHeaderTimer { /// reschedule for 1s later iff there are active connections. pub(crate) fn run(&mut self, vm: &mut bun_jsc::virtual_machine::VirtualMachine) { self.event_loop_timer.state = EventLoopTimerState::FIRED; - // `uws_loop_mut` is the audited safe accessor (loop owned by the VM, - // separate allocation from `RuntimeState.timer` so no aliasing with - // `&mut self`). - let loop_ = vm.uws_loop_mut(); + // Raw loop pointer — no `&mut Loop` may be formed on a published loop + // (waker threads mutate `pending_wakeups` concurrently). + let loop_ = vm.uws_loop(); let now = Timespec::now(TimespecMockMode::AllowMockedTime); // Record when we last ran it. @@ -409,9 +408,10 @@ impl DateHeaderTimer { }; // updateDate() is an expensive function. - loop_.update_date(); + bun_usockets::Loop::update_date(loop_); - if loop_.internal_loop_data.sweep_timer_count > 0 { + // SAFETY: `loop_` is the live per-VM uws loop; loop-thread-only field. + if unsafe { (*loop_).internal_loop_data.sweep_timer_count } > 0 { // Reschedule it automatically for 1 second later. let next = now.add_ms(1000); self.event_loop_timer.next = ElTimespec { @@ -1059,14 +1059,14 @@ impl All { // documented in `# Safety` above. Cannot be `&mut` without breaking the // out-of-file call sites that hold raw pointers. #[allow(clippy::not_unsafe_ptr_arg_deref)] - pub fn increment_immediate_ref(&mut self, delta: i32, uws_loop: *mut bun_uws_sys::Loop) { + pub fn increment_immediate_ref(&mut self, delta: i32, uws_loop: *mut bun_usockets::Loop) { let old = self.immediate_ref_count; let new = old + delta; self.immediate_ref_count = new; if old <= 0 && new > 0 { #[cfg(not(windows))] - // SAFETY: caller passes the VM's live uws loop - unsafe { &mut *uws_loop }.ref_(); + // Raw-place twin: caller passes the VM's live uws loop. + bun_usockets::Loop::ref_raw(uws_loop); #[cfg(windows)] { // Lazy-init the idle handle and start @@ -1083,8 +1083,8 @@ impl All { } } else if old > 0 && new <= 0 { #[cfg(not(windows))] - // SAFETY: caller passes the VM's live uws loop - unsafe { &mut *uws_loop }.unref(); + // Raw-place twin: caller passes the VM's live uws loop. + bun_usockets::Loop::unref_raw(uws_loop); #[cfg(windows)] if !self.uv_idle.data.is_null() { self.uv_idle.stop(); @@ -1109,15 +1109,15 @@ impl All { // documented in `# Safety` above. Cannot be `&mut` without breaking the // out-of-file call sites that hold raw pointers. #[allow(clippy::not_unsafe_ptr_arg_deref)] - pub fn increment_timer_ref(&mut self, delta: i32, uws_loop: *mut bun_uws_sys::Loop) { + pub fn increment_timer_ref(&mut self, delta: i32, uws_loop: *mut bun_usockets::Loop) { let old = self.active_timer_count; let new = old + delta; debug_assert!(new >= 0); self.active_timer_count = new; if old <= 0 && new > 0 { #[cfg(not(windows))] - // SAFETY: caller passes the VM's live uws loop - unsafe { &mut *uws_loop }.ref_(); + // Raw-place twin: caller passes the VM's live uws loop. + bun_usockets::Loop::ref_raw(uws_loop); // `uv_timer.ref()` is intentionally unconditional (no `data != // null` guard). Invariant: every path that reaches a positive // `active_timer_count` first inserts a timer, and `insert` @@ -1127,8 +1127,8 @@ impl All { self.uv_timer.ref_(); } else if old > 0 && new <= 0 { #[cfg(not(windows))] - // SAFETY: caller passes the VM's live uws loop - unsafe { &mut *uws_loop }.unref(); + // Raw-place twin: caller passes the VM's live uws loop. + bun_usockets::Loop::unref_raw(uws_loop); #[cfg(windows)] self.uv_timer.unref(); } diff --git a/src/runtime/valkey_jsc/js_valkey.rs b/src/runtime/valkey_jsc/js_valkey.rs index 9aa6a4176176..26cae30bcea4 100644 --- a/src/runtime/valkey_jsc/js_valkey.rs +++ b/src/runtime/valkey_jsc/js_valkey.rs @@ -12,8 +12,8 @@ use bun_jsc::{ self as jsc, CallFrame, GlobalRef, JSArray, JSGlobalObject, JSMap, JSPromise, JSValue, JsCell, JsRef, JsResult, }; -use bun_ptr::{AsCtxPtr, BackRef}; -use bun_uws as uws; +use bun_ptr::BackRef; +use bun_usockets as uws; use super::protocol_jsc; use super::valkey; @@ -56,22 +56,6 @@ fn vm_event_loop_ctx() -> bun_io::EventLoopCtx { bun_io::posix_event_loop::get_vm_ctx(bun_io::AllocatorType::Js) } -/// Scope-guarded `ref/deref` over a raw pointer — sidesteps the -/// `scopeguard`-captures-`&self` borrowck conflict that pervades this file. -// R-2: takes `*const` now that every `JSValkeyClient` method is `&self`; -// `deref()` (and `ref_()`) already only need a shared receiver. -#[inline] -fn deref_guard( - this: *const JSValkeyClient, -) -> scopeguard::ScopeGuard<*const JSValkeyClient, fn(*const JSValkeyClient)> { - fn drop_fn(p: *const JSValkeyClient) { - // SAFETY: `p` was a live `&JSValkeyClient` at guard creation; the - // intrusive `ref_()` taken just before guarantees liveness here. - unsafe { JSValkeyClient::deref(p.cast_mut()) } - } - scopeguard::guard(this, drop_fn as fn(*const JSValkeyClient)) -} - bun_output::define_scoped_log!(debug, RedisJS, visible); type Socket = uws::AnySocket; @@ -365,8 +349,7 @@ impl SubscriptionCtx { // `#[repr(C)]`: `client` MUST be // at offset 0. `ValkeyClient::parent()` recovers the outer pointer via // `from_field_ptr!`, but belt-and-suspenders against any path that assumes -// `*mut JSValkeyClient` and `*mut ValkeyClient` alias (the socket ext slot did -// — see `connect()` below). +// `*mut JSValkeyClient` and `*mut ValkeyClient` alias. #[repr(C)] pub struct JSValkeyClient { pub client: JsCell, @@ -428,6 +411,11 @@ impl JSValkeyClient { // SAFETY: caller contract. unsafe { bun_ptr::RefCount::deref(this) }; } + /// Take a new strong ref as a transferable [`uws::OwnerRef`]. + #[inline] + fn owner_ref(&self) -> uws::OwnerRef { + uws::owner_ref_of(self) + } #[inline] pub fn new(init: JSValkeyClient) -> *mut JSValkeyClient { // bun.TrivialNew(@This()) → heap::alloc(Box::new(init)) @@ -867,8 +855,6 @@ impl JSValkeyClient { self._subscription_ctx.get().is_subscriber ); debug_assert!(self.client.get().status == valkey::Status::Connected); - self.ref_(); - let _d = deref_guard(self); if !self._subscription_ctx.get().is_subscriber { let flags = &self.client.get().flags; @@ -896,8 +882,6 @@ impl JSValkeyClient { .has_subscriptions(&self.global_object) .unwrap_or(false) ); - self.ref_(); - let _d = deref_guard(self); // This is the last subscription, restore original flags if !self @@ -964,9 +948,6 @@ impl JSValkeyClient { global_object: &JSGlobalObject, this_value: JSValue, ) -> JsResult { - self.ref_(); - let _d = deref_guard(self); - // If already connected, resolve immediately if self.client.get().status == valkey::Status::Connected { return Ok(JSPromise::resolved_promise_value( @@ -1060,9 +1041,6 @@ impl JSValkeyClient { fn add_timer(&self, timer: &JsCell, next_timeout_ms: u32) { // `timer` is `&self.timer` or `&self.reconnect_timer`; `JsCell` gives // us closure-scoped `&mut` without an open-coded raw deref. - self.ref_(); - let _d = deref_guard(self); - // If the timer is already active, we need to remove it first if timer.get().state == Timer::State::ACTIVE { self.remove_timer(timer); @@ -1140,13 +1118,10 @@ impl JSValkeyClient { // Mark timer as fired self.timer.with_mut(|t| t.state = Timer::State::FIRED); - // Increment ref to ensure 'self' stays alive throughout the function - self.ref_(); - let _d = deref_guard(self); - // Release the keep-alive ref from add_timer; remove_timer/stop_timers skip FIRED timers. - // SAFETY: `_d` holds a balancing ref so the count stays > 0 and `self` - // remains live past this call. - unsafe { JSValkeyClient::deref(std::ptr::from_ref(self).cast_mut()) }; + // Adopt the keep-alive ref add_timer took (remove_timer/stop_timers + // skip FIRED timers); it keeps `self` alive until scope end. + // SAFETY: the FIRED timer's unreleased ref is owned by this fire. + let _timer_ref = unsafe { bun_ptr::ScopedRef::adopt(std::ptr::from_ref(self).cast_mut()) }; if self.client.get().flags.failed { return; } @@ -1198,13 +1173,10 @@ impl JSValkeyClient { self.reconnect_timer .with_mut(|t| t.state = Timer::State::FIRED); - // Increment ref to ensure 'self' stays alive throughout the function - self.ref_(); - let _d = deref_guard(self); - // Release the keep-alive ref from add_timer; remove_timer/stop_timers skip FIRED timers. - // SAFETY: `_d` holds a balancing ref so the count stays > 0 and `self` - // remains live past this call. - unsafe { JSValkeyClient::deref(std::ptr::from_ref(self).cast_mut()) }; + // Adopt the keep-alive ref add_timer took (remove_timer/stop_timers + // skip FIRED timers); it keeps `self` alive until scope end. + // SAFETY: the FIRED timer's unreleased ref is owned by this fire. + let _timer_ref = unsafe { bun_ptr::ScopedRef::adopt(std::ptr::from_ref(self).cast_mut()) }; // Execute reconnection logic self.reconnect(); @@ -1220,10 +1192,6 @@ impl JSValkeyClient { return; } - // Ref to keep this alive during the reconnection - self.ref_(); - let _d = deref_guard(self); - // Ref the poll to keep event loop alive during connection self.poll_ref.with_mut(|r| { r.disable(); @@ -1254,14 +1222,11 @@ impl JSValkeyClient { // we should always have a strong reference to the object here debug_assert!(self.this_value.get().is_strong()); - let self_ptr = self.as_ctx_ptr(); - let _defer = scopeguard::guard(self_ptr, |p| { - // SAFETY: `p` was `self.as_ctx_ptr()` at guard creation; the caller - // holds an intrusive ref across this scope so `*p` is live here. - unsafe { - (*p).client_mut().on_writable(); - (*p).update_poll_ref(); - } + // `BackRef` (Copy + Deref) detaches the borrow; the core dispatch + // guard keeps the owner alive across this scope. + let _defer = scopeguard::guard(BackRef::new(self), |p| { + p.client_mut().on_writable(); + p.update_poll_ref(); }); let global_object = self.global_object; let _exit = self.vm().enter_event_loop_scope(); @@ -1308,9 +1273,6 @@ impl JSValkeyClient { /// /// `SubscriptionCtx` will invoke this to communicate that it has added a new listener. pub fn on_new_subscription_callback_insert(&self) { - self.ref_(); - let _d = deref_guard(self); - self.client_mut().on_writable(); self.update_poll_ref(); } @@ -1319,9 +1281,6 @@ impl JSValkeyClient { debug_assert!(self.is_subscriber()); debug_assert!(self.this_value.get().is_strong()); - self.ref_(); - let _d = deref_guard(self); - let _ = value; self.client_mut().on_writable(); @@ -1393,32 +1352,17 @@ impl JSValkeyClient { if delay_ms > 0 { self.add_timer(&self.reconnect_timer, delay_ms); } - - // Release the keep-alive ref `connect()` took for the just-closed - // socket. We only reach here from `ValkeyClient::on_close()`'s reconnect - // branch, which (unlike its other branches) does not call - // `on_valkey_close()` and so never balances that ref. The reconnect - // timer (and the next `connect()`) take their own refs, so without this - // every retry leaks one ref and the client is never freed. - // SAFETY: caller (`SocketHandler::on_close`/`on_connect_error`) holds a - // scoped ref across this call, so the count stays > 0. - unsafe { JSValkeyClient::deref(std::ptr::from_ref(self).cast_mut()) }; + // The socket's owner ref is released by the core after the terminal + // callback returns — no compensation deref here. } // Callback for when Valkey client closes pub fn on_valkey_close(&self) -> JsTerminatedResult<()> { let global_object = self.global_object; - let self_ptr = self.as_ctx_ptr(); - let _defer = scopeguard::guard(self_ptr, |p| { - // SAFETY: `p` was `self.as_ctx_ptr()`; the socket dispatch path - // holds an intrusive ref across this scope so `*p` is live here. - // The trailing `deref` releases that ref. - unsafe { - (*p).update_poll_ref(); - JSValkeyClient::deref(p); - } - }); + // The socket's owner ref is released by the core after the terminal + // callback returns; only the poll-ref refresh remains here. + let _defer = scopeguard::guard(BackRef::new(self), |p| p.update_poll_ref()); let Some(this_jsvalue) = self.this_value.get().try_get() else { return Ok(()); @@ -1491,30 +1435,24 @@ impl JSValkeyClient { return; } - self.ref_(); // socket close can potentially call JS so we need to enqueue the deinit struct Holder { - // BACKREF — JSValkeyClient is intrusively ref-counted (RefCount + @fieldParentPtr - // recovery in SubscriptionCtx::parent). The `self.ref_()` above / `(*ctx).deref()` - // in run() keep it alive across the task hop. - ctx: *const JSValkeyClient, + // Owned strong ref: keeps the client alive across the task hop; + // released in run() after the close. + ctx: uws::OwnerRef, task: jsc::AnyTask::AnyTask, } impl Holder { fn run(self_: *mut Holder) { - // SAFETY: allocated via heap::alloc below; reclaimed here. + // SAFETY: allocated via heap::into_raw below; reclaimed here. let self_ = unsafe { bun_core::heap::take(self_) }; - let ctx = self_.ctx; - // SAFETY: single-threaded; intrusive ref taken before enqueue guarantees liveness. - unsafe { - (*ctx).client_mut().close(); - JSValkeyClient::deref(ctx.cast_mut()); - } + self_.ctx.data().client_mut().close(); + self_.ctx.deref(); // self_ dropped here (Box freed). } } let holder = bun_core::heap::into_raw(Box::new(Holder { - ctx: self.as_ctx_ptr(), + ctx: self.owner_ref(), task: jsc::AnyTask::AnyTask::default(), // overwritten below })); // SAFETY: holder just allocated; closure captures nothing so it coerces @@ -1536,11 +1474,12 @@ impl JSValkeyClient { } pub fn finalize(self: Box) { - // Refcounted: `deref_guard` releases the JS wrapper's +1 at scope end; + // Refcounted: adopt the JS wrapper's +1 and release it at scope end; // allocation may outlive this call if other refs remain, so hand // ownership back to the raw refcount. let this: &Self = bun_core::heap::release(self); - let _d = deref_guard(this); + // SAFETY: this finalize owns the JS wrapper's ref; the guard consumes it. + let _js_ref = unsafe { bun_ptr::ScopedRef::adopt(std::ptr::from_ref(this).cast_mut()) }; this.stop_timers(); this.this_value.with_mut(|t| t.finalize()); @@ -1566,9 +1505,6 @@ impl JSValkeyClient { fn connect(&self) -> Result<(), crate::Error> { self.client_mut().flags.needs_to_open_socket = false; - self.ref_(); - let _d = deref_guard(self); - let is_tls = self.client.get().tls != valkey::TLS::None; // `vm.rare_data()` needs `&mut VirtualMachine`; `client.vm` // is `&'static`. Cast through raw — the per-thread VM is single-owner @@ -1602,7 +1538,10 @@ impl JSValkeyClient { // SAFETY: per-thread `RuntimeState`; `ssl_ctx_cache` has a // stable address for the VM's lifetime, JS-thread-only. let cache = unsafe { &mut (*state).ssl_ctx_cache }; - self._secure.set(cache.get_or_create(custom, &mut err)); + // bun_usockets::SslCtx and bun_boringssl's SSL_CTX are the same + // C object behind distinct bindgen nominals; cross opaquely. + self._secure + .set(cache.get_or_create(custom, &mut err).map(|p| p.cast())); } self._secure.get().is_none() } else { @@ -1622,53 +1561,36 @@ impl JSValkeyClient { valkey::TLS::None => None, valkey::TLS::Enabled => { // SAFETY: `vm_ptr` is the live per-thread VM (see above). - Some(unsafe { crate::jsc_hooks::default_client_ssl_ctx(vm_ptr) }) + Some(unsafe { crate::jsc_hooks::default_client_ssl_ctx(vm_ptr) }.cast()) } valkey::TLS::Custom(_) => Some(self._secure.get().unwrap()), }; - self.ref_(); - // Balance the ref above if connect() throws — the caller (e.g. send()) - // only knows to clean up its own state, not the keep-alive ref. - let self_ptr = self.as_ctx_ptr(); - let errdefer_deref = scopeguard::guard(self_ptr, |p| { - // SAFETY: balances the `ref_()` just taken; `*p` is live until this - // guard releases that ref on early return. - unsafe { JSValkeyClient::deref(p) } - }); self.client_mut().status = valkey::Status::Connecting; self.update_poll_ref(); - let errdefer_status = scopeguard::guard(self_ptr, |p| { - // SAFETY: `p` was `self.as_ctx_ptr()`; `errdefer_deref` (dropped - // after this guard) still holds the balancing ref, so `*p` is live. - unsafe { - (*p).client_mut().status = valkey::Status::Disconnected; - (*p).update_poll_ref(); - } - }); - // The socket ext slot is typed `ExtSlot` - // (uws_handlers.rs `Valkey = NsHandler`); store - // the OUTER pointer, not the inner `ValkeyClient`, or dispatch will - // mis-type and re-offset it (`on_open` → `this.client_mut()` adds - // `offsetof(JSValkeyClient, client)` again → garbage `&mut ValkeyClient`). - // Reshaped for borrowck — `address` is a field of `client`; go through a - // raw pointer. `Address::connect` only reads host/path bytes and forwards - // `owner_ptr` opaquely (no overlapping write). - let owner_ptr: *mut JSValkeyClient = std::ptr::from_ref::(self).cast_mut(); - let client_ptr: *mut valkey::ValkeyClient = self.client.as_ptr(); - // SAFETY: `client_ptr` is live; `group` is the lazy-initialised per-VM - // `SocketGroup` (stable for the VM's lifetime). `ssl_ctx` is a +1-ref - // BoringSSL `SSL_CTX*` (or None) forwarded opaquely to usockets. - let socket = unsafe { - (*client_ptr) + // Owner attach (Protocol v2): transfer one strong ref to the core; it + // is released exactly once at the socket's terminal (on_close / + // on_connect_error / silent SEMI_SOCKET close), or before + // `Address::connect` returns on failure. + let owner = self.owner_ref(); + // SAFETY: `group` is the lazy-initialised per-VM `SocketGroup` (stable + // for the VM's lifetime), only touched here on the JS thread. + let result = + self.client + .get() .address - .connect(owner_ptr, &mut *group, ssl_ctx, is_tls) - }?; - self.client_mut().socket = socket; - // Disarm errdefers on success. - scopeguard::ScopeGuard::into_inner(errdefer_status); - scopeguard::ScopeGuard::into_inner(errdefer_deref); - Ok(()) + .connect(owner, unsafe { &mut *group }, ssl_ctx, is_tls); + match result { + Ok(socket) => { + self.client_mut().socket = socket; + Ok(()) + } + Err(err) => { + self.client_mut().status = valkey::Status::Disconnected; + self.update_poll_ref(); + Err(err) + } + } } pub fn send( @@ -1736,7 +1658,7 @@ impl JSValkeyClient { debug_assert!(this_ref.client.get().socket.is_closed()); if let Some(s) = this_ref._secure.get() { // SAFETY: SSL_CTX is C-refcounted; this releases our ref. - unsafe { boringssl::c::SSL_CTX_free(s) }; + unsafe { boringssl::c::SSL_CTX_free(s.cast()) }; } this_ref.client_mut().shutdown(None); this_ref.poll_ref.with_mut(|r| r.disable()); @@ -1834,42 +1756,83 @@ impl JSValkeyClient { // linked into the build. // ─────────────────────────────────────────────────────────────────────────── -// SocketHandler +// ValkeyProtocol // ─────────────────────────────────────────────────────────────────────────── -/// uWS socket-event handler for the Valkey client (kind = `.valkey[_tls]`). -pub struct SocketHandler; +/// Protocol v2 socket handler for the Valkey client (kinds +/// `Valkey`/`ValkeyTls`). The core trampoline holds a strong owner ref across +/// every callback and releases the socket's owner ref after the terminal, so +/// no ref bracketing or ext bookkeeping happens here. +pub struct ValkeyProtocol; -// Inherent associated types are unstable in Rust, so use a module-level alias -// and refer to it as `SocketType` inside the impl. -type SocketType = uws::NewSocketHandler; +impl uws::Protocol for ValkeyProtocol { + type Owner = JSValkeyClient; + const KIND: uws::SocketKind = uws::SocketKind::Valkey; + const KIND_TLS: Option = Some(uws::SocketKind::ValkeyTls); -impl SocketHandler { - fn _socket(s: SocketType) -> Socket { - // `NewSocketHandler` only differs by const generic; the - // `socket` field is identical. Re-wrap the inner `InternalSocket` into - // the right `AnySocket` variant. - if SSL { - Socket::SocketTls(uws::SocketTLS { socket: s.socket }) - } else { - Socket::SocketTcp(uws::SocketTCP { socket: s.socket }) - } + fn on_open(this: &JSValkeyClient, s: Socket, _is_client: bool, _ip: &[u8]) { + // `ValkeyClient::on_open` re-stamps `client.socket` itself. + let _ = this.client_mut().on_open(s); // TODO: properly propagate exception upwards + } + + fn on_handshake(this: &JSValkeyClient, _s: Socket, ok: bool, err: uws::VerifyError) { + let _ = Self::handshake_impl(this, ok, err); // TODO: properly propagate exception upwards + } + + fn on_close(this: &JSValkeyClient, _s: Socket, _code: uws::CloseCode2, _errno: i32) { + debug!("Socket closed."); + // Ensure the socket pointer is updated. + this.client_mut().socket = Socket::SocketTcp(uws::SocketTCP::detached()); + let _defer = scopeguard::guard(BackRef::new(this), |p| { + p.client_mut().status = valkey::Status::Disconnected; + p.update_poll_ref(); + }); + let _ = this.client_mut().on_close(); // TODO: properly propagate exception upwards + } + + // `on_end` keeps the trait's no-op default: half-opened sockets are not + // allowed, so usockets always dispatches on_close afterwards. + + fn on_connect_error(this: &JSValkeyClient, _err: uws::ConnectFailure) { + // Core closed the failed socket before this notify (C5); drop the + // stale handle. + this.client_mut().socket = Socket::SocketTcp(uws::SocketTCP::detached()); + let _defer = scopeguard::guard(BackRef::new(this), |p| { + p.client_mut().status = valkey::Status::Disconnected; + p.update_poll_ref(); + }); + let _ = this.client_mut().on_close(); // TODO: properly propagate exception upwards } - pub fn on_open(this: &JSValkeyClient, socket: SocketType) -> JsTerminatedResult<()> { - this.client_mut().socket = Self::_socket(socket); - narrow_terminated(this.client_mut().on_open(Self::_socket(socket))) + fn on_timeout(this: &JSValkeyClient, s: Socket) { + debug!("Socket timed out."); + this.client_mut().socket = s; + // Handle socket timeout } - pub fn on_handshake_( + fn on_data(this: &JSValkeyClient, s: Socket, data: &mut [u8]) { + // Ensure the socket pointer is updated. + this.client_mut().socket = s; + let _ = this.client_mut().on_data(data); // TODO: properly propagate exception upwards + this.update_poll_ref(); + } + + fn on_writable(this: &JSValkeyClient, s: Socket) { + this.client_mut().socket = s; + this.client_mut().on_writable(); + this.update_poll_ref(); + } +} + +impl ValkeyProtocol { + fn handshake_impl( this: &JSValkeyClient, - _socket: SocketType, - success: i32, + handshake_success: bool, ssl_error: uws::us_bun_verify_error_t, ) -> JsTerminatedResult<()> { debug!( "onHandshake: {} error={} reason={} code={}", - success, + handshake_success, ssl_error.error_no, bstr::BStr::new( ssl_error @@ -1882,9 +1845,6 @@ impl SocketHandler { .map_or(b"no code" as &[u8], |c| c.to_bytes()) ), ); - let handshake_success = success == 1; - this.ref_(); - let _d = deref_guard(this.as_ctx_ptr()); let _update = scopeguard::guard(BackRef::new(this), |p| p.update_poll_ref()); let vm = this.client.get().vm; if handshake_success { @@ -1997,98 +1957,6 @@ impl SocketHandler { .fail_with_js_value(&this.global_object, err_value), ) } - - // `pub const onHandshake = if (ssl) onHandshake_ else null;` - pub const ON_HANDSHAKE: Option< - fn( - &JSValkeyClient, - SocketType, - i32, - uws::us_bun_verify_error_t, - ) -> JsTerminatedResult<()>, - > = if SSL { Some(Self::on_handshake_) } else { None }; - - pub fn on_close( - this: &JSValkeyClient, - _socket: SocketType, - _code: i32, - _reason: Option<*mut c_void>, - ) { - // No need to deref since this.client.on_close() invokes on_valkey_close which does deref. - - debug!("Socket closed."); - this.ref_(); - // Ensure the socket pointer is updated. - this.client_mut().socket = Socket::SocketTcp(uws::SocketTCP::detached()); - let this_ptr = this.as_ctx_ptr(); - let _defer = scopeguard::guard(this_ptr, |p| { - // SAFETY: `p` was `this.as_ctx_ptr()`; the `ref_()` taken above - // keeps `*p` live until this guard's `deref` releases it. - unsafe { - (*p).client_mut().status = valkey::Status::Disconnected; - (*p).update_poll_ref(); - JSValkeyClient::deref(p); - } - }); - - let _ = this.client_mut().on_close(); // TODO: properly propagate exception upwards - } - - pub fn on_end(this: &JSValkeyClient, socket: SocketType) { - let _ = this; - let _ = socket; - - // Half-opened sockets are not allowed. - // usockets will always call onClose after onEnd in this case so we don't need to do - // anything here - } - - pub fn on_connect_error( - this: &JSValkeyClient, - _socket: SocketType, - _code: i32, - ) -> JsTerminatedResult<()> { - // Ensure the socket pointer is updated. - this.client_mut().socket = Socket::SocketTcp(uws::SocketTCP::detached()); - this.ref_(); - let this_ptr = this.as_ctx_ptr(); - let _defer = scopeguard::guard(this_ptr, |p| { - // SAFETY: `p` was `this.as_ctx_ptr()`; the `ref_()` taken above - // keeps `*p` live until this guard's `deref` releases it. - unsafe { - (*p).client_mut().status = valkey::Status::Disconnected; - (*p).update_poll_ref(); - JSValkeyClient::deref(p); - } - }); - - narrow_terminated(this.client_mut().on_close()) - } - - pub fn on_timeout(this: &JSValkeyClient, socket: SocketType) { - debug!("Socket timed out."); - - this.client_mut().socket = Self::_socket(socket); - // Handle socket timeout - } - - pub fn on_data(this: &JSValkeyClient, socket: SocketType, data: &[u8]) { - // Ensure the socket pointer is updated. - this.client_mut().socket = Self::_socket(socket); - - this.ref_(); - let _d = deref_guard(this); - let _ = this.client_mut().on_data(data); // TODO: properly propagate exception upwards - this.update_poll_ref(); - } - - pub fn on_writable(this: &JSValkeyClient, socket: SocketType) { - this.client_mut().socket = Self::_socket(socket); - this.ref_(); - let _d = deref_guard(this); - this.client_mut().on_writable(); - this.update_poll_ref(); - } } // ─────────────────────────────────────────────────────────────────────────── diff --git a/src/runtime/valkey_jsc/mod.rs b/src/runtime/valkey_jsc/mod.rs index 20b86bef4547..b325e7f5e1e0 100644 --- a/src/runtime/valkey_jsc/mod.rs +++ b/src/runtime/valkey_jsc/mod.rs @@ -14,7 +14,7 @@ use crate::jsc::{JSGlobalObject, JSValue}; pub mod valkey; // ValkeyClient state machine, fail/reject paths, auto-flush #[path = "js_valkey.rs"] -pub mod js_valkey; // JSValkeyClient host fns, SocketHandler, constructor +pub mod js_valkey; // JSValkeyClient host fns, ValkeyProtocol, constructor #[path = "js_valkey_functions.rs"] pub mod js_valkey_functions; // 200+ prototype methods (get/set/hget/…) diff --git a/src/runtime/valkey_jsc/valkey.rs b/src/runtime/valkey_jsc/valkey.rs index 8af08821c23f..c8a339da673f 100644 --- a/src/runtime/valkey_jsc/valkey.rs +++ b/src/runtime/valkey_jsc/valkey.rs @@ -6,7 +6,7 @@ use bun_collections::VecExt; use bun_collections::OffsetByteList; use bun_jsc::virtual_machine::VirtualMachine; use bun_jsc::{GlobalRef, JSGlobalObject, JSPromise, JSValue, JsResult}; -use bun_uws::{self as uws, AnySocket, SocketGroup, SocketKind, SslCtx}; +use bun_usockets::{self as uws, AnySocket, SocketGroup, SocketKind, SslCtx}; use bun_valkey::valkey_protocol as protocol; use bun_valkey::valkey_protocol::{RESPValue, RedisError}; @@ -195,27 +195,28 @@ impl Address { } } - /// Open a TCP/TLS/Unix socket via - /// `uws::Socket{TLS,TCP}::connect_*_group`. - /// - /// `Owner` is the userdata pointer stashed in the socket ext (the - /// `JSValkeyClient` parent in practice — that's what `SocketHandler` - /// pulls back out on event dispatch). Generic so the caller controls the - /// stored type; this fn only forwards it opaquely to `connect_*_group`. - pub(crate) fn connect( + /// Open a TCP/TLS/Unix socket via `uws::Socket{TLS,TCP}::connect_*_owned` + /// (Protocol v2). `owner` transfers one strong ref to the core, which + /// releases it exactly once at the socket's terminal (on_close / + /// on_connect_error / silent SEMI_SOCKET close). On failure the core + /// releases it before returning. + pub(crate) fn connect( &self, - owner: *mut Owner, + owner: uws::OwnerRef, group: &mut SocketGroup, ssl_ctx: Option<*mut SslCtx>, is_tls: bool, - ) -> Result { + ) -> Result + where + O: bun_ptr::RefCounted + 'static, + { if is_tls { let kind = SocketKind::ValkeyTls; let sock = match self { Address::Unix(path) => { - uws::SocketTLS::connect_unix_group(group, kind, ssl_ctx, path, owner, false)? + uws::SocketTLS::connect_unix_owned(group, kind, ssl_ctx, path, owner, false)? } - Address::Host { host, port } => uws::SocketTLS::connect_group( + Address::Host { host, port } => uws::SocketTLS::connect_owned( group, kind, ssl_ctx, @@ -230,9 +231,9 @@ impl Address { let kind = SocketKind::Valkey; let sock = match self { Address::Unix(path) => { - uws::SocketTCP::connect_unix_group(group, kind, ssl_ctx, path, owner, false)? + uws::SocketTCP::connect_unix_owned(group, kind, ssl_ctx, path, owner, false)? } - Address::Host { host, port } => uws::SocketTCP::connect_group( + Address::Host { host, port } => uws::SocketTCP::connect_owned( group, kind, ssl_ctx, @@ -417,8 +418,6 @@ impl ValkeyClient { return false; } - self.ref_(); - // Start draining the command queue let mut total_bytelength: usize = 0; @@ -462,8 +461,6 @@ impl ValkeyClient { let have_more = self.queue.readable_length() > 0; self.auto_flusher.registered.set(have_more); - self.deref(); - // Return true if we should schedule another flush have_more } @@ -642,16 +639,9 @@ impl ValkeyClient { if socket.is_closed() { return; } - // usockets does not dispatch `on_close`/`on_connect_error` when an - // application explicitly closes a `us_socket_t` whose TCP connect - // hasn't resolved yet (`POLL_TYPE_SEMI_SOCKET` — DNS resolved - // synchronously so `connect()` got a real `us_socket_t*` rather than - // a `us_connecting_socket_t*`). See `us_internal_socket_close_raw`. - // The valkey client relies on one of those callbacks (via - // `on_valkey_close`/`on_valkey_reconnect`) to release the `+1` - // keep-alive ref `connect()` took, so without one the - // `JSValkeyClient` box leaks. Detect a SEMI_SOCKET before closing - // and run the close path ourselves afterwards. + // Explicitly closing a SEMI_SOCKET dispatches no on_close (contract + // C1). The core releases its owner ref on that silent close; the + // behavioral half (settle promises, fire onclose) is replayed here. let is_semi_socket = matches!(socket.socket(), uws::InternalSocket::Connected(_)) && !socket.is_established(); socket.close(uws::CloseCode::Normal); @@ -749,8 +739,6 @@ impl ValkeyClient { } /// Process data received from socket - /// - /// Caller refs / derefs. pub fn on_data(&mut self, data: &[u8]) -> JsTerminated<()> { debug!( "Low-level onData called with {} bytes: {}", @@ -1354,9 +1342,7 @@ impl ValkeyClient { } pub fn on_writable(&mut self) { - self.ref_(); self.send_next_command(); - self.deref(); } fn enqueue( @@ -1509,19 +1495,6 @@ impl ValkeyClient { Ok(data.len()) } - /// Increment reference count - pub fn ref_(&mut self) { - self.parent().ref_(); - } - - pub fn deref(&mut self) { - let parent = std::ptr::from_ref(self.parent()).cast_mut(); - // SAFETY: only called in balanced `ref_()`/`deref()` pairs - // (`on_auto_flush`, `on_writable`), so the count stays > 0 and the - // outer `&mut self` protector is never invalidated by deallocation. - unsafe { JSValkeyClient::deref(parent) }; - } - #[inline] fn global_object(&mut self) -> GlobalRef { self.parent().global_object diff --git a/src/runtime/webcore/CookieMap.rs b/src/runtime/webcore/CookieMap.rs index 0a109ab74104..2fe346b12e7d 100644 --- a/src/runtime/webcore/CookieMap.rs +++ b/src/runtime/webcore/CookieMap.rs @@ -2,7 +2,7 @@ use core::ffi::c_void; use core::ptr::NonNull; use bun_jsc::{JSGlobalObject, JsResult}; -use bun_uws::ResponseKind; +use bun_uws_shim::ResponseKind; bun_opaque::opaque_ffi! { /// Opaque FFI handle. Always used behind a pointer (`*mut CookieMap`). diff --git a/src/runtime/webcore/FileReader.rs b/src/runtime/webcore/FileReader.rs index 2cb0fba6f932..ce1218594f5e 100644 --- a/src/runtime/webcore/FileReader.rs +++ b/src/runtime/webcore/FileReader.rs @@ -289,7 +289,7 @@ bun_io::impl_buffered_reader_parent! { let ev = (&*this).event_loop.get(); // The event loop is a libuv // `uv_loop_t*` on Windows. `.cast()` reconciles the impl-declared - // `bun_uws_sys::Loop` nominal with `bun_io::Loop` (= `uv::Loop`). + // `bun_usockets::Loop` nominal with `bun_io::Loop` (= `uv::Loop`). #[cfg(windows)] { ev.uv_loop().cast() } #[cfg(not(windows))] { ev.r#loop() } }; diff --git a/src/runtime/webcore/Request.rs b/src/runtime/webcore/Request.rs index 0e2f9e667c8c..616065ca642e 100644 --- a/src/runtime/webcore/Request.rs +++ b/src/runtime/webcore/Request.rs @@ -32,7 +32,7 @@ use bun_jsc::AbortSignalRef; use bun_jsc::StringJsc as _; use bun_jsc::generated::JSRequest as js_gen; use bun_ptr::weak_ptr::WeakPtrData; -use bun_uws as uws; +use bun_uws_shim as uws; use core::mem::ManuallyDrop; impl bun_ptr::weak_ptr::HasWeakPtrData for Request { @@ -376,21 +376,21 @@ impl Request { + self.body_value().memory_cost() } - #[bun_uws::uws_callback(export = "Request__setCookiesOnRequestContext")] + #[bun_uws_shim::uws_callback(export = "Request__setCookiesOnRequestContext")] pub fn ffi_set_cookies_on_request_context(&self, cookie_map: Option<&CookieMap>) { self.request_context .set_cookies(cookie_map.map(|c| std::ptr::from_ref::(c).cast_mut())); } /// C++ treats the returned pointer as borrowed for the request handler's lifetime. - #[bun_uws::uws_callback(export = "Request__getUWSRequest", no_catch)] + #[bun_uws_shim::uws_callback(export = "Request__getUWSRequest", no_catch)] pub fn ffi_get_uws_request(&self) -> *mut uws::Request { self.request_context .get_request() .unwrap_or(core::ptr::null_mut()) } - #[bun_uws::uws_callback(export = "Request__setInternalEventCallback")] + #[bun_uws_shim::uws_callback(export = "Request__setInternalEventCallback")] pub fn ffi_set_internal_event_callback(&self, callback: JSValue, global_this: &JSGlobalObject) { self.internal_event_callback .set(InternalJSEventCallback::init(callback, global_this)); @@ -398,7 +398,7 @@ impl Request { self.request_context.enable_timeout_events(); } - #[bun_uws::uws_callback(export = "Request__setTimeout")] + #[bun_uws_shim::uws_callback(export = "Request__setTimeout")] pub fn ffi_set_timeout(&self, seconds: JSValue, global_this: &JSGlobalObject) { if !seconds.is_number() { let _ = global_this.throw(format_args!( @@ -415,7 +415,7 @@ impl Request { /// `BunRequest.prototype.clone` (the `Bun.serve` `routes:` subclass) goes /// through `JSBunRequest::clone` -> here, not through [`Self::do_clone`], /// so it needs the same fetch-spec step-1 usability check. - #[bun_uws::uws_callback(export = "Request__clone")] + #[bun_uws_shim::uws_callback(export = "Request__clone")] pub fn ffi_clone(&self, global_this: &JSGlobalObject) -> Option> { self.throw_if_body_unusable(global_this).ok()?; self.clone(global_this).ok() @@ -424,7 +424,7 @@ impl Request { /// `JSBunRequest::clone` tail: mirror [`Self::do_clone`]'s cache sync so a /// `routes:` handler that observed `.body` before cloning gets a fresh tee /// branch from the next `.body` read instead of the locked tee source. - #[bun_uws::uws_callback(export = "Request__syncClonedBodyStreamCaches")] + #[bun_uws_shim::uws_callback(export = "Request__syncClonedBodyStreamCaches")] pub fn ffi_sync_cloned_body_stream_caches( &self, global_this: &JSGlobalObject, @@ -508,7 +508,7 @@ impl Request { .map(Some) } - #[bun_uws::uws_callback(export = "Bun__JSRequest__calculateEstimatedByteSize")] + #[bun_uws_shim::uws_callback(export = "Bun__JSRequest__calculateEstimatedByteSize")] pub fn calculate_estimated_byte_size(&self) { self.reported_estimated_size.set( self.body_value().estimated_size() diff --git a/src/runtime/webcore/fetch/FetchTasklet.rs b/src/runtime/webcore/fetch/FetchTasklet.rs index 49d58f794778..aa9b68baaca2 100644 --- a/src/runtime/webcore/fetch/FetchTasklet.rs +++ b/src/runtime/webcore/fetch/FetchTasklet.rs @@ -350,19 +350,20 @@ impl FetchTasklet { self.sink.map(|p| unsafe { &mut *p }) } - /// Mutable access to the request-body streaming buffer while `Some` (this + /// Shared access to the request-body streaming buffer while `Some` (this /// side holds one of the two initial intrusive refs from /// `ThreadSafeStreamBuffer::new`; released in `clear_sink`). Detached /// lifetime so the borrow does not conflict with disjoint `&mut self` /// access at call sites — the buffer lives in a separate heap allocation - /// shared with the HTTP thread (mutex-guarded internally). + /// shared with the HTTP thread. Shared (never `&mut`): the HTTP thread + /// holds concurrent `&Self` borrows; the byte buffer is behind its lock. #[inline] - fn stream_buffer_mut<'r>(&self) -> Option<&'r mut ThreadSafeStreamBuffer> { - // SAFETY: see doc comment — counted ref keeps pointee live; mutex - // inside `ThreadSafeStreamBuffer` serialises cross-thread `buffer` + fn stream_buffer_ref<'r>(&self) -> Option<&'r ThreadSafeStreamBuffer> { + // SAFETY: see doc comment — counted ref keeps pointee live; the lock + // inside `ThreadSafeStreamBuffer` serialises cross-thread buffer // access, and `callback` is main-thread-only. self.request_body_streaming_buffer - .map(|p| unsafe { &mut *p.as_ptr() }) + .map(|p| unsafe { &*p.as_ptr() }) } pub(crate) fn ref_(&self) { @@ -817,7 +818,7 @@ impl FetchTasklet { // request slot until the idle timeout. if self.result.certificate_info.take().is_some() { if let Some(http_) = self.http.as_mut() { - http::http_thread().schedule_shutdown(http_); + http::HTTPThread::schedule_shutdown(http_); } } self.mutex.unlock(); @@ -967,7 +968,7 @@ impl FetchTasklet { // the connection already closed/failed the resume is a no-op // (keyed through the abort tracker). if let Some(http_) = self.http.as_mut() { - http::http_thread().schedule_cert_check_resume(http_); + http::HTTPThread::schedule_cert_check_resume(http_); } // Fall through. The common case (certificate-only update) returns // at the metadata-less early return below; the #27275 coalesced @@ -1223,7 +1224,7 @@ impl FetchTasklet { // Empty or unparseable certificate bytes: every false return must have // scheduled the parked socket's shutdown, like the paths above. if let Some(http_) = self.http.as_mut() { - http::http_thread().schedule_shutdown(http_); + http::HTTPThread::schedule_shutdown(http_); } self.result.fail = Some(http::Error::ERR_TLS_CERT_ALTNAME_INVALID); false @@ -1603,7 +1604,7 @@ impl FetchTasklet { // and if the server doesn't close the connection by itself // and doesn't send any follow-up data // then we must make sure the HTTP thread flushes. - http::http_thread().schedule_receive_resume(http_.async_http_id); + http::HTTPThread::schedule_receive_resume(http_.async_http_id); } this.mutex.lock(); @@ -1682,7 +1683,7 @@ impl FetchTasklet { fn schedule_receive_resume(&self) { if let Some(http_) = self.http.as_ref() { - http::http_thread().schedule_receive_resume(http_.async_http_id); + http::HTTPThread::schedule_receive_resume(http_.async_http_id); } } @@ -2106,7 +2107,7 @@ impl FetchTasklet { Ok(fetch_tasklet_ptr) } - #[bun_uws::uws_callback] + #[bun_uws_shim::uws_callback] pub(crate) fn abort_listener(&mut self, reason: JSValue) { bun_output::scoped_log!(FetchTasklet, "abortListener"); let this = self; @@ -2199,7 +2200,7 @@ impl FetchTasklet { Some(sink) => sink.high_water_mark() as usize, None => 16384, }; - let Some(thread_safe_stream_buffer) = self.stream_buffer_mut() else { + let Some(thread_safe_stream_buffer) = self.stream_buffer_ref() else { return ResumableSinkBackpressure::Done; }; // Mutex guards `buffer` against the HTTP thread; released when @@ -2235,7 +2236,7 @@ impl FetchTasklet { if needs_schedule { // wakeup the http thread to write the data - http::http_thread().schedule_request_write( + http::HTTPThread::schedule_request_write( self.http.as_mut().unwrap(), http::http_thread::WriteMessageType::Data, ); @@ -2261,7 +2262,7 @@ impl FetchTasklet { } else { if !self.skip_chunked_framing() { // Using chunked transfer encoding, send the terminating chunk - let Some(thread_safe_stream_buffer) = self.stream_buffer_mut() else { + let Some(thread_safe_stream_buffer) = self.stream_buffer_ref() else { // SAFETY: `this_ptr` derived from live `&mut self`; we hold a ref. FetchTasklet::deref(this_ptr); return; @@ -2272,9 +2273,17 @@ impl FetchTasklet { .lock() .write(http::END_OF_CHUNKED_HTTP1_1_ENCODING_RESPONSE_BODY); // OOM/capacity: fire-and-forget } + // Sticky marker before the wake-up: the HTTP thread drops the End + // message when the request has no live stream/socket yet (queued + // task, h2 pending_attach); senders re-check via Stream::sync_ended. + if let Some(buf) = self.stream_buffer_ref() { + buf.mark_ended(); + } if let Some(http_) = self.http.as_mut() { - http::http_thread() - .schedule_request_write(http_, http::http_thread::WriteMessageType::End); + http::HTTPThread::schedule_request_write( + http_, + http::http_thread::WriteMessageType::End, + ); } } // SAFETY: `this_ptr` derived from live `&mut self`; we hold a ref. @@ -2291,7 +2300,7 @@ impl FetchTasklet { self.tracker.did_cancel(&self.global_this); if let Some(http_) = self.http.as_mut() { - http::http_thread().schedule_shutdown(http_); + http::HTTPThread::schedule_shutdown(http_); } } @@ -2463,7 +2472,7 @@ impl FetchTasklet { // until the idle timeout. if task_ref.result.certificate_info.take().is_some() { if let Some(http_) = task_ref.http.as_mut() { - http::http_thread().schedule_shutdown(http_); + http::HTTPThread::schedule_shutdown(http_); } } // We won the `has_schedule_callback` CAS above but are not @@ -2506,7 +2515,7 @@ impl FetchTasklet { } impl FetchTasklet { - #[bun_uws::uws_callback(export = "Bun__FetchResponse_finalize", no_catch)] + #[bun_uws_shim::uws_callback(export = "Bun__FetchResponse_finalize", no_catch)] pub(crate) fn on_response_finalize(&mut self) { bun_output::scoped_log!(FetchTasklet, "onResponseFinalize"); let this = self; diff --git a/src/runtime/webcore/s3/client.rs b/src/runtime/webcore/s3/client.rs index b63d9a883161..3b6b5db2f68f 100644 --- a/src/runtime/webcore/s3/client.rs +++ b/src/runtime/webcore/s3/client.rs @@ -1211,7 +1211,7 @@ pub fn readable_stream( // Wake the HTTP thread so it observes the abort even when the // socket is idle; otherwise the final `has_more == false` // callback never fires and both the task and wrapper leak. - bun_http::http_thread().schedule_shutdown_by_id((*task).async_http_id); + bun_http::HTTPThread::schedule_shutdown_by_id((*task).async_http_id); } } } diff --git a/src/runtime/webcore/streams.rs b/src/runtime/webcore/streams.rs index 0d86d23081bf..7e2d3f84a60f 100644 --- a/src/runtime/webcore/streams.rs +++ b/src/runtime/webcore/streams.rs @@ -10,7 +10,7 @@ use crate::webcore::jsc::{ use bun_collections::{ByteVecExt, VecExt}; use bun_core::{FeatureFlags, strings}; use bun_sys::{self as sys, Error as SysError, Fd}; -use bun_uws as uws; +use bun_uws_shim as uws; use crate::webcore::blob::Any as AnyBlob; use crate::webcore::sink::Sink; diff --git a/src/spawn/Cargo.toml b/src/spawn/Cargo.toml index 38baba7ce619..a7103f10b834 100644 --- a/src/spawn/Cargo.toml +++ b/src/spawn/Cargo.toml @@ -29,3 +29,6 @@ bun_spawn_sys.workspace = true bun_sys.workspace = true bun_threading.workspace = true bun_which.workspace = true + +[target.'cfg(windows)'.dependencies] +bun_usockets.workspace = true diff --git a/src/spawn/process.rs b/src/spawn/process.rs index a076c610e928..acfc555892eb 100644 --- a/src/spawn/process.rs +++ b/src/spawn/process.rs @@ -442,8 +442,7 @@ impl Process { let fd = unsafe { &mut *poll }; fd.enable_keeping_process_alive(ctx); - // SAFETY: `platform_event_loop` returns the live uws loop. - let loop_ = unsafe { &mut *self.event_loop.platform_event_loop() }; + let loop_ = self.event_loop.platform_event_loop(); match fd.register(loop_, bun_io::PollKind::Process, PROCESS_POLL_ONE_SHOT) { Ok(()) => { self.ref_(); @@ -473,8 +472,7 @@ impl Process { } if let Some(fd) = self.poller.fd_poll_mut() { - // SAFETY: `platform_event_loop` returns the live uws loop. - let loop_ = unsafe { &mut *self.event_loop.platform_event_loop() }; + let loop_ = self.event_loop.platform_event_loop(); let maybe = fd.register(loop_, bun_io::PollKind::Process, PROCESS_POLL_ONE_SHOT); if maybe.is_ok() { self.ref_(); @@ -2673,10 +2671,10 @@ mod spawn_process_body { // SAFETY: read-only field access between uv ticks; the uv exit // callback's `&mut Process` does not overlap this `&Process`. + // `loop_` is the live `uws::WindowsLoop*` from + // `EventLoopHandle::platform_event_loop`. while !unsafe { (*process).has_exited() } { - // SAFETY: `loop_` is the live `uws::WindowsLoop*` from - // `EventLoopHandle::platform_event_loop`. - unsafe { (*loop_).run() }; + bun_usockets::Loop::run(loop_); } Ok(Ok(Result { @@ -2770,9 +2768,9 @@ mod spawn_process_body { // SAFETY: read-only field access between uv ticks; callbacks fired // inside `tick()` write through the same `this_ptr` root. + // `loop_` wraps a live `uws::WindowsLoop*`. while unsafe { (*this_ptr).waiting_count } > 0 { - // SAFETY: `loop_` wraps a live `uws::WindowsLoop*`. - unsafe { (*loop_.platform_event_loop()).tick() }; + bun_usockets::Loop::tick(loop_.platform_event_loop()); } // SAFETY: loop drained (waiting_count == 0); no further uv callback diff --git a/src/sql_jsc/Cargo.toml b/src/sql_jsc/Cargo.toml index 9acbcce2b257..437ee6777048 100644 --- a/src/sql_jsc/Cargo.toml +++ b/src/sql_jsc/Cargo.toml @@ -38,5 +38,5 @@ bun_sha_hmac.workspace = true # gated until bun_runtime is green again. # bun_runtime.workspace = true bun_sql.workspace = true -bun_uws.workspace = true -bun_uws_sys.workspace = true +bun_usockets.workspace = true +bun_uws_shim.workspace = true diff --git a/src/sql_jsc/jsc.rs b/src/sql_jsc/jsc.rs index 86f1698eefd1..9e63f636349e 100644 --- a/src/sql_jsc/jsc.rs +++ b/src/sql_jsc/jsc.rs @@ -71,9 +71,7 @@ pub(crate) fn js_error_to_mysql(e: JsError) -> bun_sql::mysql::protocol::any_mys // directly). // ────────────────────────────────────────────────────────────────────────── -// `uws.us_bun_verify_error_t::toJS` — sunk to `bun_jsc::system_error` so both -// `bun_runtime` and this crate import the single canonical body (was -// triplicated across runtime/socket/uws_jsc, here, and PostgresSQLConnection). +// `uws.us_bun_verify_error_t::toJS` — canonical body is `bun_jsc::system_error`. pub use bun_jsc::system_error::verify_error_to_js; // ────────────────────────────────────────────────────────────────────────── @@ -82,7 +80,7 @@ pub use bun_jsc::system_error::verify_error_to_js; // Same layering note as `verify_error_to_js` above: canonical impl lives in // `bun_runtime::socket::uws_jsc::create_bun_socket_error_to_js`, but importing // it would cycle (`bun_runtime` depends on this crate). The body only needs -// `bun_uws` + `bun_boringssl_sys` + `bun_jsc` (all lower-tier), so it is hosted +// `bun_uws_shim` + `bun_boringssl_sys` + `bun_jsc` (all lower-tier), so it is hosted // here for the SQL connection `createInstance` paths. // ────────────────────────────────────────────────────────────────────────── @@ -120,10 +118,10 @@ fn boringssl_err_to_js(global: &JSGlobalObject, err_code: u32) -> JSValue { } pub(crate) fn create_bun_socket_error_to_js( - err: bun_uws::create_bun_socket_error_t, + err: bun_usockets::create_bun_socket_error_t, global: &JSGlobalObject, ) -> JSValue { - use bun_uws::create_bun_socket_error_t as E; + use bun_usockets::create_bun_socket_error_t as E; match err { // `us_ssl_ctx_from_options` only sets *err for the CA/cipher cases; // bad cert/key/DH return NULL with `.none` and the detail is on the @@ -219,9 +217,9 @@ pub struct SqlRuntimeHooks { /// `SSLContextCache::getOrCreateOpts` — digest-keyed weak `SSL_CTX*` cache. pub ssl_ctx_get_or_create: unsafe fn( cache: *mut c_void, - opts: &bun_uws::us_bun_socket_context_options_t, - err: &mut bun_uws::create_bun_socket_error_t, - ) -> *mut bun_uws::SslCtx, + opts: &bun_usockets::BunSocketContextOptions, + err: &mut bun_usockets::create_bun_socket_error_t, + ) -> *mut bun_uws_shim::SslCtx, /// `SSLConfig::fromJS` — parse a JS TLS-options object. Returns a boxed /// `bun_runtime::socket::SSLConfig` (caller frees via `ssl_config_free`), /// or null when the value contained no TLS config / threw (caller checks @@ -231,7 +229,7 @@ pub struct SqlRuntimeHooks { pub ssl_config_free: unsafe fn(*mut c_void), /// `SSLConfig::asUSocketsForClientVerification`. pub ssl_config_as_usockets_client: - unsafe fn(*const c_void) -> bun_uws::us_bun_socket_context_options_t, + unsafe fn(*const c_void) -> bun_usockets::BunSocketContextOptions, /// `SSLConfig.server_name` — null when unset. pub ssl_config_server_name: unsafe fn(*const c_void) -> *const c_char, /// `SSLConfig.reject_unauthorized`. @@ -280,13 +278,13 @@ pub(crate) trait VirtualMachineSqlExt { fn ssl_ctx_cache(&mut self) -> &mut SslCtxCache; /// bun_io::EventLoopCtx for the JS-thread VM, for KeepAlive::{ref_,unref}. fn vm_ctx(&self) -> bun_io::EventLoopCtx; - /// Lazy-init `RareData`'s per-protocol uws [`bun_uws::SocketGroup`]. + /// Lazy-init `RareData`'s per-protocol uws [`bun_usockets::SocketGroup`]. /// Encapsulates the `rare_data(&mut self)` / `*_group(.., &VirtualMachine)` /// borrowck conflict (the two borrows touch field-disjoint state) so the /// four call sites need no per-site raw-pointer dance. - fn postgres_socket_group(&mut self) -> &mut bun_uws::SocketGroup; + fn postgres_socket_group(&mut self) -> &mut bun_usockets::SocketGroup; /// See [`Self::postgres_socket_group`]. - fn mysql_socket_group(&mut self) -> &mut bun_uws::SocketGroup; + fn mysql_socket_group(&mut self) -> &mut bun_usockets::SocketGroup; // NOTE: `event_loop_mut` lives on `VirtualMachine` as a safe inherent // accessor (single audited deref under the JS-thread-singleton invariant); // the former unsafe trait shim here was dead — inherent methods always win @@ -317,7 +315,7 @@ impl VirtualMachineSqlExt for VirtualMachine { bun_io::js_vm_ctx() } #[inline] - fn postgres_socket_group(&mut self) -> &mut bun_uws::SocketGroup { + fn postgres_socket_group(&mut self) -> &mut bun_usockets::SocketGroup { // `rare_data()` returns the boxed `&mut RareData` (disjoint allocation); // `*_group` only reads `vm.uws_loop()`. Route the read-only `vm` // argument through the JS-thread singleton accessor instead of a @@ -328,7 +326,7 @@ impl VirtualMachineSqlExt for VirtualMachine { .postgres_group::(VirtualMachine::get()) } #[inline] - fn mysql_socket_group(&mut self) -> &mut bun_uws::SocketGroup { + fn mysql_socket_group(&mut self) -> &mut bun_usockets::SocketGroup { // See `postgres_socket_group` — singleton `&'static` for the read-only // `vm` argument avoids the raw-pointer split-borrow. self.rare_data().mysql_group::(VirtualMachine::get()) @@ -509,9 +507,9 @@ pub mod api { /// itself). Returns `Default` for the empty/`tls:true` config. pub fn as_usockets_for_client_verification( &self, - ) -> bun_uws::us_bun_socket_context_options_t { + ) -> bun_usockets::BunSocketContextOptions { match self.0 { - None => bun_uws::us_bun_socket_context_options_t { + None => bun_usockets::BunSocketContextOptions { request_cert: 1, reject_unauthorized: 0, ..Default::default() @@ -872,9 +870,9 @@ bun_opaque::opaque_ffi! { pub struct SslCtxCache; } impl SslCtxCache { pub fn get_or_create_opts( &mut self, - opts: &bun_uws::us_bun_socket_context_options_t, - err: &mut bun_uws::create_bun_socket_error_t, - ) -> Option<*mut bun_uws::SslCtx> { + opts: &bun_usockets::BunSocketContextOptions, + err: &mut bun_usockets::create_bun_socket_error_t, + ) -> Option<*mut bun_uws_shim::SslCtx> { // SAFETY: `self` is `&mut runtime_state().ssl_ctx_cache`; `opts`/`err` // are caller stack locals. let p = diff --git a/src/sql_jsc/mysql/JSMySQLConnection.rs b/src/sql_jsc/mysql/JSMySQLConnection.rs index 063dd3e2490f..fa5967a5774d 100644 --- a/src/sql_jsc/mysql/JSMySQLConnection.rs +++ b/src/sql_jsc/mysql/JSMySQLConnection.rs @@ -1,6 +1,3 @@ -use core::cell::Cell; -use core::ffi::c_void; - use crate::jsc::{ CallFrame, EventLoopSqlExt as _, EventLoopTimer, EventLoopTimerState, EventLoopTimerTag, GlobalRef, HasAutoFlush, JSGlobalObject, JSValue, JsCell, JsRef, JsResult, KeepAlive, @@ -18,7 +15,7 @@ use bun_sql::mysql::protocol::error_packet::ErrorPacket; use bun_sql::mysql::protocol::new_reader::NewReader; use bun_sql::mysql::protocol::new_writer::NewWriter; use bun_sql::mysql::ssl_mode::SSLMode; -use bun_uws::{self as uws, AnySocket, NewSocketHandler, SocketTCP}; +use bun_usockets::{self as uws, AnySocket, SocketTCP}; use super::js_mysql_query::JSMySQLQuery; use crate::mysql::protocol::any_mysql_error_jsc::mysql_error_to_js; @@ -46,11 +43,13 @@ bun_core::declare_scope!(MySQLConnection, visible); // `JsCell` is `#[repr(transparent)]`, so `from_field_ptr!` recovery // (`from_timer_ptr` / `MySQLConnection::get_js_connection`) sees identical // offsets. -#[derive(bun_ptr::CellRefCounted)] +#[derive(bun_ptr::RefCounted)] #[ref_count(destroy = Self::deinit)] pub struct JSMySQLConnection { - // intrusive refcount (bun.ptr.RefCount mixin); destroy callback = `deinit` - ref_count: Cell, + // intrusive refcount (bun.ptr.RefCount mixin); destroy callback = `deinit`. + // `RefCount` (not `Cell`): Protocol v2 owners must satisfy + // `bun_ptr::RefCounted` so the core dispatch guard can ref/deref them. + ref_count: bun_ptr::RefCount, js_value: JsCell, // LIFETIMES.tsv: JSC_BORROW — assigned from createInstance param; never freed global_object: GlobalRef, @@ -94,9 +93,8 @@ bun_jsc::impl_js_class_via_generated!(JSMySQLConnection => crate::jsc::codegen:: /// RAII owner for one intrusive refcount on a `JSMySQLConnection`. Dropping /// calls [`JSMySQLConnection::deref`], which may free `*self.0` — so callers /// must not hold a live `&`/`&mut JSMySQLConnection` across the guard's drop -/// point. Construct via [`JSMySQLConnection::ref_guard`] (which also bumps the -/// count) or directly when adopting a ref taken elsewhere (e.g. the socket ref -/// from `on_open`). +/// point. Construct via [`JSMySQLConnection::ref_guard`] (which also bumps +/// the count). struct DerefOnDrop(*mut JSMySQLConnection); impl Drop for DerefOnDrop { fn drop(&mut self) { @@ -107,6 +105,32 @@ impl Drop for DerefOnDrop { } impl JSMySQLConnection { + /// Bump the intrusive refcount (`&self` proves liveness). + #[inline] + pub(crate) fn ref_(&self) { + // SAFETY: `&self` is a live borrow of the pointee. + unsafe { bun_ptr::RefCount::::ref_(self.as_ctx_ptr()) } + } + + /// Release one intrusive ref; runs `deinit` at zero. + /// + /// # Safety + /// `this` must point to a live `Self` and the caller must own one ref; + /// `this` may be dangling afterwards. + #[inline] + pub(crate) unsafe fn deref(this: *mut Self) { + // SAFETY: forwarded caller contract. + unsafe { bun_ptr::RefCount::::deref(this) } + } + + /// Fresh strong ref for the Protocol v2 attach surface + /// (`connect_owned` / `adopt_tls_owned`); core releases it exactly once + /// at the socket terminal. + #[inline] + pub(crate) fn owner_ref(&self) -> uws::OwnerRef { + uws::owner_ref_of(self) + } + /// RAII pair for `ref_()` / `deref()`: bumps the intrusive refcount now and /// releases it on drop. The guard stashes a raw pointer (not `&Self`) so no Rust /// reference is held across the potential free in `deref()`; the `&self` @@ -409,7 +433,7 @@ impl JSMySQLConnection { /// `&mut self` protector live across the dealloc would be UB under Stacked /// Borrows. fn deinit(this: *mut Self) { - // SAFETY: routed only through `CellRefCounted::destroy` (refcount==0); + // SAFETY: routed only through `RefCounted::destructor` (refcount==0); // `this` is the live `heap::alloc` ptr from `create_instance`, sole // owner; no `&`/`&mut Self` outlives the `heap::take` below. unsafe { @@ -522,7 +546,7 @@ impl JSMySQLConnection { let (secure, tls_config) = scopeguard::ScopeGuard::into_inner(tls_guard); let ptr: *mut JSMySQLConnection = bun_core::heap::into_raw(Box::new(JSMySQLConnection { - ref_count: Cell::new(1), + ref_count: bun_ptr::RefCount::init(), js_value: JsCell::new(JsRef::empty()), global_object: GlobalRef::from(global_object), vm: BackRef::new_mut(vm), @@ -559,25 +583,27 @@ impl JSMySQLConnection { let hostname = args.hostname_str.to_utf8(); // MySQL always opens plain TCP first; STARTTLS adopts into the TLS - // group after the SSLRequest exchange. + // group after the SSLRequest exchange. `owner_ref()` transfers one + // strong ref to core; core releases it at the socket terminal + // (incl. the silent no-event close of a never-completed connect). let group = vm.mysql_socket_group::(); let result = if !path.is_empty() { - SocketTCP::connect_unix_group( + SocketTCP::connect_unix_owned( group, - uws::DispatchKind::Mysql, + uws::SocketKind::Mysql, None, &path[..], - ptr, + this.owner_ref(), false, ) } else { - SocketTCP::connect_group( + SocketTCP::connect_owned( group, - uws::DispatchKind::Mysql, + uws::SocketKind::Mysql, None, hostname.slice(), args.port, - ptr, + this.owner_ref(), false, ) }; @@ -585,8 +611,10 @@ impl JSMySQLConnection { Ok(s) => s, Err(e) => { let _ = this; - // SAFETY: `ptr` is the freshly-boxed allocation; sole owner. - // `this` (a `ParentRef`) is not used past this point, so no + // The transferred owner ref was already released by + // `connect_*_owned` on failure; this drops the ctor's +1. + // SAFETY: `ptr` is the freshly-boxed allocation; `this` + // (a `ParentRef`) is not used past this point, so no // borrow outlives the `heap::take` inside `deinit`. unsafe { Self::deref(ptr) }; return Err(global_object @@ -641,12 +669,10 @@ impl JSMySQLConnection { } use my_sql_connection::Status as S; match this.connection.get().status { - // A close while the connect/handshake is still in flight gets no - // socket event (uws skips the on_close dispatch for sockets whose - // connect never completed), so the socket-close -> on_close -> - // fail chain never runs: fail directly so the JS onclose callback - // fires and the status goes terminal instead of staying - // Connecting forever. + // A TCP-stage in-flight close gets no socket event, but a + // DNS-stage close dispatches on_connecting_error synchronously + // (C4). Fail directly so the JS onclose callback fires and the + // status goes terminal on both variants. S::Connecting | S::Handshaking | S::Authenticating | S::AuthenticationAwaitingPk => { this.fail(b"Connection closed", AnyMySQLErrorT::ConnectionClosed); } @@ -941,31 +967,25 @@ impl JSMySQLConnection { } } -/// uSockets event handlers for the MySQL connection (plain and TLS). -pub struct SocketHandler; +/// Protocol v2 socket handlers for the MySQL connection (plain + TLS kinds). +/// The trampoline holds a strong owner ref across every handler and releases +/// the core-held ext ref at the terminal, so the old on_open/on_close socket +/// ref pair and per-handler ref brackets are gone. +pub struct MySQLSocketProtocol; -// Inherent associated types are unstable in Rust -// (`feature(inherent_associated_types)`), so spell out -// `NewSocketHandler` at every use site instead. -impl SocketHandler { - fn _socket(s: NewSocketHandler) -> AnySocket { - if SSL { - AnySocket::SocketTls(s.assume_ssl()) - } else { - AnySocket::SocketTcp(s.assume_tcp()) - } - } +impl uws::Protocol for MySQLSocketProtocol { + type Owner = JSMySQLConnection; + const KIND: uws::SocketKind = uws::SocketKind::Mysql; + const KIND_TLS: Option = Some(uws::SocketKind::MysqlTls); - pub fn on_open(this: &JSMySQLConnection, s: NewSocketHandler) { - let socket = Self::_socket(s); + fn on_open(this: &JSMySQLConnection, socket: AnySocket, _is_client: bool, _ip: &[u8]) { let is_tcp = matches!(socket, AnySocket::SocketTcp(_)); this.connection_mut().set_socket(socket); if is_tcp { - // This handshake is not TLS handleshake is actually the MySQL handshake - // When a connection is upgraded to TLS, the onOpen callback is called again and at this moment we dont wanna to change the status to handshaking + // This is the MySQL handshake, not TLS: on TLS upgrade on_open + // fires again and the status must not regress to Handshaking. this.connection_mut().status = my_sql_connection::Status::Handshaking; - this.ref_(); // keep a ref for the socket } // Only set up the timers after all status changes are complete — the timers rely on the status to determine timeouts. this.setup_max_lifetime_timer_if_necessary(); @@ -973,14 +993,9 @@ impl SocketHandler { this.update_reference_type(); } - fn on_handshake_( - this: &JSMySQLConnection, - _: NewSocketHandler, - success: i32, - ssl_error: uws::us_bun_verify_error_t, - ) { - let handshake_was_successful = match this.connection_mut().do_handshake(success, ssl_error) - { + // Fires only on the MysqlTls kind (plain sockets never handshake). + fn on_handshake(this: &JSMySQLConnection, _: AnySocket, ok: bool, ssl_error: uws::VerifyError) { + let handshake_was_successful = match this.connection_mut().do_handshake(ok, ssl_error) { Ok(v) => v, Err(e) => { return this.fail_fmt(e, format_args!("Failed to send handshake response")); @@ -994,21 +1009,7 @@ impl SocketHandler { } } - // pub const onHandshake = if (ssl) onHandshake_ else null; - pub const ON_HANDSHAKE: Option< - fn(&JSMySQLConnection, NewSocketHandler, i32, uws::us_bun_verify_error_t), - > = if SSL { Some(Self::on_handshake_) } else { None }; - - pub fn on_close( - this: &JSMySQLConnection, - _: NewSocketHandler, - _: i32, - _: Option<*mut c_void>, - ) { - // Releases the socket ref taken in on_open. - // RAII guard adopts that existing ref (no `ref_()` here); raw-pointer - // shaped so no reference outlives the potential free. - let _ref = DerefOnDrop(this.as_ctx_ptr()); + fn on_close(this: &JSMySQLConnection, _: AnySocket, _: uws::CloseCode2, _errno: i32) { // A close before the handshake finished means the server (or an // intermediary like a container port proxy) accepted the TCP // connection but went away before completing startup — e.g. the @@ -1026,34 +1027,26 @@ impl SocketHandler { this.fail(message, err); } - pub fn on_end(_: &JSMySQLConnection, socket: NewSocketHandler) { + fn on_end(_: &JSMySQLConnection, socket: AnySocket) { // no half closed sockets socket.close(uws::CloseKind::Normal); } - pub fn on_connect_error(this: &JSMySQLConnection, _: NewSocketHandler, _: i32) { + fn on_connect_error(this: &JSMySQLConnection, _: uws::ConnectFailure) { this.fail(b"Failed to connect", AnyMySQLErrorT::ConnectionRefused); } - pub fn on_timeout(this: &JSMySQLConnection, _: NewSocketHandler) { + fn on_timeout(this: &JSMySQLConnection, _: AnySocket) { this.fail(b"Connection timeout", AnyMySQLErrorT::ConnectionTimedOut); } - pub fn on_data(this: &JSMySQLConnection, _: NewSocketHandler, data: &[u8]) { - // Both guards re-enter via raw pointer so no reference is live across - // the potential free. Guard drop order is LIFO, so `_ref` (deref) runs - // last. - let p = ParentRef::new(this); - let _ref = this.ref_guard(); - + fn on_data(this: &JSMySQLConnection, _: AnySocket, data: &mut [u8]) { + // The dispatch guard keeps `this` alive through the defer body. scopeguard::defer! { - // `_ref` has not yet dropped, so `*p` is still live; `ParentRef` - // yields a fresh `&JSMySQLConnection` per access (R-2: every - // callee is `&self`). // reset the connection timeout after we're done processing the data - p.reset_connection_timeout(); - p.update_reference_type(); - p.register_auto_flusher(); + this.reset_connection_timeout(); + this.update_reference_type(); + this.register_auto_flusher(); } if this.vm().is_shutting_down() { // we are shutting down lets not process the data @@ -1068,7 +1061,7 @@ impl SocketHandler { } } - pub fn on_writable(this: &JSMySQLConnection, _: NewSocketHandler) { + fn on_writable(this: &JSMySQLConnection, _: AnySocket) { this.connection_mut().reset_backpressure(); this.drain_internal(); } diff --git a/src/sql_jsc/mysql/MySQLConnection.rs b/src/sql_jsc/mysql/MySQLConnection.rs index ceabd1322dcc..2ef54375eaac 100644 --- a/src/sql_jsc/mysql/MySQLConnection.rs +++ b/src/sql_jsc/mysql/MySQLConnection.rs @@ -1,6 +1,9 @@ use crate::jsc::{JSValue, VirtualMachineSqlExt as _}; use bun_collections::{OffsetByteList, StringHashMap, VecExt}; -use bun_uws::{self as uws, AnySocket as Socket, SslCtx}; +use bun_usockets::{self as uws, AnySocket as Socket}; +// `secure` stays on the boringssl nominal (matches `ConnectionCtorArgs` and +// the `SSLContextCache`); cast to bssl-sys only at the `adopt_tls` boundary. +use bun_uws_shim::SslCtx; use bun_sql::mysql::Capabilities; use bun_sql::mysql::MySQLQueryResult; @@ -319,25 +322,27 @@ impl MySQLConnection { pub fn upgrade_to_tls(&mut self) -> Result<(), FlushQueueError> { // Only adopt if we're currently a plain TCP socket. - let Socket::SocketTcp(tcp) = &self.socket else { + let Socket::SocketTcp(tcp) = self.socket else { return Ok(()); }; - let uws::InternalSocket::Connected(raw) = tcp.socket else { + let uws::InternalSocket::Connected(sref) = tcp.socket else { return Ok(()); }; // `as_mut()` is `'static`, so `tls_group` borrows the VM singleton — // not `*self` — and stays live across the field reads below. - let tls_group: &mut bun_uws::SocketGroup = crate::jsc::VirtualMachine::get() + let tls_group: &mut uws::SocketGroup = crate::jsc::VirtualMachine::get() .as_mut() .mysql_socket_group::(); // SAFETY: `secure` is set to a live `SSL_CTX*` before TLS upgrade is - // requested. + // requested; the cast bridges the boringssl vs bssl-sys nominals of + // the same C struct (single cast site — the field stays boringssl-typed). let ssl_ctx = unsafe { &mut *self .secure .expect("secure SSL_CTX must be set before upgradeToTLS") + .cast::() }; let server_name = self.tls_config.server_name(); let sni = if server_name.is_null() { @@ -347,40 +352,27 @@ impl MySQLConnection { // `tls_config` for the connection lifetime. Some(unsafe { bun_core::ffi::cstr(server_name) }) }; - // `Option>` is an 8-byte null-niche optional; using - // `Option<*mut T>` here would request 16 bytes (separate discriminant) - // and desync with the trampoline reader (uws_handlers.rs) which reads - // the slot as `Option>`. - let ext_size = core::mem::size_of::>>() as i32; - - // SAFETY: `raw` is a live connected `us_socket_t*`; adopt_tls may - // realloc and return a different ptr. - let Some(new_socket) = (unsafe { &mut *raw }).adopt_tls( - tls_group, - bun_uws::SocketKind::MysqlTls, + + // Reachable off-dispatch (AutoFlusher -> drain_internal), so C6 does + // not cover `sref`: `adopt_tls_owned` refuses stale/closed handles. + // The new owner ref is stamped before the old Mysql-kind ref is + // released (core swap), so dispatch never sees a stale owner. + let owner = self.js_connection_ref().owner_ref(); + let Some(tls) = uws::SocketTLS::adopt_tls_owned( + sref, + std::ptr::from_mut(tls_group), + uws::SocketKind::MysqlTls, ssl_ctx, sni, true, // is_client - ext_size, - ext_size, + owner, ) else { return Err(FlushQueueError::AuthenticationFailed); }; - - let js_connection = self.get_js_connection(); - let new_socket = new_socket.as_ptr(); - // SAFETY: `new_socket` is a live us_socket_t freshly returned by - // `adopt_tls`; ext storage was sized for - // `Option>` above. One `&mut` reborrow - // drives both safe inherent methods (`ext` / `start_tls_handshake`). - let sock = unsafe { &mut *new_socket }; - *sock.ext::>>() = - core::ptr::NonNull::new(js_connection); - self.socket = Socket::SocketTls(uws::SocketTLS { - socket: uws::InternalSocket::Connected(new_socket), - }); - // ext is now repointed; safe to kick the handshake (any dispatch lands here). - sock.start_tls_handshake(); + self.socket = Socket::SocketTls(tls); + // Owner already swapped by core; safe to kick the handshake (any + // dispatch lands on the live owner). + tls.start_tls_handshake(); Ok(()) } @@ -404,7 +396,7 @@ impl MySQLConnection { pub fn do_handshake( &mut self, - success: i32, + success: bool, ssl_error: uws::us_bun_verify_error_t, ) -> Result { bun_core::scoped_log!( @@ -414,9 +406,8 @@ impl MySQLConnection { ssl_error.error_no, self.ssl_mode ); - let handshake_success = success == 1; self.sequence_id = self.sequence_id.wrapping_add(1); - if handshake_success { + if success { self.tls_status = TLSStatus::SslOk; if self.tls_config.reject_unauthorized() != 0 { // follow the same rules as postgres diff --git a/src/sql_jsc/postgres/PostgresSQLConnection.rs b/src/sql_jsc/postgres/PostgresSQLConnection.rs index f42d7c179971..935e22d478ec 100644 --- a/src/sql_jsc/postgres/PostgresSQLConnection.rs +++ b/src/sql_jsc/postgres/PostgresSQLConnection.rs @@ -1,7 +1,6 @@ use bun_collections::VecExt; use bun_jsc::JsCell; use core::cell::Cell; -use core::ffi::c_void; use core::sync::atomic::{AtomicU32, Ordering}; use crate::jsc::EventLoopTimer; @@ -16,7 +15,7 @@ use bun_core::strings; use bun_core::{self}; use bun_io::KeepAlive; use bun_ptr::{AsCtxPtr, BackRef, ParentRef}; -use bun_uws as uws; +use bun_usockets as uws; use core::ptr::NonNull; use crate::jsc::{EventLoopTimerState, EventLoopTimerTag}; @@ -91,14 +90,15 @@ use crate::jsc::verify_error_to_js; // impossible (UnsafeCell suppresses `noalias` on `&T`). The codegen shim still // emits `this: &mut PostgresSQLConnection`; `&mut T` reborrows to `&T` so the // impls below compile against either. -#[derive(bun_ptr::CellRefCounted)] +#[derive(bun_ptr::RefCounted)] #[ref_count(destroy = Self::deinit)] pub struct PostgresSQLConnection { pub socket: JsCell, pub status: Cell, - // Private — intrusive refcount invariant; reach via `ref_()`/`deref()` - // (provided by `#[derive(CellRefCounted)]` above). - ref_count: Cell, + // Private — intrusive refcount invariant (Protocol v2 Owner). Strong refs + // are minted via `owner_ref()` / `RefPtr`; the core's dispatch guard and + // ext ref keep the owner alive across every socket callback. + ref_count: bun_ptr::RefCount, pub write_buffer: JsCell, // Private — `JsCell` aliasing invariant; only `Reader` and `on_data` @@ -150,8 +150,11 @@ pub struct PostgresSQLConnection { pub authentication_state: JsCell, /// `us_ssl_ctx_t` built from `tls_config` at construct time. Applied via - /// `us_socket_adopt_tls` when the server replies `S` to the SSLRequest. - pub secure: Option<*mut uws::SslCtx>, + /// `adopt_tls_owned` when the server replies `S` to the SSLRequest. + /// Owned `SSL_CTX*` on the boringssl nominal (matches `ConnectionCtorArgs` + /// and the `SSLContextCache`); cast to the bssl-sys nominal only at the + /// `adopt_tls` boundary in [`Self::setup_tls`]. + pub secure: Option<*mut bun_uws_shim::SslCtx>, pub tls_config: jsc::api::ServerConfig::SSLConfig, pub tls_status: Cell, pub ssl_mode: SSLMode, @@ -183,7 +186,46 @@ bun_event_loop::impl_timer_owner!(PostgresSQLConnection; from_max_lifetime_timer_ptr => max_lifetime_timer, ); +/// RAII owner for one intrusive refcount on a `PostgresSQLConnection`. +/// Dropping calls `deref`, which may free `*self.0` — callers must not hold a +/// live `&`/`&mut PostgresSQLConnection` across the guard's drop point. +struct DerefOnDrop(*mut PostgresSQLConnection); +impl Drop for DerefOnDrop { + fn drop(&mut self) { + // SAFETY: constructor contract — `self.0` is a live `heap::alloc` + // pointer with at least one outstanding ref owned by this guard. + unsafe { PostgresSQLConnection::deref(self.0) } + } +} + impl PostgresSQLConnection { + /// Bump the intrusive refcount (`&self` proves liveness). + #[inline] + fn ref_(&self) { + // SAFETY: `&self` is a live borrow of the pointee. + unsafe { bun_ptr::RefCount::::ref_(self.as_ctx_ptr()) } + } + + /// Release one intrusive ref; runs `deinit` at zero. + /// + /// # Safety + /// `this` must point to a live `Self` and the caller must own one ref; + /// `this` may be dangling afterwards. + #[inline] + unsafe fn deref(this: *mut Self) { + // SAFETY: forwarded caller contract. + unsafe { bun_ptr::RefCount::::deref(this) } + } + + /// RAII pair for `ref_()` / `deref()`: bumps the intrusive refcount now + /// and releases it on drop. The guard stashes a raw pointer (not `&Self`) + /// so no Rust reference is held across the potential free in `deref()`. + #[inline] + fn ref_guard(&self) -> DerefOnDrop { + self.ref_(); + DerefOnDrop(self.as_ctx_ptr()) + } + // ─── R-2 interior-mutability helpers ───────────────────────────────────── /// Read-modify-write the packed `Cell` through `&self`. @@ -242,6 +284,12 @@ impl PostgresSQLConnection { bun_io::posix_event_loop::get_vm_ctx(bun_io::AllocatorType::Js) } + /// Strong owner ref minted for the core's Protocol v2 attach APIs + /// (transferred to core; released exactly once at the socket terminal). + fn owner_ref(&self) -> uws::OwnerRef { + uws::owner_ref_of(self) + } + // ---- self-referential connection-string slices ---------------------------- // `database`/`user`/`password`/`path`/`options` are raw `*const [u8]` fat // pointers into `self.options_buf`. They are populated once in `call()` (each @@ -319,8 +367,11 @@ impl PostgresSQLConnection { // if we have backpressure, wait for onWritable return false; } - self.ref_(); debug!("onAutoFlush: draining"); + // The flusher fires off-dispatch (deferred microtask, raw ctx ptr, no + // dispatch guard), so a re-entrant close in `drain_internal` could + // otherwise free `self` mid-call — hold our own ref for the body. + let _ref = self.ref_guard(); // drain as much as we can self.drain_internal(); @@ -333,8 +384,6 @@ impl PostgresSQLConnection { ); self.auto_flusher .with_mut(|a| a.registered = keep_flusher_registered); - // SAFETY: `self` is a live Box-allocated connection; this releases one ref. - unsafe { Self::deref(self.as_ctx_ptr()) }; keep_flusher_registered } @@ -426,33 +475,36 @@ impl PostgresSQLConnection { pub fn setup_tls(&self) { debug!("setupTLS"); + if !self.try_setup_tls() { + self.fail( + b"Failed to upgrade to TLS", + AnyPostgresError::TLSUpgradeFailed, + ); + } + } + + fn try_setup_tls(&self) -> bool { // `vm_mut()` is `'static`, so `tls_group` borrows the VM singleton — // not `*self` — and stays live across the field reads below. - let tls_group: &mut bun_uws::SocketGroup = self.vm_mut().postgres_socket_group::(); + let tls_group: &mut uws::SocketGroup = self.vm_mut().postgres_socket_group::(); // At this point we are // a plain TCP socket in the Connected state. let Socket::SocketTcp(tcp) = self.socket.get() else { - self.fail( - b"Failed to upgrade to TLS", - AnyPostgresError::TLSUpgradeFailed, - ); - return; + return false; }; - let uws::InternalSocket::Connected(raw) = tcp.socket else { - self.fail( - b"Failed to upgrade to TLS", - AnyPostgresError::TLSUpgradeFailed, - ); - return; + let uws::InternalSocket::Connected(sref) = tcp.socket else { + return false; }; // SAFETY: `secure` is set to a live `SSL_CTX*` before `setup_tls` is - // reached. + // reached; the cast bridges the boringssl vs bssl-sys nominals of the + // same C struct (single cast site — the field stays boringssl-typed). let ssl_ctx = unsafe { &mut *self .secure .expect("secure SSL_CTX must be set before setupTLS") + .cast::() }; let server_name = self.tls_config.server_name(); let sni = if server_name.is_null() { @@ -462,45 +514,25 @@ impl PostgresSQLConnection { // `tls_config` for the connection lifetime. Some(unsafe { bun_core::ffi::cstr(server_name) }) }; - // The ext slot is an 8-byte null-niche - // optional pointer, `Option>`; using - // `Option<*mut T>` here would request 16 bytes (separate discriminant) - // and desync with the trampoline reader (uws_handlers.rs) which reads - // the slot as `Option>`. - let ext_size = - core::mem::size_of::>>() as i32; - - // SAFETY: `raw` is a live connected `us_socket_t*`; adopt_tls may - // realloc and return a different ptr. - let Some(new_socket) = (unsafe { &mut *raw }).adopt_tls( - tls_group, - bun_uws::SocketKind::PostgresTls, + + // Owner-swap adopt (Protocol v2): the new owner ref is stamped before + // the old kind's ref is released — no dispatch window sees a stale + // owner — and the handshake is kicked only after the swap. + let Some(tls) = uws::SocketTLS::adopt_tls_owned( + sref, + core::ptr::from_mut(tls_group), + uws::SocketKind::PostgresTls, ssl_ctx, sni, true, // is_client - ext_size, - ext_size, + self.owner_ref(), ) else { - self.fail( - b"Failed to upgrade to TLS", - AnyPostgresError::TLSUpgradeFailed, - ); - return; + return false; }; - let new_socket = new_socket.as_ptr(); - // SAFETY: `new_socket` is a live us_socket_t freshly returned by - // `adopt_tls`; ext slot is sized for `Option>` - // above. One `&mut` reborrow drives both safe inherent methods - // (`ext` / `start_tls_handshake`). - let sock = unsafe { &mut *new_socket }; - *sock.ext::>>() = - core::ptr::NonNull::new(self.as_ctx_ptr()); - self.socket.set(Socket::SocketTls(uws::SocketTLS { - socket: uws::InternalSocket::Connected(new_socket), - })); - // ext is now repointed; safe to kick the handshake (any dispatch lands here). - sock.start_tls_handshake(); + self.socket.set(Socket::SocketTls(tls)); + tls.start_tls_handshake(); self.start(); + true } fn setup_max_lifetime_timer_if_necessary(&self) { @@ -657,14 +689,12 @@ impl PostgresSQLConnection { pub fn finalize(self: Box) { debug!("PostgresSQLConnection finalize"); - // Refcounted: release the JS wrapper's +1; allocation may outlive this - // call if other refs remain, so hand ownership back to the raw refcount - // FIRST so a panic in the work below leaks instead of UAF-ing siblings. - let this = bun_core::heap::release(self); - this.stop_timers(); - this.js_value.with_mut(|r| r.finalize()); - // SAFETY: `this` is the live m_ctx allocation; `deref` frees on count==0. - unsafe { Self::deref(this) }; + // Releases the JS wrapper's +1; the allocation may outlive this call + // while the core's ext owner ref (Protocol v2) is still outstanding. + bun_ptr::finalize_js_box(self, |this| { + this.stop_timers(); + this.js_value.with_mut(|r| r.finalize()); + }); } pub fn flush_data_and_reset_timeout(&self) { @@ -702,8 +732,10 @@ impl PostgresSQLConnection { } pub fn fail_with_js_value(&self, value: JSValue) { - // reshaped for borrowck — `update_has_pending_activity()` + `ref_and_close(value)` - // are expanded inline at each return below. + // Timer-fired paths dispatch raw with no strong ref, and `ref_and_close` + // releases the core ext owner ref at the synchronous close terminal — + // hold our own ref so re-entrant JS below cannot free `self`. + let _ref = self.ref_guard(); self.stop_timers(); if self.status.get() == Status::Failed { self.update_has_pending_activity(); @@ -712,7 +744,6 @@ impl PostgresSQLConnection { self.status.set(Status::Failed); - self.ref_(); // we defer the refAndClose so the on_close will be called first before we reject the pending requests let on_close_opt = self.consume_on_close_callback(self.global()); if let Some(on_close) = on_close_opt { @@ -734,8 +765,6 @@ impl PostgresSQLConnection { event_loop.exit(); } self.ref_and_close(Some(value)); - // SAFETY: `self` is a live Box-allocated connection; this releases one ref. - unsafe { Self::deref(self.as_ctx_ptr()) }; self.update_has_pending_activity(); } @@ -873,10 +902,9 @@ impl PostgresSQLConnection { self.start(); } - pub fn on_handshake(&self, success: i32, ssl_error: uws::us_bun_verify_error_t) { + pub fn on_handshake(&self, success: bool, ssl_error: uws::us_bun_verify_error_t) { debug!("onHandshake: {} {}", success, ssl_error.error_no); - let handshake_success = success == 1; - if handshake_success { + if success { if self.tls_config.reject_unauthorized() != 0 { // only reject the connection if reject_unauthorized == true match self.ssl_mode { @@ -974,7 +1002,8 @@ impl PostgresSQLConnection { } pub fn on_data(&self, data: &[u8]) { - self.ref_(); + // Protocol v2: the core dispatch guard holds a strong ref for the + // whole callback — no consumer ref bracket. self.update_flags(|f| f.insert(ConnectionFlags::IS_PROCESSING_DATA)); self.disable_connection_timeout(); @@ -1068,8 +1097,6 @@ impl PostgresSQLConnection { // reset the connection timeout after we're done processing the data self.reset_connection_timeout(); - // SAFETY: `self` is a live Box-allocated connection; this releases one ref. - unsafe { Self::deref(self.as_ctx_ptr()) }; } pub fn constructor( @@ -1184,69 +1211,68 @@ pub(crate) fn call(global_object: &JSGlobalObject, callframe: &CallFrame) -> JsR // moved `secure`/`tls_config` for the struct literal below. let (secure, tls_config) = scopeguard::ScopeGuard::into_inner(errdefer_guard); - let ptr: *mut PostgresSQLConnection = - bun_core::heap::into_raw(Box::new(PostgresSQLConnection { - socket: JsCell::new(Socket::SocketTcp(uws::SocketTCP { - socket: uws::InternalSocket::Detached, - })), - status: Cell::new(Status::Connecting), - ref_count: Cell::new(1), - write_buffer: JsCell::new(OffsetByteList::default()), - read_buffer: JsCell::new(OffsetByteList::default()), - last_message_start: Cell::new(0), - requests: JsCell::new(PostgresRequest::Queue::init()), - pipelined_requests: Cell::new(0), - nonpipelinable_requests: Cell::new(0), - pending_requests: Cell::new(0), - poll_ref: JsCell::new(KeepAlive::default()), - global_object: BackRef::new(global_object), - // `vm` is the `&mut VirtualMachine` from `bun_vm().as_mut()` above — - // the JS-thread singleton with full write provenance. `BackRef::new_mut` - // captures the `NonNull` so `vm_mut()` can later route through the same - // canonical `VirtualMachine::as_mut()` accessor. - vm: BackRef::new_mut(vm), - statements: JsCell::new(PreparedStatementsMap::default()), - prepared_statement_id: Cell::new(0), - pending_activity_count: AtomicU32::new(0), - js_value: JsCell::new(crate::jsc::JsRef::empty()), - backend_parameters: JsCell::new(StringMap::init(true)), - backend_key_data: JsCell::new(protocol::BackendKeyData::default()), - database, - user: username, - password, - path, - options, - options_buf, - authentication_state: JsCell::new(AuthenticationState::Pending), - secure, - tls_config, - tls_status: Cell::new(if args.ssl_mode != SSLMode::Disable { - TLSStatus::Pending - } else { - TLSStatus::None - }), - ssl_mode: args.ssl_mode, - idle_timeout_interval_ms: u32::try_from(idle_timeout).expect("int cast"), - connection_timeout_ms: u32::try_from(connection_timeout).expect("int cast"), - flags: Cell::new(if use_unnamed_prepared_statements { - ConnectionFlags::USE_UNNAMED_PREPARED_STATEMENTS - } else { - ConnectionFlags::empty() - }), - timer: JsCell::new(EventLoopTimer::init_paused( - EventLoopTimerTag::PostgresSQLConnectionTimeout, - )), - max_lifetime_interval_ms: u32::try_from(max_lifetime).expect("int cast"), - max_lifetime_timer: JsCell::new(EventLoopTimer::init_paused( - EventLoopTimerTag::PostgresSQLConnectionMaxLifetime, - )), - auto_flusher: JsCell::new(AutoFlusher::default()), - })); - - // `heap::into_raw` is `Box::into_raw` — never null. Sole owner until - // `to_js` below. R-2: every field is interior-mutable, so a shared - // `ParentRef` deref is sufficient for the writes below. - let this = ParentRef::from(core::ptr::NonNull::new(ptr).expect("heap::into_raw non-null")); + // `strong` is the eventual JS wrapper's +1 (transferred at `to_js` below). + let strong = bun_ptr::RefPtr::new(PostgresSQLConnection { + socket: JsCell::new(Socket::SocketTcp(uws::SocketTCP { + socket: uws::InternalSocket::Detached, + })), + status: Cell::new(Status::Connecting), + ref_count: bun_ptr::RefCount::init(), + write_buffer: JsCell::new(OffsetByteList::default()), + read_buffer: JsCell::new(OffsetByteList::default()), + last_message_start: Cell::new(0), + requests: JsCell::new(PostgresRequest::Queue::init()), + pipelined_requests: Cell::new(0), + nonpipelinable_requests: Cell::new(0), + pending_requests: Cell::new(0), + poll_ref: JsCell::new(KeepAlive::default()), + global_object: BackRef::new(global_object), + // `vm` is the `&mut VirtualMachine` from `bun_vm().as_mut()` above — + // the JS-thread singleton with full write provenance. `BackRef::new_mut` + // captures the `NonNull` so `vm_mut()` can later route through the same + // canonical `VirtualMachine::as_mut()` accessor. + vm: BackRef::new_mut(vm), + statements: JsCell::new(PreparedStatementsMap::default()), + prepared_statement_id: Cell::new(0), + pending_activity_count: AtomicU32::new(0), + js_value: JsCell::new(crate::jsc::JsRef::empty()), + backend_parameters: JsCell::new(StringMap::init(true)), + backend_key_data: JsCell::new(protocol::BackendKeyData::default()), + database, + user: username, + password, + path, + options, + options_buf, + authentication_state: JsCell::new(AuthenticationState::Pending), + secure, + tls_config, + tls_status: Cell::new(if args.ssl_mode != SSLMode::Disable { + TLSStatus::Pending + } else { + TLSStatus::None + }), + ssl_mode: args.ssl_mode, + idle_timeout_interval_ms: u32::try_from(idle_timeout).expect("int cast"), + connection_timeout_ms: u32::try_from(connection_timeout).expect("int cast"), + flags: Cell::new(if use_unnamed_prepared_statements { + ConnectionFlags::USE_UNNAMED_PREPARED_STATEMENTS + } else { + ConnectionFlags::empty() + }), + timer: JsCell::new(EventLoopTimer::init_paused( + EventLoopTimerTag::PostgresSQLConnectionTimeout, + )), + max_lifetime_interval_ms: u32::try_from(max_lifetime).expect("int cast"), + max_lifetime_timer: JsCell::new(EventLoopTimer::init_paused( + EventLoopTimerTag::PostgresSQLConnectionMaxLifetime, + )), + auto_flusher: JsCell::new(AutoFlusher::default()), + }); + + // R-2: every field is interior-mutable, so a shared `ParentRef` deref is + // sufficient for the writes below. + let this = ParentRef::from(strong.data); { let hostname = args.hostname_str.to_utf8(); @@ -1256,23 +1282,26 @@ pub(crate) fn call(global_object: &JSGlobalObject, callframe: &CallFrame) -> JsR // adopts into `postgres_tls_group` after the server's `S`. let group = vm.postgres_socket_group::(); let path_slice = this.path.slice(); + // `dupe_ref` is the owner ref TRANSFERRED to core (Protocol v2); + // core releases it exactly once at the socket terminal, or + // synchronously right here when the connect itself fails. let result = if !path_slice.is_empty() { - uws::SocketTCP::connect_unix_group( + uws::SocketTCP::connect_unix_owned( group, uws::SocketKind::Postgres, None, path_slice, - ptr, + strong.dupe_ref(), false, ) } else { - uws::SocketTCP::connect_group( + uws::SocketTCP::connect_owned( group, uws::SocketKind::Postgres, None, hostname.slice(), args.port, - ptr, + strong.dupe_ref(), false, ) }; @@ -1280,7 +1309,8 @@ pub(crate) fn call(global_object: &JSGlobalObject, callframe: &CallFrame) -> JsR this.socket.set(Socket::SocketTcp(match result { Ok(s) => s, Err(err) => { - PostgresSQLConnection::deinit(ptr); + // Last ref: releases the ctor's +1 and runs `deinit`. + strong.deref(); return Err(global_object.throw_error( bun_jsc::CrateError::from(err), "failed to connect to postgresql", @@ -1293,7 +1323,7 @@ pub(crate) fn call(global_object: &JSGlobalObject, callframe: &CallFrame) -> JsR this.update_has_pending_activity(); this.reset_connection_timeout(); this.poll_ref.with_mut(|r| r.ref_(this.vm_ctx())); - let js_value = js::to_js(ptr, global_object); + let js_value = js::to_js(strong.into_raw(), global_object); js_value.ensure_still_alive(); this.js_value.set(crate::jsc::JsRef::init_weak(js_value)); js::onconnect_set_cached(js_value, global_object, on_connect); @@ -1302,80 +1332,69 @@ pub(crate) fn call(global_object: &JSGlobalObject, callframe: &CallFrame) -> JsR Ok(js_value) } -pub struct SocketHandler; - -// Inherent associated types are unstable; use a free type alias instead. -pub type SocketType = uws::NewSocketHandler; - -impl SocketHandler { - fn _socket(s: SocketType) -> Socket { - // `NewSocketHandler` has identical layout for any `SSL`; rebuild the - // monomorphic variant from the inner `InternalSocket`. - if SSL { - Socket::SocketTls(uws::SocketTLS { socket: s.socket }) - } else { - Socket::SocketTcp(uws::SocketTCP { socket: s.socket }) - } +/// Protocol v2 handler set: one registration covers the plain-TCP kind and +/// its TLS sibling (`setup_tls` adopts the socket across the pair). +pub struct PostgresProtocol; + +/// VM-shutdown guard shared by the socket-event handlers below. `on_close` +/// and `on_end` intentionally do NOT route through this — they forward +/// unconditionally. +#[inline] +fn guarded(this: &PostgresSQLConnection, f: impl FnOnce(&PostgresSQLConnection)) { + if this.vm().is_shutting_down() { + bun_core::hint::cold(); + this.close(); + return; } + f(this) +} - /// VM-shutdown guard shared by the 6 socket-event shims below - /// (on_open / on_handshake / on_connect_error / on_timeout / on_data / on_writable). `on_close` and `on_end` - /// intentionally do NOT route through this — they forward unconditionally. - #[inline] - fn guarded(this: &PostgresSQLConnection, f: impl FnOnce(&PostgresSQLConnection)) { - if this.vm().is_shutting_down() { - bun_core::hint::cold(); - this.close(); - return; - } - f(this) - } +impl uws::Protocol for PostgresProtocol { + type Owner = PostgresSQLConnection; + const KIND: uws::SocketKind = uws::SocketKind::Postgres; + const KIND_TLS: Option = Some(uws::SocketKind::PostgresTls); - pub fn on_open(this: &PostgresSQLConnection, socket: SocketType) { - Self::guarded(this, |t| t.on_open(Self::_socket(socket))); + fn on_open(this: &PostgresSQLConnection, socket: uws::AnySocket, _is_client: bool, _ip: &[u8]) { + guarded(this, |t| t.on_open(socket)); } - fn on_handshake_( - this: &PostgresSQLConnection, - _: SocketType, - success: i32, - ssl_error: uws::us_bun_verify_error_t, - ) { - Self::guarded(this, |t| t.on_handshake(success, ssl_error)); + fn on_data(this: &PostgresSQLConnection, _socket: uws::AnySocket, data: &mut [u8]) { + guarded(this, |t| t.on_data(data)); } - // pub const onHandshake = if (ssl) onHandshake_ else null; - pub const ON_HANDSHAKE: Option< - fn(&PostgresSQLConnection, SocketType, i32, uws::us_bun_verify_error_t), - > = if SSL { Some(Self::on_handshake_) } else { None }; + fn on_writable(this: &PostgresSQLConnection, _socket: uws::AnySocket) { + guarded(this, |t| t.on_drain()); + } - pub fn on_close( + fn on_close( this: &PostgresSQLConnection, - _socket: SocketType, - _: i32, - _: Option<*mut c_void>, + _socket: uws::AnySocket, + _code: uws::CloseCode2, + _errno: i32, ) { this.on_close(); } - pub fn on_end(this: &PostgresSQLConnection, _socket: SocketType) { + fn on_end(this: &PostgresSQLConnection, _socket: uws::AnySocket) { this.on_close(); } - pub fn on_connect_error(this: &PostgresSQLConnection, _socket: SocketType, _: i32) { - Self::guarded(this, |t| t.on_connect_error()); - } - - pub fn on_timeout(this: &PostgresSQLConnection, _socket: SocketType) { - Self::guarded(this, |t| t.on_timeout()); + fn on_timeout(this: &PostgresSQLConnection, _socket: uws::AnySocket) { + guarded(this, |t| t.on_timeout()); } - pub fn on_data(this: &PostgresSQLConnection, _socket: SocketType, data: &[u8]) { - Self::guarded(this, |t| t.on_data(data)); + fn on_connect_error(this: &PostgresSQLConnection, _err: uws::ConnectFailure) { + guarded(this, |t| t.on_connect_error()); } - pub fn on_writable(this: &PostgresSQLConnection, _socket: SocketType) { - Self::guarded(this, |t| t.on_drain()); + // Only TLS sockets emit handshake events; the plain kind never sees this. + fn on_handshake( + this: &PostgresSQLConnection, + _socket: uws::AnySocket, + ok: bool, + ssl_error: uws::VerifyError, + ) { + guarded(this, |t| t.on_handshake(ok, ssl_error)); } } @@ -1392,13 +1411,11 @@ impl PostgresSQLConnection { } fn close(&self) { - // A close while the connect/handshake is still in flight gets no - // socket event: uws skips the on_close dispatch for sockets whose - // connect never completed, and `disconnect()` only tears down - // connected sockets. Fail the connection directly so the JS onclose - // callback fires, pending queries are rejected, and the in-flight - // socket is torn down instead of completing the handshake after - // close. + // A TCP-stage in-flight close gets no socket event (C1), but a + // DNS-stage close dispatches on_connecting_error synchronously (C4). + // Fail directly so the JS onclose callback fires and pending queries + // are rejected on both variants; `ref_and_close` settles the + // keepalive per-variant and core releases its owner ref itself. if !self.vm().is_shutting_down() && matches!( self.status.get(), @@ -1406,10 +1423,6 @@ impl PostgresSQLConnection { ) { self.fail(b"Connection closed", AnyPostgresError::ConnectionClosed); - // closing an in-flight connect dispatches no socket event, so the - // poll ref taken at creation is released here rather than in a - // socket callback - self.poll_ref.with_mut(|r| r.unref(self.vm_ctx())); } else { self.disconnect(); } @@ -1480,8 +1493,10 @@ impl PostgresSQLConnection { // user `.catch()` → new query enqueue) that mutate `self.requests` // through a fresh `&Self` from `m_ctx` are sound. The previous // black_box launder (b818e70e1c57-style) is no longer needed. - // The connection is kept alive by the caller's `ref_and_close` ref - // bracket for the duration of this loop, so re-entry never frees `*self`. + // The connection is kept alive for the duration of this loop by the + // caller's outstanding strong ref (`ref_guard` in `fail_with_js_value`, + // or the JS-stack receiver on `disconnect`), so re-entry never frees + // `*self`. while self.requests.get().readable_length() > 0 { let request_ptr: *mut PostgresSQLQuery = self.requests.get().peek_item(0); // Queue invariant: every stored pointer is non-null and live @@ -1538,11 +1553,20 @@ impl PostgresSQLConnection { fn ref_and_close(&self, js_reason: Option) { // refAndClose is always called when we wanna to disconnect or when we are closed - if !self.socket.get().is_closed() { - // event loop need to be alive to close the socket - self.poll_ref.with_mut(|r| r.ref_(self.vm_ctx())); - // will unref on socket close - self.socket.get().close(uws::CloseKind::Normal); + let socket = self.socket.get(); + if !socket.is_closed() { + if socket.is_established() { + // on_close will fire (possibly ticks later for TLS + // close_notify): keep the loop alive until + // `handle_socket_failure` unrefs. + self.poll_ref.with_mut(|r| r.ref_(self.vm_ctx())); + } else { + // Never-established connect: a TCP-stage close dispatches + // nothing (C1) and a DNS-stage close errors synchronously + // (C4) — settle the creation-time keepalive now (idempotent). + self.poll_ref.with_mut(|r| r.unref(self.vm_ctx())); + } + socket.close(uws::CloseKind::Normal); } // cleanup requests diff --git a/src/sql_jsc/shared/ConnectionCtorArgs.rs b/src/sql_jsc/shared/ConnectionCtorArgs.rs index 248234002ccc..cb014e6d1bb9 100644 --- a/src/sql_jsc/shared/ConnectionCtorArgs.rs +++ b/src/sql_jsc/shared/ConnectionCtorArgs.rs @@ -6,7 +6,7 @@ use crate::jsc::{ JSGlobalObject, JSValue, JsResult, VirtualMachine, VirtualMachineSqlExt as _, api::server_config::SSLConfig, }; -use bun_uws as uws; +use bun_uws_shim as uws; pub(crate) trait SslModeArg: Copy + PartialEq { /// Wire order of the JS-side enum; index 0 is `Disable`. @@ -107,7 +107,7 @@ impl ConnectionCtorArgs { // time) so cert/CA errors throw synchronously; the per-VM weak // `SSLContextCache` shares one `SSL_CTX*` per distinct config // across pooled connections and reconnects. - let mut err = uws::create_bun_socket_error_t::none; + let mut err = bun_usockets::create_bun_socket_error_t::none; secure = vm .ssl_ctx_cache() .get_or_create_opts(&tls_config.as_usockets_for_client_verification(), &mut err); diff --git a/src/standalone_graph/StandaloneModuleGraph.rs b/src/standalone_graph/StandaloneModuleGraph.rs index 989650baf333..313bcc88fbc7 100644 --- a/src/standalone_graph/StandaloneModuleGraph.rs +++ b/src/standalone_graph/StandaloneModuleGraph.rs @@ -1569,7 +1569,7 @@ pub(crate) fn download_to_path( let send_result = async_http.send_sync(); progress.end(); - let status_code = send_result?.status_code as u16; + let status_code = send_result?.response().status_code as u16; match status_code { 404 => { diff --git a/src/sys/lib.rs b/src/sys/lib.rs index 68546dbdcd82..399e67e55728 100644 --- a/src/sys/lib.rs +++ b/src/sys/lib.rs @@ -3089,7 +3089,7 @@ mod posix_impl { } // ── socket primitives (recv/send/socketpair) ── - // Full networking lives in `bun_uws_sys`; these are the bare libc wrappers + // Full networking lives in `bun_uws_shim`; these are the bare libc wrappers // exposed for shell/pipe IPC. pub fn recv(fd: Fd, buf: &mut [u8], flags: i32) -> Maybe { let len = buf.len().min(MAX_COUNT); @@ -9710,7 +9710,7 @@ bun_core::link_impl_OutputSink! { } // (former `__bun_uws_stat_file` provider deleted — body moved DOWN into -// `bun_uws_sys::socket_context::stat_for_digest`, which calls `libc::stat` +// `bun_uws_shim::socket_context::stat_for_digest`, which calls `libc::stat` // directly. uws_sys already links libc; the cross-crate hook bought nothing.) #[cfg(test)] diff --git a/src/usockets/Cargo.toml b/src/usockets/Cargo.toml new file mode 100644 index 000000000000..6ba5d593cce4 --- /dev/null +++ b/src/usockets/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "bun_usockets" +version.workspace = true +edition.workspace = true + +[lib] +path = "lib.rs" + +[features] +default = ["cabi"] +# cabi.rs exports the `#[no_mangle]` us_* C-ABI symbols; the C core in +# packages/bun-usockets is deleted, so these are the sole definitions. +cabi = [] +# Fault-injection API (fault.rs). Enabled by the build via +# `bun_runtime/socket_fault_injection` (scripts/build/rust.ts, asan profile). +socket_fault_injection = [] + +[lints] +workspace = true + +[dependencies] +bun_alloc.workspace = true +bun_core.workspace = true +bun_errno.workspace = true +thiserror.workspace = true +# Protocol v2 owner refcounting (protocol.rs; safe-protocol.md). +bun_ptr.workspace = true +# Platform-split `addrinfo` type shared with the DNS bridge (consumers/04). +bun_dns.workspace = true +libc.workspace = true +# Raw BoringSSL bindings (tls-semantics.md Part 2d): re-export of the vendored +# bssl-sys crate; pre-generated per-target bindings are committed in +# src/bssl/bindings/ (see the README there). +bun_bssl.workspace = true + +[target.'cfg(windows)'.dependencies] +bun_libuv_sys.workspace = true +# Winsock2 surface (sockaddr types, WSAE* codes, getaddrinfo) + kernel32 +# SetHandleInformation for the no-inherit (FD_CLOEXEC parity) path. +bun_windows_sys.workspace = true diff --git a/src/usockets/backend/epoll.rs b/src/usockets/backend/epoll.rs new file mode 100644 index 000000000000..e065d8ced14b --- /dev/null +++ b/src/usockets/backend/epoll.rs @@ -0,0 +1,167 @@ +//! epoll backend (Linux/Android). Implements docs/semantics.md §1-2 poll +//! mechanics: epoll_pwait2 with an ENOSYS fallback latch, level-triggered +//! R/W with implicit EPOLLHUP|EPOLLERR. All udata are untagged slot pointers +//! (the poll registry removed the tagged-pointer FilePoll back-channel). + +use core::ptr; + +use crate::backend::{self, Events, PollState}; +use crate::loop_::Loop; +use crate::unsafe_core::poll_access; + +/// `ready_polls` element type. +pub type EventType = libc::epoll_event; + +/// Epoll delivers one coalesced entry per fd (R1.21). +pub(crate) const READY_DUPES: i32 = 1; + +/// Zero requested events → poll for implicit EPOLLHUP|EPOLLERR only (always +/// reported even when unrequested). NEVER EPOLLRDHUP: level-triggered RDHUP +/// for an already-received FIN would spin the loop (R2.7). +fn kernel_bits(events: Events) -> u32 { + if events.is_empty() { + (libc::EPOLLHUP | libc::EPOLLERR) as u32 + } else { + events.0 + } +} + +pub(crate) fn poll_start_rc(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + let mut st = poll_access::read_poll(p); + st.set_polling(events); + poll_access::write_poll(p, st); + poll_access::epoll_ctl( + poll_access::loop_fd(loop_), + libc::EPOLL_CTL_ADD, + st.fd(), + kernel_bits(events), + p as usize as u64, + ) +} + +pub(crate) fn poll_change(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + let mut st = poll_access::read_poll(p); + let old_events = st.events(); + if old_events == events { + return 0; + } + st.set_polling(events); + poll_access::write_poll(p, st); + let rc = poll_access::epoll_ctl( + poll_access::loop_fd(loop_), + libc::EPOLL_CTL_MOD, + st.fd(), + kernel_bits(events), + p as usize as u64, + ); + backend::update_pending_ready_polls(loop_, p, p, old_events, events); + rc +} + +pub(crate) fn poll_stop(p: *mut PollState, loop_: *mut Loop) { + let st = poll_access::read_poll(p); + let old_events = st.events(); + poll_access::epoll_ctl( + poll_access::loop_fd(loop_), + libc::EPOLL_CTL_DEL, + st.fd(), + 0, + 0, + ); + backend::update_pending_ready_polls(loop_, p, ptr::null_mut(), old_events, Events::NONE); +} + +pub(crate) fn accept_poll_event(p: *mut PollState) -> u64 { + poll_access::read_eventfd8(poll_access::read_poll(p).fd()) +} + +// ── poll registry sources (Fd + Pri on epoll) ──────────────────────────────── + +pub(crate) fn registry_arm( + p: *mut PollState, + loop_: *mut Loop, + source: crate::loop_::poll_registry::PollSource, +) -> i32 { + match source { + crate::loop_::poll_registry::PollSource::Fd { + readable, writable, .. + } => poll_start_rc(p, loop_, backend::fd_interest(readable, writable)), + // PSI trigger fds signal via EPOLLPRI only; the slot's believed events + // are READABLE (dispatch translates PRI→IN before the R1.18 mask). + crate::loop_::poll_registry::PollSource::Pri { .. } => { + let mut st = poll_access::read_poll(p); + st.set_polling(Events::READABLE); + poll_access::write_poll(p, st); + poll_access::epoll_ctl( + poll_access::loop_fd(loop_), + libc::EPOLL_CTL_ADD, + st.fd(), + (libc::EPOLLPRI | libc::EPOLLERR) as u32, + p as usize as u64, + ) + } + } +} + +/// Interest update — same EPOLL_CTL_MOD as socket [`poll_change`], but the +/// slot's bits commit only after the kernel accepts the change: a failed MOD +/// keeps the old interest, so an identical retry re-issues the syscall. +pub(crate) fn registry_change(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + let mut st = poll_access::read_poll(p); + let old_events = st.events(); + if old_events == events { + return 0; + } + let rc = poll_access::epoll_ctl( + poll_access::loop_fd(loop_), + libc::EPOLL_CTL_MOD, + st.fd(), + kernel_bits(events), + p as usize as u64, + ); + if rc != 0 { + return rc; + } + st.set_polling(events); + poll_access::write_poll(p, st); + backend::update_pending_ready_polls(loop_, p, p, old_events, events); + rc +} + +pub(crate) fn registry_disarm( + p: *mut PollState, + loop_: *mut Loop, + _armed: crate::loop_::poll_registry::ArmedSource, +) { + poll_stop(p, loop_); +} + +pub(crate) fn wait_immediate(loop_: *mut Loop) -> i32 { + poll_access::epoll_wait_ready(loop_, 0) +} + +/// R1.18: `current_ready_poll` is the live loop cursor (nested ticks and +/// `update_pending_ready_polls` read/write it mid-iteration — verbatim quirk). +pub(crate) fn dispatch_ready_polls(loop_: *mut Loop) { + poll_access::set_current_ready_poll(loop_, 0); + while poll_access::current_ready_poll(loop_) < poll_access::num_ready_polls(loop_) { + let i = poll_access::current_ready_poll(loop_); + let entry = poll_access::ready_poll_at(loop_, i); + let udata = entry.u64; + if udata != 0 { + let mut kernel_events = entry.events; + // EPOLLPRI is only ever requested by registry Pri sources (PSI + // trigger fds), whose believed events are READABLE — translate so + // the R1.18 mask passes the event through. + if kernel_events & libc::EPOLLPRI as u32 != 0 { + kernel_events |= libc::EPOLLIN as u32; + } + // Normalized to 0/1 like kqueue's EV_ERROR: a raw EPOLLERR (8) + // would read as errno 8 downstream (R1.18). + let error = kernel_events & libc::EPOLLERR as u32 != 0; + let eof = kernel_events & libc::EPOLLHUP as u32 != 0; + backend::dispatch_untagged(udata, error, eof, Events(kernel_events)); + } + poll_access::set_current_ready_poll(loop_, poll_access::current_ready_poll(loop_) + 1); + } +} diff --git a/src/usockets/backend/kqueue.rs b/src/usockets/backend/kqueue.rs new file mode 100644 index 000000000000..66ee41695e3b --- /dev/null +++ b/src/usockets/backend/kqueue.rs @@ -0,0 +1,535 @@ +//! kqueue backend (macOS/FreeBSD). Implements docs/semantics.md §1-2 poll +//! mechanics: kevent64 changelists with KEVENT_FLAG_ERROR_EVENTS errno +//! mirroring, level-triggered EVFILT_READ + one-shot EVFILT_WRITE (incl. the +//! zero-events add-oneshot-WRITE-for-FIN rule), two-pass per-poll coalesce. +//! All udata are untagged slot pointers (the poll registry removed the tagged-pointer +//! FilePoll back-channel). + +use core::ptr; + +use crate::LIBUS_SOCKET_DESCRIPTOR; +use crate::backend::{self, Events, MAX_READY_POLLS, PollState}; +use crate::loop_::Loop; +use crate::unsafe_core::poll_access; + +/// macOS uses `kevent64_s`; usockets aliases it to `struct kevent` on FreeBSD. +#[cfg(target_os = "macos")] +pub type EventType = libc::kevent64_s; +#[cfg(target_os = "freebsd")] +pub type EventType = libc::kevent; + +/// Kqueue may deliver the same poll twice (one kevent per filter, R1.21). +pub(crate) const READY_DUPES: i32 = 2; + +/// `kqueue_change` (R2.9): ≤2 kevent64 changes. EVFILT_READ is +/// level-triggered; EVFILT_WRITE is ALWAYS one-shot. Polling for neither +/// direction arms a one-shot WRITE so a half-open socket still learns about +/// the peer's FIN (epoll relies on implicit EPOLLHUP instead). +pub(crate) fn kqueue_change( + kqfd: i32, + fd: LIBUS_SOCKET_DESCRIPTOR, + old_events: Events, + new_events: Events, + udata: u64, +) -> i32 { + let mut changes = [poll_access::zeroed_kev(); 2]; + let mut n = 0usize; + + let is_readable = new_events.contains(Events::READABLE); + let is_writable = new_events.contains(Events::WRITABLE); + + if is_readable != old_events.contains(Events::READABLE) { + changes[n] = poll_access::make_kev( + fd, + libc::EVFILT_READ, + if is_readable { + libc::EV_ADD + } else { + libc::EV_DELETE + }, + udata, + ); + n += 1; + } + + if !is_readable && !is_writable { + if !old_events.contains(Events::WRITABLE) { + changes[n] = poll_access::make_kev( + fd, + libc::EVFILT_WRITE, + libc::EV_ADD | libc::EV_ONESHOT, + udata, + ); + n += 1; + } + } else if is_writable != old_events.contains(Events::WRITABLE) { + changes[n] = poll_access::make_kev( + fd, + libc::EVFILT_WRITE, + if is_writable { + libc::EV_ADD | libc::EV_ONESHOT + } else { + libc::EV_DELETE + }, + udata, + ); + n += 1; + } + + poll_access::kevent_error_events(kqfd, &mut changes[..n]) +} + +pub(crate) fn poll_start_rc(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + let mut st = poll_access::read_poll(p); + st.set_polling(events); + poll_access::write_poll(p, st); + kqueue_change( + poll_access::loop_fd(loop_), + st.fd(), + Events::NONE, + events, + p as usize as u64, + ) +} + +pub(crate) fn poll_change(p: *mut PollState, loop_: *mut Loop, events: Events) { + let mut st = poll_access::read_poll(p); + let old_events = st.events(); + if old_events == events { + return; + } + st.set_polling(events); + poll_access::write_poll(p, st); + kqueue_change( + poll_access::loop_fd(loop_), + st.fd(), + old_events, + events, + p as usize as u64, + ); + backend::update_pending_ready_polls(loop_, p, p, old_events, events); +} + +/// R2.10: with no W armed, the zero-events rule ADDs a one-shot +/// EVFILT_WRITE carrying `udata = 0` — delivered later as a NULL ready +/// poll and skipped. Poll bits in `p` are NOT cleared. +pub(crate) fn poll_stop(p: *mut PollState, loop_: *mut Loop) { + let st = poll_access::read_poll(p); + let old_events = st.events(); + if !old_events.is_empty() { + kqueue_change( + poll_access::loop_fd(loop_), + st.fd(), + old_events, + Events::NONE, + 0, + ); + // Believed-W: the one-shot EVFILT_WRITE (udata = p) may still be armed + // and kqueue_change's zero-events branch never deletes it — delete it + // so a kept-open fd can't fire into a freed slot (ENOENT if delivered). + if old_events.contains(Events::WRITABLE) { + let mut wr = [poll_access::make_kev( + st.fd(), + libc::EVFILT_WRITE, + libc::EV_DELETE, + 0, + )]; + poll_access::kevent_error_events(poll_access::loop_fd(loop_), &mut wr); + } + } else { + // believed-NONE can still have an armed one-shot EVFILT_WRITE with + // real slot udata (pause -> raw_shutdown). Detach paths keep the fd + // open, so no close-DEL destroys the knote: delete both filters. + let kqfd = poll_access::loop_fd(loop_); + let fd = st.fd(); + let mut rd = [poll_access::make_kev( + fd, + libc::EVFILT_READ, + libc::EV_DELETE, + 0, + )]; + poll_access::kevent_error_events(kqfd, &mut rd); + let mut wr = [poll_access::make_kev( + fd, + libc::EVFILT_WRITE, + libc::EV_DELETE, + 0, + )]; + poll_access::kevent_error_events(kqfd, &mut wr); + } + backend::update_pending_ready_polls(loop_, p, ptr::null_mut(), old_events, Events::NONE); +} + +/// Kqueue user events have no underlying fd to drain. +pub(crate) fn accept_poll_event(_p: *mut PollState) -> u64 { + 0 +} + +// ── poll registry sources ───────────────────────────────────────────────────── +// Registry Fd polls are LEVEL-triggered in both directions — the socket +// oneshot-WRITE / zero-events-FIN rules above do not apply to them. + +/// `EVFILT_MEMORYSTATUS` (xnu ; not in libc). fflags per +/// libdispatch's pressure registration. +#[cfg(target_os = "macos")] +const EVFILT_MEMORYSTATUS: i16 = -14; +#[cfg(target_os = "macos")] +const NOTE_MEMORYSTATUS_PRESSURE_WARN: u32 = 0x00000002; +#[cfg(target_os = "macos")] +const NOTE_MEMORYSTATUS_PRESSURE_CRITICAL: u32 = 0x00000004; + +/// ≤2 EV_ADD/EV_DELETE deltas moving an Fd registration `old` → `new`. +/// One submission per filter (same discipline as `Kqueue::remove`): +/// FreeBSD's no-ERROR_EVENTS shim can abort a batched changelist at the +/// first error, which would leave the second filter's knote armed with +/// soon-stale udata (disarm-before-free). Returns the first nonzero rc plus the interest +/// actually reached (a failed filter keeps its old bit), so callers commit +/// only kernel truth to the slot. +fn registry_fd_delta( + kqfd: i32, + fd: LIBUS_SOCKET_DESCRIPTOR, + old: Events, + new: Events, + udata: u64, +) -> (i32, Events) { + let mut rc = 0; + let mut achieved = old; + for (bit, filter) in [ + (Events::READABLE, libc::EVFILT_READ), + (Events::WRITABLE, libc::EVFILT_WRITE), + ] { + let now = new.contains(bit); + if now != old.contains(bit) { + let mut ch = [poll_access::make_kev( + fd, + filter, + if now { libc::EV_ADD } else { libc::EV_DELETE }, + udata, + )]; + let r = poll_access::kevent_error_events(kqfd, &mut ch); + if r == 0 { + achieved = if now { + achieved | bit + } else { + Events(achieved.0 & !bit.0) + }; + } else if rc == 0 { + rc = r; + } + } + } + (rc, achieved) +} + +pub(crate) fn registry_arm( + p: *mut PollState, + loop_: *mut Loop, + source: crate::loop_::poll_registry::PollSource, +) -> i32 { + use crate::loop_::poll_registry::PollSource; + let kqfd = poll_access::loop_fd(loop_); + let udata = p as usize as u64; + let mut st = poll_access::read_poll(p); + match source { + PollSource::Fd { + readable, writable, .. + } => { + let events = backend::fd_interest(readable, writable); + // Commit only the achieved interest: on partial-arm failure the + // register unwind's purge then deletes exactly the armed filters. + let (rc, achieved) = registry_fd_delta(kqfd, st.fd(), Events::NONE, events, udata); + st.set_polling(achieved); + poll_access::write_poll(p, st); + rc + } + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + PollSource::Proc { pid } => { + st.set_polling(Events::READABLE); + poll_access::write_poll(p, st); + let mut ch = [poll_access::make_kev_ex( + pid as u64, + libc::EVFILT_PROC, + libc::EV_ADD, + libc::NOTE_EXIT, + udata, + )]; + poll_access::kevent_error_events(kqfd, &mut ch) + } + #[cfg(target_os = "macos")] + PollSource::Machport { port } => { + st.set_polling(Events::READABLE); + poll_access::write_poll(p, st); + let mut ch = [poll_access::make_kev_ex( + u64::from(port), + libc::EVFILT_MACHPORT, + libc::EV_ADD, + 0, + udata, + )]; + poll_access::kevent_error_events(kqfd, &mut ch) + } + #[cfg(target_os = "macos")] + PollSource::Memorystatus => { + st.set_polling(Events::READABLE); + poll_access::write_poll(p, st); + // EV_CLEAR: each pressure transition delivers once (libdispatch + // parity, same as io/'s registration). + let mut ch = [poll_access::make_kev_ex( + 0, + EVFILT_MEMORYSTATUS, + libc::EV_ADD | libc::EV_CLEAR, + NOTE_MEMORYSTATUS_PRESSURE_WARN | NOTE_MEMORYSTATUS_PRESSURE_CRITICAL, + udata, + )]; + poll_access::kevent_error_events(kqfd, &mut ch) + } + } +} + +/// Level-triggered interest update for a registry Fd source. Commits only +/// the interest the kernel accepted (see [`registry_fd_delta`]): a failed +/// filter keeps its old bit, so an identical retry re-issues the kevent. +pub(crate) fn registry_change(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + let mut st = poll_access::read_poll(p); + let old_events = st.events(); + if old_events == events { + return 0; + } + let (rc, achieved) = registry_fd_delta( + poll_access::loop_fd(loop_), + st.fd(), + old_events, + events, + p as usize as u64, + ); + if achieved != old_events { + st.set_polling(achieved); + poll_access::write_poll(p, st); + backend::update_pending_ready_polls(loop_, p, p, old_events, achieved); + } + rc +} + +pub(crate) fn registry_disarm( + p: *mut PollState, + loop_: *mut Loop, + armed: crate::loop_::poll_registry::ArmedSource, +) { + use crate::loop_::poll_registry::ArmedSource; + let kqfd = poll_access::loop_fd(loop_); + let st = poll_access::read_poll(p); + match armed { + ArmedSource::Fd => { + let old = st.events(); + if !old.is_empty() { + let _ = registry_fd_delta(kqfd, st.fd(), old, Events::NONE, 0); + } + } + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + ArmedSource::Proc { pid } => { + let mut ch = [poll_access::make_kev_ex( + pid as u64, + libc::EVFILT_PROC, + libc::EV_DELETE, + 0, + 0, + )]; + let _ = poll_access::kevent_error_events(kqfd, &mut ch); + } + #[cfg(target_os = "macos")] + ArmedSource::Machport { port } => { + let mut ch = [poll_access::make_kev_ex( + u64::from(port), + libc::EVFILT_MACHPORT, + libc::EV_DELETE, + 0, + 0, + )]; + let _ = poll_access::kevent_error_events(kqfd, &mut ch); + } + #[cfg(target_os = "macos")] + ArmedSource::Memorystatus => { + let mut ch = [poll_access::make_kev_ex( + 0, + EVFILT_MEMORYSTATUS, + libc::EV_DELETE, + 0, + 0, + )]; + let _ = poll_access::kevent_error_events(kqfd, &mut ch); + } + } + backend::update_pending_ready_polls(loop_, p, ptr::null_mut(), st.events(), Events::NONE); +} + +pub(crate) fn wait_immediate(loop_: *mut Loop) -> i32 { + poll_access::kevent_wait_ready(loop_, 0, true) +} + +// 1-byte coalesced flags (pass 1 writes every non-skipped index). +const FL_READABLE: u8 = 1 << 0; +const FL_WRITABLE: u8 = 1 << 1; +const FL_ERROR: u8 = 1 << 2; +const FL_EOF: u8 = 1 << 3; +const FL_SKIP: u8 = 1 << 4; +/// poll registry poll: dispatched per-kevent in pass 2 (no coalesce) so the +/// filter payload (fflags/data) survives to the handler. +const FL_REGISTERED: u8 = 1 << 5; + +#[cfg(target_os = "macos")] +fn is_readable_filter(filter: i16) -> bool { + filter == libc::EVFILT_READ || filter == libc::EVFILT_MACHPORT +} +#[cfg(target_os = "freebsd")] +fn is_readable_filter(filter: i16) -> bool { + filter == libc::EVFILT_READ || filter == libc::EVFILT_USER +} + +#[cfg(target_os = "macos")] +fn entry_parts(e: &EventType) -> (u64, i16, u16) { + (e.udata, e.filter, e.flags) +} +#[cfg(target_os = "freebsd")] +fn entry_parts(e: &EventType) -> (u64, i16, u16) { + (e.udata as u64, e.filter as i16, e.flags) +} + +#[cfg(target_os = "macos")] +fn entry_payload(e: &EventType) -> (u32, i64) { + (e.fflags, e.data) +} +#[cfg(target_os = "freebsd")] +fn entry_payload(e: &EventType) -> (u32, i64) { + (e.fflags, e.data as i64) +} + +/// Untagged, non-UDP udata pointing at an occupied-or-vacant slot with kind +/// bits == Registered. UDP low-bit tags are excluded FIRST — a tagged word +/// does not point at a PollState. +fn is_registered_udata(udata: u64) -> bool { + udata & backend::UDP_TAG_MASK == 0 + && poll_access::read_poll(udata as usize as *mut PollState).kind_bits() + == backend::KIND_REGISTERED +} + +/// Per-kevent registry dispatch: direction from the filter (everything that +/// is not EVFILT_WRITE reads as readable — PROC/MACHPORT/MEMORYSTATUS +/// included), error/eof from the flags, raw filter payload passed through. +/// R1.18 parity with epoll's `dispatch_untagged` mask: the filter direction +/// is ANDed with the slot's believed polling bits, so a same-batch stale +/// kevent for a direction removed by `PollRef::change` is dropped. +fn dispatch_registered_kevent(e: &EventType) { + let (udata, filter, flags) = entry_parts(e); + let (fflags, data) = entry_payload(e); + let p = udata as usize as *mut PollState; + let believed = poll_access::read_poll(p).events(); + let readable = filter != libc::EVFILT_WRITE && believed.contains(Events::READABLE); + let writable = filter == libc::EVFILT_WRITE && believed.contains(Events::WRITABLE); + let error = flags & libc::EV_ERROR != 0; + let eof = flags & libc::EV_EOF != 0; + if !readable && !writable && !error && !eof { + return; + } + crate::loop_::poll_registry::dispatch_ready( + p, + crate::loop_::poll_registry::PollEvents { + readable, + writable, + error, + eof, + fflags, + data, + }, + ); +} + +/// R1.19: kqueue delivers each filter as a separate kevent, so pass 1 +/// coalesces same-poll entries (backward scan; ≤2 kevents per fd) and pass 2 +/// dispatches in kernel order of each poll's FIRST kevent. +pub(crate) fn dispatch_ready_polls(loop_: *mut Loop) { + // Zero-init: entries a nested tick appends beyond pass 1's count read as + // no-flags in pass 2 and are dropped (the nested tick already dispatched + // them); C reads uninitialized stack there — deliberate UB removal. + let mut coalesced = [0u8; MAX_READY_POLLS]; + + // Pass 1: decode + merge. No callbacks run here, so the count is stable. + let n = poll_access::num_ready_polls(loop_).max(0); + for i in 0..n { + let entry = poll_access::ready_poll_at(loop_, i); + let (udata, filter, flags) = entry_parts(&entry); + if udata == 0 { + coalesced[i as usize] = FL_SKIP; + continue; + } + // poll registry entries skip the coalesce entirely — pass 2 dispatches + // each kevent with its filter payload intact. + if is_registered_udata(udata) { + coalesced[i as usize] = FL_REGISTERED; + continue; + } + + let mut bits = 0u8; + if is_readable_filter(filter) { + bits |= FL_READABLE; + } + if filter == libc::EVFILT_WRITE { + bits |= FL_WRITABLE; + } + if flags & libc::EV_ERROR != 0 { + bits |= FL_ERROR; + } + if flags & libc::EV_EOF != 0 { + bits |= FL_EOF; + } + + let mut merged = false; + for j in (0..i).rev() { + if coalesced[j as usize] & (FL_SKIP | FL_REGISTERED) == 0 + && poll_access::ready_poll_udata(loop_, j) == udata + { + coalesced[j as usize] |= bits; + coalesced[i as usize] = FL_SKIP; + merged = true; + break; + } + } + if !merged { + coalesced[i as usize] = bits; + } + } + + // Pass 2: dispatch through the loop's live cursor (verbatim C quirk — + // nested ticks and update_pending_ready_polls read/write it). + poll_access::set_current_ready_poll(loop_, 0); + while poll_access::current_ready_poll(loop_) < poll_access::num_ready_polls(loop_) { + let i = poll_access::current_ready_poll(loop_); + let udata = poll_access::ready_poll_udata(loop_, i); + if udata != 0 { + if coalesced[i as usize] & FL_REGISTERED != 0 { + let entry = poll_access::ready_poll_at(loop_, i); + dispatch_registered_kevent(&entry); + } else { + let bits = coalesced[i as usize]; + // bits == 0: nested-tick-appended entry beyond pass 1's count + // (already dispatched by the nested tick) — dropped here, so + // dispatch_untagged never sees an all-empty kqueue event. + if bits & FL_SKIP == 0 && bits != 0 { + let mut events = Events::NONE; + if bits & FL_READABLE != 0 { + events |= Events::READABLE; + } + if bits & FL_WRITABLE != 0 { + events |= Events::WRITABLE; + } + backend::dispatch_untagged( + udata, + bits & FL_ERROR != 0, + bits & FL_EOF != 0, + events, + ); + } + } + } + poll_access::set_current_ready_poll(loop_, poll_access::current_ready_poll(loop_) + 1); + } +} diff --git a/src/usockets/backend/libuv.rs b/src/usockets/backend/libuv.rs new file mode 100644 index 000000000000..8295349d7a49 --- /dev/null +++ b/src/usockets/backend/libuv.rs @@ -0,0 +1,198 @@ +//! libuv backend (Windows): one uv_poll per armed socket (owned via +//! `SocketHeader.uv_p`), uv_prepare/uv_check driving loop_pre/loop_post +//! around each uv_run iteration, us_timer_t, and active-handle proxying into +//! `uv_loop.active_handles`. Implements docs/semantics.md §1-2 (libuv arm) + +//! the active-handle keep-alive contract. +//! All uv unsafety lives in `unsafe_core::ffi::uv`; this file is safe glue. + +use core::ffi::c_void; + +use crate::backend::{Events, PollState}; +use crate::loop_::{Loop, WakeupAsync}; +use crate::socket::us_socket_t; +use crate::unsafe_core::ffi::uv; +use crate::unsafe_core::poll_access; + +// ── loop lifecycle (libuv.c:154-212) ───────────────────────────────────────── +// The loop module's `create_loop_raw`/`free_loop_raw` windows arms call these +// around loop-data init/free, mirroring the C order. + +/// `us_create_loop` libuv head (libuv.c:162-175): adopt `hint` when given +/// (Bun binds the uws loop to the thread's default libuv loop) else own a +/// fresh `uv_loop_new()`, then start the unreffed prepare/check hooks. +/// Fills `WindowsLoop.{uv_loop,is_default,pre,check}`. −1 on loop-create +/// failure (nothing to unwind). +pub(crate) fn loop_init(loop_: *mut Loop, hint: *mut c_void) -> i32 { + uv::loop_init(loop_, hint) +} + +/// `us_loop_free` head (libuv.c:191-199). The caller frees loop data +/// (timers/async close) between this and [`loop_teardown`]. +pub(crate) fn loop_close_hooks(loop_: *mut Loop) { + uv::loop_close_hooks(loop_); +} + +/// `us_loop_free` tail (libuv.c:203-208): owned loops get one last NOWAIT +/// run to fire close callbacks, then deletion; default (hint) loops don't. +pub(crate) fn loop_teardown(loop_: *mut Loop) { + uv::loop_teardown(loop_); +} + +/// `us_loop_run` (libuv.c:214-219). Callers hold only `*mut Loop` — uv_run +/// dispatches back into Rust, so no `&mut Loop` may span this call (C17). +pub(crate) fn run(loop_: *mut Loop) { + uv::loop_run_once(loop_); +} + +/// `us_loop_pump` (libuv.c:150-152). +pub(crate) fn pump(loop_: *mut Loop) { + uv::loop_pump(loop_); +} + +// ── socket poll arm/stop (libuv.c:93-133) ──────────────────────────────────── +// The uv_poll wrapper is created at first arm and owned by `s.uv_p` until +// `socket_poll_stop`; its box dies later in the uv_close callback (deferred +// free, R2.4). + +/// `us_poll_start` (libuv.c:93-105): polling bits, init_socket + always-unref +/// (keep-alive is Bun's `Async.KeepAlive`, not usockets), start. Always +/// returns 0 (R2.13); on uv_poll_init_socket failure the socket is left +/// unarmed with the polling bits clear (C ignores the rc and proceeds into +/// UB — we surface it in debug and keep R2.6's believed set truthful). +pub(crate) fn socket_poll_start(s: *mut us_socket_t, loop_: *mut Loop, events: Events) -> i32 { + if uv::socket_poll_is_armed(s) { + // Already-armed re-start = uv_poll_start with the new set (the C + // path re-inits the live handle; the restart is the effective part). + set_polling_bits(s, events); + uv::socket_poll_rearm(s, events); + return 0; + } + let armed = uv::socket_poll_first_arm(loop_, s, events); + debug_assert!(armed, "uv_poll_init_socket failed; socket will never fire"); + if armed { + set_polling_bits(s, events); + } + 0 +} + +/// `us_poll_change` (libuv.c:112-121): no-op when `uv_p` is null (never +/// armed / already stopped) or the believed event set is unchanged. +pub(crate) fn socket_poll_change(s: *mut us_socket_t, _loop: *mut Loop, events: Events) { + if !uv::socket_poll_is_armed(s) { + return; + } + if poll_access::read_poll(s.cast::()).events() != events { + set_polling_bits(s, events); + uv::socket_poll_rearm(s, events); + } +} + +/// `us_poll_stop` + deferred free (libuv.c:123-133): stop, null `uv_p`, then +/// uv_close; the wrapper is freed by its close callback, never here. +/// Tolerates never-armed/already-stopped sockets. +pub(crate) fn socket_poll_stop(s: *mut us_socket_t, _loop: *mut Loop) { + uv::socket_poll_stop_close(s); +} + +/// The PollState polling bits are the believed registration (R2.6) — the +/// dispatch-time source of truth, same as the POSIX backends. +fn set_polling_bits(s: *mut us_socket_t, events: Events) { + let p = s.cast::(); + let mut st = poll_access::read_poll(p); + st.set_polling(events); + poll_access::write_poll(p, st); +} + +// ── active-handle proxying (uv active handles keep the loop alive) ─────────────────── +// WindowsLoop keep-alive accounting goes into `uv_loop.active_handles` (a +// Bun-private counter libuv reads in `uv__loop_alive`), not `num_polls`. + +pub(crate) fn add_active(loop_: *mut Loop, value: u32) { + uv::add_active(loop_, value); +} + +pub(crate) fn sub_active(loop_: *mut Loop, value: u32) { + uv::sub_active(loop_, value); +} + +pub(crate) fn inc_active(loop_: *mut Loop) { + uv::add_active(loop_, 1); +} + +pub(crate) fn dec_active(loop_: *mut Loop) { + uv::sub_active(loop_, 1); +} + +pub(crate) fn unref_count(loop_: *mut Loop, count: i32) { + uv::unref_count_active(loop_, count); +} + +pub(crate) fn is_active(loop_: *mut Loop) -> bool { + uv::loop_alive(loop_) +} + +pub(crate) fn active_count(loop_: *mut Loop) -> u32 { + uv::active_count(loop_) +} + +// ── wakeup async (R10.4 libuv arm) ─────────────────────────────────────────── + +/// uv_async, unreffed; `cb` receives the LOOP pointer (`cb_expects_the_loop`). +pub(crate) fn create_wakeup_async( + loop_: *mut Loop, + cb: unsafe extern "C" fn(*mut Loop), +) -> *mut WakeupAsync { + uv::wakeup_async_create(loop_, cb) +} + +/// `us_wakeup_loop` libuv arm: just uv_async_send, callable from any thread — +/// no `pending_wakeups` consumption on this backend (R10.1). +pub(crate) fn wakeup_async_send(a: *mut WakeupAsync) { + uv::wakeup_async_send(a); +} + +pub(crate) fn wakeup_async_close(a: *mut WakeupAsync) { + uv::wakeup_async_close(a); +} + +// ── us_timer_t (libuv only — POSIX has no us_timer users left) ─────────────── + +/// Opaque: a `us_internal_callback_t` header + embedded uv_timer_t + ext in +/// one allocation (`ffi::uv::TimerBlob`). Freed only by its uv_close callback. +pub struct Timer { + _opaque: [u8; 0], +} + +impl Timer { + /// `us_create_timer`; `fallthrough` = unreffed (does not keep loop alive). + pub fn create(loop_: *mut Loop, fallthrough: bool, ext_size: usize) -> *mut Timer { + uv::timer_create(loop_, fallthrough, ext_size) + } + + /// `us_timer_set`: `ms == 0` → stop; sweep timer is one-shot-guarded so + /// repeated enable_sweep calls don't skew the 4 s cadence (OQ-16). + pub fn set( + t: *mut Timer, + cb: Option, + ms: i32, + repeat_ms: i32, + ) { + uv::timer_set(t, cb, ms, repeat_ms); + } + + /// `us_timer_close`: always refs, stops, then defer-frees via uv_close. + pub fn close(t: *mut Timer) { + uv::timer_close(t); + } + + /// `us_timer_loop`. + pub(crate) fn owner_loop(t: *mut Timer) -> *mut Loop { + uv::timer_loop(t) + } +} + +/// Sweep driver: on libuv the 4 s sweep is the repeating uv timer's callback, +/// not a poll-deadline fold (R5.8 libuv arm, loop.c:386-389). +pub(crate) extern "C" fn sweep_timer_cb(t: *mut Timer) { + crate::loop_::timeouts::timer_sweep(Timer::owner_loop(t)); +} diff --git a/src/usockets/backend/mod.rs b/src/usockets/backend/mod.rs new file mode 100644 index 000000000000..539120b70266 --- /dev/null +++ b/src/usockets/backend/mod.rs @@ -0,0 +1,441 @@ +//! cfg-selected eventing backend (static dispatch; the future io_uring seam). +//! Poll semantics per docs/semantics.md §2 (POLL LAYER), including the +//! SEMI_SOCKET / CALLBACK / UDP / REGISTERED (poll registry) poll types. +//! Every udata is an untagged pointer owned by this crate (the poll registry deleted the +//! tagged-pointer FilePoll back-channel). + +#[cfg(any(target_os = "linux", target_os = "android"))] +pub mod epoll; +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +pub mod kqueue; +#[cfg(windows)] +pub mod libuv; + +#[cfg(any(target_os = "linux", target_os = "android"))] +pub use epoll::EventType; +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +pub use kqueue::EventType; + +#[cfg(any(target_os = "linux", target_os = "android"))] +use epoll as platform; +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +use kqueue as platform; + +use core::ffi::c_void; + +use crate::LIBUS_SOCKET_DESCRIPTOR; +use crate::loop_::Loop; +use crate::unsafe_core::{deref, io, poll_access}; + +/// `LIBUS_MAX_READY_POLLS` — capacity of `Loop.ready_polls`. +#[cfg(not(windows))] +pub(crate) const MAX_READY_POLLS: usize = 1024; + +/// `POLL_TYPE_*` — low bits of the poll state (docs/semantics.md §2). +/// Deliberately renumbered vs internal.h (C: SOCKET=0..UDP=4); legal because +/// POLL_TYPE_* is crate-internal (docs/cabi.md §8) — do NOT "fix" to C. +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub enum PollType { + // 0 is deliberately unassigned: a decommitted slab chunk reads as zeroed + // memory, so kind bits 0 must resolve to dispatch's dropped arm — never + // to a dispatchable kind (Callback polls have no generation guard). + Callback = 1, + /// A connect-in-progress or listen socket; dispatch bit-tests WRITABLE + /// to tell them apart (loop.c:453). + SemiSocket = 2, + SocketShutDown = 3, + Socket = 4, + /// unsafe_core/io.rs packs `Udp as usize` into udata LOW bits (see + /// [`UDP_TAG_MASK`]); the value must stay nonzero, odd, and ≤ 0xF. + Udp = 5, + /// First-class non-socket registration (loop_/poll_registry.rs). + /// Slab-backed like sockets: dispatch generation-guards the slot, so a + /// vacant slot retaining kind 6 drops the event. + Registered = 6, +} + +const KIND_CALLBACK: u8 = PollType::Callback as u8; +const KIND_SEMI_SOCKET: u8 = PollType::SemiSocket as u8; +const KIND_SOCKET_SHUT_DOWN: u8 = PollType::SocketShutDown as u8; +const KIND_SOCKET: u8 = PollType::Socket as u8; +pub(crate) const KIND_REGISTERED: u8 = PollType::Registered as u8; + +/// Low 4 bits of an UNTAGGED udata word: `io::udp_tag` packs +/// `socket_ptr | PollType::Udp` (udp::Socket is align(16)); every other +/// udata is an aligned pointer with zero low bits. +#[cfg(not(windows))] +pub(crate) const UDP_TAG_MASK: u64 = 0xF; + +use crate::socket::ECONNRESET_ERRNO; + +/// Platform readiness bits (`LIBUS_SOCKET_READABLE`/`WRITABLE` differ per +/// platform and cross the ABI — docs/cabi.md §8). +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct Events(pub u32); + +impl Events { + #[cfg(any(target_os = "linux", target_os = "android"))] + pub const READABLE: Events = Events(libc::EPOLLIN as u32); + #[cfg(any(target_os = "linux", target_os = "android"))] + pub const WRITABLE: Events = Events(libc::EPOLLOUT as u32); + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + pub const READABLE: Events = Events(1); + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + pub const WRITABLE: Events = Events(2); + #[cfg(windows)] + pub const READABLE: Events = Events(1); // UV_READABLE + #[cfg(windows)] + pub const WRITABLE: Events = Events(2); // UV_WRITABLE + + pub const NONE: Events = Events(0); + + #[inline] + pub fn contains(self, other: Events) -> bool { + self.0 & other.0 != 0 + } + + #[inline] + pub fn is_empty(self) -> bool { + self.0 == 0 + } +} + +impl core::ops::BitOr for Events { + type Output = Events; + fn bitor(self, rhs: Events) -> Events { + Events(self.0 | rhs.0) + } +} + +impl core::ops::BitAnd for Events { + type Output = Events; + fn bitand(self, rhs: Events) -> Events { + Events(self.0 & rhs.0) + } +} + +impl core::ops::BitOrAssign for Events { + fn bitor_assign(&mut self, rhs: Events) { + self.0 |= rhs.0; + } +} + +/// `us_poll_t` state word: `{fd:27 signed, poll_type:5}` (R2.2). The 5-bit +/// poll_type holds the kind in its low 3 bits plus POLLING_OUT/POLLING_IN. +/// Every poll-owning object embeds this as its FIRST field (repr(C)) so the +/// kernel udata pointer doubles as the object pointer. +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct PollState(pub(crate) u32); + +impl PollState { + const FD_BITS: u32 = 27; + const FD_MASK: u32 = (1 << Self::FD_BITS) - 1; + const KIND_MASK: u32 = 0b111 << Self::FD_BITS; + /// `POLL_TYPE_POLLING_OUT` (8) / `POLL_TYPE_POLLING_IN` (16) within the + /// 5-bit poll_type field. + const POLLING_OUT: u32 = 1 << (Self::FD_BITS + 3); + const POLLING_IN: u32 = 1 << (Self::FD_BITS + 4); + + /// `us_poll_init` (R2.5): sets fd + kind, clearing the polling bits. + /// fd is limited to 2^26-1 (silently truncated like the C bitfield). + pub(crate) const fn init(fd: LIBUS_SOCKET_DESCRIPTOR, kind: PollType) -> PollState { + PollState((fd as u32 & Self::FD_MASK) | ((kind as u32) << Self::FD_BITS)) + } + + /// Signed 27-bit fd (−1 legal but never used). POSIX-only: a Windows + /// SOCKET does not fit — libuv paths read the full-width `SocketHeader.fd`. + #[cfg(not(windows))] + pub(crate) const fn fd(self) -> LIBUS_SOCKET_DESCRIPTOR { + ((self.0 << (32 - Self::FD_BITS)) as i32) >> (32 - Self::FD_BITS) + } + + pub(crate) const fn kind_bits(self) -> u8 { + ((self.0 & Self::KIND_MASK) >> Self::FD_BITS) as u8 + } + + /// `us_internal_poll_set_type` (R2.5): replaces the kind bits only, + /// preserving polling bits — the poll must be inited first. + pub(crate) fn set_kind(&mut self, kind: PollType) { + self.0 = (self.0 & !Self::KIND_MASK) | ((kind as u32) << Self::FD_BITS); + } + + /// `us_poll_events` (R2.6): the poll's *believed* registration; the + /// source of truth for the dispatch-time event mask (R1.18). + pub(crate) const fn events(self) -> Events { + let mut e = 0u32; + if self.0 & Self::POLLING_IN != 0 { + e |= Events::READABLE.0; + } + if self.0 & Self::POLLING_OUT != 0 { + e |= Events::WRITABLE.0; + } + Events(e) + } + + pub(crate) fn set_polling(&mut self, events: Events) { + self.0 &= !(Self::POLLING_IN | Self::POLLING_OUT); + if events.contains(Events::READABLE) { + self.0 |= Self::POLLING_IN; + } + if events.contains(Events::WRITABLE) { + self.0 |= Self::POLLING_OUT; + } + } +} + +/// Invoked with `loop_` when `cb_expects_the_loop`, else with the poll +/// pointer itself (the C `us_internal_callback_t` cast dance, type-erased). +pub(crate) type CallbackFn = unsafe extern "C" fn(*mut c_void); + +/// `us_internal_callback_t` — the CALLBACK-kind poll body (wakeup async; +/// timers exist only on libuv). loop_/wakeup.rs owns creation/teardown. +#[repr(C)] +#[derive(Copy, Clone)] +pub(crate) struct CallbackPoll { + pub state: PollState, + pub loop_: *mut Loop, + pub cb: Option, + /// Skip `accept_poll_event` (edge-triggered eventfd wakeup on epoll). + pub leave_poll_ready: bool, + pub cb_expects_the_loop: bool, + #[cfg(target_os = "macos")] + pub port: u32, // mach_port_t + #[cfg(target_os = "macos")] + pub machport_buf: *mut c_void, +} + +// ── poll registration (R2.7-R2.11; per-platform kernel mechanics) ──────────── + +/// `us_poll_start_rc`: store polling bits, register with the kernel, return +/// the raw rc (0 success; epoll −1 + errno, kqueue >0 error events + errno). +#[cfg(not(windows))] +pub(crate) fn poll_start_rc(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + platform::poll_start_rc(p, loop_, events) +} + +/// `us_poll_change` (R2.8): no-op if unchanged, else re-register and null +/// out removed instances in the pending ready-poll window. +#[cfg(not(windows))] +pub(crate) fn poll_change(p: *mut PollState, loop_: *mut Loop, events: Events) { + platform::poll_change(p, loop_, events); +} + +/// `us_poll_stop` (R2.10). Poll bits in `p` are NOT cleared. +#[cfg(not(windows))] +pub(crate) fn poll_stop(p: *mut PollState, loop_: *mut Loop) { + platform::poll_stop(p, loop_); +} + +/// `us_internal_accept_poll_event`: epoll reads 8 bytes off the eventfd +/// (EINTR-retried); kqueue user events have no underlying fd (no-op, 0). +#[cfg(not(windows))] +pub(crate) fn accept_poll_event(p: *mut PollState) -> u64 { + platform::accept_poll_event(p) +} + +// ── poll registry registration (per-source kernel mechanics) ───────────────── + +/// Interest-set → platform readiness bits for registry Fd sources. +#[cfg(not(windows))] +pub(crate) fn fd_interest(readable: bool, writable: bool) -> Events { + let mut e = Events::NONE; + if readable { + e |= Events::READABLE; + } + if writable { + e |= Events::WRITABLE; + } + e +} + +/// Arm a registry source; returns 0 on success, else the raw rc with errno +/// set (same contract as [`poll_start_rc`]). +#[cfg(not(windows))] +pub(crate) fn registry_arm( + p: *mut PollState, + loop_: *mut Loop, + source: crate::loop_::poll_registry::PollSource, +) -> i32 { + platform::registry_arm(p, loop_, source) +} + +/// Update a registry Fd source's interest (level-triggered on both backends +/// — no oneshot-WRITE socket rule). Returns 0 on success, else the raw rc +/// with errno set (same contract as [`poll_start_rc`]). +#[cfg(not(windows))] +pub(crate) fn registry_change(p: *mut PollState, loop_: *mut Loop, events: Events) -> i32 { + platform::registry_change(p, loop_, events) +} + +/// Disarm a registry source and null its pending ready-list entries. Must +/// strictly precede the slot free. +#[cfg(not(windows))] +pub(crate) fn registry_disarm( + p: *mut PollState, + loop_: *mut Loop, + armed: crate::loop_::poll_registry::ArmedSource, +) { + platform::registry_disarm(p, loop_, armed) +} + +// ── ready-poll pipeline (R1.18-R1.21) ───────────────────────────────────────── + +/// `us_internal_dispatch_ready_polls`: iterate `ready_polls` via the loop's +/// live `current_ready_poll` cursor (nested ticks may clobber it — quirk +/// ported verbatim), routing tagged udata to Bun's FilePoll dispatch. +#[cfg(not(windows))] +pub(crate) fn dispatch_ready_polls(loop_: *mut Loop) { + platform::dispatch_ready_polls(loop_); +} + +/// `us_internal_drain_ready_polls` (R1.20): while the kernel filled the +/// whole buffer, re-poll non-blocking and dispatch again, at most 48 times. +#[cfg(not(windows))] +pub(crate) fn drain_ready_polls(loop_: *mut Loop) { + let mut drain_count: i32 = 48; + while poll_access::num_ready_polls(loop_) == MAX_READY_POLLS as i32 + && { + drain_count -= 1; + drain_count != 0 + } + && poll_access::num_polls(loop_) > 0 + { + let n = platform::wait_immediate(loop_); + if n <= 0 { + poll_access::set_num_ready_polls(loop_, 0); + break; + } + platform::dispatch_ready_polls(loop_); + } +} + +/// `us_internal_loop_update_pending_ready_polls` (R1.21): rewrite up to N +/// not-yet-dispatched entries whose udata equals `old` (N = 1 epoll, +/// 2 kqueue). `new` may be null (poll_stop / close). +#[cfg(not(windows))] +pub(crate) fn update_pending_ready_polls( + loop_: *mut Loop, + old: *mut PollState, + new: *mut PollState, + _old_events: Events, + _new_events: Events, +) { + let old_word = old as usize as u64; + let new_word = new as usize as u64; + let mut remaining = platform::READY_DUPES; + let mut i = poll_access::current_ready_poll(loop_); + while i < poll_access::num_ready_polls(loop_) && remaining > 0 { + if poll_access::ready_poll_udata(loop_, i) == old_word { + poll_access::set_ready_poll_udata(loop_, i, new_word); + remaining -= 1; + } + i += 1; + } +} + +// ── per-poll dispatch (R2.12) ───────────────────────────────────────────────── + +/// Untagged-udata router: a UDP udata is `socket_ptr | PollType::Udp` and +/// does NOT point at a PollState — decode it BEFORE the word is treated as +/// one. Masks kernel events with the poll's believed events (R1.18). +#[cfg(not(windows))] +pub(crate) fn dispatch_untagged(udata: u64, error: bool, eof: bool, raw: Events) { + if udata & UDP_TAG_MASK == PollType::Udp as u64 { + let s = (udata & !UDP_TAG_MASK) as usize as *mut crate::udp::Socket; + let events = raw & Events(io::udp_poll_events(s)); + if !events.is_empty() || error || eof { + // eof is unread in the UDP arm, as in C's POLL_TYPE_UDP case. + crate::udp::dispatch_ready_poll( + s, + error, + events.contains(Events::READABLE), + events.contains(Events::WRITABLE), + ); + } + return; + } + let p = udata as usize as *mut PollState; + let events = raw & poll_access::read_poll(p).events(); + if !events.is_empty() || error || eof { + dispatch_ready_poll(p, error, eof, events); + } +} + +/// `us_internal_dispatch_ready_poll`: switch on the poll kind. Slab-backed +/// kinds probe the slot's generation PARITY (quirk OQ-4 — docs/semantics.md): vacant +/// drops the event; recycled slots are unreachable (deferred free + close DEL). +pub(crate) fn dispatch_ready_poll(p: *mut PollState, error: bool, eof: bool, events: Events) { + let st = poll_access::read_poll(p); + // INVARIANT: kind bits are read from possibly-recycled slab memory BEFORE + // the generation probe; vacant slots keep kind in {2,3,4,6} — all + // generation-guarded arms — and decommitted chunks read 0 (unassigned), + // so neither reaches the unguarded CALLBACK arm. + match st.kind_bits() { + KIND_SEMI_SOCKET | KIND_SOCKET | KIND_SOCKET_SHUT_DOWN => { + if poll_access::slab_generation(p) & 1 == 0 { + return; + } + if st.kind_bits() == KIND_SEMI_SOCKET { + // A connecting socket may have gained R via a pre-connect + // partial write; test the W bit, not equality. Listen + // sockets only ever poll READABLE (loop.c:446-453). + if st.events().contains(Events::WRITABLE) { + let s = p.cast::(); + // loop.c:453-467: report the kernel's actual SO_ERROR + // (0 → ECONNRESET for the completed-then-reset race), + // never the literal error/eof booleans. Full-width header + // fd — the packed PollState fd is 27-bit (POSIX-only). + let mut connect_error = 0; + if error || eof { + connect_error = io::so_error(deref::with_socket(s, |h| h.fd)); + if connect_error == 0 { + connect_error = ECONNRESET_ERRNO; + } + } + let cs = deref::with_socket(s, |h| h.connect_state); + crate::socket::on_connect(s, cs, connect_error); + } else { + crate::group::on_accept_poll_ready(p.cast()); + } + } else { + crate::socket::on_socket_poll_ready(p.cast(), error, eof, events); + } + } + // poll registry polls; epoll/libuv route here. Unreachable on kqueue: + // pass 1 tags registered udata FL_REGISTERED (per-kevent payload + // dispatch) and pass 2 drops zero-flag nested-tick appends before + // dispatch_untagged. Generation guard lives in dispatch_ready. + KIND_REGISTERED => { + crate::loop_::poll_registry::dispatch_ready( + p, + crate::loop_::poll_registry::PollEvents { + readable: events.contains(Events::READABLE), + writable: events.contains(Events::WRITABLE), + error, + eof, + fflags: 0, + data: 0, + }, + ); + } + KIND_CALLBACK => { + let cb = poll_access::read_callback_poll(p.cast()); + if !cb.leave_poll_ready { + #[cfg(not(windows))] + accept_poll_event(p); + } + let arg = if cb.cb_expects_the_loop { + cb.loop_.cast::() + } else { + p.cast::() + }; + poll_access::invoke_callback(cb.cb.expect("CALLBACK poll without cb"), arg); + } + // Udp never reaches this switch (routed by the low-bit udata tag in + // dispatch_untagged); 0 is unassigned (zeroed/decommitted slot reads + // land here); garbage kind bits from a recycled slot are dropped. + _ => {} + } +} diff --git a/src/usockets/cabi.rs b/src/usockets/cabi.rs new file mode 100644 index 000000000000..003a7cffa1fb --- /dev/null +++ b/src/usockets/cabi.rs @@ -0,0 +1,1007 @@ +//! extern "C" surface for surviving C/C++ consumers (uWS headers, the +//! libuwsockets shims, quic.c, NodeTLS.cpp, JSNodeHTTPServerSocket, webview +//! backends). Signatures per docs/cabi.md §1 + §9.1 ("minimal surface"); +//! includes the 3 helpers moved out of the SHIM (§9.3) and the 5 accessor +//! patches from §9.2 (us_socket_t / us_listen_socket_t / us_loop_t are opaque +//! to all surviving C/C++; only us_socket_group_t stays public repr(C)). +//! +//! `us_raw_root_certs` / `us_get_root_{extra,system}_cert_instances` / +//! `us_get_default_ca_store` are NOT exported here: root_certs*.cpp survive +//! as C++ TUs and keep those symbols (docs/cabi.md §1.7). + +use core::ffi::{CStr, c_char, c_int, c_uchar, c_uint, c_ushort, c_void}; +use core::ptr; + +use crate::connecting; +use crate::group::{SocketGroup, VTable}; +use crate::handle::ListenSocket; +use crate::loop_::Loop; +use crate::socket::us_socket_t; +use crate::tls::Transport; +use crate::tls::context::{BunSocketContextOptions, SslCtx, create_bun_socket_error_t}; +use crate::udp; +use crate::unsafe_core::{ext, ffi, io}; +use crate::{LIBUS_SOCKET_DESCRIPTOR, SocketKind}; + +// ── opaque C types with no Rust-side definition ────────────────────────────── + +/// `us_poll_t` — opaque here; the only surviving callers are quic.c's +/// `us_poll_fd`/`us_poll_change` on `us_udp_socket_poll` handles +/// (docs/cabi.md §3.4). Layout contract: `udp::Socket` (repr(C)) stores +/// the fd at offset 0 — asserted at [`us_poll_fd`]. +#[repr(C)] +pub struct us_poll_t { + _opaque: [u8; 0], +} + +/// `uws_res_t` — C++ HttpResponse handle (identity-cast of us_socket_t). +#[repr(C)] +pub struct uws_res_t { + _opaque: [u8; 0], +} + +pub type LoopCb = unsafe extern "C" fn(*mut Loop); + +// ── boundary helpers (length checks, nullable lowering) ───────────────────── + +/// `(ptr, c_int len)` → byte slice; null/non-positive lengths become empty. +unsafe fn byte_slice<'a>(data: *const c_char, len: c_int) -> &'a [u8] { + // SAFETY: caller passes a buffer valid for `len` bytes when non-null. + unsafe { + ext::c_slice( + data.cast_mut().cast::(), + usize::try_from(len).unwrap_or(0), + ) + } +} + +unsafe fn opt_cstr<'a>(p: *const c_char) -> Option<&'a CStr> { + // SAFETY: caller passes a NUL-terminated string when non-null. + (!p.is_null()).then(|| unsafe { CStr::from_ptr(p) }) +} + +fn opt_ctx(p: *mut SslCtx) -> Option<*mut SslCtx> { + (!p.is_null()).then_some(p) +} + +/// C++ passes the `BUN_SOCKET_KIND_*` statics; anything outside the closed +/// 0..=22 world is rejected (a rogue value in a `#[repr(u8)]` enum is UB). +fn kind_from_c(kind: c_uchar) -> Option { + (kind <= SocketKind::UwsWsTls as u8).then(|| SocketKind::from_u8(kind)) +} + +// ── §9.1 Loop (6) ───────────────────────────────────────────────────────────── + +#[unsafe(no_mangle)] +pub extern "C" fn us_create_loop( + hint: *mut c_void, + wakeup_cb: Option, + pre_cb: Option, + post_cb: Option, + ext_size: c_uint, +) -> *mut Loop { + // SAFETY: seam allocates loop + ext and installs the runtime callbacks. + unsafe { ffi::create_loop_raw(hint, wakeup_cb, pre_cb, post_cb, ext_size as usize) } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_loop_free(loop_: *mut Loop) { + // SAFETY: caller passes a loop from us_create_loop, not yet freed. + unsafe { ffi::free_loop_raw(loop_) } +} + +/// Pointer just past `us_loop_t`, 16-aligned, stable for the loop lifetime +/// (uWS::LoopData lives there — hottest accessor in uWS). C: `loop + 1`. +#[unsafe(no_mangle)] +pub extern "C" fn us_loop_ext(loop_: *mut Loop) -> *mut c_void { + const { + assert!(core::mem::size_of::() % crate::LIBUS_EXT_ALIGNMENT == 0); + } + // SAFETY: us_create_loop allocates ext_size bytes directly after the Loop. + unsafe { loop_.add(1).cast::() } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_loop_run(loop_: *mut Loop) { + crate::loop_::wakeup::us_loop_run(loop_) +} + +/// The ONLY thread-safe entry point (docs/cabi.md §9.3.4). +#[unsafe(no_mangle)] +pub extern "C" fn us_wakeup_loop(loop_: *mut Loop) { + crate::loop_::wakeup::us_wakeup_loop(loop_) +} + +/// C no-op (loop.c:920 — timers are controlled dynamically by socket count). +#[unsafe(no_mangle)] +pub extern "C" fn us_loop_integrate(_loop: *mut Loop) {} + +// §9.2.5 quic.c loop-field accessors (us_loop_t is opaque to surviving C). + +/// QUIC live-conn keep-alive (POSIX only — the libuv path holds a uv poll). +#[cfg(not(windows))] +#[unsafe(no_mangle)] +pub extern "C" fn us_loop_poll_count_add(loop_: *mut Loop, delta: c_int) { + // SAFETY: nonnull loop contract. + unsafe { (*loop_).num_polls += delta }; +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_loop_quic_head(loop_: *mut Loop) -> *mut c_void { + // SAFETY: nonnull loop contract. + unsafe { (*loop_).internal_loop_data.quic_head } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_loop_quic_head_set(loop_: *mut Loop, head: *mut c_void) { + // SAFETY: nonnull loop contract. + unsafe { (*loop_).internal_loop_data.quic_head = head }; +} + +/// Relative-µs engine deadline folded into the poll wait; -1 = none. +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_loop_quic_next_tick_set( + loop_: *mut Loop, + relative_us: core::ffi::c_longlong, +) { + // SAFETY: nonnull loop contract. + unsafe { (*loop_).internal_loop_data.quic_next_tick_us = relative_us }; +} + +#[cfg(windows)] +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_loop_quic_timer( + loop_: *mut Loop, +) -> *mut crate::backend::libuv::Timer { + // SAFETY: nonnull loop contract. + unsafe { (*loop_).internal_loop_data.quic_timer.cast() } +} + +#[cfg(windows)] +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_loop_quic_timer_set( + loop_: *mut Loop, + timer: *mut crate::backend::libuv::Timer, +) { + // SAFETY: nonnull loop contract. + unsafe { (*loop_).internal_loop_data.quic_timer = timer.cast() }; +} + +// ── §9.1 Poll (2) ──────────────────────────────────────────────────────────── + +/// Poll-first-member contract: the fd is at offset 0 of the handle. Only UDP +/// handles from [`us_udp_socket_poll`] qualify (quic.c is the sole surviving +/// caller — docs/cabi.md §3.4); `SocketHeader`'s fd offset is NOT part of +/// this contract and must not be passed here (use `us_socket_get_fd`). Registry +/// polls (`loop_::poll_registry`) are never C-visible — out of +/// contract for both `us_poll_*` fns. +#[unsafe(no_mangle)] +pub extern "C" fn us_poll_fd(p: *mut us_poll_t) -> LIBUS_SOCKET_DESCRIPTOR { + const { + assert!(core::mem::offset_of!(udp::Socket, fd) == 0); + } + // SAFETY: caller passes a live poll-first handle; fd is its first field. + unsafe { *p.cast::() } +} + +/// Must be callable from inside poll dispatch. `events` are the per-platform +/// LIBUS_SOCKET_READABLE/WRITABLE values (docs/cabi.md §9.3.7). +#[unsafe(no_mangle)] +pub extern "C" fn us_poll_change(p: *mut us_poll_t, loop_: *mut Loop, events: c_int) { + // SAFETY: caller passes a live poll-first handle registered with `loop_`. + unsafe { ffi::poll_change_raw(p.cast::(), loop_, events as u32) } +} + +// ── §9.1 Timer (4, libuv/Windows only) ─────────────────────────────────────── + +#[cfg(windows)] +mod timer { + use super::*; + use crate::backend::libuv::Timer; + + #[unsafe(no_mangle)] + pub(crate) extern "C" fn us_create_timer( + loop_: *mut Loop, + fallthrough: c_int, + ext_size: c_uint, + ) -> *mut Timer { + // SAFETY: caller passes a live loop. + unsafe { ffi::timer_create(loop_, fallthrough != 0, ext_size as usize) } + } + + #[unsafe(no_mangle)] + pub(crate) extern "C" fn us_timer_set( + t: *mut Timer, + cb: Option, + ms: c_int, + repeat_ms: c_int, + ) { + // SAFETY: caller passes a timer from us_create_timer. + unsafe { ffi::timer_set(t, cb, ms, repeat_ms) } + } + + #[unsafe(no_mangle)] + pub(crate) extern "C" fn us_timer_loop(t: *mut Timer) -> *mut Loop { + // SAFETY: caller passes a live timer. + unsafe { ffi::timer_loop(t) } + } + + #[unsafe(no_mangle)] + pub(crate) extern "C" fn us_timer_close(t: *mut Timer, fallthrough: c_int) { + // SAFETY: caller passes a live timer; not used after this call. + unsafe { ffi::timer_close(t, fallthrough != 0) } + } +} + +// ── §9.1 Socket (24 + 3 moved from SHIM) ───────────────────────────────────── + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_write( + s: *mut us_socket_t, + data: *const c_char, + length: c_int, +) -> c_int { + // SAFETY: nonnull socket contract; data valid for `length` bytes. Raw + // entry: TLS writes can dispatch, so no `&mut` may span the call (C17). + unsafe { crate::write::write(s, byte_slice(data, length)) } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_write2( + s: *mut us_socket_t, + header: *const c_char, + header_length: c_int, + payload: *const c_char, + payload_length: c_int, +) -> c_int { + // SAFETY: nonnull socket contract; both buffers valid for their lengths. + // Raw entry: no `&mut` may span a dispatch-capable write (C17). + unsafe { + crate::write::write2( + s, + byte_slice(header, header_length), + byte_slice(payload, payload_length), + ) + } +} + +/// Fires on_close synchronously; returns the (still-valid-until-postlude) +/// socket. Idempotent w.r.t. already-closed (C3, C6). `code`/`reason` pass +/// through to on_close verbatim. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_close( + s: *mut us_socket_t, + code: c_int, + reason: *mut c_void, +) -> *mut us_socket_t { + // SAFETY: nonnull socket contract; legal mid-dispatch (C17). + unsafe { ffi::socket_close_raw(s, code, reason) } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_shutdown(s: *mut us_socket_t) { + // Raw entry: the TLS shutdown path can fire on_handshake (C17). + crate::socket::socket_shutdown(s); +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_shutdown_read(s: *mut us_socket_t) { + // SAFETY: nonnull socket contract. + unsafe { (*s).shutdown_read() } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_is_closed(s: *mut us_socket_t) -> c_int { + // SAFETY: nonnull socket contract; header readable until tick postlude (C6). + unsafe { (*s).is_closed() as c_int } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_is_shut_down(s: *mut us_socket_t) -> c_int { + // SAFETY: nonnull socket contract. + unsafe { (*s).is_shutdown() as c_int } +} + +/// Ext address is stable for the socket's lifetime — adoption is in-place +/// (docs/design.md §Strategy 3), so the "except across adopt" caveat is gone. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_ext(s: *mut us_socket_t) -> *mut c_void { + // SAFETY: nonnull socket contract. + unsafe { (*s).ext_ptr().cast::() } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group(s: *mut us_socket_t) -> *mut SocketGroup { + // SAFETY: nonnull socket contract. + unsafe { (*s).raw_group() } +} + +/// §9.2.1 group-list walk. Close-safe only if the caller caches the next +/// pointer before closing `s` (App.h::closeIdle does). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_next(s: *mut us_socket_t) -> *mut us_socket_t { + // SAFETY: nonnull socket contract. + unsafe { (*s).next } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_timeout(s: *mut us_socket_t, seconds: c_uint) { + // SAFETY: nonnull socket contract. + unsafe { (*s).set_timeout(seconds) } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_long_timeout(s: *mut us_socket_t, minutes: c_uint) { + // SAFETY: nonnull socket contract. + unsafe { (*s).set_long_timeout(minutes) } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_pause(s: *mut us_socket_t) { + // SAFETY: nonnull socket contract. + unsafe { (*s).pause() } +} + +/// Resume must redeliver buffered TLS plaintext if any. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_resume(s: *mut us_socket_t) { + // SAFETY: nonnull socket contract. + unsafe { (*s).resume() } +} + +/// Writes 4 (v4) or 16 (v6) raw bytes; `*length` in/out (in = capacity); +/// `*length = 0` on failure/unix. Capacity < ip length yields `Ok` with an +/// EMPTY view, `buf` unwritten — never truncated, never `Err` (the verbatim +/// C quirk, socket.c:56-64; socket.rs `remote_address`). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_remote_address( + s: *mut us_socket_t, + buf: *mut c_char, + length: *mut c_int, +) { + // SAFETY: nonnull socket contract; buf valid for `*length` bytes. + unsafe { + let cap = usize::try_from(*length).unwrap_or(0); + if buf.is_null() || cap == 0 { + *length = 0; + return; + } + let out = core::slice::from_raw_parts_mut(buf.cast::(), cap); + match (*s).remote_address(out) { + Ok(view) => *length = view.len() as c_int, + Err(_) => *length = 0, + } + } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_get_native_handle(s: *mut us_socket_t) -> *mut c_void { + // SAFETY: nonnull socket contract. + unsafe { (*s).get_native_handle().unwrap_or(ptr::null_mut()) } +} + +/// POSIX no-op (socket.c:691 — libuv only: uv_ref on the socket's uv poll). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_ref(s: *mut us_socket_t) { + #[cfg(windows)] + // SAFETY: nonnull socket contract. + unsafe { + ffi::socket_uv_ref(s) + }; + #[cfg(not(windows))] + let _ = s; +} + +/// POSIX no-op (socket.c:736 — libuv only: uv_unref). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_unref(s: *mut us_socket_t) { + #[cfg(windows)] + // SAFETY: nonnull socket contract. + unsafe { + ffi::socket_uv_unref(s) + }; + #[cfg(not(windows))] + let _ = s; +} + +/// In-place re-stamp (no realloc); the return is ALWAYS the input pointer — +/// kept in the signature for ABI stability (docs/design.md §Strategy 3). Legal +/// mid-on_data; dispatch continues with the returned pointer. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_adopt( + s: *mut us_socket_t, + group: *mut SocketGroup, + kind: c_uchar, + old_ext_size: c_int, + ext_size: c_int, +) -> *mut us_socket_t { + let Some(kind) = kind_from_c(kind) else { + return s; + }; + // SAFETY: nonnull socket/group contract; adoption is in-place. + unsafe { + (*s).adopt(&mut *group, kind, old_ext_size, ext_size) + .map_or(s, core::ptr::NonNull::as_ptr) + } +} + +/// C14: owns the fd only on success; frees the poll (not the fd) on failure. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_from_fd( + group: *mut SocketGroup, + kind: c_uchar, + ssl_ctx: *mut SslCtx, + socket_ext_size: c_int, + fd: LIBUS_SOCKET_DESCRIPTOR, + ipc: c_int, +) -> *mut us_socket_t { + let Some(kind) = kind_from_c(kind) else { + return ptr::null_mut(); + }; + // SAFETY: nonnull group contract; ssl_ctx nullable. + unsafe { (*group).from_fd(kind, opt_ctx(ssl_ctx), socket_ext_size, fd, ipc != 0) } +} + +/// Plain sockets report 1 (socket.c:146 — the C ssl==NULL branch). Must be +/// `SSL_is_init_finished`, NOT the crate handshake state: JSHS isAuthorized() +/// probes the "init finished, on_handshake not yet fired" window, and a +/// failed handshake must report 0 (openssl.c:2029-2032). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_is_ssl_handshake_finished(s: *mut us_socket_t) -> c_int { + // SAFETY: nonnull socket contract. + unsafe { + match &(*s).transport { + Transport::Plain => 1, + Transport::Tls(t) => (!t.ssl.is_null() && ffi::ssl_is_init_finished(t.ssl)) as c_int, + } + } +} + +/// Distinguishes "finished" from "on_handshake already dispatched"; plain +/// sockets report 1 (socket.c:153). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_ssl_handshake_callback_has_fired(s: *mut us_socket_t) -> c_int { + // SAFETY: nonnull socket contract. + unsafe { + match &(*s).transport { + Transport::Plain => 1, + Transport::Tls(t) => t.handshake_callback_fired as c_int, + } + } +} + +/// Per-SNI-domain `user` from `us_listen_socket_add_server_name`, resolved +/// for this socket's negotiated servername; null if none. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_server_name_userdata(s: *mut us_socket_t) -> *mut c_void { + // SAFETY: nonnull socket contract. + unsafe { ffi::socket_server_name_userdata(s) } +} + +/// Copies the RAW 4/16 address bytes into `buf`, sets `*port`, returns the +/// byte length; 0 on failure/unix socket. `dest`/`is_ipv6` are NOT written — +/// verbatim C quirk (socket.c:651; the SHIM caller does the formatting). +#[unsafe(no_mangle)] +pub extern "C" fn us_get_remote_address_info( + buf: *mut c_char, + s: *mut us_socket_t, + _dest: *mut *const c_char, + port: *mut c_int, + _is_ipv6: *mut c_int, +) -> c_uint { + if buf.is_null() { + return 0; + } + // SAFETY: nonnull socket contract; buf valid for >= 16 bytes (C contract). + unsafe { + let out = core::slice::from_raw_parts_mut(buf.cast::(), 16); + // Empty view = getpeername failed/unix: return 0 with *port + // untouched, matching the C early-return (socket.c:651-687). + match (*s).remote_ip_port(out) { + (view, p) if !view.is_empty() => { + *port = p; + view.len() as c_uint + } + _ => 0, + } + } +} + +/// Same as [`us_get_remote_address_info`] for the local end (verbatim quirks +/// included). +#[unsafe(no_mangle)] +pub extern "C" fn us_get_local_address_info( + buf: *mut c_char, + s: *mut us_socket_t, + _dest: *mut *const c_char, + port: *mut c_int, + _is_ipv6: *mut c_int, +) -> c_uint { + if buf.is_null() { + return 0; + } + // SAFETY: nonnull socket contract; buf valid for >= 16 bytes (C contract). + unsafe { + let out = core::slice::from_raw_parts_mut(buf.cast::(), 16); + match (*s).local_ip_port(out) { + (view, p) if !view.is_empty() => { + *port = p; + view.len() as c_uint + } + _ => 0, + } + } +} + +// Moved from the SHIM (docs/cabi.md §9.3): the last C++ users of +// internal.h layout, now native. + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_get_fd(s: *mut us_socket_t) -> LIBUS_SOCKET_DESCRIPTOR { + // SAFETY: nonnull socket contract (SHIM: us_poll_fd(&s->p)). + unsafe { (*s).fd } +} + +/// SHIM body ported: closed-guard, then mark `last_write_failed` + arm R|W so +/// the next writable event re-fires on_writable. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_sendfile_needs_more(s: *mut us_socket_t) { + // SAFETY: nonnull socket contract. + unsafe { + if (*s).is_closed() { + return; + } + (*s).send_file_needs_more(); + } +} + +/// Same body for non-SSL HttpResponse (uws_res_t is an identity cast of +/// us_socket_t). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_mark_needs_more_not_ssl(res: *mut uws_res_t) { + us_socket_sendfile_needs_more(res.cast::()); +} + +// ── §9.1 Socket groups (8) ─────────────────────────────────────────────────── + +/// Initializes an embedded, zero-initialized group; does NOT link into the +/// loop (lazy on first socket); idempotent. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_init( + group: *mut SocketGroup, + loop_: *mut Loop, + vtable: *const VTable, + ext: *mut c_void, +) { + // SAFETY: nonnull group contract; vtable is a C++ static (lives forever). + unsafe { + let vt: Option<&'static VTable> = vtable.as_ref(); + (*group).init(loop_, vt, ext); + } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_deinit(group: *mut SocketGroup) { + // SAFETY: nonnull group previously passed to init; owner frees storage next. + unsafe { SocketGroup::destroy(group) } +} + +/// Raw-pointer seam (no `&mut SocketGroup` here): on_close fires synchronously +/// per socket and uWS handlers re-enter cabi on this same group mid-walk (C17). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_close_all(group: *mut SocketGroup) { + crate::group::close_all_ex(group, true) +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_ext(group: *mut SocketGroup) -> *mut c_void { + // SAFETY: nonnull group contract; ext is nullable (init contract), so + // this reads the raw word rather than the non-null-asserting owner(). + unsafe { (*group).ext_raw() } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_loop(group: *mut SocketGroup) -> *mut Loop { + // SAFETY: nonnull group contract (returns_nonnull after init). + unsafe { (*group).get_loop() } +} + +/// Live list head — caching a `us_listen_socket_t*` across ticks is a +/// documented UAF. +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_head_listen_socket(group: *mut SocketGroup) -> *mut ListenSocket { + // SAFETY: nonnull group contract. + unsafe { (*group).head_listen_sockets } +} + +/// §9.2.1: live established-socket list head (same caching caveat as above). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_head_socket(group: *mut SocketGroup) -> *mut us_socket_t { + // SAFETY: nonnull group contract. + unsafe { (*group).head_sockets } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_listen( + group: *mut SocketGroup, + kind: c_uchar, + ssl_ctx: *mut SslCtx, + host: *const c_char, + port: c_int, + options: c_int, + socket_ext_size: c_int, + error: *mut c_int, +) -> *mut ListenSocket { + let mut local_err: c_int = 0; + let ls = match kind_from_c(kind) { + // SAFETY: nonnull group contract; host nullable NUL-terminated. + Some(kind) => unsafe { + (*group).listen( + kind, + opt_ctx(ssl_ctx), + opt_cstr(host), + port, + options, + socket_ext_size, + &mut local_err, + ) + }, + None => { + local_err = libc::EINVAL; + ptr::null_mut() + } + }; + if !error.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *error = local_err }; + } + ls +} + +/// `pathlen` supports abstract sockets (leading NUL). +#[unsafe(no_mangle)] +pub extern "C" fn us_socket_group_listen_unix( + group: *mut SocketGroup, + kind: c_uchar, + ssl_ctx: *mut SslCtx, + path: *const c_char, + pathlen: usize, + options: c_int, + socket_ext_size: c_int, + error: *mut c_int, +) -> *mut ListenSocket { + let mut local_err: c_int = 0; + let ls = match kind_from_c(kind) { + // SAFETY: nonnull group contract; path valid for pathlen bytes. + Some(kind) => unsafe { + (*group).listen_unix( + kind, + opt_ctx(ssl_ctx), + ext::c_slice(path.cast_mut().cast::(), pathlen), + options, + socket_ext_size, + &mut local_err, + ) + }, + None => { + local_err = libc::EINVAL; + ptr::null_mut() + } + }; + if !error.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *error = local_err }; + } + ls +} + +// ── §9.1 Listen sockets / SNI (7) ──────────────────────────────────────────── + +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_close(ls: *mut ListenSocket) { + // SAFETY: nonnull, still-linked listen socket contract. + unsafe { (*ls).close() } +} + +/// §9.2.2: drops the listener's loop keep-alive (HttpContext.h listen paths; +/// replaces the C++ `us_socket_unref(&ls->s)` embedded-first-member poke). +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_unref(ls: *mut ListenSocket) { + // ListenSocket is repr(C) header-first, so the cast is the C `&ls->s`. + us_socket_unref(ls.cast::()) +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_next(ls: *mut ListenSocket) -> *mut ListenSocket { + // SAFETY: listener list nodes are ListenSockets (header-first repr(C)). + let s = unsafe { (*ls).get_socket() }; + // Closed listeners reuse `next` as the loop closed-chain link; C's + // dedicated listener link would read NULL there (context.c:459). + if s.is_closed() { + return core::ptr::null_mut(); + } + s.next.cast::() +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_group(ls: *mut ListenSocket) -> *mut SocketGroup { + // SAFETY: nonnull listen socket contract. + unsafe { (*ls).get_socket().raw_group() } +} + +/// `ssl_ctx` up_ref'd into the SNI tree; `user` opaque (uWS: HttpRouter*). +/// Returns 0 on success, nonzero on failure — App.h's `!= 0` rollback path +/// (openssl.c: 1 = duplicate pattern, -1 = listener has no default ctx; the +/// native bool collapses both onto 1). +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_add_server_name( + ls: *mut ListenSocket, + hostname_pattern: *const c_char, + ssl_ctx: *mut SslCtx, + user: *mut c_void, +) -> c_int { + // SAFETY: nonnull listen socket + NUL-terminated pattern contract. + unsafe { + if (*ls).add_server_name(CStr::from_ptr(hostname_pattern), ssl_ctx, user) { + 0 + } else { + 1 + } + } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_remove_server_name( + ls: *mut ListenSocket, + hostname_pattern: *const c_char, +) { + // SAFETY: nonnull listen socket + NUL-terminated pattern contract. + unsafe { (*ls).remove_server_name(CStr::from_ptr(hostname_pattern)) } +} + +/// Returns an OWNED reference — caller must `us_internal_ssl_ctx_unref`. +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_find_server_name_ctx( + ls: *mut ListenSocket, + hostname_pattern: *const c_char, +) -> *mut SslCtx { + // SAFETY: nonnull listen socket + NUL-terminated pattern contract. + unsafe { ffi::listen_socket_find_server_name_ctx(ls, hostname_pattern) } +} + +/// Dynamic SNI resolver; callback contract per docs/cabi.md §4.3. A null +/// cb is a no-op (the native surface takes a non-optional resolver). +#[unsafe(no_mangle)] +pub extern "C" fn us_listen_socket_on_server_name( + ls: *mut ListenSocket, + cb: Option< + unsafe extern "C" fn( + *mut ListenSocket, + *const c_char, + *mut c_int, + *mut us_socket_t, + ) -> *mut SslCtx, + >, +) { + let Some(cb) = cb else { return }; + // SAFETY: fn-pointer transmute between ABI-identical pointer signatures + // (us_socket_t*/SslCtx* vs c_void* — the frozen handle.rs erases them). + unsafe { + let native: extern "C" fn( + *mut ListenSocket, + *const c_char, + *mut c_int, + *mut c_void, + ) -> *mut c_void = core::mem::transmute(cb); + (*ls).on_server_name(native); + } +} + +// ── §9.1 SSL_CTX construction (3; root-cert fns stay in surviving C++ TUs) ── + +/// Options BY VALUE (memcpy-shared with `uWS::SocketContextOptions`). +/// Caller owns one ref; frees the strdup'd passphrase itself. +#[unsafe(no_mangle)] +pub extern "C" fn us_ssl_ctx_from_options( + options: BunSocketContextOptions, + err: *mut create_bun_socket_error_t, +) -> *mut SslCtx { + let mut e = create_bun_socket_error_t::none; + let ctx = crate::tls::context::ssl_ctx_from_options(options, &mut e); + if !err.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *err = e }; + } + ctx +} + +/// `SSL_CTX_free` without OpenSSL headers. +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_ssl_ctx_unref(ctx: *mut SslCtx) { + crate::tls::context::ssl_ctx_unref(ctx) +} + +/// Like from_options but without socket-layer callbacks (QUIC installs +/// lsquic's own). +#[unsafe(no_mangle)] +pub extern "C" fn us_ssl_ctx_build_raw( + options: BunSocketContextOptions, + err: *mut create_bun_socket_error_t, +) -> *mut SslCtx { + let mut e = create_bun_socket_error_t::none; + let ctx = crate::tls::context::ssl_ctx_build_raw(options, &mut e); + if !err.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *err = e }; + } + ctx +} + +// ── §9.1 UDP + packet buffer (6 — QUIC is the only surviving C consumer) ──── + +#[unsafe(no_mangle)] +pub extern "C" fn us_create_udp_socket( + loop_: *mut Loop, + data_cb: Option, + drain_cb: Option, + close_cb: Option, + recv_error_cb: Option, + host: *const c_char, + port: c_ushort, + flags: c_int, + err: *mut c_int, + user: *mut c_void, +) -> *mut udp::Socket { + // data/drain/close are non-null at every surviving call site; a null one + // fails closed instead of storing a null fn ptr. recv_error_cb is NULL at + // all three quic.c sites (quic.c:845/1203/1208; C null-guards at invoke, + // loop.c:829/860) — lowered to a no-op for the non-optional native param. + let (Some(data_cb), Some(drain_cb), Some(close_cb)) = (data_cb, drain_cb, close_cb) else { + if !err.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *err = libc::EINVAL }; + } + return ptr::null_mut(); + }; + extern "C" fn recv_error_noop(_s: *mut udp::Socket, _errno: c_int) {} + // SAFETY: fn-pointer transmutes between ABI-identical signatures (the C + // header types the recv batch as void*, the crate as PacketBuffer*). + unsafe { + let data_cb: extern "C" fn(*mut udp::Socket, *mut udp::PacketBuffer, c_int) = + core::mem::transmute(data_cb); + let drain_cb: extern "C" fn(*mut udp::Socket) = core::mem::transmute(drain_cb); + let close_cb: extern "C" fn(*mut udp::Socket) = core::mem::transmute(close_cb); + let recv_error_cb: extern "C" fn(*mut udp::Socket, c_int) = match recv_error_cb { + Some(cb) => core::mem::transmute(cb), + None => recv_error_noop, + }; + udp::Socket::create( + loop_, + data_cb, + drain_cb, + close_cb, + recv_error_cb, + host, + port, + flags, + err.as_mut(), + user, + ) + } +} + +/// Safe while iterating (QUIC teardown loops); close_cb fires before the +/// deferred free (C15). +#[unsafe(no_mangle)] +pub extern "C" fn us_udp_socket_close(s: *mut udp::Socket) { + // SAFETY: nonnull udp socket contract. + unsafe { (*s).close() } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_udp_socket_user(s: *mut udp::Socket) -> *mut c_void { + // SAFETY: nonnull udp socket contract. + unsafe { (*s).user() } +} + +/// §9.2.5: the poll embedded first in `us_udp_socket_t` — replaces quic.c's +/// raw `(struct us_poll_t *) udp` cast (fd-at-offset-0 contract, §3.4/§3.6). +#[unsafe(no_mangle)] +pub extern "C" fn us_udp_socket_poll(s: *mut udp::Socket) -> *mut us_poll_t { + s.cast::() +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_udp_packet_buffer_payload( + buf: *mut udp::PacketBuffer, + index: c_int, +) -> *mut c_char { + // SAFETY: valid only during data_cb; index within the last recv batch. + unsafe { (*buf).get_payload(index).as_mut_ptr().cast::() } +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_udp_packet_buffer_payload_length( + buf: *mut udp::PacketBuffer, + index: c_int, +) -> c_int { + // SAFETY: valid only during data_cb; index within the last recv batch. + unsafe { (*buf).get_payload(index).len() as c_int } +} + +/// Cast to `struct sockaddr*` by the caller (sockaddr_storage per slot). +#[unsafe(no_mangle)] +pub extern "C" fn us_udp_packet_buffer_peer( + buf: *mut udp::PacketBuffer, + index: c_int, +) -> *mut c_char { + // SAFETY: valid only during data_cb; index within the last recv batch. + unsafe { ptr::from_mut((*buf).get_peer(index)).cast::() } +} + +// ── Raw-socket probe helpers (quic.c route probing; bsd.c:683/728 parity) ─── + +/// `*err` is zeroed up front, set to errno only on failure (bsd.c:683). +#[unsafe(no_mangle)] +pub extern "C" fn bsd_create_socket( + domain: c_int, + ty: c_int, + protocol: c_int, + err: *mut c_int, +) -> LIBUS_SOCKET_DESCRIPTOR { + if !err.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *err = 0 }; + } + match io::create_socket(domain, ty, protocol) { + Ok(fd) => fd, + Err(e) => { + if !err.is_null() { + // SAFETY: caller-owned out-param. + unsafe { *err = e }; + } + crate::LIBUS_SOCKET_ERROR + } + } +} + +#[unsafe(no_mangle)] +pub extern "C" fn bsd_close_socket(fd: LIBUS_SOCKET_DESCRIPTOR) { + io::close(fd, false) +} + +// ── DNS bridge completion (loop.c:324-340; DNS-bridge contract C13) ── +// Consumed link-time by bun_runtime::dns_jsc (dns.rs declares both as two-arg +// extern "C"). The request pointer is unused: it was already stored on the +// socket by the connect path (loop.c:325 parity). + +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_dns_callback( + socket: *mut connecting::ConnectingSocket, + _addrinfo_req: *mut connecting::AddrinfoRequest, +) { + connecting::dns_callback(socket); +} + +#[unsafe(no_mangle)] +pub extern "C" fn us_internal_dns_callback_threadsafe( + socket: *mut connecting::ConnectingSocket, + _addrinfo_req: *mut connecting::AddrinfoRequest, +) { + connecting::dns_callback_threadsafe(socket); +} + +// ── §9.1 Data statics (kind ordinals consumed by C++ SocketKinds.h) ───────── + +#[unsafe(no_mangle)] +pub static BUN_SOCKET_KIND_DYNAMIC: u8 = SocketKind::Dynamic as u8; +#[unsafe(no_mangle)] +pub static BUN_SOCKET_KIND_UWS_HTTP: u8 = SocketKind::UwsHttp as u8; +#[unsafe(no_mangle)] +pub static BUN_SOCKET_KIND_UWS_HTTP_TLS: u8 = SocketKind::UwsHttpTls as u8; +#[unsafe(no_mangle)] +pub static BUN_SOCKET_KIND_UWS_WS: u8 = SocketKind::UwsWs as u8; +#[unsafe(no_mangle)] +pub static BUN_SOCKET_KIND_UWS_WS_TLS: u8 = SocketKind::UwsWsTls as u8; +#[unsafe(no_mangle)] +pub static BUN_SOCKET_KIND_BUN_SOCKET_TLS: u8 = SocketKind::BunSocketTls as u8; diff --git a/src/usockets/connecting.rs b/src/usockets/connecting.rs new file mode 100644 index 000000000000..0efdcb2106c0 --- /dev/null +++ b/src/usockets/connecting.rs @@ -0,0 +1,600 @@ +//! Connecting state machine: DNS bridge + happy-eyeballs (4 concurrent, +//! interleaved families) + cancel/tombstone. Implements docs/semantics.md §6 +//! and the DNS-bridge contract C13 (docs/design.md). + +use core::ffi::{c_int, c_void}; + +use crate::dispatch; +use crate::group::SocketGroup; +use crate::kind::SocketKind; +use crate::loop_::Loop; +use crate::socket::us_socket_t; +use crate::tls::context::{self, SslCtx}; +use crate::unsafe_core::ext::{deref_mut, header_mut}; +use crate::unsafe_core::ffi; +use crate::unsafe_core::io; +use crate::unsafe_core::trampolines; + +/// R6.7 (context.c:27): simultaneous happy-eyeballs attempts; the resolver +/// interleaves AAAA/A so the first 4 alternate families. No per-attempt delay. +pub(crate) const CONCURRENT_CONNECTIONS: usize = 4; + +/// Opaque `dns_jsc::Request` — owned by the process-wide DNS cache; we hold +/// one refcount from `Bun__addrinfo_get` until `Bun__addrinfo_freeRequest`. +#[repr(C)] +pub struct AddrinfoRequest { + _opaque: [u8; 0], +} + +/// Borrowed view of `dns_jsc::RequestResult` — layout frozen +/// `{ info: ?*ResultEntry, err: c_int }`; entry memory lives in the request's +/// result buffer until `freeRequest` (never freed through this view). +#[repr(C)] +pub(crate) struct AddrinfoResult { + /// Head of the `ai_next` chain (a ResultEntry starts with its addrinfo). + pub(crate) info: *mut bun_dns::addrinfo, + pub(crate) err: c_int, +} + +/// Connect in flight (DNS / non-blocking connect / happy-eyeballs); no I/O. +/// The loop promotes it to a `SocketHeader` + on_open on success, or fires +/// on_connecting_error on failure. Lives in the per-loop slab like sockets; +/// referenced externally only through `handle::ConnectingRef`. +pub struct ConnectingSocket { + pub(crate) kind: SocketKind, + pub(crate) group: *mut SocketGroup, + /// Captured at create; survives group detach so the late after_resolve / + /// dns_callback / free path never derefs freed owner storage (R6.1). + pub(crate) loop_: *mut Loop, + /// DNS cache request; one refcount held while non-null (R6.5). + pub(crate) addrinfo_req: *mut AddrinfoRequest, + /// Borrowed SSL_CTX, up_ref'd while in flight; attached only to the + /// winning attempt, unref'd at detach (R6.9/R6.11). + pub(crate) ssl_ctx: *mut SslCtx, + pub(crate) options: c_int, + pub(crate) port: u16, + /// Raw getaddrinfo rc; 0 if the failure was past resolution. Non-zero is + /// the `error_is_dns` tag — `error` then holds the same rc, a different + /// namespace that overlaps errnos numerically (R6.6, R6.13). + pub(crate) dns_error: i32, + /// errno namespace (unless `dns_error != 0`). + pub(crate) error: i32, + pub(crate) closed: bool, + pub(crate) shut_down: bool, + pub(crate) shut_down_read: bool, + /// Set until after_resolve runs or a successful cancel; while set, exactly + /// one of {request notify list, loop dns_ready list} owns `self` (C13). + pub(crate) pending_resolve_callback: bool, + /// Timeout bytes copied onto attempt children (C9). + pub(crate) timeout: u8, + pub(crate) long_timeout: u8, + /// dns_ready / closed_connecting intrusive link — never both at once; + /// drain saves the next pointer before after_resolve can free (R6.11). + pub(crate) next: *mut ConnectingSocket, + /// `group.head_connecting_sockets` doubly-linked list (R3.11). + pub(crate) prev_pending: *mut ConnectingSocket, + pub(crate) next_pending: *mut ConnectingSocket, + /// Cursor into the resolved `ai_next` chain (borrows the request buffer). + pub(crate) addrinfo_head: *mut bun_dns::addrinfo, + /// In-flight attempt sockets; top-up rules keep the live count ≤ 4 (R6.7). + pub(crate) attempts: [*mut us_socket_t; CONCURRENT_CONNECTIONS], + /// One 8-byte owner word, same layout rule as socket ext. + pub(crate) ext: *mut c_void, +} + +impl ConnectingSocket { + /// Cancellation: dispatches on_connecting_error synchronously; ext-null + /// means silent no-op (C4). Cancel is linearized against DNS completion + /// (C13); `&mut self` surface — every + /// in-crate caller uses [`close_raw`] (C17 re-entry + pending window). + pub fn close(&mut self) { + close_raw(self); + } + + pub fn group(&mut self) -> *mut SocketGroup { + self.group + } + + pub fn raw_group(&self) -> *mut SocketGroup { + self.group + } + + pub fn kind(&self) -> SocketKind { + self.kind + } + + pub fn r#loop(&self) -> *mut Loop { + self.loop_ + } + + /// The 8-byte ext word IS the storage (`T` is typically `ExtSlot`). + pub fn ext(&mut self) -> &mut T { + const { + assert!( + core::mem::size_of::() <= core::mem::size_of::<*mut c_void>() + && core::mem::align_of::() <= core::mem::align_of::<*mut c_void>(), + "connecting ext type must fit the 8-byte ext word" + ); + } + deref_mut(core::ptr::from_mut(&mut self.ext).cast::()) + } + + /// errno. + pub fn get_error(&self) -> i32 { + self.error + } + + /// `(void*)-1` for connecting sockets (R3.24, R6.13). + pub fn get_native_handle(&self) -> *mut c_void { + usize::MAX as *mut c_void + } + + pub fn is_closed(&self) -> bool { + self.closed + } + + pub fn is_shutdown(&self) -> bool { + self.shut_down + } + + /// Minute wheel; copied onto attempt children. OQ-5: the sweep never + /// walks connecting sockets, so the bucket is inert until attempts exist. + pub fn long_timeout(&mut self, minutes: u32) { + long_timeout_raw(self, minutes); + } + + /// Seconds wheel; copied onto attempt children. OQ-5 as above. + pub fn timeout(&mut self, seconds: u32) { + timeout_raw(self, seconds); + } + + /// Latched bit consumed after promotion by the embedder (R6.13). + pub fn shutdown(&mut self) { + self.shut_down = true; + } + + pub fn shutdown_read(&mut self) { + self.shut_down_read = true; + } +} + +// ── raw-place handle surface (loop thread, possibly-pending nodes) ─────────── +// While `pending_resolve_callback` is set the resolver thread touches `c.next` +// and `c.loop_`, so consumer entry points (handle.rs, group close_all) must +// not form `&`/`&mut ConnectingSocket`; they route through these (C13, R6.5). + +pub(crate) fn is_closed_raw(c: *mut ConnectingSocket) -> bool { + ffi::conn_closed(c) +} + +pub(crate) fn is_shutdown_raw(c: *mut ConnectingSocket) -> bool { + ffi::conn_shut_down(c) +} + +pub(crate) fn get_error_raw(c: *mut ConnectingSocket) -> i32 { + ffi::conn_error(c) +} + +pub(crate) fn get_dns_error_raw(c: *mut ConnectingSocket) -> i32 { + ffi::conn_dns_error(c) +} + +pub(crate) fn shutdown_raw(c: *mut ConnectingSocket) { + ffi::conn_set_shut_down(c, true); +} + +pub(crate) fn shutdown_read_raw(c: *mut ConnectingSocket) { + ffi::conn_set_shut_down_read(c, true); +} + +pub(crate) fn group_raw(c: *mut ConnectingSocket) -> *mut SocketGroup { + ffi::conn_group(c) +} + +/// Place pointer of the 8-byte ext word. +pub(crate) fn ext_place_raw(c: *mut ConnectingSocket) -> *mut *mut c_void { + ffi::conn_ext_place(c) +} + +pub(crate) fn set_ext_raw(c: *mut ConnectingSocket, ext: *mut c_void) { + ffi::conn_set_ext(c, ext); +} + +/// Seconds wheel. No-op once detached (group NULL'd by the cannot-cancel +/// tombstone, R6.10 step 4) — C null-derefs here; divergence kept deliberate. +pub(crate) fn timeout_raw(c: *mut ConnectingSocket, seconds: u32) { + let group = ffi::conn_group(c); + if group.is_null() { + return; + } + let byte = if seconds != 0 { + // wrapping: C parity for seconds near u32::MAX (R6.13). + ((u32::from(deref_mut(group).timestamp).wrapping_add(seconds.wrapping_add(3) >> 2)) % 240) + as u8 + } else { + 255 + }; + ffi::conn_set_timeout(c, byte); +} + +/// Minute wheel; same detach guard as [`timeout_raw`]. +pub(crate) fn long_timeout_raw(c: *mut ConnectingSocket, minutes: u32) { + let group = ffi::conn_group(c); + if group.is_null() { + return; + } + let byte = if minutes != 0 { + (u32::from(deref_mut(group).long_timestamp).wrapping_add(minutes) % 240) as u8 + } else { + 255 + }; + ffi::conn_set_long_timeout(c, byte); +} + +// ── creation (slow path of SocketGroup::connect, R6.2 step 4) ──────────────── + +/// Allocate + register a connecting socket for an unresolved / multi-address / +/// cached-error host. Holds one loop keep-alive until exactly one of +/// after_resolve / close-cancel / close-tombstone balances it (C13). +pub(crate) fn create( + group: *mut SocketGroup, + kind: SocketKind, + ssl_ctx: *mut SslCtx, + addrinfo_req: *mut AddrinfoRequest, + port: u16, + options: c_int, +) -> *mut ConnectingSocket { + let loop_ = deref_mut(group).loop_; + if !ssl_ctx.is_null() { + context::ssl_ctx_up_ref(ssl_ctx); + } + let c = crate::loop_::alloc_connecting( + loop_, + ConnectingSocket { + kind, + group, + loop_, + addrinfo_req, + ssl_ctx, + options, + port, + dns_error: 0, + error: 0, + closed: false, + shut_down: false, + shut_down_read: false, + pending_resolve_callback: true, + timeout: 255, + long_timeout: 255, + next: core::ptr::null_mut(), + prev_pending: core::ptr::null_mut(), + next_pending: core::ptr::null_mut(), + addrinfo_head: core::ptr::null_mut(), + attempts: [core::ptr::null_mut(); CONCURRENT_CONNECTIONS], + ext: core::ptr::null_mut(), + }, + ); + crate::group::link_connecting_socket(group, c); + keepalive_inc(loop_); + // May enqueue onto dns_ready (non-wakeup) if already resolved; never + // re-enters this thread's stack (R6.5). + ffi::addrinfo_set(addrinfo_req, c); + c +} + +// ── DNS completion enqueue (resolver side of C13) ──────────────────────────── + +/// Same-thread completion enqueue: push onto `dns_ready_head` under the loop +/// mutex; does NOT wake the loop (loop.c:324-331). Exported to the resolver as +/// `us_internal_dns_callback` via cabi.rs (DNS-bridge contract C13). +pub(crate) fn dns_callback(c: *mut ConnectingSocket) { + let loop_ = ffi::connecting_loop(c); + ffi::dns_ready_push(loop_, c); +} + +/// Cross-thread completion enqueue: same + wakeup (loop.c:336-340). Exported +/// as `us_internal_dns_callback_threadsafe` via cabi.rs. +pub(crate) fn dns_callback_threadsafe(c: *mut ConnectingSocket) { + let loop_ = ffi::connecting_loop(c); + ffi::dns_ready_push(loop_, c); + crate::loop_::wakeup::us_wakeup_loop(loop_); +} + +/// Drain `loop.data.dns_ready_head` (resolved connects queued off-thread): +/// start the happy-eyeballs attempt fan-out. Runs in loop pre AND post per +/// docs/semantics.md §1; non-wakeup vs threadsafe enqueue rules per C13. +pub(crate) fn drain_dns_ready(loop_: *mut Loop) { + let mut c = ffi::dns_ready_take(loop_); + while !c.is_null() { + // after_resolve may repurpose `next` for the closed list (R6.11). + let next = deref_mut(c).next; + after_resolve(c); + c = next; + } +} + +/// R6.6 (context.c:702-745). +fn after_resolve(c: *mut ConnectingSocket) { + { + let cm = deref_mut(c); + cm.pending_resolve_callback = false; + if cm.closed { + // close_all()/close raced the queued callback; group may be gone + // (NULL'd at detach) and the keep-alive was balanced there (R6.6). + if !cm.addrinfo_req.is_null() { + ffi::addrinfo_free_request(cm.addrinfo_req, false); + cm.addrinfo_req = core::ptr::null_mut(); + } + free_connecting(c); + return; + } + keepalive_dec(cm.loop_); + debug_assert!(!cm.addrinfo_req.is_null()); + let (entries, err) = ffi::addrinfo_result(cm.addrinfo_req); + if err != 0 { + // Preserve the resolver failure (ENOTFOUND, ...) instead of the + // fabricated ECONNABORTED; tag the namespace (R6.6). + cm.error = err; + cm.dns_error = err; + close_raw(c); + return; + } + cm.addrinfo_head = entries; + } + let opened = start_connections(c, CONCURRENT_CONNECTIONS); + if opened == 0 { + // A real connect failure must not read as caller abort (R6.6). + deref_mut(c).error = libc::ECONNREFUSED; + close_raw(c); + } +} + +/// R6.7 (context.c:665-700): walk the resolved-address cursor, opening up to +/// `count` SEMI_SOCKET attempts. Syscall/registration failure skips to the +/// next address. No local bind on this path. +fn start_connections(c: *mut ConnectingSocket, count: usize) -> usize { + let mut opened = 0usize; + loop { + let cm = deref_mut(c); + let info = cm.addrinfo_head; + if info.is_null() || opened >= count { + break; + } + cm.addrinfo_head = ffi::addrinfo_next(info); + let addr = io::addr_from_entry(info, cm.port); + let (group, kind, options) = (cm.group, cm.kind, cm.options); + let s = crate::group::connect_attempt(group, kind, &addr, options, c); + if s.is_null() { + continue; + } + opened += 1; + let cm = deref_mut(c); + let sm = header_mut(s); + sm.timeout = cm.timeout; + sm.long_timeout = cm.long_timeout; + sm.ext = cm.ext; + attempts_push(cm, s); + } + opened +} + +// ── per-attempt outcome (called from socket::on_connect, R6.9) ─────────────── + +/// Error arm of `us_internal_socket_after_open` for a happy-eyeballs attempt: +/// drop the loser, top up (1 while another attempt survives, a full burst of +/// 4 when none do), and report ECONNREFUSED only when every address failed. +pub(crate) fn attempt_failed(c: *mut ConnectingSocket, s: *mut us_socket_t) { + attempts_remove(deref_mut(c), s); + // SEMI_SOCKET close dispatches nothing (C1); RESET matches context.c:775. + close_removed_attempt(s); + + let remaining = attempts_count(deref_mut(c)); + if remaining <= 1 { + let opened = start_connections( + c, + if remaining == 0 { + CONCURRENT_CONNECTIONS + } else { + 1 + }, + ); + if opened == 0 && attempts_count(deref_mut(c)) == 0 { + deref_mut(c).error = libc::ECONNREFUSED; + close_raw(c); + } + } +} + +/// Success arm, part 1: close every losing sibling with RESET and hand back +/// the staged `SSL_CTX` (still owned by `c`) so the caller attaches it to the +/// winner BEFORE `finish_promotion` drops c's ref (R6.9 ordering). +pub(crate) fn promote_winner(c: *mut ConnectingSocket, winner: *mut us_socket_t) -> *mut SslCtx { + let cm = deref_mut(c); + let attempts = core::mem::replace( + &mut cm.attempts, + [core::ptr::null_mut(); CONCURRENT_CONNECTIONS], + ); + let ssl_ctx = cm.ssl_ctx; + for s in attempts { + if !s.is_null() && s != winner { + close_removed_attempt(s); + } + } + ssl_ctx +} + +/// Close an attempt already removed from `attempts`: sever the borrowed +/// parent links first so `socket_close`'s live-attempt routing (and the +/// silent-terminal owner release) cannot fire through this copy. +fn close_removed_attempt(s: *mut us_socket_t) { + let h = header_mut(s); + h.connect_state = core::ptr::null_mut(); + h.ext = core::ptr::null_mut(); + h.close(crate::handle::CloseCode::failure); +} + +/// Success arm, part 2: release the DNS request (no cache invalidation) and +/// defer-free `c`. Caller clears the winner's connect_state and fires on_open +/// afterwards — exactly one of {on_open, on_connect_error, +/// on_connecting_error} terminates a connect (C2, R6.12). +pub(crate) fn finish_promotion(c: *mut ConnectingSocket) { + let cm = deref_mut(c); + // Owner-ref transfer: the winner's header ext now carries the owned word. + // Null + mark closed so the consumer's still-live Connecting handle can't + // release (detach_owner) or re-terminate (close) the same ref again. + cm.ext = core::ptr::null_mut(); + cm.closed = true; + if !cm.addrinfo_req.is_null() { + ffi::addrinfo_free_request(cm.addrinfo_req, false); + cm.addrinfo_req = core::ptr::null_mut(); + } + free_connecting(c); +} + +// ── close / tombstone / deferred free (R6.10, R6.11) ───────────────────────── + +/// `us_connecting_socket_close` (socket.c:192-255). Idempotent. Raw-pointer +/// entry — no `&`/`&mut ConnectingSocket` is ever formed here: the dispatch +/// may synchronously re-enter through an aliasing handle (C17), and on the +/// cannot-cancel path the resolver may be publishing `c.next` concurrently. +/// ALL in-crate callers (group close_all, handle close) must use this. +pub(crate) fn close_raw(c: *mut ConnectingSocket) { + if ffi::conn_closed(c) { + return; + } + ffi::conn_set_closed(c, true); + for s in ffi::conn_take_attempts(c) { + if !s.is_null() { + // Direct fd teardown — deliberately NOT the close path; no + // dispatch, no linger RST (R6.10 step 2). + crate::socket::teardown_connecting_attempt(s); + } + } + + if ffi::conn_error(c) == 0 { + // No error means the caller aborted us (socket.c:209-212). + ffi::conn_set_error(c, libc::ECONNABORTED); + } + let req = ffi::conn_addrinfo_req(c); + let loop_ = ffi::connecting_loop(c); + let error = ffi::conn_error(c); + + if ffi::conn_pending(c) { + // create() sets pending and the request together; pending ⇒ req ≠ 0 + // or the cannot-cancel arm below would leak `c` forever. + debug_assert!(!req.is_null()); + if !req.is_null() && ffi::addrinfo_cancel(req, c) { + // Removed from the notify list before it fired: the callback will + // never run, so finish teardown here (C13 linearization). + keepalive_dec(loop_); + ffi::conn_set_pending(c, false); + ffi::conn_set_addrinfo_req(c, core::ptr::null_mut()); + ffi::addrinfo_free_request(req, false); + dispatch_terminal_error(c, error); + free_connecting(c); + } else { + // Can't cancel — the resolve callback is already queued. Detach + // from the group NOW so the owner can deinit; after_resolve will + // see `closed` and finish without touching the group. Balance the + // keep-alive here for the same reason (socket.c:229-243). + keepalive_dec(loop_); + dispatch_terminal_error(c, error); + detach(c); + } + return; + } + + if !req.is_null() { + // Invalidate the cache entry for a refused connect (addresses may be + // stale) and for a resolver failure (never cache a negative result). + ffi::conn_set_addrinfo_req(c, core::ptr::null_mut()); + let invalidate = error == libc::ECONNREFUSED || ffi::conn_dns_error(c) != 0; + ffi::addrinfo_free_request(req, invalidate); + } + dispatch_terminal_error(c, error); + free_connecting(c); +} + +/// The terminal dispatch releases the core-held owner ref, whose Drop can +/// free the owner storage embedding the group — static-vtable kinds detach +/// FIRST; group-vtable kinds resolve dispatch through `c.group` (no owner ref). +fn dispatch_terminal_error(c: *mut ConnectingSocket, error: c_int) { + if !dispatch::uses_group_vtable(trampolines::connecting_kind(c)) { + detach(c); + } + dispatch::dispatch_connecting_error(c, error); +} + +/// `us_internal_connecting_socket_detach` (socket.c:170-182): group unlink + +/// drop the borrowed SSL_CTX ref; leaves `c` allocated (only remaining link is +/// a loop-owned list). Raw field access only — runs inside the cannot-cancel +/// race window (see [`close_raw`]). +fn detach(c: *mut ConnectingSocket) { + let group = ffi::conn_group(c); + if !group.is_null() { + crate::group::unlink_connecting_socket(group, c); + ffi::conn_set_group(c, core::ptr::null_mut()); + } + let ssl_ctx = ffi::conn_ssl_ctx(c); + if !ssl_ctx.is_null() { + context::ssl_ctx_unref(ssl_ctx); + ffi::conn_set_ssl_ctx(c, core::ptr::null_mut()); + } +} + +/// `us_connecting_socket_free` (socket.c:184-190): never frees inline — `c` +/// may still sit on the dns_ready list; the tick postlude releases the slab +/// slot from `closed_connecting_head` (C6, R1.15). +fn free_connecting(c: *mut ConnectingSocket) { + detach(c); + ffi::closed_connecting_push(ffi::connecting_loop(c), c); +} + +// ── loop keep-alive during resolve (R6.2/R6.6/R6.10) ───────────────────────── + +fn keepalive_inc(loop_: *mut Loop) { + #[cfg(not(windows))] + { + crate::unsafe_core::poll_access::num_polls_add(loop_, 1); + } + #[cfg(windows)] + { + crate::backend::libuv::inc_active(loop_); + } +} + +fn keepalive_dec(loop_: *mut Loop) { + #[cfg(not(windows))] + { + crate::unsafe_core::poll_access::num_polls_add(loop_, -1); + } + #[cfg(windows)] + { + crate::backend::libuv::dec_active(loop_); + } +} + +// ── attempt-list bookkeeping (≤ CONCURRENT_CONNECTIONS live, R6.7) ─────────── + +fn attempts_push(c: &mut ConnectingSocket, s: *mut us_socket_t) { + for slot in &mut c.attempts { + if slot.is_null() { + *slot = s; + return; + } + } + debug_assert!(false, "more than CONCURRENT_CONNECTIONS attempts in flight"); +} + +fn attempts_remove(c: &mut ConnectingSocket, s: *mut us_socket_t) { + for slot in &mut c.attempts { + if *slot == s { + *slot = core::ptr::null_mut(); + return; + } + } +} + +fn attempts_count(c: &mut ConnectingSocket) -> usize { + c.attempts.iter().filter(|s| !s.is_null()).count() +} diff --git a/src/usockets/dispatch.rs b/src/usockets/dispatch.rs new file mode 100644 index 000000000000..d85b3bfd1a16 --- /dev/null +++ b/src/usockets/dispatch.rs @@ -0,0 +1,558 @@ +//! kind → static vtable dispatch over the link-time const kind table +//! (`BUN_UWS_KIND_TABLE`, defined in the runtime dispatch module) + the +//! compile-time vtable generator moved unchanged from `src/uws_sys/vtable.rs`. The extern "C" trampolines live in +//! `unsafe_core::trampolines`. Dispatch rules per docs/semantics.md §12 and +//! contract C17 (every callback may synchronously re-enter; never touch ext +//! after a terminal callback). + +use core::any::TypeId; +use core::ffi::{c_int, c_void}; + +use crate::connecting::ConnectingSocket; +use crate::group::VTable; +use crate::kind::SocketKind; +use crate::socket::us_socket_t; +use crate::tls::context::us_bun_verify_error_t; +use crate::unsafe_core::trampolines::{self, Trampolines}; + +pub use crate::unsafe_core::ext::ExtMut; + +/// Handlers implement this and set the `HAS_ON_*` consts for each method they +/// provide. Default impls are `unreachable!()`; the corresponding vtable slot +/// is left `None` when the const is `false`. Ext arrives as an [`ExtMut`] +/// per-use token, not a call-spanning `&mut` — take the borrow only inside +/// `with`, and never re-enter dispatch on the same socket while inside (C17). +pub trait Handler: 'static { + /// What the socket ext holds. Ignored when `HAS_EXT == false`. + type Ext; + /// When false, handlers take `(s, …)` instead of `(ext, s, …)` and + /// recover their owner from `s.group().owner::()`. + const HAS_EXT: bool = true; + + const HAS_ON_OPEN: bool = false; + const HAS_ON_DATA: bool = false; + const HAS_ON_FD: bool = false; + const HAS_ON_WRITABLE: bool = false; + const HAS_ON_CLOSE: bool = false; + const HAS_ON_TIMEOUT: bool = false; + const HAS_ON_LONG_TIMEOUT: bool = false; + const HAS_ON_END: bool = false; + const HAS_ON_CONNECT_ERROR: bool = false; + const HAS_ON_CONNECTING_ERROR: bool = false; + const HAS_ON_HANDSHAKE: bool = false; + + fn on_open(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { + unreachable!() + } + fn on_data(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t, _data: &[u8]) { + unreachable!() + } + fn on_fd(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t, _fd: c_int) { + unreachable!() + } + fn on_writable(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t) { + unreachable!() + } + fn on_close( + _ext: ExtMut<'_, Self::Ext>, + _s: *mut us_socket_t, + _code: i32, + _reason: Option<*mut c_void>, + ) { + unreachable!() + } + fn on_timeout(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t) { + unreachable!() + } + fn on_long_timeout(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t) { + unreachable!() + } + fn on_end(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t) { + unreachable!() + } + fn on_connect_error(_ext: ExtMut<'_, Self::Ext>, _s: *mut us_socket_t, _code: i32) { + unreachable!() + } + fn on_connecting_error(_cs: *mut ConnectingSocket, _code: i32) { + unreachable!() + } + fn on_handshake( + _ext: ExtMut<'_, Self::Ext>, + _s: *mut us_socket_t, + _ok: bool, + _err: us_bun_verify_error_t, + ) { + unreachable!() + } + + // `HAS_EXT == false` variants (Rust can't change a trait method's arity + // by a const, so these are separate methods). + fn on_open_no_ext(_s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { + unreachable!() + } + fn on_data_no_ext(_s: *mut us_socket_t, _data: &[u8]) { + unreachable!() + } + fn on_fd_no_ext(_s: *mut us_socket_t, _fd: c_int) { + unreachable!() + } + fn on_writable_no_ext(_s: *mut us_socket_t) { + unreachable!() + } + fn on_close_no_ext(_s: *mut us_socket_t, _code: i32, _reason: Option<*mut c_void>) { + unreachable!() + } + fn on_timeout_no_ext(_s: *mut us_socket_t) { + unreachable!() + } + fn on_long_timeout_no_ext(_s: *mut us_socket_t) { + unreachable!() + } + fn on_end_no_ext(_s: *mut us_socket_t) { + unreachable!() + } + fn on_connect_error_no_ext(_s: *mut us_socket_t, _code: i32) { + unreachable!() + } + fn on_handshake_no_ext(_s: *mut us_socket_t, _ok: bool, _err: us_bun_verify_error_t) { + unreachable!() + } +} + +/// Produce a `&'static VTable` for `H` — a const address into `.rodata`, +/// safe to store in any number of `SocketGroup`s. +pub fn make() -> &'static VTable { + &Make::::VT +} + +struct Make(core::marker::PhantomData); + +impl Make { + const VT: VTable = { + // Rust-handled kinds store ext IN the header's 8-byte word (docs/design.md + // §Strategy 3); unsafe_core::ext::downcast_raw relies on this fitting. + assert!( + !H::HAS_EXT + || (core::mem::size_of::() <= core::mem::size_of::<*mut c_void>() + && core::mem::align_of::() <= core::mem::align_of::<*mut c_void>()), + "Handler::Ext must fit the 8-byte socket ext word" + ); + VTable { + on_open: if H::HAS_ON_OPEN { + Some(Trampolines::::on_open) + } else { + None + }, + on_data: if H::HAS_ON_DATA { + Some(Trampolines::::on_data) + } else { + None + }, + on_fd: if H::HAS_ON_FD { + Some(Trampolines::::on_fd) + } else { + None + }, + on_writable: if H::HAS_ON_WRITABLE { + Some(Trampolines::::on_writable) + } else { + None + }, + on_close: if H::HAS_ON_CLOSE { + Some(Trampolines::::on_close) + } else { + None + }, + on_timeout: if H::HAS_ON_TIMEOUT { + Some(Trampolines::::on_timeout) + } else { + None + }, + on_long_timeout: if H::HAS_ON_LONG_TIMEOUT { + Some(Trampolines::::on_long_timeout) + } else { + None + }, + on_end: if H::HAS_ON_END { + Some(Trampolines::::on_end) + } else { + None + }, + on_connect_error: if H::HAS_ON_CONNECT_ERROR { + Some(Trampolines::::on_connect_error) + } else { + None + }, + on_connecting_error: if H::HAS_ON_CONNECTING_ERROR { + Some(Trampolines::::on_connecting_error) + } else { + None + }, + on_handshake: if H::HAS_ON_HANDSHAKE { + Some(Trampolines::::on_handshake) + } else { + None + }, + } + }; +} + +// ── kind → handler dispatch (loop-driven) ──────────────────────────────────── +// The loop NEVER reads `group->vtable` itself except through here: dispatch +// switches on `s.kind` and falls back to the group vtable for UwsHttp{,Tls}, +// UwsWs{,Tls} and Dynamic (docs/cabi.md §2.1). + +pub const SOCKET_KIND_COUNT: usize = SocketKind::TestChannel as usize + 1; + +/// Type-erased owner operations for a Protocol v2 kind. A table entry +/// carrying these marks the kind as v2: terminal dispatch releases the +/// core-owned ext ref through `deref` (trampolines::release_owner_ext). +#[derive(Copy, Clone)] +pub(crate) struct OwnerOps { + /// SAFETY (caller): the word points to a live owner of the registered + /// type with an outstanding strong ref — the one being released. + pub(crate) deref: unsafe fn(*mut c_void), +} + +/// One row of the link-time kind table: the const-built vtable and owner ops +/// for a Rust-handled `SocketKind`. Built ONLY by [`crate::kind_entry`]; +/// fields stay crate-private so the runtime crate can hold entries but not +/// forge them. +pub struct KindEntry { + /// The kind this row was built for ([`validate_kind_table`] traps rows + /// placed at the wrong index). + pub(crate) kind: SocketKind, + pub(crate) vtable: &'static VTable, + pub(crate) owner_ops: OwnerOps, + /// Registered protocol type (debug dispatch checks). + pub(crate) handler_type: fn() -> TypeId, + /// Registered `Protocol::Owner` type (attach surface fails closed). + pub(crate) owner_type: fn() -> TypeId, +} + +/// The process-wide kind→handler table, fully const-initialized in the one +/// crate that sees every protocol type (`bun_runtime::socket::uws_dispatch`) +/// and resolved here at link time — the Rust analog of the C loop's fixed +/// dispatch switch. `None` = kind never dispatches through the static tables +/// (Invalid trap, group-vtable kinds, ABI-reserved listener kinds). +pub type KindTable = [Option<&'static KindEntry>; SOCKET_KIND_COUNT]; + +/// Const-eval integrity check for the link-time table: every present row +/// must sit at its own kind's index, and kinds outside the static tables +/// (Invalid, Dynamic/uWS group-vtable kinds) must be `None`. Run it in a +/// `const _: () = ...` next to the table so a misplaced row is a compile +/// error. +pub const fn validate_kind_table(t: &KindTable) { + let mut i = 0; + while i < SOCKET_KIND_COUNT { + match t[i] { + Some(e) => assert!(e.kind as usize == i, "kind-table row at the wrong index"), + None => {} + } + i += 1; + } + assert!(t[SocketKind::Invalid as usize].is_none()); + assert!(t[SocketKind::Dynamic as usize].is_none()); + assert!(t[SocketKind::UwsHttp as usize].is_none()); + assert!(t[SocketKind::UwsHttpTls as usize].is_none()); + assert!(t[SocketKind::UwsWs as usize].is_none()); + assert!(t[SocketKind::UwsWsTls as usize].is_none()); +} + +#[inline] +fn entry(kind: SocketKind) -> Option<&'static KindEntry> { + crate::unsafe_core::trampolines::kind_table()[kind as usize] +} + +/// True iff `kind` is a Protocol v2 kind whose table-registered owner type is +/// `O`. The attach surface fails closed on anything else: a kind without a +/// table entry would leak the ref at the terminal, a different owner type is +/// confusion. +pub(crate) fn owner_registered_as(kind: SocketKind) -> bool { + entry(kind).is_some_and(|e| (e.owner_type)() == TypeId::of::()) +} + +/// `Some` iff `kind` has a Protocol v2 table entry (owner-carrying ext). +pub(crate) fn owner_ops(kind: SocketKind) -> Option<&'static OwnerOps> { + entry(kind).map(|e| &e.owner_ops) +} + +/// Silent-terminal owner release (C1: SEMI_SOCKET closes and detach dispatch +/// NO callback, but core's ext-held owner ref is still released exactly once +/// — documented deviation from C parity, Protocol v2 terminal contract). +pub(crate) fn release_owner_on_silent_terminal(s: *mut us_socket_t) { + trampolines::release_owner_ext(s); +} + +/// Debug ext-type check backing `Trampolines::ext` (docs/design.md kind registry): +/// a static kind's trampoline belongs to the handler in its table entry. +/// Kinds without an entry (group-vtable) are vacuously true. +pub(crate) fn kind_dispatches_to(kind: SocketKind) -> bool { + entry(kind).is_none_or(|e| (e.handler_type)() == TypeId::of::()) +} + +/// TLS side-channel hooks (raw ciphertext tap / new-session / keylog). These +/// are not vtable slots (the 11-slot layout is FROZEN, docs/cabi.md §3.7); +/// only `BunSocketTls` sockets consume them (docs/tls.md §2.7, §3.3) and +/// the ext-null / unstamped window is the consumer's silent no-op. +pub struct TlsSideChannelHooks { + pub ssl_raw_tap: fn(s: *mut us_socket_t, data: &[u8]), + pub session: fn(s: *mut us_socket_t, session: &[u8]), + pub keylog: fn(s: *mut us_socket_t, line: &[u8]), +} + +/// The link-time hooks (`BUN_UWS_TLS_SIDE_CHANNEL`, defined next to the kind +/// table in the runtime dispatch module) — always present, so raw-tap +/// ciphertext can never be silently dropped (docs/tls.md §2.7). +fn tls_hooks() -> &'static TlsSideChannelHooks { + crate::unsafe_core::trampolines::tls_side_channel() +} + +/// Resolve the vtable for a socket event. `None` = vacant slab slot (stale +/// kernel pointer, OQ-4 structural fix) — the caller drops the event. +/// Panics: kind=Invalid (calloc trap, crash-by-design), missing group vtable +/// for Dynamic/uWS kinds, kind without a table entry. +fn vt(s: *mut us_socket_t) -> Option<&'static VTable> { + if !trampolines::socket_slot_live(s) { + return None; + } + let kind = trampolines::socket_kind(s); + match kind { + SocketKind::Invalid => panic!( + "us_socket_t with kind=invalid (group={:p})", + trampolines::socket_group(s) + ), + k if uses_group_vtable(k) => Some( + trampolines::socket_group_vtable(s) + .unwrap_or_else(|| panic!("socket kind {k:?} has no group vtable")), + ), + k => Some( + entry(k) + .unwrap_or_else(|| panic!("dispatch on socket kind {k:?} with no table entry")) + .vtable, + ), + } +} + +/// Connecting-socket variant of [`vt`]. +fn vtc(cs: *mut ConnectingSocket) -> Option<&'static VTable> { + if !trampolines::connecting_slot_live(cs) { + return None; + } + let kind = trampolines::connecting_kind(cs); + match kind { + SocketKind::Invalid => panic!("us_connecting_socket_t with kind=invalid"), + k if uses_group_vtable(k) => Some( + trampolines::connecting_group_vtable(cs) + .unwrap_or_else(|| panic!("connecting socket kind {k:?} has no group vtable")), + ), + k => Some( + entry(k) + .unwrap_or_else(|| panic!("dispatch on socket kind {k:?} with no table entry")) + .vtable, + ), + } +} + +// The drivers below never touch ext themselves (C17): the trampoline wraps +// the ext pointer in a per-use `ExtMut` immediately before the handler call +// and never touches it after — no `&mut` spans the handler. + +pub(crate) fn dispatch_open(s: *mut us_socket_t, is_client: bool, ip: &[u8]) { + if let Some(vt) = vt(s) { + trampolines::invoke_open(vt, s, is_client, ip); + } +} + +pub(crate) fn dispatch_data(s: *mut us_socket_t, data: &mut [u8]) { + if let Some(vt) = vt(s) { + trampolines::invoke_data(vt, s, data); + } +} + +pub(crate) fn dispatch_writable(s: *mut us_socket_t) { + if let Some(vt) = vt(s) { + trampolines::invoke_writable(vt, s); + } +} + +pub(crate) fn dispatch_close(s: *mut us_socket_t, code: c_int, reason: *mut c_void) { + if let Some(vt) = vt(s) { + trampolines::invoke_close(vt, s, code, reason); + // Terminal contract: core's ext-held owner ref is released exactly + // once after on_close returns (Protocol v2 terminal contract; no-op for v1 kinds). + trampolines::release_owner_ext(s); + } +} + +pub(crate) fn dispatch_end(s: *mut us_socket_t) { + if let Some(vt) = vt(s) { + trampolines::invoke_end(vt, s); + } +} + +pub(crate) fn dispatch_timeout(s: *mut us_socket_t) { + if let Some(vt) = vt(s) { + trampolines::invoke_timeout(vt, s); + } +} + +pub(crate) fn dispatch_long_timeout(s: *mut us_socket_t) { + if let Some(vt) = vt(s) { + trampolines::invoke_long_timeout(vt, s); + } +} + +pub(crate) fn dispatch_fd(s: *mut us_socket_t, fd: c_int) { + if let Some(vt) = vt(s) { + trampolines::invoke_fd(vt, s, fd); + } +} + +pub(crate) fn dispatch_connect_error(s: *mut us_socket_t, code: c_int) { + if let Some(vt) = vt(s) { + // C5 close-then-notify: core closes the never-opened socket itself + // (silent SEMI close, C1; a handler re-close is an idempotent no-op) + // so a handler that never closes cannot leak a spinning fd. + crate::socket::close_raw_keep_owner(s); + trampolines::invoke_connect_error(vt, s, code); + // Terminal (C2): release core's owner ref after on_connect_error. + trampolines::release_owner_ext(s); + } +} + +pub(crate) fn dispatch_connecting_error(cs: *mut ConnectingSocket, code: c_int) { + if let Some(vt) = vtc(cs) { + trampolines::invoke_connecting_error(vt, cs, code); + // Terminal (C2): release the connecting socket's owner ref (also + // nulls the attempts' borrowed copies). + trampolines::release_owner_ext_connecting(cs); + } +} + +pub(crate) fn dispatch_handshake(s: *mut us_socket_t, ok: bool, err: us_bun_verify_error_t) { + if let Some(vt) = vt(s) { + trampolines::invoke_handshake(vt, s, ok, err); + } +} + +/// Only bun_socket_tls ever produces side-channel events (docs/tls.md §6.1); +/// the kind gate only differs from the old C in unreachable states. +fn tls_side_channel_target(s: *mut us_socket_t) -> bool { + trampolines::socket_slot_live(s) && trampolines::socket_kind(s) == SocketKind::BunSocketTls +} + +pub(crate) fn dispatch_ssl_raw_tap(s: *mut us_socket_t, data: &[u8]) { + if tls_side_channel_target(s) { + (tls_hooks().ssl_raw_tap)(s, data); + } +} + +pub(crate) fn dispatch_session(s: *mut us_socket_t, session: &[u8]) { + if tls_side_channel_target(s) { + (tls_hooks().session)(s, session); + } +} + +pub(crate) fn dispatch_keylog(s: *mut us_socket_t, line: &[u8]) { + if tls_side_channel_target(s) { + (tls_hooks().keylog)(s, line); + } +} + +/// True when `kind` routes through the group vtable instead of a static +/// per-kind Rust handler. Also the single source of the ext storage class: +/// these kinds get an inline slab ext area contiguous after the header +/// (`socket::alloc` / `unsafe_core::ext::downcast_raw`); all others +/// store ext in the header word. Invariant (docs/design.md §Strategy 3): adoption never crosses this +/// predicate — `group::adopt_socket` re-stamps kind without touching ext, so +/// `uses_group_vtable(old) == uses_group_vtable(new)` must hold at adopt. +pub(crate) fn uses_group_vtable(kind: SocketKind) -> bool { + kind.is_uws() || matches!(kind, SocketKind::Dynamic) +} + +// Test-only: raw fd + C-ABI vtable handler need `unsafe` outside unsafe_core. +#[cfg(all(test, not(miri), any(target_os = "linux", target_os = "android")))] +#[allow(unsafe_code)] +mod tests { + use super::*; + use crate::backend::PollType; + use crate::group::SocketGroup; + use crate::loop_::tick; + use crate::socket::{self, SocketFlags}; + use crate::unsafe_core::ext::header_mut; + use crate::unsafe_core::test_support::{create_test_loop, free_test_loop}; + use crate::unsafe_core::trampolines::socket_slot_live; + use core::ptr; + use std::sync::atomic::{AtomicI32, Ordering}; + + static CLOSED_AT_NOTIFY: AtomicI32 = AtomicI32::new(-1); + + unsafe extern "C" fn record_connect_error( + s: *mut us_socket_t, + _code: c_int, + ) -> *mut us_socket_t { + CLOSED_AT_NOTIFY.store(header_mut(s).is_closed() as i32, Ordering::SeqCst); + s + } + + static VT: VTable = VTable { + on_open: None, + on_data: None, + on_fd: None, + on_writable: None, + on_close: None, + on_timeout: None, + on_long_timeout: None, + on_end: None, + on_connect_error: Some(record_connect_error), + on_connecting_error: None, + on_handshake: None, + }; + + /// C5 close-then-notify: dispatch_connect_error closes the SEMI_SOCKET + /// itself, BEFORE the handler runs — a handler that never closes must not + /// leave the failed fd registered. + #[test] + fn connect_error_closes_before_notify() { + let loop_ = create_test_loop(); + let mut group = Box::new(SocketGroup::default()); + group.init(loop_, Some(&VT), ptr::null_mut()); + let g: *mut SocketGroup = &mut *group; + + // SAFETY: plain fd creation; the close under test owns it from here. + let fd = unsafe { libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0) }; + assert!(fd >= 0); + let s = socket::alloc( + loop_, + PollType::SemiSocket, + fd, + g, + SocketKind::Dynamic, + SocketFlags(0), + 0, + ); + crate::group::link_socket(g, s); + crate::unsafe_core::poll_access::num_polls_add(loop_, 1); // armed connect poll + + dispatch_connect_error(s, libc::ECONNREFUSED); + + assert_eq!( + CLOSED_AT_NOTIFY.load(Ordering::SeqCst), + 1, + "on_connect_error must observe the socket already closed (C5)" + ); + assert!( + header_mut(s).is_closed(), + "dispatch must close a failed direct connect even if the handler does not" + ); + + tick::drain_closed_sockets(loop_); + assert!(!socket_slot_live(s), "closed slot drains at the postlude"); + + // SAFETY: heads drained above; group unlinks itself from the loop. + unsafe { SocketGroup::destroy(g) }; + drop(group); + free_test_loop(loop_); + } +} diff --git a/src/usockets/docs/cabi.md b/src/usockets/docs/cabi.md new file mode 100644 index 000000000000..bf3231e53790 --- /dev/null +++ b/src/usockets/docs/cabi.md @@ -0,0 +1,578 @@ +# bun_usockets: frozen C-ABI surface contract + +Scope: the C under `packages/bun-usockets/src/**` was deleted and replaced by the +native Rust crate (`src/usockets`). +Surviving native consumers that must keep linking against the crate's `extern "C"` surface: + +| Tag | Consumer | Files | +| ------ | --------------------------------------- | ------------------------------------------------------------------------ | +| UWS | C++ uWebSockets layer | `packages/bun-uws/src/*.h` (header-only, compiled into the shims) | +| SHIM | C shim | `src/uws_sys/libuwsockets.cpp` | +| H3SHIM | H3 C shim | `src/uws_sys/libuwsockets_h3.cpp` | +| QUIC | lsquic glue (survives) | `packages/bun-usockets/src/quic.c` (+ `quic.h`) | +| NTLS | Node TLS bindings | `src/jsc/bindings/NodeTLS.cpp` | +| JSHS | node:http server socket | `src/jsc/bindings/node/JSNodeHTTPServerSocket{,.Prototype}.cpp` (+ `.h`) | +| WV | webview backends | `src/runtime/webview/{WebKitBackend,ChromeBackend}.cpp` | +| RUST | Rust extern decls in `src/uws_sys/*.rs` | become native calls into the crate (see §7) | + +Opaque-pointer-only C++ users (no symbol/layout needs beyond forward decls): +`src/jsc/bindings/NodeHTTP.cpp`, `ScriptExecutionContext.{h,cpp}`, `webcore/WebSocket.{h,cpp}` +(`us_socket_t*` / `us_loop_t*` / `us_socket_group_t*` passed through only). + +Reference signatures: all signatures below are verbatim from +`packages/bun-usockets/src/libusockets.h` (public) and `internal/internal.h` / +`internal/loop_data.h` / `internal/eventing/{epoll_kqueue,libuv}.h` (internal) at HEAD. +This tree already carries the "socket group" redesign (no `us_socket_context_t`; groups are +embedded in owners; TLS is per-socket `s->ssl`; dispatch is by `s->kind` through Rust +`us_dispatch_*`). + +--- + +## 1. Exported functions required by surviving C/C++ consumers + +Legend: consumers in brackets. "RUST" additionally consumes almost everything below via +`src/uws_sys` extern decls; only non-Rust consumers are listed since Rust callers can be +re-pointed natively. + +### 1.1 Loop + +| Function | Consumers | Contract | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `struct us_loop_t *us_create_loop(void *hint, void (*wakeup_cb)(us_loop_r), void (*pre_cb)(us_loop_r), void (*post_cb)(us_loop_r), unsigned int ext_size)` | UWS `Loop.h` | Allocates loop + `ext_size` bytes after the struct at `LIBUS_EXT_ALIGNMENT`. `hint` = existing native loop (libuv) or NULL. C++ placement-news `uWS::LoopData` (alignas(16)) into the ext immediately after. | +| `void us_loop_free(us_loop_r)` | UWS `Loop.h` | C++ runs `LoopData::~LoopData()` first, then calls this. Must free quic_timer if armed (current loop.c:155). | +| `void *us_loop_ext(us_loop_r)` | UWS (Loop.h, App.h, AsyncSocket.h, HttpResponse.h, WebSocketContext.h, Http3Response.h) | Pointer just past `us_loop_t`, 16-aligned, stable for loop lifetime. Hottest accessor in uWS (every cork/date/deflate access). | +| `void us_loop_run(us_loop_r)` | UWS `Loop.h` | Blocks until no non-fallthrough polls remain. | +| `void us_wakeup_loop(us_loop_r)` | UWS `Loop.h` (`Loop::defer`) | **Only thread-safe entry point.** Async-signal wakeup; loop thread then invokes `wakeup_cb` which drains the C++ defer queues. Increments `pending_wakeups` so the tick returns immediately. | +| `void us_loop_integrate(us_loop_r)` | UWS `Loop.h` | Hook timers into an existing (alien/libuv) loop. | + +### 1.2 Poll (needed by QUIC and SHIM only) + +| Function | Consumers | Contract | +| ------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | +| `LIBUS_SOCKET_DESCRIPTOR us_poll_fd(us_poll_r)` | QUIC (×5), SHIM | QUIC calls it on `(struct us_poll_t *) udp_socket` — i.e. relies on `us_poll_t` being the first member of `us_udp_socket_t`. | +| `void us_poll_change(us_poll_r, us_loop_r, int events)` | QUIC, SHIM | `events` = `LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE` (platform-specific values, see §8). QUIC arms WRITABLE on send backpressure; SHIM's needs-more helpers arm R | W. Must be callable from inside poll dispatch. | + +(`us_create_poll`, `us_poll_free`, `us_poll_init`, `us_poll_start{,_rc}`, `us_poll_stop`, +`us_poll_events`, `us_poll_ext`, `us_poll_resize` have **no surviving C/C++ callers** — +internal + Rust only.) + +### 1.3 Timers (libuv/Windows only — POSIX has no us_timer users left) + +Public API is `#ifdef _WIN32` in `libusockets.h`; QUIC uses it under `LIBUS_USE_LIBUV`: + +| Function | Consumers | Contract | +| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------ | +| `struct us_timer_t *us_create_timer(us_loop_r, int fallthrough, unsigned int ext_size)` | QUIC (libuv path: lazy `loop->data.quic_timer = us_create_timer(loop, 1, 0)`) | `fallthrough=1` → does not keep loop alive. May return NULL. | +| `void us_timer_set(struct us_timer_t *, void (*cb)(struct us_timer_t *), int ms, int repeat_ms)` | QUIC | `repeat_ms=0` = one-shot; both 0 = disarm. | +| `struct us_timer_t *us_timer_loop(struct us_timer_t *)` → `us_loop_t*` | QUIC (`us_quic_on_timer` → `us_quic_loop_process(us_timer_loop(t))`) | | +| `void us_timer_close(struct us_timer_t *, int fallthrough)` | crate-internal (loop_free closes quic_timer) + RUST `Timer.rs` | | +| `void *us_timer_ext(struct us_timer_t *)` | RUST only | | + +### 1.4 Socket + +All take `us_socket_r` = nonnull `struct us_socket_t *`. Reentrancy note that applies to the +whole table: every one of these may be called from inside `on_data`/`on_writable`/vtable +callbacks (uWS does so pervasively), including `us_socket_close` on the socket currently +being dispatched. + +| Function | Consumers | Contract | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `int us_socket_write(us_socket_r, const char *data, int length)` | UWS AsyncSocket.h/HttpContext.h, WV both | Plaintext write; TLS-encrypts when `s->ssl`. Returns bytes accepted (0..length); on partial, socket arms WRITABLE and the next `on_writable` fires. Never negative. | +| `int us_socket_write2(us_socket_r, const char *header, int header_length, const char *payload, int payload_length)` | UWS WebSocket.h, WV WebKit | Vectored 2-part write (frame header + body without copy). Returns total bytes accepted across both parts. | +| `struct us_socket_t *us_socket_close(us_socket_r, int code, void *reason)` | UWS App/AsyncSocket/HttpContext/WebSocket/WebSocketContext, WV | `code` = `LIBUS_SOCKET_CLOSE_CODE_*` (§8). Fires `on_close(code, reason)` synchronously (via dispatch); returns the (still-valid-until-loop_post) socket. Idempotent w.r.t. already-closed. Actual free deferred to outermost `loop_post` (`closed_head`, `tick_depth` guard). | +| `void us_socket_shutdown(us_socket_r)` | UWS AsyncSocket/HttpContext | TLS: close_notify; TCP: FIN. | +| `void us_socket_shutdown_read(us_socket_r)` | UWS WebSocket.h | `shutdown(fd, SHUT_RD)` equivalent. | +| `int us_socket_is_closed(us_socket_r)` | UWS, SHIM, WV, JSHS | Reads `flags.is_closed`. Must be true from the moment close is requested (guards in shim's needs-more helpers rely on it). | +| `int us_socket_is_shut_down(us_socket_r)` | UWS HttpContext/WebSocketContext | Write-side already shut down. | +| `void *us_socket_ext(us_socket_r)` | UWS everywhere, JSHS | Pointer just past `us_socket_t`, `LIBUS_EXT_ALIGNMENT`-aligned. C++ placement-news `HttpResponseData` / `WebSocketData` there and relies on the address being stable **except across `us_socket_adopt` relocation**. | +| `struct us_socket_group_t *us_socket_group(us_socket_r)` | UWS AsyncSocket/HttpContext/HttpResponse/WebSocket/WebSocketContext | returns_nonnull. `WebSocket.h` computes its context data as `((us_socket_group_t *) us_socket_group_ext(us_socket_group(s)) + 1)` — see layout §3. | +| `void us_socket_timeout(us_socket_r, unsigned int seconds)` | UWS AsyncSocket/HttpContext/HttpResponse/WebSocketContext | Granularity `LIBUS_TIMEOUT_GRANULARITY` (4s) via group sweep; 0 clears. Fires vtable `on_timeout`. | +| `void us_socket_long_timeout(us_socket_r, unsigned int minutes)` | UWS HttpResponse.h | Minute-granularity sweep → `on_long_timeout`. | +| `void us_socket_pause(us_socket_r)` / `void us_socket_resume(us_socket_r)` | UWS AsyncSocket.h | Stop/restart readable polling (`flags.is_paused`). Resume must redeliver buffered TLS plaintext if any. | +| `void us_socket_remote_address(us_socket_r, char *buf, int *length)` | UWS AsyncSocket.h, SHIM | Writes 4 (v4) or 16 (v6) raw bytes; `*length` in/out (in = capacity). `*length=0` on failure/unix. | +| `void *us_socket_get_native_handle(us_socket_r)` | UWS AsyncSocket.h | `SSL*` if TLS else `(void*)(intptr_t)fd`. | +| `void us_socket_ref(us_socket_r)` / `void us_socket_unref(us_socket_r)` | UWS HttpContext.h (unrefs listen sockets) | libuv: uv_ref/uv_unref semantics; epoll/kqueue: adjusts whether socket counts toward keeping `us_loop_run` alive. No-op must still be exported. | +| `struct us_socket_t *us_socket_adopt(us_socket_r, us_socket_group_r, unsigned char kind, int old_ext_size, int ext_size)` | UWS HttpResponse.h (WS upgrade) | Moves socket between groups/kinds, resizing ext; **may realloc and return a different pointer** (`flags.adopted`). Caller re-placement-news ext and calls `LoopData::transferCorkSlot` with the new pointer. Must be legal mid-`on_data`; dispatch continues with the returned pointer. | +| `struct us_socket_t *us_socket_from_fd(us_socket_group_r, unsigned char kind, struct ssl_ctx_st *ssl_ctx /*nullable*/, int socket_ext_size, LIBUS_SOCKET_DESCRIPTOR fd, int ipc)` | WV both (`BUN_SOCKET_KIND_DYNAMIC`, ssl_ctx=NULL, ipc=0) | Wraps an existing fd; starts readable polling; links into group; frees the poll (not the fd) on failure and returns NULL. | +| `int us_socket_is_ssl_handshake_finished(us_socket_r)` | JSHS | | +| `int us_socket_ssl_handshake_callback_has_fired(us_socket_r)` | JSHS | Distinguishes "finished" from "on_handshake already dispatched". | +| `void *us_socket_server_name_userdata(us_socket_r)` | UWS HttpContext.h | Per-SNI-domain `user` stored via `us_listen_socket_add_server_name` (uWS keeps a per-domain `HttpRouter*` there); resolved for the socket's negotiated servername. NULL if none. | +| `unsigned int us_get_remote_address_info(char *buf, us_socket_r, const char **dest, int *port, int *is_ipv6)` | SHIM | Formats textual IP into `buf`, points `*dest` at it, returns length; 0 on failure/unix socket. | +| `unsigned int us_get_local_address_info(char *buf, us_socket_r, const char **dest, int *port, int *is_ipv6)` | SHIM | Same for local end. | + +**Defined in SHIM today (not in the C library), using internal layout — see §3/§9:** + +| Function | Currently | Contract | +| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `LIBUS_SOCKET_DESCRIPTOR us_socket_get_fd(us_socket_r)` | SHIM def: `us_poll_fd(&s->p)` | Declared in libusockets.h; Rust binds it (`us_socket_t.rs`). | +| `void us_socket_sendfile_needs_more(us_socket_r)` | SHIM def: `if(closed) return; s->flags.last_write_failed = 1; us_poll_change(&s->p, s->group->loop, R | W)` | Called after a short `sendfile(2)` so the next writable event re-fires `on_writable`. | +| `void us_socket_mark_needs_more_not_ssl(uws_res_r)` | SHIM def: identical body (casts `uws_res_t*`→`us_socket_t*`) | Same, for non-SSL HttpResponse. Called from Rust (`Response.rs`). | + +### 1.5 Socket groups + +`us_socket_group_t` is a PUBLIC struct (full layout in `libusockets.h`) embedded by value in +its owners — see §3.1. + +| Function | Consumers | Contract | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `void us_socket_group_init(us_socket_group_r, us_loop_r, const struct us_socket_vtable_t *vtable /*nullable*/, void *ext /*nullable*/)` | UWS HttpContext/WebSocketContext `create()`, WV both | Initializes an embedded, zero-initialized group. Does NOT link into loop (lazy on first socket). Idempotent. `ext` = owner back-pointer. | +| `void us_socket_group_deinit(us_socket_group_r)` | UWS HttpContext::free, WebSocketContext::free | Unlinks from loop; asserts socket list empty. Owner frees embedding storage right after. | +| `void us_socket_group_close_all(us_socket_group_r)` | UWS App.h `close()` | Closes every socket AND listen socket in the group (fires `on_close` per socket). Group stays valid. Walks `head_listen_sockets` first. Must also account for sockets parked in `low_prio_head` (`low_prio_count`). | +| `void *us_socket_group_ext(us_socket_group_r)` | UWS App/HttpContext/WebSocket/WebSocketContext | Returns `group->ext` (the owner pointer). | +| `struct us_loop_t *us_socket_group_loop(us_socket_group_r)` | UWS App/AsyncSocket/HttpResponse/WebSocketContext | returns_nonnull. | +| `struct us_listen_socket_t *us_socket_group_head_listen_socket(us_socket_group_r)` | UWS App.h (`addServerName` etc. walk listeners) | Live list head; caching `us_listen_socket_t*` across ticks is a documented UAF. | +| `struct us_listen_socket_t *us_socket_group_listen(us_socket_group_r, unsigned char kind, struct ssl_ctx_st *ssl_ctx /*nullable*/, const char *host /*nullable*/, int port, int options, int socket_ext_size, int *error)` | UWS HttpContext.h (passes `options \| LIBUS_LISTEN_DEFER_ACCEPT`) | Listener owns embedded accept state; accepted sockets get `kind` stamped, `socket_ext_size` ext, are linked into THIS group, and up_ref'd `ssl_ctx` applied when non-NULL. `*error` receives errno-ish code on NULL return. | +| `struct us_listen_socket_t *us_socket_group_listen_unix(us_socket_group_r, unsigned char kind, struct ssl_ctx_st *ssl_ctx, const char *path, size_t pathlen, int options, int socket_ext_size, int *error)` | UWS HttpContext.h | Unix-domain variant; `pathlen` supports abstract sockets (leading NUL). | + +(Group connect: `us_socket_group_connect`, `us_socket_group_connect_unix`, +`us_socket_pair`, `us_socket_adopt_tls`, `us_socket_tls_feed`, +`us_socket_start_tls_handshake`, `us_socket_sni_resolve`, `us_loop_close_all_groups`, +`us_socket_group_close_all_ex`, `us_socket_group_timestamp`, `us_socket_group_next` — +**Rust-only consumers**, no C/C++ caller survives.) + +### 1.6 Listen sockets / SNI + +| Function | Consumers | Contract | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------- | +| `void us_listen_socket_close(struct us_listen_socket_t *)` | UWS App.h | Unlinks from group's listener list, releases ssl_ctx ref + SNI tree, frees in loop_post. | +| `struct us_listen_socket_t *us_listen_socket_next(struct us_listen_socket_t *)` | UWS App.h | Walk listener list. | +| `struct us_socket_group_t *us_listen_socket_group(struct us_listen_socket_t *)` | UWS App.h | The accept group. | +| `int us_listen_socket_add_server_name(struct us_listen_socket_t *, const char *hostname_pattern, struct ssl_ctx_st *ssl_ctx, void *user /*nullable*/)` | UWS App.h | ssl_ctx up_ref'd into the SNI tree; `user` opaque (uWS: per-domain HttpRouter\*). Wildcard patterns supported. | +| `void us_listen_socket_remove_server_name(struct us_listen_socket_t *, const char *hostname_pattern)` | UWS App.h | Releases that entry's ssl_ctx ref. | +| `struct ssl_ctx_st *us_listen_socket_find_server_name_ctx(struct us_listen_socket_t *, const char *hostname_pattern)` | UWS App.h | **Returns an OWNED reference — caller must `us_internal_ssl_ctx_unref`** (App.h does). | +| `void us_listen_socket_on_server_name(struct us_listen_socket_t *, struct ssl_ctx_st *(*cb)(struct us_listen_socket_t *, const char *hostname, int *abort_handshake, struct us_socket_t *socket))` | UWS App.h | Dynamic SNI resolver; see callback contract §4.3. | + +(`us_listen_socket_ext/get_fd/port/find_server_name_userdata` — Rust-only.) + +### 1.7 SSL_CTX construction / root certs + +| Function | Consumers | Contract | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `struct ssl_ctx_st *us_ssl_ctx_from_options(struct us_bun_socket_context_options_t options /*BY VALUE*/, enum create_bun_socket_error_t *err)` | UWS App.h | Builds a BoringSSL SSL_CTX; caller owns one ref (release with `us_internal_ssl_ctx_unref`). Mode-neutral (client+server). Frees the internal strdup'd passphrase itself. NULL + `*err` on failure. | +| `void us_internal_ssl_ctx_unref(struct ssl_ctx_st *)` | UWS App.h | `SSL_CTX_free` without OpenSSL headers. (`us_internal_ssl_ctx_up_ref` symmetric, Rust-only today.) | +| `int us_raw_root_certs(struct us_cert_string_t **out)` | NTLS | Returns count; `*out` points at static array of PEM strings (never freed). | +| `STACK_OF(X509) *us_get_root_extra_cert_instances()` | NTLS | Extra CA certs from `NODE_EXTRA_CA_CERTS`. | +| `STACK_OF(X509) *us_get_root_system_cert_instances()` | NTLS | Platform system store certs. | +| `SSL_CTX *us_ssl_ctx_build_raw(struct us_bun_socket_context_options_t, enum create_bun_socket_error_t *)` | QUIC (extern-declared locally) | Same as from_options but without socket-layer callbacks attached (QUIC installs lsquic's own). | +| `X509_STORE *us_get_default_ca_store()` | QUIC | Bun's default trust store (root_certs.cpp). | + +**Crypto TU split:** `crypto/root_certs*.cpp` stays a C++ TU inside bun-usockets — +the NTLS + `us_get_default_ca_store` rows come from it unchanged. `crypto/sni_tree.cpp` +was replaced by `tls/sni.rs`, and `crypto/openssl.c` by the Rust TLS layer, which +exports `us_ssl_ctx_from_options`, `us_ssl_ctx_build_raw`, +`us_internal_ssl_ctx_{up_ref,unref}`, and the internal SSL surface the socket layer uses. + +### 1.8 UDP + packet buffer (QUIC is the only surviving C consumer) + +| Function | Consumers | Contract | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `struct us_udp_socket_t *us_create_udp_socket(us_loop_r, void (*data_cb)(struct us_udp_socket_t *, void *, int), void (*drain_cb)(struct us_udp_socket_t *), void (*close_cb)(struct us_udp_socket_t *), void (*recv_error_cb)(struct us_udp_socket_t *, int), const char *host, unsigned short port, int flags, int *err, void *user)` | QUIC (×3: server listen, client bind v6 then v4 fallback) | Creates + binds + starts readable polling. `data_cb(socket, recvbuf, npackets)` — `recvbuf` is a `us_udp_packet_buffer_t*` (per-loop shared recv buffer, `LIBUS_RECV_BUFFER_LENGTH`), valid only during the callback. `drain_cb` after WRITABLE clears backpressure. `close_cb` fires from `us_udp_socket_close` before deferred free. `recv_error_cb(s, errno)` for non-EAGAIN recvmmsg errors (IP_RECVERR/ICMP); socket NOT closed automatically. NULL + `*err` on bind failure. | +| `void us_udp_socket_close(struct us_udp_socket_t *)` | QUIC (×4) | Stops poll, fires close_cb, defers free to loop_post via `closed_udp_head`. Safe while iterating (QUIC calls it in `while (ctx->listeners)` teardown loops). | +| `void *us_udp_socket_user(struct us_udp_socket_t *)` | QUIC (×3) | The `user` pointer from create (QUIC stores its listen socket there). | +| `char *us_udp_packet_buffer_payload(struct us_udp_packet_buffer_t *, int index)` | QUIC | Payload of packet `index` in the last receive batch. | +| `int us_udp_packet_buffer_payload_length(struct us_udp_packet_buffer_t *, int index)` | QUIC | | +| `char *us_udp_packet_buffer_peer(struct us_udp_packet_buffer_t *, int index)` | QUIC | Cast to `struct sockaddr*` (sockaddr_storage per slot). | + +QUIC additionally does `(struct us_poll_t *) udp_socket` casts (poll-first layout, §3) and +sets DONTFRAG/DF socket options directly on `us_poll_fd(...)` — no extra API needed. + +All other UDP functions (`bind`, `send`, `receive`, `set_broadcast`, `connect`, +`disconnect`, memberships, TTL, `bound_port`, `bound_ip`, `remote_ip`, +`us_create_udp_packet_buffer`, `us_udp_buffer_set_packet_payload`, +`us_udp_packet_buffer_truncated`, `us_udp_packet_buffer_local_ip`) are consumed **only by +Rust** (`src/uws_sys/udp.rs` → node:dgram) — now native calls. + +### 1.9 QUIC layer (quic.c EXPORTS — for completeness, NOT part of the Rust crate) + +quic.c survives and continues to export the whole `us_quic_*` surface consumed by +UWS `Http3App.h`/`Http3Context.h`/`Http3Request.h`/`Http3Response.h`/`Http3ResponseData.h` +and H3SHIM (`us_quic_global_init`, `us_create_quic_socket_context`, +`us_quic_socket_context_{shutdown,free,add_server_name,ext,loop,listen,connect,on_*}`, +`us_quic_listen_socket_{close,port,local_address}`, `us_quic_socket_remote_address`, +`us_quic_stream_*`, `us_quic_loop_process`, `us_quic_loop_flush_if_pending`, pending-connect +API) plus RUST `quic.rs` (`us_quic_global_init`) and `Loop.rs` +(`us_quic_loop_flush_if_pending`). Signatures: `packages/bun-usockets/src/quic.h`. +The Rust crate must define `LIBUS_USE_QUIC`-equivalent loop hooks (§6). + +--- + +## 2. IMPORTS: symbols the Rust crate must call OUT to (reverse dependencies) + +These are functions the deleted C calls today; the Rust crate must keep invoking them with +identical semantics: + +1. **Dispatch (Rust, `src/runtime/socket/uws_dispatch.rs`)** — `us_dispatch_open`, + `us_dispatch_data`, `us_dispatch_fd`, `us_dispatch_writable`, `us_dispatch_close`, + `us_dispatch_timeout`, `us_dispatch_long_timeout`, `us_dispatch_end`, + `us_dispatch_connect_error`, `us_dispatch_connecting_error`, `us_dispatch_handshake` + (custom_data always NULL), `us_dispatch_session`, `us_dispatch_keylog`, + `us_dispatch_ssl_raw_tap`. The loop NEVER reads `group->vtable` itself — dispatch + switches on `s->kind` and falls back to the group vtable for `UwsHttp{,Tls}`, + `UwsWs{,Tls}`, and `Dynamic`. For Rust-handled kinds these are direct Rust calls, + but the vtable-for-C++-kinds path survives unchanged. +2. **quic.c hooks** — from `us_internal_loop_pre` AND `us_internal_loop_post`: + `if (loop->data.quic_head) us_quic_loop_process(loop);`. On libuv loop teardown: + `us_timer_close(loop->data.quic_timer, 0)` if set. +3. **Loop callbacks** installed via `us_create_loop`: `wakeup_cb` (from loop thread after + `us_wakeup_loop`), `pre_cb` (every iteration before poll-wait — cork drain depends on + it, §5), `post_cb` (after dispatching ready polls). +4. **Group vtable callbacks** (§4) for C++ kinds. +5. **DNS/JS glue (already Rust/Zig-side exports)** — `Bun__addrinfo_get/set/cancel/ +freeRequest/getRequestResult`, `Bun__lock/unlock`, `Bun__panic`, `Bun__outOfMemory`. +6. **SNI dynamic resolver** installed via `us_listen_socket_on_server_name` (§4.3). + +--- + +## 3. Layout contracts — struct-field pokes from surviving code (the dangerous list) + +### 3.1 `us_socket_group_t` — PUBLIC repr(C), embedded by value. Layout FROZEN. + +Definition (libusockets.h): `{ us_loop_t *loop; const us_socket_vtable_t *vtable; void *ext; +us_socket_t *head_sockets; us_connecting_socket_t *head_connecting_sockets; +us_listen_socket_t *head_listen_sockets; us_socket_t *iterator; +us_socket_group_t *prev, *next; uint32_t global_tick; uint16_t low_prio_count; +unsigned char timestamp, long_timestamp, linked; }` + +- **Embedded by value** at offset 0 in `uWS::HttpContext` (`static_assert(offsetof == 0)`, + non-polymorphic assert) and `uWS::WebSocketContext` + (`static_assert(offsetof(WebSocketContext, data) == sizeof(us_socket_group_t))` — + **`sizeof(us_socket_group_t)` is ABI**), and as C++ static storage in both webview + backends. Zero-initialization (`{}` / static zeroing) must be a valid pre-init state. +- **Field reads from C++:** `App.h::closeIdle()` walks `group->head_sockets` and + `s->next` directly. `SHIM` reads `s->group->loop`. +- Sockets parked in the loop's `low_prio_head` are NOT in `head_sockets` + (`low_prio_count` tracks them) — `close_all`/`deinit` must handle both; `closeIdle`'s + walk will simply miss parked sockets (current behavior, keep). + +### 3.2 `us_socket_t` — internal, but layout-relied-upon by SHIM + App.h + +- `struct us_poll_t p` is the **first member** (SHIM: `&s->p`; identity cast + poll↔socket everywhere). +- SHIM writes `s->flags.last_write_failed = 1` (bit 7 of the packed 1-byte + `us_socket_flags`) and reads `s->group->loop`. +- `App.h::closeIdle` reads `s->next`. +- **Pointer-identity contract:** `uWS::AsyncSocket/HttpResponse/WebSocket` are casts of + `us_socket_t*` (no C++ fields of their own); all their state lives in the ext region + returned by `us_socket_ext` = address just past the struct, `LIBUS_EXT_ALIGNMENT(16)`- + aligned. So `sizeof(us_socket_t)` (rounded to 16) is ABI for the C++ side only through + `us_socket_ext` — keep it a function, never a macro. +- JSHS additionally uses `us_socket_stream_buffer_t` + `us_socket_buffered_js_write` — + both already **exported from Rust** (`src/runtime/socket/uws_jsc.rs`); unchanged. + +### 3.3 `us_listen_socket_t` — first-member poke from C++ + +`HttpContext.h::listen{,_unix}` calls `us_socket_unref(&socket->s)` — relies on +`struct us_socket_t s` being the **first member** of `us_listen_socket_t` and on the C++ +TU seeing the full internal.h definition. (Shrink candidate, §9.) + +### 3.4 `us_poll_t` + +- epoll/kqueue: `alignas(16) struct { signed int fd : 27; unsigned int poll_type : 5; }`. +- libuv: `{ uv_poll_t *uv_p; LIBUS_SOCKET_DESCRIPTOR fd; unsigned char poll_type; }`. +- First member of `us_socket_t`, `us_udp_socket_t`, `us_internal_callback_t`; + **quic.c casts `us_udp_socket_t*` → `us_poll_t*`** for `us_poll_fd`/`us_poll_change`. + +### 3.5 `us_loop_t` and `us_internal_loop_data_t` + +- `struct us_internal_loop_data_t data` is the **first member** of `us_loop_t` + (both eventing backends), followed by (epoll/kqueue) `int num_polls; int +num_ready_polls; int current_ready_poll; int fd; unsigned int bun_polls; unsigned int +pending_wakeups; alignas(16) ready_polls[1024]` / (libuv) `uv_loop_t *uv_loop; int +is_default; uv_prepare_t *uv_pre; uv_check_t *uv_check;`. +- **quic.c field pokes:** `loop->data.quic_head` (linked list of engine contexts, read+ + written), `loop->data.quic_next_tick_us` (written by `us_quic_loop_process`, read by + Bun's Rust `getTimeout` — `src/runtime/jsc_hooks.rs` + `src/runtime/timer/mod.rs`), + `loop->data.quic_timer` (libuv only), and **`ctx->loop->num_polls++/--`** (keeps the + loop alive per live QUIC connection). +- `us_internal_loop_data_t` is already mirrored field-for-field in + `src/uws_sys/InternalLoopData.rs` (comment at `internal/loop_data.h:35`); the Rust + runtime reads `quic_next_tick_us` through that mirror. **The Rust + definition is the source of truth; quic.c needs a C header that matches it + exactly** (fields incl. `sweep_next_tick_ns`/`sweep_timer`, `sweep_timer_count`, + `wakeup_async`, `head`, `quic_head`, `quic_next_tick_us`, `[quic_timer]`, `iterator`, + `recv_buf`, `send_buf`, `ssl_data`, `pre_cb`, `post_cb`, `closed_udp_head`, + `closed_head`, `low_prio_head`, `low_prio_budget`, `dns_ready_head`, + `closed_connecting_head`, `zig_mutex_t mutex`, `parent_ptr`, `parent_tag`, + `iteration_nr`, `jsc_vm`, `tick_depth`). +- C++ (uWS) touches the loop ONLY through `us_loop_ext` — `uWS::Loop*` is an identity + cast of `us_loop_t*` but never reads fields. + +### 3.6 `us_udp_socket_t` + +quic.c holds `us_udp_socket_t*` opaquely EXCEPT for the poll-first cast (§3.4). Rust-only +consumers (udp.rs) treat it opaquely. Layout otherwise free. + +### 3.7 Value types crossing the ABI (repr(C), FROZEN) + +- `us_socket_vtable_t` — 11 function-pointer slots **in this order**: on_open, on_data, + on_fd, on_writable, on_close, on_timeout, on_long_timeout, on_end, on_connect_error, + on_connecting_error, on_handshake. C++ builds 4 static const instances (httpVTable, + wsVTable, webview s_hostVTable ×2); NULL slots are skipped by dispatch. +- `us_bun_socket_context_options_t` — 20 fields, **passed BY VALUE** to + `us_ssl_ctx_from_options` / `us_ssl_ctx_build_raw`, and **memcpy'd** onto + `uWS::SocketContextOptions` in SHIM `uws_create_app` (layouts must stay identical). + Also constructed by Rust (`App.rs`) and passed through H3SHIM. +- `us_bun_verify_error_t { int error; const char *code; const char *reason; }` — returned + by value (`us_socket_verify_error`), passed by value into vtable `on_handshake`. +- `us_cert_string_t { const char *str; size_t len; }` (NTLS). +- `us_iovec_t { void *iov_base; size_t iov_len; }` — iovec-layout-compatible (Rust-only + caller today). +- `enum create_bun_socket_error_t` (0..4). +- `struct us_socket_flags` — 1 byte packed; bit assignments frozen because SHIM sets + `last_write_failed` directly (until §9 patch lands). + +### 3.8 Socket-kind constants — Rust → C++ direction (already correct, keep) + +`BUN_SOCKET_KIND_{DYNAMIC,UWS_HTTP,UWS_HTTP_TLS,UWS_WS,UWS_WS_TLS}` are `#[no_mangle]` +`unsigned char` statics exported from `src/uws_sys/SocketKind.rs`, consumed by C++ via +`packages/bun-uws/src/SocketKinds.h` and by webview backends (`BUN_SOCKET_KIND_DYNAMIC`). +`SocketKind` is `#[repr(u8)]`, dense 0..=22; `crypto/openssl.c` (being rewritten) also +references `BUN_SOCKET_KIND_BUN_SOCKET_TLS`. + +--- + +## 4. Callback contracts + +### 4.1 Group vtable (installed by C++: httpVTable, wsVTable, webview vtables) + +Invocation path: Rust loop → `us_dispatch_*` (`dispatch.rs`) → for kinds +UwsHttp/UwsHttpTls/UwsWs/UwsWsTls/Dynamic → `s->group->vtable` slot. Contracts the C++ +handlers assume: + +- **Return value** is the possibly-relocated/closed socket; the driver must continue with + the returned pointer (uWS handlers return the result of `close()`/`adopt` chains) and + re-read `s->flags` after the call (a handler may have closed or adopted the socket). +- **NULL slots are skipped** (e.g. httpVTable.on_fd, wsVTable.on_open); skipping must be + a no-op, not a crash (`Invalid` kind is deliberately null → crash-by-design). +- `on_open(s, is_client, ip, ip_len)` — after accept/connect (post-TLS-attach but before + handshake completion); `ip` = raw bytes (4/16) or len 0. +- `on_data(s, data, len)` — `data` points into the loop's shared `recv_buf` + (`LIBUS_RECV_BUFFER_LENGTH` + `LIBUS_RECV_BUFFER_PADDING` on both ends, writable — + WebSocket unmasking mutates it in place and reads in 16-byte SIMD strides, hence the + padding). Valid only for the duration of the call. **Fully re-entrant**: handler may + write, close, shutdown, adopt (upgrade), or run arbitrary JS that re-enters the loop + (`tick_depth`); freed-socket reclamation must defer to outermost loop_post. +- `on_writable(s)` — fired when poll goes writable AND a prior write failed + (`last_write_failed`); uWS clears backpressure then may close. +- `on_close(s, code, reason)` — exactly once per socket, code = `LIBUS_SOCKET_CLOSE_CODE_*`, + `reason` = pointer passed to `us_socket_close` (uWS passes strings/nullptr). Fired + synchronously from `us_socket_close` or from EOF/error paths. +- `on_end(s)` — peer FIN with socket not shut down; uWS responds with close(); with + `LIBUS_SOCKET_ALLOW_HALF_OPEN` the socket must stay writable. +- `on_timeout(s)` / `on_long_timeout(s)` — from the group sweep (4 s / 1 min granularity). +- `on_handshake(s, success, verify_error /*by value*/, custom_data)` — TLS handshake + completion; dispatch passes `custom_data = NULL`. httpVTable installs it only for SSL. +- `on_connect_error` / `on_connecting_error` — connect failures (C++ leaves them NULL; + Rust kinds use them). + +### 4.2 Loop callbacks (uWS `Loop.h`) + +- `pre_cb` runs EVERY iteration before poll-wait: uWS drains leftover cork slots here + (max 2 uncork calls). Rust loop's `us_internal_loop_pre` must keep the order: + `iteration_nr++`, DNS results, low-prio socket handling, `pre_cb(loop)`, quic process. +- `post_cb` after dispatch; `us_internal_loop_post` order: DNS results, quic process, + free closed sockets (only when `tick_depth <= 1`), free closed udp/connecting sockets. +- `wakeup_cb` on the loop thread after any-thread `us_wakeup_loop`; uWS drains its + mutex-protected defer queues there. + +### 4.3 Dynamic SNI callback (`us_listen_socket_on_server_name`) + +`struct ssl_ctx_st *cb(us_listen_socket_t *ls, const char *hostname, int *abort_handshake, +us_socket_t *socket)` — called mid-handshake (inside SSL_do_handshake, JS may run: +BIO loop state must be saved/restored around it, cf. `us_internal_ssl_loop_state_save/ +restore`). Return: SSL_CTX to use for THIS handshake only (callee does not cache/own it), +or NULL → default ctx. `*abort_handshake`: 1 = abort; 2 = suspend (async resolver) — +resumed later via `us_socket_sni_resolve(s, ctx /*consumed, nullable*/, error)` which +must be a no-op on a closed socket. + +### 4.4 UDP callbacks — §1.8 table. + +--- + +## 5. Cork / LoopData / date header — who owns what + +- **All cork state is C++-owned**, in `uWS::LoopData` (two `CorkSlot{buffer,socket,offset, +ssl}` of 16 KB each + LRU bit), which lives in the loop ext region + (`us_loop_ext(loop)`), placement-new'd by `uWS::Loop::create` right after + `us_create_loop(..., ext_size = sizeof(LoopData))` and destroyed manually before + `us_loop_free`. The Rust crate never touches cork state. +- Mutators: `AsyncSocket::cork/uncork/getSendBuffer/write` (acquire/find/touch/release + slots, force-uncork LRU victim), `HttpResponse::upgrade` → + `LoopData::transferCorkSlot(slot, newWebSocketPtr, ssl)` after `us_socket_adopt` + (relocation-aware), `LoopData::unborrowCorkSlot` on socket close paths, + `uWS::Loop::preCb` drains leftovers each iteration, and SHIM export + `uws_res_clear_corked_socket(us_loop_t*)` (called from Rust) force-drains both slots. +- **Crate obligations:** (1) ext pointer stable + 16-aligned (LoopData is `alignas(16)`); + (2) `pre_cb` invoked every iteration before blocking; (3) `us_socket_adopt` returns the + new pointer so C++ can retarget the slot; (4) nothing in the crate may hold `data` + pointers across an `on_data` that could adopt. +- **Date header:** `LoopData::date[32]` refreshed by `LoopData::updateDate()`, driven via + SHIM export `uws_loop_date_header_timer_update(us_loop_t*)` called from the Rust + runtime's own 1 s timer (bound in `src/uws_sys/Loop.rs`). No usockets timer involved — + nothing for the crate to provide beyond `us_loop_ext`. + +--- + +## 6. Everything quic.c needs (it survives; the crate is its platform layer) + +Functions: `us_create_udp_socket`, `us_udp_socket_close`, `us_udp_socket_user`, +`us_udp_packet_buffer_{payload,payload_length,peer}`, `us_poll_fd`, `us_poll_change`, +`us_create_timer`/`us_timer_set`/`us_timer_loop` (libuv only), `us_ssl_ctx_build_raw`, +`us_get_default_ca_store` (§1.7). + +Loop integration: + +- Fields (§3.5): `loop->data.quic_head`, `loop->data.quic_next_tick_us`, + `loop->data.quic_timer` (libuv), `loop->num_polls++/--`. +- Hooks: `us_internal_loop_pre/post` call `us_quic_loop_process(loop)` when + `quic_head != NULL` (loop.c:405,412 today). Rust equivalents must keep both call sites + (pre = flush JS-task writes before blocking; post = process this tick's datagrams). +- Poll-timeout folding (epoll/kqueue): the epoll_pwait2 timeout is clamped by + `quic_next_tick_us` — already implemented Rust-side in `src/runtime/timer/mod.rs` via + the `InternalLoopData` mirror; keep. (epoll_kqueue.c:368-379 is the C twin being + deleted — verify the Rust path covers the non-Bun `us_loop_run` too.) +- Constants: `LIBUS_SOCKET_READABLE/WRITABLE` (platform values! EPOLLIN/EPOLLOUT vs 1/2 + kqueue vs UV_READABLE/UV_WRITABLE), `LIBUS_SOCKET_DESCRIPTOR`, `LIBUS_SOCKET_ERROR` + (-1 / INVALID_SOCKET), `LIBUS_RECV_BUFFER_LENGTH`. +- Headers: quic.c used to include `internal/internal.h` — it now needs a C header + delivering: the `us_internal_loop_data_t` + `us_loop_t` + `us_poll_t` layouts (or §9 + accessors), the function decls above, and `zig_mutex_t`. +- quic.c also calls libc directly (`getsockname`, `setsockopt` DF bits) on + `us_poll_fd(...)` — no API needed. + +--- + +## 7. src/uws_sys Rust files: which bindings point INTO C++ (stay) vs into deleted C + +**Stay unchanged — bind uws\_\* C++ shim exports (libuwsockets.cpp / libuwsockets_h3.cpp / bun-uws):** + +- `App.rs` — 32 `uws_app_*` / `uws_create_app` etc. +- `Response.rs` — 37 `uws_res_*` (+1 `us_socket_mark_needs_more_not_ssl`, shim-defined — see §9.3) +- `Request.rs` — 8 `uws_req_*` +- `WebSocket.rs` — 21 `uws_ws_*` +- `h3.rs` — 58 `uws_h3_*` / H3 res functions +- `Loop.rs` — 8 `uws_*` (`uws_get_loop`, `uws_get_loop_with_native`, + `uws_res_clear_corked_socket`, `uws_loop_date_header_timer_update`, ...) **plus 9 `us_*` + decls that must be re-pointed to the crate** +- `BodyReaderMixin.rs`, `thunk.rs` — no FFI decls of either kind. + +**Re-point to the new crate (currently extern-into-deleted-C):** +`us_socket_t.rs` (43 fns), `udp.rs` (20), `ConnectingSocket.rs` (14), `SocketGroup.rs` (9), +`ListenSocket.rs` (8), `Loop.rs` (9 us\_\*), `SocketContext.rs` (4: ssl_ctx fns), +`Timer.rs` (4), `lib.rs` (3), `socket.rs` (1). `quic.rs` (`us_quic_global_init`) points +into quic.c — stays extern. Type-only files (`vtable.rs`, `InternalLoopData.rs`, +`SocketKind.rs`, `SocketKinds` statics, `us_bun_verify_error_t`) become the canonical +definitions. + +**Rust → C++ exports that already exist and must keep their symbols:** `us_dispatch_*` +(uws*dispatch.rs), `BUN_SOCKET_KIND*\*`statics (SocketKind.rs),`us_socket_buffered_js_write` (uws_jsc.rs, called from JSHS C++). + +--- + +## 8. Constants & macros the public header must keep exporting + +| Constant | Value | Consumers | +| ----------------------------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------- | +| `LIBUS_EXT_ALIGNMENT` | 16 | UWS App.h static_assert; ext-region contract everywhere | +| `LIBUS_RECV_BUFFER_LENGTH` | 524288 | UWS WebSocketProtocol.h (unmask loop bound), QUIC recv batch | +| `LIBUS_RECV_BUFFER_PADDING` | 32 | recv_buf over-read guarantee for SIMD unmask | +| `LIBUS_TIMEOUT_GRANULARITY` | 4 | timeout semantics | +| `LIBUS_SOCKET_CLOSE_CODE_CLEAN_SHUTDOWN / CONNECTION_RESET / FAST_SHUTDOWN` | 0 / 1 / 2 | UWS App.h + Rust; semantics block comment in libusockets.h is normative | +| listen/socket option enum (`LIBUS_LISTEN_DEFAULT..LIBUS_LISTEN_DEFER_ACCEPT`) | 0,1,2,4,8,16,32,64 | UWS HttpContext.h (`DEFER_ACCEPT`), Rust | +| `LIBUS_SOCKET_READABLE / WRITABLE` | EPOLLIN/EPOLLOUT · 1/2 (kqueue) · UV_READABLE/UV_WRITABLE | SHIM, QUIC — **per-platform, keep in header** | +| `LIBUS_SOCKET_DESCRIPTOR` | int / SOCKET | all | +| `LIBUS_SOCKET_ERROR` | -1 / INVALID_SOCKET | QUIC | +| `us_loop_r/us_socket_r/us_poll_r/us_socket_group_r` + `nonnull_arg/nonnull_fn_decl` | macros | SHIM uses `us_socket_r` in its own definitions | +| `POLL_TYPE_*`, `POLL_TYPE_BITSIZE(5)`, masks | internal.h | crate-internal only after §9.3 | +| `us_calloc/us_malloc/us_realloc/us_free` | default to libc | header compat only; no surviving consumer overrides them | + +--- + +## 9. Minimal surface + shrink opportunities (prefer small C++ patches) + +### 9.1 Deduplicated extern "C" function export list (C/C++ consumers only) + +Loop (6): `us_create_loop`, `us_loop_free`, `us_loop_ext`, `us_loop_run`, +`us_wakeup_loop`, `us_loop_integrate`. +Poll (2): `us_poll_fd`, `us_poll_change`. +Timer (4, libuv/Win): `us_create_timer`, `us_timer_set`, `us_timer_loop`, `us_timer_close`. +Socket (24): `us_socket_write`, `us_socket_write2`, `us_socket_close`, +`us_socket_shutdown`, `us_socket_shutdown_read`, `us_socket_is_closed`, +`us_socket_is_shut_down`, `us_socket_ext`, `us_socket_group`, `us_socket_timeout`, +`us_socket_long_timeout`, `us_socket_pause`, `us_socket_resume`, +`us_socket_remote_address`, `us_socket_get_native_handle`, `us_socket_ref`, +`us_socket_unref`, `us_socket_adopt`, `us_socket_from_fd`, +`us_socket_is_ssl_handshake_finished`, `us_socket_ssl_handshake_callback_has_fired`, +`us_socket_server_name_userdata`, `us_get_remote_address_info`, +`us_get_local_address_info` (+3 moved from SHIM per 9.3: `us_socket_get_fd`, +`us_socket_sendfile_needs_more`, `us_socket_mark_needs_more_not_ssl`). +Group (8): `us_socket_group_init`, `us_socket_group_deinit`, `us_socket_group_close_all`, +`us_socket_group_ext`, `us_socket_group_loop`, `us_socket_group_head_listen_socket`, +`us_socket_group_listen`, `us_socket_group_listen_unix`. +Listen/SNI (7): `us_listen_socket_close`, `us_listen_socket_next`, +`us_listen_socket_group`, `us_listen_socket_add_server_name`, +`us_listen_socket_remove_server_name`, `us_listen_socket_find_server_name_ctx`, +`us_listen_socket_on_server_name`. +SSL/certs (7): `us_ssl_ctx_from_options`, `us_internal_ssl_ctx_unref`, +`us_ssl_ctx_build_raw`, `us_get_default_ca_store`, `us_raw_root_certs`, +`us_get_root_extra_cert_instances`, `us_get_root_system_cert_instances` +(last 4 come from the surviving C++ crypto TUs — §1.7). +UDP (6): `us_create_udp_socket`, `us_udp_socket_close`, `us_udp_socket_user`, +`us_udp_packet_buffer_payload`, `us_udp_packet_buffer_payload_length`, +`us_udp_packet_buffer_peer`. +Data statics (5): `BUN_SOCKET_KIND_*` (already Rust). + +**≈ 62 functions + 8 repr(C) types** (`us_socket_group_t`, `us_socket_vtable_t`, +`us_bun_socket_context_options_t`, `us_bun_verify_error_t`, `us_cert_string_t`, +`us_iovec_t`, `enum create_bun_socket_error_t`, and — only where the §9.2 accessors are not applied — +`us_socket_t`/`us_listen_socket_t`/`us_poll_t`/`us_loop_t`/`us_internal_loop_data_t` +partial layouts). Everything else in libusockets.h/internal.h is Rust-internal +(the ~115 `us_*` fns declared in `src/uws_sys/*.rs` are native calls). + +### 9.2 Eliminating the C++ field pokes (tiny C++ accessor patches) + +1. **`App.h::closeIdle`** (`group->head_sockets`, `s->next`): add + `struct us_socket_t *us_socket_group_head_socket(us_socket_group_r)` and + `struct us_socket_t *us_socket_next(us_socket_r)` (or a + `us_socket_group_for_each` callback walker). Eliminates the only C++ read of + `us_socket_t` fields → `us_socket_t` becomes fully opaque to bun-uws. + Caveat: the walker must be close-safe (caller closes `s` after caching `next`). +2. **`HttpContext.h` `us_socket_unref(&socket->s)` ×2**: add + `void us_listen_socket_unref(struct us_listen_socket_t *)`. Eliminates the + `us_listen_socket_t` first-member contract → fully opaque. +3. **SHIM-defined `us_socket_get_fd` / `us_socket_sendfile_needs_more` / + `us_socket_mark_needs_more_not_ssl`**: move all three into the Rust crate as exports + (they only need fd, closed-check, `last_write_failed` set + poll_change) and delete + the definitions + the `#include ` from + `libuwsockets.cpp`. After 9.2.1–3, **no surviving C++ needs internal.h at all**; + `libusockets.h` keeps only opaque forward decls + the §3.7 value types + + `us_socket_group_t`. +4. **`us_socket_group_t` stays public/repr(C)** (it's embedded by value — an accessor + can't fix that, and the header already commits to the layout). Freeze it with a + `static_assert(sizeof)` in the generated header mirroring the Rust + `#[repr(C)]` definition, since WebSocketContext static_asserts on its size. +5. **quic.c pokes** (`loop->num_polls`, `loop->data.quic_*`): either (a) ship a checked C + header (`usockets_internal.h`) whose `us_loop_t`/`us_internal_loop_data_t` mirror the + Rust `#[repr(C)]` structs (they must stay in lockstep with + `src/uws_sys/InternalLoopData.rs` anyway), or (b) add 4 accessors: + `us_loop_poll_count_add(loop, int)`, `us_internal_loop_quic_head{,_set}(loop)`, + `us_internal_loop_quic_next_tick_set(loop, long long)` (+ libuv + `us_internal_loop_quic_timer{,_set}`). (b) makes `us_loop_t` fully opaque to all + surviving C/C++ — preferred; the Rust runtime keeps reading the struct natively. + +### 9.3 Semantics most likely to cause silent runtime corruption if drifted + +1. `on_data` buffer = shared mutable `recv_buf` with 32-byte padding both ends; WebSocket + unmasking writes to it and over-reads in 16-byte strides. +2. `us_socket_adopt` relocation + cork-slot retargeting + dispatch continuing on the + returned pointer (WS upgrade path). +3. Deferred close/free discipline: `on_close` synchronous, memory reclaim only in + outermost `loop_post` (`tick_depth`), incl. `closed_udp_head` for QUIC's teardown + loops. +4. `us_wakeup_loop` thread-safety + `pending_wakeups` fast-return. +5. `pre_cb` every iteration (cork drain) and pre/post quic hooks ordering (§6). +6. `us_listen_socket_find_server_name_ctx` returns an OWNED ref (App.h unrefs); + `us_ssl_ctx_from_options` BY-VALUE options struct memcpy-shared with + `uWS::SocketContextOptions`. +7. `LIBUS_SOCKET_READABLE/WRITABLE` are different values per platform — they cross the + ABI in `us_poll_change` calls from quic.c and the needs-more helpers. diff --git a/src/usockets/docs/design.md b/src/usockets/docs/design.md new file mode 100644 index 000000000000..9d8efddf1983 --- /dev/null +++ b/src/usockets/docs/design.md @@ -0,0 +1,306 @@ +# bun_usockets: Rust API design + +Companion documents: behavioral rules in `semantics.md` (non-TLS core) and +`tls.md` (TLS layer); the C boundary in `cabi.md`. + +## Strategy + +The consumer-facing surface (Copy word-sized handles, one-pointer ext +backrefs, static per-kind vtables, `Handler` trait) keeps the shape of the +crates it replaced (`bun_uws_sys` safe wrappers + `bun_uws`), so consumer code +stays mechanical; what changed is everything underneath: + +### Strategy 1: per-loop chunked slab + +Sockets live in a per-loop chunked slab (`unsafe_core/slab.rs`): pages never +move or free while the loop lives; slots are reused with a **generation +bump**. The loop OWNS all socket storage. + +### Strategy 2: generation-checked handles + +`SocketRef { ptr: NonNull, gen }` (Copy) replaces every raw +`*mut us_socket_t` in handles. Every operation validates `gen == header.gen`; +mismatch behaves exactly like the `Detached`/`is_closed` path (no-op / 0 / +None). Reading a stale slot is safe: slab memory is never returned to the OS +while the loop lives (see "Slab reclamation" — decommitted ranges stay +reserved and read as dead). **UAF through a handle is impossible by +construction.** + +### Strategy 3: no relocation, ever + +`adopt`/`adopt_tls` re-stamp kind + repoint ext in place. Ext capacity is +fixed at creation to the max of the socket's _adoption family_ (a `const fn` +over the closed `SocketKind` set; Rust kinds all use 8-byte ext, uWS kinds use +`max(sizeof HttpResponseData, sizeof WebSocketData)` passed in at +listen/context creation). Adoption never crosses families — crossing would +reinterpret the ext word. `us_internal_ssl_socket_relocated` and "callback +returns the possibly-new pointer" are gone. The C vtable keeps the +`-> *mut us_socket_t` return type for ABI stability but it is always the +input pointer. + +### Strategy 4: deferred close is the only death path + +Close unlinks to the loop's closed list immediately; the generation bumps and +the slot returns to the free list in the tick postlude +(`drain_closed_sockets`). SEMI_SOCKET close dispatches nothing (contract, +relied on by multiple consumers). + +### Strategy 5: unsafe confined to unsafe_core + +`#![forbid(unsafe_code)]` everywhere except `unsafe_core/` (slab, ext +downcast, syscall/FFI edges, cabi trampolines). + +## Crate layout + +``` +src/usockets/ crate bun_usockets (replaces bun_uws_sys + bun_uws + C sources) + lib.rs re-exports; lint config (forbid unsafe outside unsafe_core) + kind.rs SocketKind (same discriminants; closed world; adoption families) + handle.rs InternalSocket, SocketRef, NewSocketHandler, AnySocket, CloseCode, + ListenSocket, ConnectingRef (see "Handle surface" below) + socket.rs SocketHeader (slab slot: fd, gen, flags, kind, timeout bytes, links, + transport, ext word/area) + internal open/close/write/read paths + group.rs SocketGroup (repr(C), embedded-by-value; vtable slot kept for + Dynamic/uWS kinds), listen/connect/from_fd/pair/adopt + connecting.rs Connecting state machine: DNS bridge + happy-eyeballs (4 concurrent, + interleaved families) + cancel/tombstone + dispatch.rs kind -> static vtable tables; Handler trait + vtable::make; + trampolines live in unsafe_core + protocol.rs Protocol v2 — the safe consumer socket interface (below) + loop_/ + mod.rs Loop: num_polls/active/fd/ready_polls/current_ready_poll/ + pending_wakeups + InternalLoopData fields (jsc_vm, parent tag/ptr, + quic_head, recv/send buf, low_prio, closed lists, dns_ready, mutex, + iteration_nr, tick_depth) + tick.rs us_loop_run_bun_tick / run / pump; pre/post; sweep-deadline folding; + low-prio budget (5/tick); closed drain; dns_ready drain + timeouts.rs 4s + minute wheels over group lists; refcounted sweep enable + wakeup.rs pending_wakeups atomic; wakeup_async; defer + poll_registry.rs first-class non-socket poll registrations (below) + write.rs write/write2/raw_write(v)/write_check_error (ENOBUFS/ENOMEM=would-block) + /flush/sendfile mark/ipc fd write (SCM_RIGHTS) + tls/ + mod.rs Transport { Plain, Tls(Box) } on the SocketHeader + state.rs per-socket SSL* + BIOs; handshake/read/write/shutdown per tls.md; + loop-shared plaintext scratch (see "TLS buffer ownership") + context.rs ssl_ctx_from_options (BunSocketContextOptions unchanged repr(C)), + verify errors, default CA store, pending session/keylog queues, + raw tap, tls_feed, adopt_tls + sni.rs server-name map + wildcard matching (replaces sni_tree.cpp); + on_server_name callback; sni_resolve suspend/resume + udp.rs UdpSocket + PacketBuffer + backend/ + mod.rs trait Backend (cfg-selected); poll types incl. SEMI_SOCKET/CALLBACK/UDP + epoll.rs kqueue.rs Linux/Android and macOS/FreeBSD eventing + libuv.rs Windows: uv_poll/prepare/check, us_timer_t, active-handle proxying + fault.rs fault injection (cfg feature socket_fault_injection), same us_fault_* API + cabi.rs the extern "C" fns + repr(C) types from cabi.md (uWS C++, quic.c, + NodeTLS.cpp, JSNodeHTTPServerSocket, webview backends) + unsafe_core/ + slab.rs chunked slab + generations (Miri-tested standalone) + ext.rs kind-tag-checked ext access + trampolines.rs extern "C" vtable/dispatch shims + io.rs ffi.rs syscall edges beyond bun_sys; bssl-sys/libuv/lsquic helpers +``` + +The C++-shim bindings (`uws_app_*`/`uws_res_*`, App.rs/Response.rs/Request.rs/ +WebSocket.rs/h3.rs, `#[uws_callback]`, SSLWrapper, quic.rs) live in the sibling +`bun_uws_shim` crate unchanged — they point INTO surviving C++, not into the +deleted C. SSLWrapper's five `us_ssl_*` helper deps are provided by +tls/context.rs. + +## Handle surface (unchanged names, new internals) + +`InternalSocket`: `Connected(SocketRef) | Connecting(ConnectingRef) | Detached | +UpgradedDuplex(*mut UpgradedDuplex) | Pipe(*mut WindowsNamedPipe)`; still Copy. +All `NewSocketHandler` / `AnySocket` method names and semantics are +preserved, including: + +- state: is_closed/is_shutdown/is_established/is_detached/get_error/dns_error/get_verify_error +- io: write/write2/raw_write/raw_writev/write_check_error/write_fd/flush/tls_feed +- lifecycle: open/close(CloseCode)/shutdown/shutdown_read/pause/resume/adopt/adopt_tls/ + start_tls_handshake/set_ssl_raw_tap/sni_resolve +- options: set_timeout (240s split) / set_timeout_minutes / nodelay / keepalive / tos +- identity: local/remote address+port, fd, get_native_handle, ssl(), kind/set_kind, ext, group + +Stale-generation behavior == Detached behavior for every method. + +`ext()`: the kind registry records each kind's ext type id (debug-checked) + +- size; access goes through unsafe_core::ext with a kind check. Rust kinds + keep `Option>` 8-byte slots; uWS kinds expose `ext_ptr()` bytes + via cabi only. + +`SocketGroup`: stays repr(C) embedded-by-value (uWS C++ embeds it; sizeof +static_asserted there). init/destroy/close_all/listen/listen_unix/connect/ +connect_unix/from_fd/pair/owner/is_empty unchanged. + +`Loop`: native struct. Cross-thread contract: `wakeup` and `defer` take +`*mut Loop` (never `&mut`); pending_wakeups atomic swap semantics preserved. + +## Load-bearing contracts (treat as tests) + +C1. SEMI*SOCKET explicit close dispatches NO callbacks (valkey/sql/ws compensate). +C2. Exactly one of on_close/on_connect_error per successful connect, EXCEPT C1. +C3. on_close: ext still readable; code 0/1/2 = CloseCode, >2 = real errno; reason ptr passthrough. +C4. Connecting close: on_connecting_error dispatched synchronously; ext-null ⇒ silent no-op. +C5. connect*_ may dispatch connect_error synchronously before returning; close-then-notify order +is ENFORCED by the core: dispatch_connect_error closes the SEMI_SOCKET (silent, C1; owner ext ref +kept for the notify) before invoking on_connect_error, so consumer closes are idempotent no-ops. +C6. Deferred free: header memory (incl. ext) readable until tick postlude; closed_head drainable +post-last-tick (drain_closed_sockets). +C7. write returns bytes accepted; 0 = would-block; <0 fatal; ENOBUFS/ENOMEM => 0; no MSG_MORE. +on_writable after kernel drain; paused bit must reset on pool reuse (resettable/introspectable). +C8. Low-prio queue: 5/tick, parked off head_sockets, group.low_prio_count coherent with is_empty. +C9. Timeout wheels: 4s ticks (255=off) + minute wheel; sweep folded into poll deadline; sweep +enable refcounted; connecting sockets copy timeout bytes onto attempt children; pooled sockets' +minute wheel works with no active request attached. +C10. adopt/adopt_tls: in-place, no handshake kick (caller repoints ext then start_tls_handshake); +cork slot ownership transfers (uWS C++ HttpResponse depends on it). +C11. TLS: on_handshake(success, us_bun_verify_error_t) always delivered (verify decided by +consumer); get_native_handle live SSL_ during handshake cb; session/keylog delivered ONLY +after the SSL stack unwinds (pending queues); loop TLS routing state save/restore equivalent +around JS run inside handshakes (ALPN/SNI callbacks) — encoded as RAII scratch take/restore. +C12. CloseCode: normal (TLS close_notify + deferred fd close), fast_shutdown, failure (SO_LINGER 0 +RST). shutdown_read + shutdown after queued close frame => CLEAN_SHUTDOWN branch on EOF, not +on_end (ws client close-frame flush depends on it). +C13. DNS bridge (five fns): cancel linearization, cache poisoning rules, dns_ready_head +non-wakeup vs threadsafe enqueue, keep-alive balance (semantics.md §6). +C14. from_fd: owns fd only on success; sets nonblocking itself; no on_open self-dispatch; +ipc flag enables SCM_RIGHTS receive (on_fd) and write_fd. +C15. UDP: sync on_close, closed_udp_head lifetime, one-shot drain, Linux MSG_ERRQUEUE vs +non-Linux close-on-error, batch recv loop close recheck (semantics.md §9). +C16. Loop: parks only when num_polls>0; pending_wakeups!=0 skips GC-safepoint sleep; parent +tag/ptr + jsc_vm slots; quic pre/post hooks + quic_next_tick_us readable; close_all_groups +walks the FULL linked list and reports progress (rare_data retry loop). +C17. Every callback may synchronously re-enter (write/close/connect/adopt from inside any +callback); dispatch never touches ext after a terminal callback; no &mut formed over +consumer-owned state. + +## Consumer protocol (Protocol v2) + +Consumers (HTTP client, Valkey, Postgres, MySQL, WS client, IPC, UDP, +Bun.listen/connect) contain NO unsafe for socket interaction; the socket +interface is safe and handles re-entrancy itself. The v1 raw `Handler` stays +for uWS/Dynamic kinds. + +```rust +pub trait Protocol: Sized + 'static { + type Owner: bun_ptr::RefCounted; // interior-mutable; !Send (loop-local) + const KIND: SocketKind; // or a family pair for SSL variants + fn on_open(o: &Self::Owner, s: Socket, is_client: bool, ip: &[u8]) {} + fn on_data(o: &Self::Owner, s: Socket, data: &mut [u8]) {} + fn on_writable(o: &Self::Owner, s: Socket) {} + fn on_close(o: &Self::Owner, s: Socket, code: CloseCode2, errno: i32) {} + fn on_end(o: &Self::Owner, s: Socket) {} + fn on_timeout(o: &Self::Owner, s: Socket) {} + fn on_long_timeout(o: &Self::Owner, s: Socket) {} + fn on_connect_error(o: &Self::Owner, err: ConnectFailure) {} // covers connecting too + fn on_handshake(o: &Self::Owner, s: Socket, ok: bool, err: VerifyError) {} + fn on_fd(o: &Self::Owner, s: Socket, fd: OwnedFd) {} +} +``` + +- `Socket` is the generation-checked Copy handle (safe methods only). +- Registration: `register::

()` monomorphizes into the static kind table; + the trampoline (unsafe*core, written once) does: validate generation → load + owner ref → take dispatch guard (`owner.ref*()`) → call safe handler → drop +guard. An owner can drop to zero refs mid-callback and stays alive until +dispatch returns; its LAST release happens outside dispatch by core +guarantee. Handlers receive `&Owner`(shared), never`&mut` — owners are + interior-mutable. +- Owner attach: `connect(.., owner)`, `from_fd(.., owner)`, `adopt(.., owner)`; + `Listener::on_create` supplies the owner for accepted sockets. + `adopt_tls(.., new_owner)` swaps owner and kind atomically — no window where + dispatch sees a stale owner. `Handle::detach_owner()` clears the owner + atomically w.r.t. dispatch; subsequent events no-op. +- **Terminal contract**: after on_close/on_connect_error returns, the core + drops ITS owner ref (the one the ext held). Exactly once, on every terminal + path — including C1 SEMI_SOCKET silent close, where no callback fires but + the ext ref is still released by the core (a deliberate, documented + improvement over C parity: consumers keep no compensation ref bookkeeping). +- Re-entrancy: handlers may synchronously call any safe Socket method incl. + close/adopt/connect (C17). +- Cross-thread: unchanged (wakeup + queues); `Socket` is !Send. + +## Ext storage + +uWS/Dynamic (group-vtable) ext is CONTIGUOUS with the socket header (C parity: +`us_socket_ext` == fixed offset). Per-loop slab size classes: group-vtable +kinds allocate from a size-class slab whose slot = header + ext bytes inline +(class chosen by the family-max ext size registered at listen/context +creation). Rust kinds use the uniform slab + inline 8-byte ext word. +`ext_ptr` for group-vtable kinds is a header+1 projection. +Generation/deferred-close semantics are identical across classes. + +## Slab reclamation + +- Chunks are mmap-reserved, 256 slots each. When a chunk reaches 0 occupied + slots (hysteresis: the most-recently-emptied chunk stays committed), its + pages are reclaimed — `madvise(MADV_DONTNEED)` on Linux/macOS + (MADV_DONTNEED specifically, NEVER MADV_FREE: the zero-fill guarantee is + load-bearing) / `VirtualAlloc(MEM_RESET)` on Windows (NOT MEM_DECOMMIT: + stale-handle probes must stay a plain slot deref, and decommitted pages + would fault; MEM_RESET stays committed+readable while the OS discards the + contents). The address range stays reserved, so stale-handle validation + remains a single slot deref: a reclaimed page reads generation 0 ⇒ dead. +- Generations are u64: chunk epoch (loop-side array, bumped per decommit) in + the high 32 bits, slot counter in the low 32 — so a handle from one commit + cycle can never validate in a later one (ABA guard), and epoch wrap is + unreachable. The epoch array is the deliberate irreducible residue (~8B per + 256 peak sockets); it lives until loop teardown. +- Loop teardown fully releases: munmap / `VirtualFree(MEM_RELEASE)` every + reservation + free the epoch array (workers + HTTP thread churn must not + accumulate reservations). Safe under the existing ordering: validation only + runs on the loop's thread and teardown is its final act after group drain. + +## Non-socket poll registrations + +First-class non-socket polls (`loop_/poll_registry.rs`): `PollSource` = +`Fd{readable,writable}` | (darwin) `Proc(pid)`, `Machport(port)`, +`Memorystatus`. The registry uses the same slab/generation scheme as sockets +(a poll kind byte distinguishes); dispatch goes through a refcounted owner + +held guard (the Protocol v2 trampoline); keep-alive is integrated with +num_polls/active. This replaces the old ready_polls back-channel, +`Bun__internal_dispatch_ready_poll` extern, and tagged-pointer udata +convention. + +## TLS buffer ownership + +The loop-shared C architecture is kept: loop-shared ciphertext BIO buffers + +ONE loop-shared plaintext spill slot per loop (O(1) memory; the slab already +eliminated relocation, so per-socket spill would buy nothing). The two C +hazards are made safe: the spill/fatal-reason OWNER is a generation-checked +`SocketRef` (stale = drop, never dangles), and the save/restore re-entrancy +protocol around JS re-entry is an RAII scope guard (nested TLS entry restores +on drop, enforced by type). Batch thresholds (16KB records, 128KB flush) are +preserved verbatim. See tls.md "Resolved design notes". + +## Resolved design decisions + +1. TLS bindings: bssl-sys (vendor/boringssl/rust) as the raw layer inside + TlsState; pre-generated bindings via BINDGEN_RS_FILE + wrapper.c for + static-inlines wired into scripts/build/deps/boringssl.ts; build.rs link + directives neutered (Bun links its own BoringSSL objects). bssl-tls is NOT + used (missing ALPN/server-SNI/client-CA/new-session/PKCS12); see tls.md + PART 2. +2. SSLWrapper (`bun_uws_shim::ssl_wrapper`) survives unchanged (already Rust, + targets BoringSSL, not the deleted C); its five us*ssl*\* helper deps come + from tls/context.rs. Unification with TlsState is a follow-up. +3. sni_tree.cpp → tls/sni.rs (verbatim matching semantics incl. case + behavior); root_certs\*.cpp stay as C++ data TUs. openssl.c deleted. + wolfSSL cfg paths dropped. +4. cabi keeps us*ssl_ctx_build_raw (quic.c) + the surface in cabi.md §1/§9.1; + `us_socket_t`/`us_listen_socket_t`/`us_loop_t` are opaque to all surviving + C/C++; only `us_socket_group_t` stays public repr(C). The 3 formerly + shim-defined us*\* helpers (poking s->p / group->loop / last_write_failed) + live in cabi.rs. +5. The C-parity quirks OQ-1..16 (semantics.md) are ALL preserved verbatim as + documented quirks, EXCEPT OQ-4 (stale kernel data.ptr after zero-event + resize — structurally fixed by generation-checked dispatch: stale kernel + pointers resolve to dead slots and the event is dropped) and OQ-10 + (SEMI_SOCKET close test implemented as equality, not bitmask). +6. us_socket_stream_buffer_t: does not exist in the core (buffering lives + above it); the existing Rust-side type stays where it lives today; + write.rs does NOT reimplement it. +7. sessionTimeout/ticketKeys stay unplumbed (parity). diff --git a/src/usockets/docs/semantics.md b/src/usockets/docs/semantics.md new file mode 100644 index 000000000000..9167a66aa8d2 --- /dev/null +++ b/src/usockets/docs/semantics.md @@ -0,0 +1,1504 @@ +# bun_usockets core semantics (non-TLS) + +This document specifies the behavioral contract of the non-TLS core of the +`bun_usockets` crate (`src/usockets`), which preserves the semantics of the C +implementation it replaced. Source of truth for the contract: the replaced C +sources `packages/bun-usockets/src/{loop.c, socket.c, context.c, bsd.c, +udp.c, fault_inject.c}`, `src/internal/{internal.h, loop_data.h, +eventing/epoll_kqueue.h, eventing/libuv.h, networking/bsd.h}`, +`src/eventing/{epoll_kqueue.c, libuv.c}`, `src/libusockets.h`. +All citations are `file:line` in `packages/bun-usockets/src/` unless prefixed. + +This fork has diverged heavily from upstream uSockets. There is **no +`us_socket_context_t`**: its replacement is `us_socket_group_t` (embedded in the +owner, lazily linked to the loop) plus per-socket `kind` dispatch through the +`us_dispatch_*` dispatch tables (now `src/usockets/dispatch.rs`). +TLS is per-socket (`s->ssl != NULL`), not per-context. This document covers the +non-TLS core; every `us_internal_ssl_*` symbol is an extern boundary into +`crypto/openssl.c` and out of scope here, but the exact call sites and gating +conditions where the core routes into it ARE in scope and specified. + +Terminology: R = `LIBUS_SOCKET_READABLE`, W = `LIBUS_SOCKET_WRITABLE`. On epoll +these are literally `EPOLLIN`/`EPOLLOUT` (epoll_kqueue.h:26-27); on kqueue they +are a private bitfield 1/2 translated per call (epoll_kqueue.h:32-33); on libuv +they are `UV_READABLE`/`UV_WRITABLE` (libuv.h:24-25). + +Constants (libusockets.h:58-82): + +- `LIBUS_RECV_BUFFER_LENGTH` = 524288 (512 KiB) +- `LIBUS_RECV_BUFFER_PADDING` = 32 (both ends of recv_buf) +- `LIBUS_SEND_BUFFER_LENGTH` = 16384 (UDP send metadata only) +- `LIBUS_TIMEOUT_GRANULARITY` = 4 (seconds) +- `LIBUS_EXT_ALIGNMENT` = 16 +- Close codes: 0 = CLEAN_SHUTDOWN, 1 = CONNECTION_RESET, 2 = FAST_SHUTDOWN +- `LIBUS_MAX_READY_POLLS` = 1024 (internal.h:45) +- `LIBUS_UDP_MAX_SIZE` = 65536; `LIBUS_UDP_RECV_COUNT` = 8 POSIX / 1 Windows + (networking/bsd.h:49,59-65) + +--- + +## 1. LOOP TICK + +### 1.1 Data structures + +- **R1.1** `us_loop_t` (epoll/kqueue, epoll_kqueue.h:79-107) MUST have, in + order: `data` (us_internal_loop_data_t, 16-aligned), `num_polls` (int), + `num_ready_polls` (int), `current_ready_poll` (int), `fd` (int), `bun_polls` + (unsigned int), `pending_wakeups` (unsigned int), then a 16-aligned + `ready_polls[1024]` array of `epoll_event` (epoll) or `kevent64_s` (kqueue). + Rust code (`src/uws_sys/Loop.rs:42,73-76`) statically asserts + `pending_wakeups` is at `offset_of(num_polls)+20` and `ready_polls` at + `(offset_of(pending_wakeups)+4).next_multiple_of(16)`. Layout is ABI. +- **R1.2** `us_internal_loop_data_t` (loop_data.h:38-90) layout is mirrored in + `src/uws_sys/InternalLoopData.rs` — any change MUST update both. Fields of + behavioral relevance: `sweep_next_tick_ns` (POSIX; absolute CLOCK_MONOTONIC ns + of next sweep, or −1 = disarmed) / `sweep_timer` (libuv), `sweep_timer_count` + (refcount), `wakeup_async`, `head` (group list), `quic_head`, + `quic_next_tick_us`, `iterator` (group sweep cursor), `recv_buf`, `send_buf`, + `ssl_data`, `pre_cb`, `post_cb`, `closed_udp_head`, `closed_head`, + `low_prio_head`, `low_prio_budget`, `dns_ready_head`, + `closed_connecting_head`, `mutex` (zig_mutex_t), `parent_ptr`, `parent_tag`, + `iteration_nr`, `jsc_vm`, `tick_depth`. +- **R1.3** `us_create_loop` (epoll_kqueue.c:157-181) MUST `us_calloc` the loop + (+ext_size), zero `num_polls`/`num_ready_polls`/`current_ready_poll`/ + `bun_polls`, create the backend fd (`epoll_create1(EPOLL_CLOEXEC)` / + `kqueue()`), probe epoll_pwait2 support once via + `Bun__isEpollPwait2SupportedOnLinuxKernel()` (epoll_kqueue.c:169-173), then + `us_internal_loop_data_init`. +- **R1.4** `us_internal_loop_data_init` (loop.c:120-143) MUST: set + `sweep_next_tick_ns = -1` (POSIX) or create the sweep `us_timer_t` (libuv); + zero `sweep_timer_count`; malloc `recv_buf` of `LIBUS_RECV_BUFFER_LENGTH + 2* +LIBUS_RECV_BUFFER_PADDING` and `send_buf` of `LIBUS_SEND_BUFFER_LENGTH`, + calling `Bun__outOfMemory()` if either is NULL (loop.c:133); store + pre/post callbacks; create the wakeup async with `fallthrough=1, ext=0` and + set its callback to `wakeup_cb` (loop.c:136-137). Under ASSERT_ENABLED it + MUST panic if `Bun__lock__size != sizeof(loop->data.mutex)` (loop.c:138-142). +- **R1.5** `us_loop_free` (epoll_kqueue.c:56-60) = `us_internal_loop_data_free` + then `close(loop->fd)` then `us_free(loop)`. `us_internal_loop_data_free` + (loop.c:145-158) frees SSL loop data, `recv_buf`, `send_buf`, closes the + sweep/quic timers (libuv only), closes the wakeup async. +- **R1.6** `us_loop_integrate` is a no-op (loop.c:920-922). The sweep is + enabled dynamically by socket count (see §5). +- **R1.7** `us_loop_ext(loop)` = `loop + 1` (loop.c:924-926). + `us_loop_iteration_number(loop)` = `loop->data.iteration_nr` (loop.c:391-393). + +### 1.2 Plain run path — `us_loop_run` (epoll_kqueue.c:328-355) + +- **R1.8** `us_loop_run` loops `while (loop->num_polls)`. Per iteration, in this + exact order: + 1. `loop->data.tick_depth++` + 2. `us_internal_loop_pre(loop)` (see R1.13) + 3. compute timeout: start from NULL (block forever) and clamp to the sweep + deadline via `us_internal_clamp_to_sweep` (R1.16) + 4. blocking poll: `bun_epoll_pwait2(fd, ready_polls, 1024, timeout)` on + epoll; `kevent64(fd, NULL, 0, ready_polls, 1024, 0, timeout)` retried on + EINTR on kqueue → `num_ready_polls` + 5. `us_internal_dispatch_ready_polls(loop)` (R1.18) + 6. `us_internal_drain_ready_polls(loop)` (R1.20) + 7. `us_internal_sweep_if_due(loop)` (R5.8) + 8. `us_internal_loop_post(loop)` (R1.14) + 9. `loop->data.tick_depth--` +- **R1.9** `bun_epoll_pwait2` (epoll_kqueue.c:123-150): if `has_epoll_pwait2 != +0`, call raw syscall `sys_epoll_pwait2` (SYS 441; supplied by Bun's Rust + platform layer) with an empty sigmask, retrying while return == `-EINTR`. If + it returns any of `-ENOSYS/-EPERM/-EOPNOTSUPP/-EACCES/-EFAULT`, latch + `has_epoll_pwait2 = 0` and fall back forever to `epoll_pwait` with a + millisecond timeout computed as `tv_sec*1000 + tv_nsec/1e6` (NULL → −1), + retrying on EINTR. Note: fallback ms conversion truncates (a 999999 ns + timeout becomes 0 ms). + +### 1.3 Bun tick — `us_loop_run_bun_tick(loop, timeout)` (epoll_kqueue.c:359-418) + +- **R1.10** Exists only on epoll/kqueue (Windows drives libuv's own loop via + `us_loop_pump` = `uv_run(UV_RUN_NOWAIT)`, libuv.c:150-152). Exact order: + 1. If `loop->num_polls == 0`, return immediately (before tick_depth++). + 2. `tick_depth++`; `us_internal_loop_pre(loop)`. + 3. QUIC fold: if `quic_head && quic_next_tick_us >= 0`, and (`timeout` is + NULL or larger than `quic_next_tick_us` µs), replace `timeout` with the + quic deadline (epoll_kqueue.c:372-381). + 4. Sweep fold: `timeout = us_internal_clamp_to_sweep(loop, timeout, &storage)` + (epoll_kqueue.c:384). + 5. Wakeup swap: `had_wakeups = atomic_exchange(&loop->pending_wakeups, 0, +ACQUIRE)` (epoll_kqueue.c:386). This pairs with the RELEASE + `fetch_add` in `us_wakeup_loop` (R10.1). + 6. `will_idle = had_wakeups == 0 && (timeout == NULL || timeout != {0,0})` + (epoll_kqueue.c:387). + 7. If `will_idle && loop->data.jsc_vm`, call + `Bun__JSC_onBeforeWait(jsc_vm)` — the GC safepoint. It MUST be skipped + whenever a cross-thread wakeup is already pending or the poll will not + block (epoll_kqueue.c:388-389). + 8. Poll: epoll uses `bun_epoll_pwait2` with the timeout as-is (a zero + timespec is already a kernel fast path — comment epoll_kqueue.c:393-395). + kqueue uses `kevent64(..., will_idle ? 0 : KEVENT_FLAG_IMMEDIATE, +timeout)` retried on EINTR — the IMMEDIATE flag avoids a ~14 µs XNU + thread_block round-trip for an already-expired deadline + (epoll_kqueue.c:398-408). + 9. `us_internal_dispatch_ready_polls`; `us_internal_drain_ready_polls`; + `us_internal_sweep_if_due`; `us_internal_loop_post`; `tick_depth--`. +- **R1.11** The caller-provided `timeout` is a _relative_ timespec; NULL means + block indefinitely. The effective timeout is + `min(caller, quic_next_tick_us, sweep deadline)` in that folding order. +- **R1.12** Reentrancy: `tick_depth` counts nesting of run/tick bodies. A + nested tick (JS callback re-entering the loop, e.g. `waitForPromise`) MUST + NOT free closed sockets — see R1.15. + +### 1.4 Pre / post + +- **R1.13** `us_internal_loop_pre` (loop.c:396-407), exact order: + 1. `loop->data.iteration_nr++` + 2. `us_internal_handle_dns_results(loop)` (R6.10) + 3. `us_internal_handle_low_priority_sockets(loop)` (R1.22) + 4. `loop->data.pre_cb(loop)` + 5. if QUIC compiled and `quic_head`, `us_quic_loop_process(loop)` +- **R1.14** `us_internal_loop_post` (loop.c:409-423), exact order: + 1. `us_internal_handle_dns_results(loop)` (again — results that landed + during dispatch) + 2. QUIC process (if any) + 3. **only if `tick_depth <= 1`**: `us_internal_free_closed_sockets(loop)` + 4. `loop->data.post_cb(loop)` +- **R1.15** `us_internal_free_closed_sockets` (loop.c:360-383) frees, in + order: every socket on `closed_head` (zeroing prev/next, then + `us_poll_free`), every UDP socket on `closed_udp_head` (`us_poll_free`), + every `us_connecting_socket_t` on `closed_connecting_head` (`us_free`). + All three heads are then NULL. This is the ONLY place closed + socket/udp/connecting memory is released (drain point). A nested tick defers + it to the outermost tick's loop_post (loop.c:414-421) because the outer + dispatch may still hold a pointer to a just-closed socket. + +### 1.5 Timeout clamping + +- **R1.16** `us_internal_clamp_to_sweep(loop, timeout, storage)` + (epoll_kqueue.c:312-326): let `ns = us_internal_sweep_timeout_ns(loop)` + (−1 = no sweep armed → return `timeout` unchanged). If `timeout` is non-NULL + and ≤ the sweep delta, return `timeout`. Otherwise return `storage` = the + sweep delta split into sec/nsec. So the result is min(timeout, sweep delta), + with ties going to `timeout`. +- **R1.17** `us_internal_sweep_timeout_ns` (loop.c:96-102): −1 if disarmed, + else `max(0, sweep_next_tick_ns - monotonic_now_ns)`. + +### 1.6 Ready-poll dispatch + +- **R1.18** `us_internal_dispatch_ready_polls` (epoll*kqueue.c:184-285). + **Epoll**: iterate `current_ready_poll` from 0 to `num_ready_polls-1`. For + each entry read the poll pointer from `data.ptr`; skip NULL. If the pointer + carries a tag in bits 48-63 (`CLEAR_POINTER_TAG(p) != p`, + epoll_kqueue.c:38-39), it is a Bun FilePoll — call + `Bun__internal_dispatch_ready_poll(loop, poll)` and continue. Otherwise: + `error = !!(events & EPOLLERR)` (normalized to 0/1 — a raw EPOLLERR value 8 + would be misread as an errno downstream, comment epoll_kqueue.c:194-196), + `eof = events & EPOLLHUP`, `events &= us_poll_events(poll)` (mask to what + the poll is \_currently* registered for), then if `events || error || eof` + call `us_internal_dispatch_ready_poll(poll, error, eof, events)`. +- **R1.19** **Kqueue** does a two-pass coalesce (epoll_kqueue.c:206-283) + because each filter arrives as a separate kevent: pass 1 decodes each entry + into 1-byte flags {readable (EVFILT_READ, plus EVFILT_MACHPORT on macOS / + EVFILT_USER on FreeBSD), writable (EVFILT_WRITE), error (EV_ERROR), eof + (EV_EOF)} and merges an entry into an earlier entry with the same poll + pointer (backward scan; at most 2 kevents per fd), marking the later entry + `skip`. Pass 2 iterates `current_ready_poll` in order: NULL → skip; tagged → + `Bun__internal_dispatch_ready_poll`; skipped → skip; else build + `events = readable*R | writable*W`, `events &= us_poll_events(poll)`, + dispatch if `events || error || eof`. Dispatch order therefore matches + kernel-delivered order of each poll's FIRST kevent. +- **R1.20** `us_internal_drain_ready_polls` (epoll_kqueue.c:292-309): while + the previous poll returned exactly `LIBUS_MAX_READY_POLLS` events, and at + most 48 times, and `num_polls > 0`, re-poll non-blocking (zero timespec / + `KEVENT_FLAG_IMMEDIATE`) and dispatch again. ≤0 results reset + `num_ready_polls = 0` and stop. (Mirrors libuv's saturation re-poll.) +- **R1.21** **Poll mutation during iteration**: + `us_internal_loop_update_pending_ready_polls(loop, old, new, old_events, +new_events)` (epoll*kqueue.c:420-441) scans `ready_polls` from + `current_ready_poll` (inclusive) forward, replacing up to N entries whose + pointer equals `old` with `new` (N = 1 on epoll, 2 on kqueue). `new` may be + NULL (removal — e.g. poll_stop/close). It is invoked by `us_poll_change` + (with new==old, so it is effectively a no-op there but preserved for parity; + stale event \_bits* are instead filtered by the `events &= us_poll_events()` + mask at dispatch), by `us_poll_stop` (new = NULL), and by `us_poll_resize` + (old → new). NOTE: entries at indexes < current_ready_poll are never + rewritten — they were already dispatched. + +### 1.7 Low-priority processing + +- **R1.22** `us_internal_handle_low_priority_sockets` (loop.c:297-320), called + from loop_pre: set `low_prio_budget = 5` + (`MAX_LOW_PRIO_SOCKETS_PER_LOOP_ITERATION`, loop.c:295). Pop from + `low_prio_head` (LIFO) while budget > 0: unlink from the low-prio queue + (fixing prev of the new head), `s->next = 0`, decrement + `s->group->low_prio_count`. If the socket is closed, just set + `low_prio_state = 2` and continue. Otherwise relink into + `group->head_sockets` (`us_internal_socket_group_link_socket`), re-enable + readable (`us_poll_change(events | R)`), set `low_prio_state = 2`. +- **R1.23** low_prio_state values (internal.h:245): 0 = not queued, 1 = queued + in `loop->data.low_prio_head`, 2 = was queued and got budget this iteration + (processes one readable dispatch normally, then reset to 0 by the readable + handler, loop.c:596-597). +- **R1.24** Parking (loop.c:595-633), inside the READABLE arm of the socket + dispatch, only for TLS sockets where `us_internal_ssl_is_low_prio(s)` is + true (mid-handshake). Priority order: state==2 → clear to 0 and process + now; else if `low_prio_budget > 0` → decrement and process now; else park: + disable readable (`us_poll_change(events & W)`), and if not already parked + (state != 1): `group->low_prio_count++` **before** + `us_internal_socket_group_unlink_socket(g, s)` (so the group's emptiness + check can't unlink the group, loop.c:613-620), push LIFO onto + `loop->data.low_prio_head` (prev/next reused), set state = 1. In both park + cases `break` out of the socket case (skipping the eof/error tail for this + event). Parked sockets are NOT in `group->head_sockets` and are NOT swept + for timeouts. + +--- + +## 2. POLL LAYER + +- **R2.1** Poll kinds (internal.h:88-99): SOCKET=0, SOCKET_SHUT_DOWN=1, + SEMI_SOCKET=2 (listen + in-flight connect), CALLBACK=3 (async/timer), UDP=4, + stored in the low 3 bits; POLLING_OUT=8, POLLING_IN=16 in the top 2 bits of + a 5-bit field. `POLL_TYPE_KIND_MASK=0b111`, `POLL_TYPE_POLLING_MASK=0b11000`. +- **R2.2** epoll/kqueue `us_poll_t` is 4 bytes: bitfield `{fd:27 signed, +poll_type:5}` (epoll_kqueue.h:109-114). fd is limited to 2^26-1. libuv + `us_poll_t` is `{uv_poll_t *uv_p; fd; unsigned char poll_type}` + (libuv.h:39-45). +- **R2.3** `us_create_poll(loop, fallthrough, ext_size)` (epoll_kqueue.c:63-68): + `us_malloc(sizeof(us_poll_t)+ext_size)` with the returned pointer's bits + 48-63 cleared (`CLEAR_POINTER_TAG` — tagged pointers are reserved for Bun + FilePolls). Increments `loop->num_polls` unless `fallthrough`. The ext + region is NOT zeroed. On libuv (libuv.c:221-228) it also mallocs the + `uv_poll_t` and points `uv_p->data` at the poll; num_polls is not tracked + (libuv counts active handles itself). +- **R2.4** `us_poll_free` (epoll_kqueue.c:71-74): `loop->num_polls--` then + `us_free(p)`. Note it decrements num_polls even for fallthrough-created + polls — callers must keep create/free fallthrough-symmetric (the wakeup + async is closed via `us_internal_async_close`, which does call + `us_poll_free`; the balance works out because the async was fallthrough=1 + and its close also decrements — see quirk OQ-13). On libuv + (libuv.c:73-91): if `p->uv_p == NULL` (poll lost ownership after resize) + just free p; if the uv handle is mid-close, re-point `uv_p->data = p` so + `close_cb_free_poll` frees both; else free both immediately. +- **R2.5** `us_poll_init(p, fd, poll_type)` sets `state.fd = fd`, + `state.poll_type = poll_type` (clears polling bits) (epoll_kqueue.c:81-84). + `us_internal_poll_set_type` only replaces the kind bits, preserving polling + bits (epoll_kqueue.c:100-102) — it does not SET from scratch, so the poll + must be inited first (comment epoll_kqueue.c:99). +- **R2.6** `us_poll_events(p)` derives R/W from the POLLING*IN/OUT bits + (epoll_kqueue.c:86-88). This is the poll's \_believed* registration and is + the source of truth for the dispatch-time event mask (R1.18). +- **R2.7** `us_poll_start_rc(p, loop, events)` (epoll_kqueue.c:513-539): store + polling bits; **epoll**: build `epoll_event{events, data.ptr=p}`; if neither + R nor W requested, add `EPOLLHUP|EPOLLERR` explicitly and NEVER `EPOLLRDHUP` + (a level-triggered RDHUP for an already-received FIN would spin the loop — + comment epoll_kqueue.c:518-527); `EPOLL_CTL_ADD` retried on EINTR; returns + the epoll_ctl rc (0 success, −1 + errno). **kqueue**: `kqueue_change(kqfd, +fd, 0, events, p)` (R2.9). `us_poll_start` is the same ignoring the rc. +- **R2.8** `us_poll_change(p, loop, events)` (epoll_kqueue.c:545-570): no-op if + events unchanged. Else update polling bits; epoll `EPOLL_CTL_MOD` with the + same zero-events → `EPOLLHUP|EPOLLERR` rule; kqueue `kqueue_change(fd, +old_events, events, p)`; then + `us_internal_loop_update_pending_ready_polls(loop, p, p, old, new)`. +- **R2.9** `kqueue_change` (epoll*kqueue.c:447-482): builds ≤2 kevent64 + changes: EVFILT_READ EV_ADD/EV_DELETE when the R bit differs. For W: + \_special zero-events rule* — if the new events poll for NEITHER R nor W and + the old events did not include W, ADD `EVFILT_WRITE EV_ADD|EV_ONESHOT` (a + half-open socket needs some filter armed to learn about the FIN/EOF; + epoll relies on implicit EPOLLHUP instead); otherwise if the W bit differs, + `EVFILT_WRITE EV_ADD|EV_ONESHOT` or `EV_DELETE`. **EVFILT_WRITE is always + one-shot on kqueue; EVFILT_READ is level-triggered (no EV_CLEAR, no + ONESHOT).** Submitted with `KEVENT_FLAG_ERROR_EVENTS`; if the call returns + > 0 error events, `errno` is set from `change_list[0].data` to mirror + > epoll's error contract (epoll_kqueue.c:474-480). +- **R2.10** `us_poll_stop` (epoll_kqueue.c:572-589): epoll `EPOLL_CTL_DEL` + (retried on EINTR; the `event` argument is uninitialized — legal since + Linux 2.6.9); kqueue calls `kqueue_change(fd, old_events, 0, NULL)` only if + `old_events != 0` — note this path passes new_events=0 through the R2.9 + zero-events rule, so if the poll had no W it ADDS a one-shot EVFILT_WRITE + with `udata = NULL` (delivered later as a NULL ready poll and skipped). + Then `us_internal_loop_update_pending_ready_polls(loop, p, NULL, old, 0)`. + Poll bits in `p` are NOT cleared by stop. +- **R2.11** `us_poll_resize(p, loop, old_ext, new_ext)` + (epoll_kqueue.c:485-511): if `new_size <= old_size` return `p` unchanged. + Else `us_calloc` a new poll (zero-filled), memcpy the old bytes, + `loop->num_polls++` (old poll's later free decrements). Re-register the fd + with the new pointer as userdata: epoll strips the polling bits from + `new_p` and calls `us_poll_change(new_p, loop, events)` (forcing a MOD); + kqueue calls `kqueue_change(fd, 0, R|W, new_p)` (forcibly re-adds both + filters). Then `us_internal_loop_update_pending_ready_polls(loop, p, new_p, +events, events)`. The OLD poll is NOT freed here. On libuv + (libuv.c:232-249): keeps the same `uv_poll_t`, re-points `uv_p->data = +new_p`, sets `p->uv_p = NULL` (old poll no longer owns the uv handle). +- **R2.12** `us_internal_dispatch_ready_poll(p, error, eof, events)` + (loop.c:431-917) switches on `us_internal_poll_type(p)`: + - CALLBACK (loop.c:433-444): unless `cb->leave_poll_ready`, call + `us_internal_accept_poll_event(p)` (epoll: read 8 bytes from the + eventfd, retried on EINTR, epoll_kqueue.c:591-604; kqueue: no-op). + Then invoke `cb->cb`, passing `cb->loop` if `cb_expects_the_loop` else + the callback struct itself. Never reads `events`. + - SEMI_SOCKET: connect-completion vs accept — §6/§7. + - SOCKET / SOCKET_SHUT_DOWN: §3.6/§4. + - UDP: §9. +- **R2.13** Epoll vs kqueue eventing summary (normative for the Rust implementation): + - epoll: level-triggered for both R and W; EPOLLERR/EPOLLHUP always + delivered regardless of interest set; error := EPOLLERR, eof := EPOLLHUP. + EPOLLRDHUP is never requested. + - kqueue: EVFILT_READ level-triggered; EVFILT_WRITE one-shot (EV_ONESHOT). + After a writable event is delivered the kernel filter is gone; the + dispatcher clears POLLING_OUT to reflect that (loop.c:556-563) while + preserving POLLING_IN from the poll's own state (a pure write kevent has + no R bit). error := EV_ERROR flag, eof := EV_EOF flag on either filter. + - libuv: `uv_poll_start(events, poll_cb)`; poll_cb maps + `status < 0 && status != UV_EOF` → error, `status == UV_EOF` → eof + (libuv.c:26-29). uv_poll handles are created per poll; `us_poll_start` + always `uv_unref`s the handle (keep-alive is Bun's `Async.KeepAlive`, not + usockets — libuv.c:100-104). `us_poll_stop` uv_poll_stop + uv_close with + deferred-free protocol (R2.4). `us_poll_start_rc` always returns 0 on + libuv (libuv.c:107-110) — EPOLL_CTL_ADD-failure handling is + epoll/kqueue-only. + - libuv loop: `uv_prepare_t` → `us_internal_loop_pre`, `uv_check_t` → + `us_internal_loop_post`, both unreffed (libuv.c:154-186). libuv timers + fire AFTER the check (post) callback (comment libuv.c:36). `us_timer_t` + exists only on this backend (libusockets.h:206-226): it is a + `us_internal_callback_t` + embedded `uv_timer_t`; `us_timer_set` arms + `uv_timer_start(ms, repeat_ms)` (0 → stop); the sweep timer specifically + is one-shot-guarded (`has_added_timer_to_event_loop`) so repeated + enable_sweep calls don't skew the 4 s cadence (libuv.c:296-305). + - FreeBSD: kevent64 shimmed onto kevent (epoll_kqueue.h:44-75): + `KEVENT_FLAG_ERROR_EVENTS` → suppress eventlist harvesting entirely; + `KEVENT_FLAG_IMMEDIATE` + NULL timeout → zero timespec. Async wakeup uses + EVFILT_USER with EV_CLEAR (R10.5). + +--- + +## 3. SOCKET LIFECYCLE + +### 3.1 Memory layout & creation + +- **R3.1** `us_socket_t` (internal.h:258-304) layout: `us_poll_t p` + (16-aligned), `timeout` (u8), `long_timeout` (u8), `flags` (packed 1-byte + `us_socket_flags`: is_paused, allow_half_open, low_prio_state:2, is_ipc, + is_closed, adopted, last_write_failed — internal.h:240-256, static-asserted + size 1 on epoll/kqueue), `kind` (u8, dispatch discriminator), 12 bits of SSL + state + `ssl_pending_close_code` (u8), `group*`, `ssl*`, `prev*`, `next*`, + `connect_next*`, `connect_state*`. Ext memory is `s + 1` (socket.c:594-596), + 16-aligned by ALIGNMENT of the struct. +- **R3.2** A socket allocation is one poll allocation: + `us_create_poll(loop, 0, sizeof(us_socket_t) - sizeof(us_poll_t) + ext_size + - sizeof(us_poll_t))`— expressed variously as`sizeof(struct us_socket_t) + ext`(context.c:506,644,678; socket.c:416) or`sizeof(us_socket_t) - sizeof(us_poll_t) + listen->socket_ext_size` for + accepts (loop.c:483). Poll header first, socket fields, then ext. +- **R3.3** Field init on every creation path MUST set: `group`, `kind`, + `ssl = NULL`, `timeout = 255`, `long_timeout = 255`, all flags zero except + `allow_half_open = (options & LIBUS_SOCKET_ALLOW_HALF_OPEN)` where an + options word exists, `connect_state = NULL` (accept: loop.c:496-507; + connect: context.c:477-494; from_fd: socket.c:424-436; listen: + context.c:337-352). `connect_next` is initialized on connect paths and for + listeners; the accept path does not touch it (dead for established + server sockets). + +### 3.2 Open + +- **R3.4** `us_socket_open(s, is_client, ip, ip_length)` (socket.c:644-649): + routes to `us_internal_ssl_on_open` iff `s->ssl`, else `us_dispatch_open`. + The accept loop calls the same pair directly (loop.c:514-519) with + `is_client=0` and the peer IP bytes from `bsd_accept_socket` (4 or 16 bytes, + raw network order, NOT a string); the connect promotion calls it with + `is_client=1, ip=NULL, ip_length=0` (context.c:812-816). + +### 3.3 Adopt + +- **R3.5** `us_socket_adopt(s, group, kind, old_ext_size, ext_size)` + (context.c:265-329). Precondition: if `us_socket_is_closed(s) || +us_socket_is_shut_down(s)`, return `s` unchanged (no adoption of closed or + shut-down sockets). Steps: + 1. If `low_prio_state != 1`: `us_internal_socket_group_unlink_socket( +old_group, s)` (this also fixes `group->iterator` if we're inside + on_timeout, R3.14). If parked (state==1) and the group actually changes: + move the `low_prio_count` from old to new group, touch (link) the new + group, maybe-unlink the old (context.c:276-283); the socket itself stays + on the loop's low-prio queue. + 2. If `ext_size != -1`: `us_poll_resize` with sizes + `sizeof(us_socket_t) - sizeof(us_poll_t) + {old_ext_size, ext_size}`. + `us_poll_resize` only reallocates when growing (R2.11). If a new block + was returned (`new_s != s`): mark OLD socket `is_closed = 1`, push OLD + onto `loop->data.closed_head`, set OLD `flags.adopted = 1`, and set + OLD `s->prev = new_s` — this is the forwarding pointer the dispatcher + follows (R3.6). If the old socket had SSL, notify + `us_internal_ssl_socket_relocated(loop, s, new_s)`. + If `s->connect_state` exists (adopting an in-flight connect attempt), + re-point `c->connecting_head = new_s`, `c->group = group`, `c->kind = +kind`, and move c between the groups' connecting lists + (context.c:307-312). NOTE: this assumes the adopted socket is the list + head — see OQ-7. + 3. Unconditionally stamp `new_s->group = group`, `new_s->kind = kind`, + `timeout = 255`, `long_timeout = 255` (adoption clears timeouts). + 4. If `new_s->flags.low_prio_state == 1`: splice the new pointer into the + loop low-prio queue in place of the old (fix neighbor/head pointers, + context.c:319-324). Else `us_internal_socket_group_link_socket(group, +new_s)`. + 5. Return `new_s`. + With `ext_size == -1` the socket is re-stamped (group/kind/timeouts) with + no resize and no connect_state fixup. +- **R3.6** Adoption forwarding: everywhere the dispatcher regains control + after calling out (accept-open loop.c:521-523, socket case entry + loop.c:549-551, after writable loop.c:567-569, after on_data + loop.c:687-689), it MUST apply: `if (s && s->flags.adopted && s->prev) +s = s->prev;`. I.e. a closed+adopted socket's `prev` field is repurposed as + the forwarding pointer to the relocated socket. (`us_socket_adopt_tls` and + `us_socket_tls_feed` live in crypto/openssl.c — TLS layer, out of scope — + but they reuse `us_socket_adopt` and the same forwarding contract.) + +### 3.4 Group linkage invariants + +- **R3.7** `us_socket_group_t` (libusockets.h:270-287): `{loop, vtable, ext, +head_sockets, head_connecting_sockets, head_listen_sockets, iterator, +prev, next, global_tick (u32), low_prio_count (u16), timestamp (u8), +long_timestamp (u8), linked (u8)}`. `us_socket_group_init` + (context.c:49-55) zeroes the struct and sets loop/vtable/ext; it does NOT + link into the loop. +- **R3.8** Lazy linking: `us_internal_group_touched` links the group at the + head of `loop->data.head` on first insertion of any socket / connecting + socket / listener (context.c:178-183, called from link_socket, + link_connecting_socket, init_listen_socket). + `us_internal_group_maybe_unlink` (context.c:185-190) unlinks iff `linked` + and the group is empty: `head_sockets == NULL && head_connecting_sockets == +NULL && head_listen_sockets == NULL && low_prio_count == 0` + (context.c:171-176). +- **R3.9** `us_internal_socket_group_link_socket` (context.c:192-204): no-op + for closed sockets. Push at head of `head_sockets` (doubly linked via + s->prev/s->next), set `s->group = group`, touch the group, and + `us_internal_enable_sweep_timer(loop)` (§5). +- **R3.10** `us_internal_socket_group_unlink_socket` (context.c:206-228): + if `s == group->iterator`, advance `group->iterator = s->next` (sweep + safety). Unlink from the doubly-linked list — note the head-detection idiom + `if (prev == next) head_sockets = 0` (both NULL ⟺ only element). Then + `us_internal_disable_sweep_timer(loop)` and `maybe_unlink(group)`. +- **R3.11** Connecting-socket link/unlink are the same shape on + `head_connecting_sockets` via `next_pending`/`prev_pending` + (context.c:230-261), also enabling/disabling the sweep refcount. +- **R3.12** `us_internal_loop_unlink_group` (loop.c:178-196): if the group is + the loop's sweep cursor (`loop->data.iterator`), advance the cursor to + `group->next` BEFORE unlinking, so a timeout handler that deinits the + current group doesn't strand the sweep in freed memory. +- **R3.13** `us_socket_group_deinit` (context.c:57-74): debug-asserts all + heads NULL, `low_prio_count == 0`, `iterator == NULL`; unlinks from the + loop if linked. The embedding owner frees the storage. +- **R3.14** Sweep-vs-mutation contract: during `us_internal_timer_sweep`, + `group->iterator` is set to the socket being dispatched (loop.c:257). Any + unlink of that socket (close, adopt) advances `group->iterator` (R3.10). If + after dispatch `group->iterator == s` still, step `s = s->next`; else + resume from `group->iterator` (loop.c:277-282). If dispatch caused the + whole group to be deinit'd, `loop_data->iterator` no longer equals `group` + and the sweep MUST NOT touch `group` again (loop.c:262-274; it jumps to the + next group already installed in `loop_data->iterator` by R3.12). + +### 3.5 Close paths + +- **R3.15** Close-code trichotomy (libusockets.h:71-82): + - `0` CLEAN_SHUTDOWN: TLS graceful (close_notify, deferred fd close); plain + TCP just closes (FIN emitted by the kernel on close of an un-RST socket). + - `1` CONNECTION_RESET: before closing the fd, set + `SO_LINGER{l_onoff=1, l_linger=0}` so close() sends RST and skips + TIME_WAIT (socket.c:304-308). + - `2` FAST_SHUTDOWN: TLS fast shutdown, TCP normal FIN close. At the plain- + TCP core level codes 0 and 2 behave identically; the distinction is + consumed by the TLS layer and by JS (codes 0..2 are "self-initiated" and + filtered; peer errors are errnos > 2, loop.c:793-796). +- **R3.16** `us_socket_close(s, code, reason)` (socket.c:339-344): if + `s->ssl && !closed` route to `us_internal_ssl_close` (graceful TLS close, + may defer); else `us_internal_socket_close_raw`. +- **R3.17** `us_internal_socket_close_raw(s, code, reason)` (socket.c:263-337) + exact sequence: 0. If `s->ssl && s->ssl_in_use` (JS destroyed the socket from inside a + BoringSSL callback): DO NOT close now; set `ssl_pending_detach = 1`, + `ssl_pending_close_code = code`, return `s`. The SSL driver's epilogue + re-runs the close (socket.c:264-273). + 1. If already closed, return `s` unchanged. + 2. Unlink: if `low_prio_state == 1`, splice out of the loop low-prio queue, + zero prev/next/state, `group->low_prio_count--`, then + `us_internal_group_maybe_unlink(group)` (socket.c:277-291). Else + `us_internal_socket_group_unlink_socket(group, s)`. + 3. Deregister: kqueue skips the kevent syscall (fd close removes filters + automatically) and only calls + `us_internal_loop_update_pending_ready_polls(loop, s, 0, events, 0)`; + epoll/libuv call `us_poll_stop` (socket.c:295-302). + 4. If `code == 1` (RESET), arm `SO_LINGER{1,0}` (socket.c:304-308). + 5. `bsd_close_socket(fd)`. + 6. `s->flags.is_closed = 1`. + 7. Dispatch on_close — but ONLY if the poll type is not SEMI_SOCKET + (`!(poll_type & POLL_TYPE_SEMI_SOCKET)`; note this bit-test also skips + UDP? No — close_raw is only called on TCP sockets; the mask test + matches SEMI_SOCKET(2) and any type with bit 2 set, in practice only + SEMI_SOCKET; SOCKET=0 and SOCKET_SHUT_DOWN=1 pass). Route + `us_internal_ssl_on_close` if `s->ssl` else `us_dispatch_close(s, code, +reason)`. A never-opened connect (SEMI_SOCKET) MUST NOT get on_close — + its owner is notified via on_connect_error instead (socket.c:316-325). + 8. `us_internal_ssl_detach(s)` (SSL_free + NULL; idempotent, no-op for + plain TCP). + 9. Push `s` onto `loop->data.closed_head` via `s->next`. Memory is freed at + the outermost tick's loop_post (R1.15). + 10. Return the on_close return value if it was dispatched, else `s`. +- **R3.18** `us_socket_detach(s)` (socket.c:349-385): identical unlink/stop/ + closed-list bookkeeping to close_raw but **never closes the fd**, never + sets SO_LINGER, never dispatches on_close, and always + `us_internal_ssl_detach`s. The fd's ownership passes to the caller. Sets + `is_closed = 1` and pushes to closed_head. +- **R3.19** `us_socket_shutdown(s)` (socket.c:624-630): TLS routes to + `us_internal_ssl_shutdown`; plain routes to + `us_internal_socket_raw_shutdown` (socket.c:613-622): if not closed and not + already SHUT_DOWN — set poll type to `POLL_TYPE_SOCKET_SHUT_DOWN`, + `us_poll_change(events & R)` (stop polling writable), then + `bsd_shutdown_socket(fd)` = `shutdown(fd, SHUT_WR/SD_SEND)`. Send-FIN, + keep reading. +- **R3.20** `us_socket_shutdown_read(s)` = `shutdown(fd, SHUT_RD/SD_RECEIVE)` + unconditionally (idempotent; no state change) (socket.c:47-50). +- **R3.21** `us_socket_is_shut_down(s)` (socket.c:602-607): TLS asks + `us_internal_ssl_is_shut_down`; plain returns + `poll_type == POLL_TYPE_SOCKET_SHUT_DOWN`. `us_socket_is_closed(s)` = + `flags.is_closed` (socket.c:142-144). `us_socket_is_established(s)` = + `poll_type != POLL_TYPE_SEMI_SOCKET` (socket.c:164-167). + +### 3.6 Readable/eof/error dispatch on established sockets (loop.c:544-800) + +- **R3.22** Case order for one event dispatch on SOCKET/SOCKET_SHUT_DOWN: + (a) adoption-forward `s` (R3.6); cache `loop = s->group->loop` (the group + may change during callbacks, the loop can't; loop.c:552-553); + (b) WRITABLE handling (only when `events & W && !error`, loop.c:554-583): + clear `last_write_failed`; on kqueue clear POLLING_OUT preserving + POLLING_IN (R2.13); dispatch `ssl_on_writable`/`us_dispatch_writable`; + re-forward for adoption; return if `!s || closed`. Then: if + `!last_write_failed || shut_down` → `us_poll_change(events & R)` (stop + polling writable); else on kqueue re-arm `us_poll_change(events | W)` + (one-shot filter re-registration). + (c) READABLE handling (loop.c:586-753): low-prio gate (R1.24), then a recv + loop: + - flags: `MSG_DONTWAIT` POSIX, `MSG_PUSH_IMMEDIATE` Windows (loop.c:638-643). + - IPC sockets (`flags.is_ipc`, non-Windows) use `bsd_recvmsg` with a + 1-int SCM_RIGHTS control buffer; if a valid `SOL_SOCKET/SCM_RIGHTS` cmsg + arrives with `length > 0`, dispatch `us_dispatch_fd(s, fd)` FIRST, then + fall through to the normal data dispatch of the same bytes; abort the + recv loop if on_fd closed the socket (loop.c:647-675). Only the first + cmsg / one fd per recvmsg is extracted. + - Non-IPC: `bsd_recv(fd, recv_buf + 32, LIBUS_RECV_BUFFER_LENGTH, flags)` + (loop.c:678). All reads land in the loop-shared recv_buf at offset + `LIBUS_RECV_BUFFER_PADDING`. + - `length > 0`: dispatch `ssl_on_data`/`us_dispatch_data(s, buf, length)`; + re-forward adoption. Repeat-read heuristic (POSIX, loop.c:691-713): + continue the loop only if `s` alive, `length >= LIBUS_RECV_BUFFER_LENGTH + - 24\*1024`, `length <= LIBUS_RECV_BUFFER_LENGTH`, and (`error`set (hung +up — macOS delivers EV_EOF with the same event) or`loop->num_ready_polls < 25`), and socket not closed and NOT paused +(`flags.is_paused`— a pause from inside on_data stops the loop).`repeat_recv_count`increments only when`error == 0`, and when +`repeat_recv_count > 10 && loop->num_ready_polls > 2` the loop stops +(starvation guard). Windows (loop.c:715-731): after a successful read, +probe recv exactly once more (`repeat_recv_count++ == 0`) unless + closed/paused, to catch AFD_POLL_ABORT races. + - `length == 0`: set `eof = 1`, break (handled below). + - `length == -1 && !bsd_would_block()`: peer-initiated TCP error → bypass + the SSL-graceful path and `us_internal_socket_close_raw(s, LIBUS_ERR, +NULL)`; **return** from dispatch (loop.c:736-748). The close code is the + raw errno. + (d) EOF handling (loop.c:755-784), only if `eof && s`: if socket already + closed → return (no on_end after close). If `us_socket_is_shut_down(s)` + (we sent FIN first, got FIN back) → `close_raw(s, 0 /*CLEAN*/, NULL)`, + return. If `allow_half_open`: `us_poll_change(&s->p, loop, W)` — an + ABSOLUTE event set: stop readable, force-keep writable even if it wasn't + currently armed (a same-tick queued write must still flush; the writable + dispatch disarms W again once drained — comment loop.c:765-775) — then + dispatch `ssl_on_end`/`us_dispatch_end`. Else: dispatch on_end, then + `close_raw(s, 0, NULL)`, return. + (e) ERROR handling (loop.c:786-799), only if `error && s`: fetch real errno + via `us_socket_get_error(s)` (SO_ERROR; epoll_kqueue.c:863-871 — falls back + to `errno` if getsockopt itself fails) and + `close_raw(s, so_error > 2 ? so_error : ECONNRESET, NULL)` — values 0..2 + are clamped to ECONNRESET because they'd collide with the CloseCode enum + that JS filters as self-initiated; return. +- **R3.23** Pause/resume (socket.c:747-769): `us_socket_pause` — no-op if + paused or closed; `us_poll_change(W)` (absolute: keep only writable), + `is_paused = 1`. `us_socket_resume` — no-op unless paused; clear flag; + no-op if closed; if shut down → `us_poll_change(R)` (read-only side); + else `us_poll_change(R|W)`. NOTE resume unconditionally arms W even if no + write is pending; the next writable dispatch will disarm it (R3.22b). + +### 3.7 Misc accessors + +- **R3.24** `us_socket_ext` = `s+1`; `us_connecting_socket_ext` = `c+1` + (socket.c:594-600). `us_socket_kind`/`set_kind`, `us_socket_group`, + `us_socket_is_tls` = `ssl != NULL` (socket.c:76-94). + `us_socket_get_native_handle`: SSL* if TLS else `(void*)(uintptr_t)fd`(socket.c:456-461); for connecting sockets always`(void\*)-1` + (socket.c:463-465). +- **R3.25** Address accessors (socket.c:29-74, 651-689) go through + `bsd_local_addr`/`bsd_remote_addr` (getsockname/getpeername) each call — + nothing is cached; failure or too-small caller buffer yields `*length = 0` + / port −1. `us_get_remote_address_info`/`us_get_local_address_info` copy + raw IP bytes into caller buf and return the byte length (0 on failure); + `dest`/`is_ipv6` out-params are NOT written (callers infer family from + length 4/16). +- **R3.26** `us_socket_ref`/`us_socket_unref` are uv_ref/uv_unref on libuv and + no-ops elsewhere (socket.c:691-696, 736-741). +- **R3.27** `us_socket_from_fd(group, kind, ssl_ctx, ext, fd, ipc)` + (socket.c:412-454), POSIX-only (returns 0 on Windows/libuv): create poll, + init `POLL_TYPE_SOCKET`, `us_poll_start_rc(R|W)` — on failure free the poll + and return 0 WITHOUT closing the caller's fd. Init fields (is_ipc = ipc), + then `bsd_socket_nodelay(1)`, `apple_no_sigpipe`, `bsd_set_nonblocking`, + link into group. If `ssl_ctx`, attach client TLS immediately. Caller + invokes on_open itself (via `us_socket_open`) — from_fd does not dispatch. +- **R3.28** `us_socket_pair` (socket.c:387-397), POSIX-only: + `socketpair(AF_UNIX, SOCK_STREAM)`, then `us_socket_from_fd(group, kind, +NULL, ext, fds[0], 0)`; fds[1] is left for the caller. +- **R3.29** Listen socket close (`us_listen_socket_close`, context.c:426-449): + if not closed — `us_poll_stop`, `bsd_close_socket(fd)`, + `us_internal_listen_socket_ssl_free(ls)` (frees SSL_CTX ref + SNI tree), + unlink from `accept_group->head_listen_sockets` (singly-linked pointer + scan), `maybe_unlink(group)`, push onto `closed_head`, `is_closed = 1`. + Never dispatches on_close. Memory freed in loop_post (can be inside the + accept loop — comment context.c:448). +- **R3.30** `us_loop_close_all_groups(loop)` (loop.c:204-224): walk + `loop->data.head`; for each group with any of head_sockets / + head_connecting_sockets / low_prio_count, call + `us_socket_group_close_all_ex(g, /*also_listeners*/0)`; listen sockets are + deliberately NOT closed (owner holds a raw pointer; closing here would + UAF — comment loop.c:208-213). Returns 1 if anything was closed. + Rust deviation: C cached `next` and probed `next->linked` after the call — + but a close callback may free the cached group outright (owner deinit), so + the probe is a UAF. The walk instead restarts from `loop->data.head` after + every dispatch, skipping (by address, never deref'd) groups already + dispatched this call so a repopulated or deferral-stuck group cannot spin + it; the caller's retry rounds (C16) pick those up. +- **R3.31** `us_socket_group_close_all_ex(group, also_listeners)` + (context.c:81-147), exact order: + 1. If also_listeners: close listeners first (`while (head_listen_sockets) +us_listen_socket_close(...)`) so nothing new is accepted. + 2. Close every connecting socket (walk with cached `next_pending`). + 3. Walk `head_sockets` (cached next): SEMI_SOCKET (in-flight connect + attempt) → dispatch `us_dispatch_connect_error(s, ECONNABORTED)` first + (so the owner wrapper detaches), then `close_raw(s, RESET, 0)` if the + handler didn't close; established → `us_socket_close(s, CLEAN, 0)`. + 4. Force-drain survivors: `while (head_sockets) +close_raw(head_sockets, RESET, 0)` — TLS sockets whose graceful close + deferred are forcibly closed so no socket outlives the owner's storage. + 5. If `low_prio_count`: walk `loop->data.low_prio_head`, and for each + parked socket belonging to this group call `us_socket_close(q, CLEAN, +0)` (close_raw's low-prio branch unlinks + decrements the counter); + assert count reaches 0. + Rust deviation: steps 2-5 do not use C's cached-`next` walks. With + in-place adoption there is no relocation tombstone, so a re-entrant + adopt/close can relink a cached `next` into a foreign group or the closed + chain. Step 2 restarts from `head_connecting_sockets` after every dispatch + (close always detaches the node, so each pass shrinks the live prefix) and + runs AGAIN after step 4 — a backstop for connecting sockets an on_close + opened mid-walk. Step 3 snapshots `head_sockets` once (slot addresses are + stable under the walk's tick-depth ref) and revalidates each entry + (slot live ∧ not closed ∧ still this group) before closing — single-pass, + so a §5.2-deferred close is attempted exactly once and left to step 4. + Steps 4-5 keep restart-from-head walks, stepping past sockets a §1.4/§5.2 + deferral left linked (bounding the force-drain, which otherwise spins on + an in-use head socket). + +--- + +## 4. WRITE PATH + +- **R4.1** `us_socket_write(s, data, length)` (socket.c:467-482): TLS → + `us_internal_ssl_write`. Plain: return 0 if closed or shut down. Else + `written = bsd_send(fd, data, length)`. If `written != length` (including + −1): set `flags.last_write_failed = 1` and `us_poll_change(R|W)` (absolute + set — this re-arms READABLE even on a paused socket, see OQ-2). Return + `written < 0 ? 0 : written`. Fatal errors (EPIPE/ECONNRESET) are + indistinguishable from would-block to the caller — the socket keeps polling + writable; the error eventually surfaces as an error/HUP event. +- **R4.2** `us_socket_write_check_error(s, data, length, *fatal)` + (socket.c:484-517): zero `*fatal` first. Closed/shut-down → 0. TLS → plain + `us_socket_write` (TLS errors propagate through the SSL layer). Else send; + on `written < 0`: + - `bsd_would_block() || bsd_send_is_transient_error()` → treat as + would-block: `last_write_failed = 1`, poll R|W, return 0. Transient = + ENOBUFS/ENOMEM on POSIX, WSAENOBUFS on Windows (bsd.c:1017-1023). This is + the commit-fc865b39 behavior: ENOBUFS/ENOMEM are transient kernel + resource exhaustion on a healthy connection, NOT fatal (comment + socket.c:496-501). + - anything else → `*fatal = 1`, return 0, and DO NOT arm writable + (retry can never succeed). + On short write (`written != length`): `last_write_failed = 1`, poll R|W. + Return `written` (≥0). +- **R4.3** `us_socket_write2(s, header, hlen, payload, plen)` + (socket.c:399-410): closed/shut-down → 0. `bsd_write2` (single writev of + the two chunks on POSIX; two sequential sends on Windows, where the payload + send is only attempted if the header fully flushed — bsd.c:912-953). If + `written != hlen + plen` → `us_poll_change(R|W)`. Returns + `written < 0 ? 0 : written`. NOTE: write2 does NOT set `last_write_failed` + (OQ-3). There is no TLS branch — write2 on a TLS socket writes ciphertext- + layer bytes raw (callers only use it on plain sockets). +- **R4.4** `us_socket_raw_write(s, data, length)` (socket.c:537-554): gates + ONLY on `is_closed` and raw poll type == SOCKET_SHUT_DOWN — deliberately + NOT `us_socket_is_shut_down()`, because the TLS layer uses this to flush + close_notify after SSL_shutdown marked the SSL shut down (comment + socket.c:538-543). Otherwise identical to us_socket_write (sets + last_write_failed + R|W on short). +- **R4.5** `us_socket_raw_writev(s, iov, count)` (socket.c:519-535): same + gating as raw_write; computes `total = Σ iov_len`; `bsd_writev` caps count + at 1024 (IOV_MAX; bsd.c:898-901 — partial-write handling carries the rest); + short/failed → `last_write_failed = 1`, poll R|W; returns + `written < 0 ? 0 : written`. Windows emulates writev with sequential + bsd_send, stopping at the first short write, returning −1 if nothing was + written (bsd.c:934-942). +- **R4.6** `bsd_send` (bsd.c:956-986) = `send(fd, buf, len, +MSG_NOSIGNAL | MSG_DONTWAIT)` retried on EINTR (MSG_NOSIGNAL defined to 0 + where missing; macOS relies on SO_NOSIGPIPE set at creation, + bsd.c:332-340). There is NO MSG_MORE / TCP_CORK corking on the send path + itself; `us_socket_flush` → `bsd_socket_flush` clears `TCP_CORK` on Linux + (bsd.c:675-681) and is a no-op elsewhere — the "flush" only matters if + some other layer corked. `us_socket_flush` is gated on + `!us_socket_is_shut_down(s)` (socket.c:136-140). +- **R4.7** `bsd_would_block()` (bsd.c:1005-1011): POSIX checks + `errno == EWOULDBLOCK` ONLY (the `|| EAGAIN` is commented out; equal on all + currently-supported POSIX targets); Windows `WSAEWOULDBLOCK`. +- **R4.8** Sendfile: `us_socket_sendfile_needs_more(s)` + (src/uws_sys/libuwsockets.cpp:1877-1881, declared libusockets.h:598): if + not closed, set `last_write_failed = 1` and `us_poll_change(R|W)`. The + actual sendfile syscall lives outside the core; this hook only re-arms + writable + marks backpressure so the dispatcher keeps W polled (R3.22b). +- **R4.9** Writable-poll invariant: after any short/failed write the poll is + R|W and `last_write_failed = 1`. The next writable event clears the flag + BEFORE dispatching on_writable; if the handler doesn't write-and-fail + again, W is disarmed (loop.c:554-577). This is the entire backpressure + protocol — there is no userspace send buffer in the core + (`us_socket_stream_buffer_t` does not exist in this tree; buffering lives + in the Zig/Rust callers). +- **R4.10** IPC fd passing, send side: `us_socket_ipc_write_fd(s, data, +length, fd)` (socket.c:556-592, POSIX only): closed/shut-down → 0. Build a + 1-iovec msghdr with a single `SCM_RIGHTS` cmsg of one int + (`CMSG_SPACE(sizeof(int))` control buffer), `bsd_sendmsg(fd, &msg, 0)` + (EINTR-retried, bsd.c:989-1003 — note flags=0, no MSG_NOSIGNAL/DONTWAIT + here; the fd is nonblocking anyway). If `sent != length`: + `last_write_failed = 1`, poll R|W. Return `sent < 0 ? 0 : sent`. Contract: + if the return value < length the fd was NOT transferred and the caller must + retry the whole (data, fd) pair. Receive side is R3.22c (on_fd then + on_data). + +--- + +## 5. TIMEOUTS + +- **R5.1** Encoding: `s->timeout` and `s->long_timeout` are u8; 255 = + disarmed. Armed values are ticks-mod-240 on the group's clocks. +- **R5.2** `us_socket_timeout(s, seconds)` (socket.c:104-110): 0 → 255; else + `s->timeout = (group->timestamp + ((seconds + 3) >> 2)) % 240` — i.e. + ceil(seconds/4) ticks from the group's current short clock. Max meaningful + timeout ≈ 239 ticks ≈ 956 s; longer values alias mod 240. +- **R5.3** `us_socket_long_timeout(s, minutes)` (socket.c:120-126): 0 → 255; + else `(group->long_timestamp + minutes) % 240` (1-minute ticks, max 239 + min). Connecting-socket variants use `c->group->timestamp` identically + (socket.c:112-134); those values are templates copied onto attempt sockets + at `start_connections` (context.c:688-689) — the `us_connecting_socket_t` + itself is NEVER swept (see OQ-5). +- **R5.4** Sweep clocks: per-group `global_tick` increments once per sweep; + `timestamp = global_tick % 240`; `long_timestamp = (global_tick / 15) % +240` (loop.c:236-238). With one sweep per 4 s, one long tick = 15 sweeps = + 60 s. +- **R5.5** Sweep enable/disable refcount: EVERY link of a socket or + connecting socket calls `us_internal_enable_sweep_timer(loop)`; every + unlink calls `us_internal_disable_sweep_timer(loop)` (context.c:203,226, + 241,259). POSIX (loop.c:81-94): count 0→1 sets `sweep_next_tick_ns = now + +4e9` and calls `Bun__internal_ensureDateHeaderTimerIsEnabled(loop)`; count + →0 sets `sweep_next_tick_ns = -1`. libuv (loop.c:56-69): 0→1 arms the + repeating 4000 ms uv timer (+ same Bun call); →0 _intends_ to swap the + callback to a no-op, but `us_timer_set` early-returns for the sweep timer + once `has_added_timer_to_event_loop` is set (libuv.c:300-305), so in + practice on libuv the sweep keeps firing `sweep_timer_cb` forever after + the first enable; with all groups empty the sweep is a cheap no-op walk. + The timer was created with fallthrough=1 → uv_unref'd (loop.c:124, + libuv.c:265-267), so it does not keep the loop alive. Preserve this; do + not "fix" by actually stopping it (see quirk OQ-16). +- **R5.6** Listen sockets do NOT participate in the sweep refcount + (init_listen_socket links into head_listen_sockets without + enable_sweep_timer, context.c:363-366) and are never swept (they live in + head_listen_sockets, not head_sockets). +- **R5.7** Sweep deadline folds into the poll timeout via R1.16/R1.17; + there is no timerfd / EVFILT_TIMER on POSIX. +- **R5.8** `us_internal_sweep_if_due(loop)` (loop.c:104-115), called after + dispatch in both run paths: return if disarmed or `now < +sweep_next_tick_ns`. Re-arm FIRST (`sweep_next_tick_ns = now + 4e9`) — + a timeout handler may unlink the last socket and disarm — then + `us_internal_timer_sweep(loop)`. On libuv the sweep is driven by the uv + timer callback instead (loop.c:386-389). +- **R5.9** `us_internal_timer_sweep(loop)` (loop.c:227-290) MUST NOT run + recursively. For each group (cursor = `loop_data->iterator`, advanced as in + R3.12/R3.14): bump the clocks (R5.4), then walk `head_sockets`. Inner fast + loop scans until `short_ticks == s->timeout || long_ticks == +s->long_timeout` or list end. On a hit: `group->iterator = s`. If short + matches: `s->timeout = 255` (one-shot — the handler must re-arm) then + `us_dispatch_timeout(s)`. Then, group-survival check (R3.14). If the + socket survived as cursor (`group->iterator == s`) and long matches: + `s->long_timeout = 255`, `us_dispatch_long_timeout(s)`, survival check + again. Advance per R3.14. Both timeouts on the same tick fire short first, + long second, on the same dispatch. After the group's walk: `group->iterator += 0`, advance the loop cursor. +- **R5.10** Re-arm rules: dispatch does NOT re-arm anything. A handler that + wants a recurring timeout MUST call `us_socket_timeout` again. A handler + that closes the socket is safe (close unlinks and fixes both iterators). + +--- + +## 6. CONNECT + +- **R6.1** `us_connecting_socket_t` (internal.h:310-338): `{addrinfo_req, +group, loop (captured at create; survives group detach), ssl_ctx (up_ref'd +borrow), next (dns_ready / closed-list link), connecting_head (list of +in-flight attempt sockets via s->connect_next), options, socket_ext_size, +bitfields closed/shutdown/shutdown_read/pending_resolve_callback/ +error_is_dns, timeout, long_timeout, kind, port, error, addrinfo_head +(cursor into the resolved list), next_pending/prev_pending (group list)}`. + Allocated as `us_calloc(1, sizeof + socket_ext_size)` (context.c:611) — + ext lives at `c+1` and is memcpy'd into every attempt socket + (context.c:693). +- **R6.2** `us_socket_group_connect(group, kind, ssl_ctx, host, port, +local_host, local_port, options, ext_size, *has_dns_resolved)` + (context.c:567-634), on the loop thread: + 1. Parse `local_host` as a literal IP (never resolved) into `local_addr` + if given (context.c:574-578; `try_parse_ip` handles v4 then v6, + context.c:542-565). + 2. If `host` parses as a literal IP: `*has_dns_resolved = 1`; return + `us_socket_group_connect_resolved_dns(...)` (an `us_socket_t*`). + 3. Else `Bun__addrinfo_get(loop, host, port, &ai_req)`. Return 0 means the + request already has a result (cache hit): if `result->error == 0` AND + there is exactly one entry (`entries->info.ai_next == NULL`), do the + fast path: build the sockaddr with the requested port + (`init_addr_with_port`, context.c:530-540), `*has_dns_resolved = 1`, + connect directly, `Bun__addrinfo_freeRequest(ai_req, s == NULL)` + (invalidate the cache entry if the connect failed), return the socket + (possibly NULL). A cached ERROR or multi-address result falls through + to the connecting-socket path (comment context.c:589-593). + 4. Slow path: calloc the `us_connecting_socket_t`; fill options/kind/loop; + up_ref ssl_ctx if given; `timeout = long_timeout = 255`; + `pending_resolve_callback = 1`; store ai_req and port; link into the + group's connecting list. Keep the loop alive: + `loop->num_polls++` (POSIX) / `uv_loop->active_handles++` (Windows) + (context.c:625-629). Then `Bun__addrinfo_set(ai_req, c)` — registers c + for completion notification (may fire immediately via the dns_ready + queue if the request already completed). Return `c` with + `*has_dns_resolved = 0`. + Return type is `void*`: `us_socket_t*` when `*has_dns_resolved == 1`, + `us_connecting_socket_t*` otherwise. +- **R6.3** `us_socket_group_connect_resolved_dns` (context.c:496-528): + `bsd_create_connect_socket(addr, local_addr, options)` (R8.9) → NULL on + failure (errno preserved). `bsd_socket_nodelay(fd, 1)`. Create poll of + `sizeof(us_socket_t) + ext`, init `POLL_TYPE_SEMI_SOCKET`, + `us_poll_start_rc(W)`; on registration failure: close fd, free poll, + restore errno, return NULL. Init fields (R3.3, `last_write_failed = 0`), + attach client TLS now if ssl_ctx (fast path has no c to stash it on), link + into group. The socket polls WRITABLE-only until the connect completes. +- **R6.4** Unix connect (`us_socket_group_connect_unix`, context.c:636-663): + same shape via `bsd_create_connect_socket_unix` (macOS long-path + `__pthread_fchdir` workaround, R8.13); no DNS, no connecting socket. +- **R6.5** DNS bridge threading contract (internal.h:140-144, loop.c:322-357): + - `Bun__addrinfo_get(loop, host, port, &req)`: loop thread. Returns 0 if a + result is already available (cache), nonzero if in flight. + - `Bun__addrinfo_set(req, c)`: loop thread; registers c to be notified. + On an already-resolved request it defers to the loop's dns_ready + mechanism, never re-enters (comment context.c:592-593). + - Completion: the resolver (any thread) calls + `us_internal_dns_callback_threadsafe(c, req)` = `us_internal_dns_callback` + (push c onto `loop->data.dns_ready_head` under `Bun__lock(&loop->data. +mutex)`) + `us_wakeup_loop(loop)`. The non-threadsafe variant + (same-thread) skips the wakeup (loop.c:322-340). + - Drain: `us_internal_handle_dns_results(loop)` (loop_pre AND loop_post) + swaps `dns_ready_head` to a local list under the mutex, then calls + `us_internal_socket_after_resolve(c)` for each (loop.c:342-357), on the + loop thread. + - `Bun__addrinfo_cancel(req, c)`: loop thread; returns nonzero if c was + removed from the notify list before firing, 0 if the callback already + fired/queued (socket.c:214-244). + - `Bun__addrinfo_getRequestResult(req)` → `{entries, error}`; + `Bun__addrinfo_freeRequest(req, invalidate_cache)` releases the request, + dropping the DNS cache entry when `invalidate_cache != 0`. +- **R6.6** `us_internal_socket_after_resolve(c)` (context.c:702-745): + clear `pending_resolve_callback`. If `c->closed` (close raced the + callback): free the request (no invalidate) and `us_connecting_socket_free` + — the keep-alive was already balanced by the cancel branch of close + (comment context.c:703-707). Else: balance the keep-alive + (`num_polls--` / `active_handles--`). If `result->error`: `c->error = +result->error`, `c->error_is_dns = 1` (the two error namespaces overlap + numerically — consumers MUST check error_is_dns first, internal.h:324-328), + `us_connecting_socket_close(c)`. Else set `c->addrinfo_head = +&result->entries->info` and `start_connections(c, 4)`; if zero attempts + could be opened, `c->error = ECONNREFUSED` then close (a real connect + failure must not read as caller abort, context.c:739-744). +- **R6.7** Happy-eyeballs (`CONCURRENT_CONNECTIONS = 4`, context.c:27): + `start_connections(c, count)` (context.c:665-700) walks `c->addrinfo_head` + (advancing the cursor), opening up to `count` attempt sockets: each is + built exactly like R6.3 (SEMI_SOCKET, poll W, nodelay; syscall or + registration failure → skip to next address; no local bind on this path — + comment context.c:672), gets `s->timeout/long_timeout` copied from c, is + linked into the group, gets c's ext memcpy'd, and is pushed onto + `c->connecting_head` via `s->connect_next` with `s->connect_state = c`. + Returns number opened. Ordering: address order is whatever the resolver + returned; the first 4 race simultaneously; there is no per-attempt delay + timer. +- **R6.8** Connect completion — the SEMI_SOCKET arm of dispatch + (loop.c:445-467): if the poll's events include W it is a connecting socket + (a listen socket only ever polls R; the bit-test rather than equality + tolerates R|W after an early partial write — comment loop.c:446-452). + If `error || eof` accompany the writable event, fetch `SO_ERROR`; if that + reads 0, substitute ECONNRESET (handshake completed then reset race — + matches libuv, loop.c:453-466). Call + `us_internal_socket_after_open(s, connect_error)`. +- **R6.9** `us_internal_socket_after_open(s, error)` (context.c:747-818): + - Windows-only pre-step: on error==0, probe `recv(fd, NULL, 0)` and map + non-WSAEWOULDBLOCK/WSAEINTR failures to an error (context.c:749-765). + - **Error path**: with `c = s->connect_state`: + - c != NULL (happy-eyeballs attempt): remove s from `c->connecting_head` + (pointer-scan), `us_socket_close(s, RESET, 0)` (SEMI_SOCKET → no + on_close, R3.17.7). Then if ≤1 attempts remain + (`connecting_head == NULL || connecting_head->connect_next == NULL`), + `start_connections(c, head==NULL ? 4 : 1)`; if nothing opened and no + attempts remain: `c->error = ECONNREFUSED`, + `us_connecting_socket_close(c)`. + - c == NULL (direct connect): `us_dispatch_connect_error(s, error)`; + the handler is expected to close the socket itself (comment + context.c:789). + - **Success path**: `us_poll_change(R)` (absolute), nodelay(1) again, + poll type → `POLL_TYPE_SOCKET`, `us_socket_timeout(s, 0)` (disarm). If + c: close every OTHER attempt with RESET (loser legs), attach TLS from + `c->ssl_ctx` if present, `Bun__addrinfo_freeRequest(req, 0)`, + `us_connecting_socket_free(c)`, `s->connect_state = NULL`. Finally + `ssl_on_open(s, 1, 0, 0)` or `us_dispatch_open(s, 1, 0, 0)`. +- **R6.10** `us_connecting_socket_close(c)` (socket.c:192-255): idempotent + via `c->closed`. Steps: + 1. `c->closed = 1`. + 2. For every attempt socket on `connecting_head`: unlink from its group, + `us_poll_stop`, `bsd_close_socket(fd)`, push to loop closed_head, + `is_closed = 1`. (Direct fd teardown — deliberately NOT close_raw; no + dispatch fires for attempts here.) + 3. If `c->error == 0`, set `c->error = ECONNABORTED` (caller abort). + 4. If `pending_resolve_callback`: + - `Bun__addrinfo_cancel` succeeded → balance keep-alive + (num_polls--/active_handles--), clear the flag, free the request (no + invalidate), `us_dispatch_connecting_error(c, c->error)`, + `us_connecting_socket_free(c)`. + - cancel failed (callback in flight) → balance keep-alive, dispatch + connecting_error, `us_internal_connecting_socket_detach(c, loop)` + (unlink from group + drop ssl_ctx ref, group := NULL, + socket.c:172-182) but DO NOT free — after_resolve will see + `c->closed` and finish (R6.6). Return. + 5. Else (resolution already done): if `addrinfo_req` remains, free it with + invalidate = `(c->error == ECONNREFUSED || c->error_is_dns)` (refused → + stale addresses; DNS failure → never cache negatives; socket.c:247-252). + `us_dispatch_connecting_error(c, c->error)`; `us_connecting_socket_free(c)`. + Rust deviation (steps 4-5): for static-vtable (owner-carrying) kinds the + detach runs BEFORE the connecting_error dispatch — the dispatch releases + the core-held owner ref, whose Drop can free the owner storage embedding + the group, so the group unlink must complete first. Group-vtable kinds + keep the C order (their vtable is resolved through `c->group`). +- **R6.11** `us_connecting_socket_free(c)` (socket.c:184-190): detach + (group unlink + ssl_ctx unref) then push onto + `loop->data.closed_connecting_head` via `c->next`; actual `us_free` happens + in `us_internal_free_closed_sockets` (R1.15). Never free immediately — c + may still sit on the dns_ready list. +- **R6.12** on*connect_error vs on_connecting_error: `us_dispatch_connect* + error(s, code)`fires on a real (attempt)`us_socket_t`— direct-connect +failure (R6.9) and group close_all of an in-flight attempt (R3.31.3).`us_dispatch_connecting_error(c, code)`fires on the`us_connecting_socket_t` — DNS failure, all-attempts-failed, or + cancellation (R6.10). Exactly one of {on_open, on_connect_error(s), + on_connecting_error(c)} terminates a connect. +- **R6.13** Connecting-socket accessor semantics: `get_error` = c->error; + `get_dns_error` = error_is_dns ? error : 0 (socket.c:636-642); + `shutdown`/`shutdown_read` just latch bits consumed after promotion by the + Zig caller (socket.c:52-54, 632-634); `is_shut_down` = c->shutdown; + `is_closed` = c->closed; `ext` = c+1; `get_native_handle` = (void\*)-1. + +--- + +## 7. LISTEN / ACCEPT + +- **R7.1** `us_listen_socket_t` (internal.h:401-424) embeds a full + `us_socket_t s` (so a listener IS a socket for poll/close purposes), plus: + `accept_group` (group accepted sockets join — usually == s.group), `next` + (singly-linked into `accept_group->head_listen_sockets`), `ssl_ctx` + (borrowed, up_ref'd on listen, freed on close; NULL = plain), `sni` tree, + `on_server_name` callback, `socket_ext_size` (ext stamped onto every + accepted socket), `accept_kind` (kind stamped onto accepted sockets), + `deferred_accept` flag. +- **R7.2** `us_socket_group_listen(group, kind, ssl_ctx, host, port, options, +ext_size, *error)` (context.c:369-399): `bsd_create_listen_socket` (R8.6) + → 0 on failure. Create poll of `sizeof(us_listen_socket_t)` (no ext on the + listener poll itself), init `POLL_TYPE_SEMI_SOCKET`, `us_poll_start_rc(R)`; + registration failure (e.g. epoll ENOSPC) → close fd, free poll, report via + BOTH `*error` and thread-local errno (context.c:379-389). Init + (context.c:333-367): listener socket fields per R3.3 with `kind = 0` + ("listener itself never dispatches"), `allow_half_open` from options + (inherited by accepted sockets), `timeout = long_timeout = 255`; listener + struct fields per R7.1 (up_ref ssl_ctx, sni = NULL, on_server_name = NULL, + deferred_accept = 0); link into `head_listen_sockets` + touch group. If + `options & LIBUS_LISTEN_DEFER_ACCEPT`, `ls->deferred_accept = +bsd_set_defer_accept(fd)` (1 only if the setsockopt succeeded, R8.8). + `us_socket_group_listen_unix` (context.c:401-424) is identical minus + defer-accept. +- **R7.3** Accept loop — the SEMI_SOCKET/readable arm (loop.c:468-541): + `bsd_accept_socket(listen_fd, &addr)`; on error do nothing (no timer yet — + TODO in source; EMFILE/ENFILE are silently dropped until the next readable + event). On success loop: + 1. `us_create_poll(loop, 0, sizeof(us_socket_t) - sizeof(us_poll_t) + +socket_ext_size)`; init `POLL_TYPE_SOCKET`; `us_poll_start_rc(R)`. If + registration fails: `bsd_close_socket(client_fd)` (peer sees RST rather + than a black hole) + `us_poll_free`, `continue` to the next accept + (loop.c:485-492). + 2. Stamp fields: `group = accept_group`, `kind = accept_kind`, `ssl=NULL`, + `connect_state=NULL`, timeouts 255, flags zeroed except + `allow_half_open` copied from the listener (loop.c:496-507). + 3. `bsd_socket_nodelay(client_fd, 1)` — nodelay always on (loop.c:510). + 4. Link into accept_group. + 5. If `listen_socket->ssl_ctx`: `us_internal_ssl_attach(s, ssl_ctx, 0, +NULL, listen_socket)` then `us_internal_ssl_on_open(s, 0, ip, iplen)`; + else `us_dispatch_open(s, 0, ip, iplen)` — ip is the raw 4/16-byte + peer address from accept (loop.c:514-519). + 6. Adoption-forward `s` (R3.6). + 7. If `deferred_accept` and s alive: synchronously re-enter + `us_internal_dispatch_ready_poll(s, 0, 0, R)` — the client's first + bytes are already in the buffer; the recv loop tolerates EWOULDBLOCK + (loop.c:525-532). + 8. If the LISTEN socket got closed by a callback, break out of the accept + loop (loop.c:534-537). + 9. `bsd_accept_socket` again; loop until it returns error (EAGAIN drains + the backlog). + Accepted fds are CLOEXEC+NONBLOCK via accept4 where available; otherwise + set by `bsd_set_nonblocking(apple_no_sigpipe(fd))` (bsd.c:800-846). +- **R7.4** macOS accept quirk (bsd.c:817-834): if accept returns a socket + with `addr->len == 0` (XNU bug: dual-stack v4 connection immediately + RST), probe `recv(MSG_PEEK|MSG_DONTWAIT)`; if no data, close the fd and + retry accept; if buffered data exists, let the socket through. +- **R7.5** Listener accessors: `us_listen_socket_ext` = ls+1 + (context.c:451-453 — note the listener poll was created without ext, so + this points one-past the struct into nothing usable unless a future ext is + added; current callers don't use it), `head_listen_socket`/`next` walk + (context.c:455-461), `get_fd`, `port` (getsockname), `group` = + accept_group (context.c:463-473). + +--- + +## 8. BSD LAYER (non-trivial pieces only) + +- **R8.1** `bsd_create_socket(domain, type, protocol, *err)` + (bsd.c:683-717): where SOCK_CLOEXEC|SOCK_NONBLOCK exist, pass them in the + type (one syscall) and only add `apple_no_sigpipe`; otherwise (mac/Win) + create then `bsd_set_nonblocking(apple_no_sigpipe(fd))`. EINTR-retried. + On failure `*err = errno` (if err non-NULL) and returns + LIBUS_SOCKET_ERROR. `bsd_set_nonblocking` (bsd.c:356-373) sets O_NONBLOCK + AND FD_CLOEXEC via fcntl on POSIX; on Windows it is a no-op (libuv sets + FIONBIO at poll init; connect paths use `win32_set_nonblocking` + explicitly, bsd.c:342-354). +- **R8.2** Addr plumbing: `struct bsd_addr_t` = `{sockaddr_storage mem, len, +char *ip, ip_length, port}` (networking/bsd.h:51-57). + `internal_finalize_bsd_addr` (bsd.c:743-757) points `ip` INTO `mem` + (sin_addr / sin6_addr), sets ip_length 4/16, port via ntohs; unknown + family → ip_length 0, port −1. No string formatting anywhere in the core — + IPs cross the API as raw bytes. +- **R8.3** `bsd_local_addr`/`bsd_remote_addr` = getsockname/getpeername + + finalize; −1 on failure (bsd.c:759-775). +- **R8.4** Reuse options (bsd.c:1044-1101): `bsd_set_reuse(fd, options)` + applies, in order: `SO_EXCLUSIVEADDRUSE` (Windows only, if + EXCLUSIVE_PORT); if REUSE_ADDR → `bsd_set_reuseaddr` = SO_REUSEPORT on + non-Linux platforms that have it, else SO_REUSEADDR (bsd.c:1044-1051); if + REUSE_PORT → SO_REUSEPORT, and if the platform lacks it (ENOTSUP) the + failure is swallowed UNLESS `LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE` + (bsd.c:1086-1098). Windows maps missing REUSE_PORT to + WSAEOPNOTSUPP/ENOTSUP. +- **R8.5** `bsd_bind_listen_fd` (bsd.c:1103-1138): `bsd_set_reuse`; then on + POSIX ALWAYS set plain SO_REUSEADDR (TIME_WAIT rebinding; never on + Windows — port stealing, comment bsd.c:1115-1122); if AF_INET6 set + IPV6_V6ONLY = (options & LIBUS_SOCKET_IPV6_ONLY) (failure is fatal); + `bind` then `listen(fd, 512)` (both EINTR-retried, + `us_internal_bind_and_listen` bsd.c:1025-1042; `*error` is set to LIBUS_ERR + after bind failure AND unconditionally after listen — i.e. `*error` holds + stale errno 0 on success). +- **R8.6** `bsd_create_listen_socket(host, port, options, *error)` + (bsd.c:1160-1213): getaddrinfo(AI_PASSIVE, AF_UNSPEC, SOCK_STREAM) on the + decimal port string; try every AF_INET6 result first, then every AF_INET; + first successful bind+listen wins; failures close the candidate fd and + continue. Returns LIBUS_SOCKET_ERROR if all fail. (host may be NULL → + wildcard.) +- **R8.7** Unix listen/connect long-path handling + (`bsd_create_unix_socket_address`, bsd.c:1230-1350): empty path → ENOENT. + Linux: path ≥ sizeof(sun_path) (108) and not abstract → open the dirname + `O_PATH|O_DIRECTORY` and rewrite the sun_path as + `/proc/self/fd//` (ENAMETOOLONG if even that overflows); + abstract sockets (leading NUL) use `addrlen = offsetof(sun_path) + +path_len`. macOS: same trick but via `__pthread_fchdir(dirfd)` +relative + basename around the bind/connect, restored with `__pthread_fchdir(-1)` + (bsd.c:1389-1414, 1826-1849). Other/too-long → ENAMETOOLONG. Windows + simulates ENOENT/ENAMETOOLONG via SetLastError. Note: no unlink() of a + stale socket file — bind fails EADDRINUSE and the caller deals with it. + Windows maps a bind/listen WSAENETDOWN to ERROR_PATH_NOT_FOUND + (bsd.c:1362-1370). +- **R8.8** `bsd_set_defer_accept` (bsd.c:1140-1156): Linux + `TCP_DEFER_ACCEPT = 1` second (nginx-style short timeout); FreeBSD + `SO_ACCEPTFILTER "dataready"`; returns 1 on setsockopt success, 0 on + failure or unsupported platform. +- **R8.9** `bsd_create_connect_socket(addr, local_addr, options)` + (bsd.c:1727-1799): create socket for addr->ss_family. If `local_addr`: + POSIX sets SO_REUSEADDR first (TIME_WAIT local-port reuse, matching + libuv; NOT on Windows), bind, and a bind failure closes the fd and + returns error with errno preserved. Windows: explicit nonblocking; the + null address (0.0.0.0/::) is rewritten to loopback; loopback destinations + get `SIO_TCP_INITIAL_RTO` with no SYN retransmissions (fail fast) + (bsd.c:1760-1790). Then `bsd_do_connect_raw` (bsd.c:1643-1690): + EINTR-retried connect where EINPROGRESS (POSIX) / + WSAEINPROGRESS|WSAEWOULDBLOCK|WSAEALREADY (Windows) count as success (0); + also treats `r == -1 && errno == 0` as success (comment bsd.c:1678-1680). + Non-zero rc → close fd, return LIBUS_SOCKET_ERROR. +- **R8.10** `bsd_accept_socket` (bsd.c:790-847): accept4(SOCK_CLOEXEC| + SOCK_NONBLOCK) where available else accept + fixups; EINTR-retried; macOS + addrlen==0 quirk per R7.4; finalizes the addr. +- **R8.11** recv/send wrappers all EINTR-retry and carry fault-injection + hooks (§11): `bsd_recv` (bsd.c:849-872; also BUN_DEBUG BUN_RECV/BUN_SEND + file logging), `bsd_recvmsg`, `bsd_send` (MSG_NOSIGNAL|MSG_DONTWAIT), + `bsd_sendmsg` (flags passed through), `bsd_writev` (IOV_MAX cap 1024), + `bsd_write2`. +- **R8.12** Keepalive (`bsd_socket_keepalive`, bsd.c:547-613): SO_KEEPALIVE + on/off; when on with delay: `delay == 0` → −1 (POSIX) / UV_EINVAL −4071 + (Windows+libuv); TCP_KEEPIDLE (or Darwin TCP_KEEPALIVE) = delay; + TCP_KEEPINTVL = 1; TCP_KEEPCNT = 10. Returns 0 or the errno / + WSAGetLastError value (positive). +- **R8.13** TOS (bsd.c:619-673): family detected via getsockname → IP_TOS or + IPV6_TCLASS; setters return 0 / −errno, getter returns value / −errno. +- **R8.14** Misc option helpers, all thin but with the 6-then-4 fallback + pattern (`setsockopt_6_or_4`, bsd.c:375-392: try IPPROTO_IPV6 option; on + ENOPROTOOPT/EINVAL retry the IPv4 option): multicast loopback, TTL + (validated 1..255 → EINVAL), broadcast, multicast interface (rejects + multicast-range IPv4 addresses as interfaces, bsd.c:406-435), IGMP + membership (v4 ip_mreq / v6 ipv6_mreq; iface family must match, else + EINVAL) and source-specific membership (ip_mreq_source / + group_source_req) (bsd.c:437-525). + +--- + +## 9. UDP + +- **R9.1** `us_udp_socket_t` (internal.h:340-358): poll header + callbacks + `{on_data, on_drain, on_close, on_recv_error}`, `user`, `loop`, cached + `port` (bound port, captured once at creation), bits `closed`/`connected`, + `next` (closed-list link). No ext. +- **R9.2** `us_create_udp_socket(loop, data_cb, drain_cb, close_cb, +recv_error_cb, host, port, flags, *err, user)` (udp.c:149-202): + `bsd_create_udp_socket` (R9.8) → 0 on failure. Poll of + `sizeof(us_udp_socket_t)`, `POLL_TYPE_UDP`, `us_poll_start_rc(R|W)` — + registration failure closes fd, frees poll, reports errno via \*err and + errno. Cache the bound port via getsockname. Because the poll starts R|W, + the first tick delivers one writable event → one initial `on_drain` + (then W is cleared per R9.6). +- **R9.3** `us_udp_socket_close(s)` (udp.c:102-111): `us_poll_stop`, close + fd, `closed = 1`, push onto `loop->data.closed_udp_head`, then call + `s->on_close(s)` synchronously. Memory freed in loop_post (R1.15). +- **R9.4** Receive path (loop.c:802-914), the POLL_TYPE_UDP dispatch arm: + 1. If `u->closed`, ignore entirely. + 2. **Linux error-queue drain** (loop.c:808-843): if `error` (EPOLLERR), + loop `recvmsg(fd, MSG_ERRQUEUE)` until it fails, extracting + `sock_extended_err.ee_errno` from IP_RECVERR/IPV6_RECVERR cmsgs and + calling `on_recv_error(u, ee ?: ECONNREFUSED)` per queued ICMP error. + The socket stays open. Track `recv_error_surfaced`. + 3. If `events & R` and not closed: loop — `bsd_udp_setup_recvbuf` over the + loop's shared recv_buf (LIBUS_RECV_BUFFER_LENGTH), `npackets = +bsd_recvmmsg(fd, &recvbuf, MSG_DONTWAIT)`: - `> 0` → `u->on_data(u, &recvbuf, npackets)`; repeat while not closed. - `== LIBUS_SOCKET_ERROR` and not would-block: Linux → surface errno + via on_recv_error (socket stays open, `recv_error_surfaced = 1`); + non-Linux → set `error = 1` (falls through to close). Would-block on + Linux sets `recv_would_block_only`. - `== 0` → done. + 4. If `events & W` and not closed: `us_poll_change(events & R)` — clear W + BEFORE `on_drain` so a callback that re-arms W keeps the re-arm; also + ensures a level-triggered EPOLLOUT+EPOLLERR combo can't spin + (loop.c:885-897). Then `u->on_drain(u)`. + 5. Close-on-error: Linux — only if `error && !recv_error_surfaced && +!recv_would_block_only && !closed` (residual unexplained EPOLLERR); + elsewhere — any `error` closes via `us_udp_socket_close` + (loop.c:899-913). +- **R9.5** Packet buffer layout (`udp_recvbuf`, networking/bsd.h:140-152): + POSIX — 8 mmsghdr + 8 iovec (each iov = 64 KiB slice of the shared + recv_buf at `i * LIBUS_UDP_MAX_SIZE`) + 8 sockaddr_storage + 8×256-byte + control buffers, wired by `bsd_udp_setup_recvbuf` (bsd.c:179-201). Windows + — single buf/len/recvlen/addr (one packet per recv). Accessors + (udp.c:27-45 → bsd.c:259-330): payload pointer/length (length clamped to + LIBUS_UDP_MAX_SIZE), peer sockaddr pointer, truncated = MSG_TRUNC flag + (always 0 on Windows), local (destination) IP from + IP_PKTINFO/IP_RECVDSTADDR/IPV6_PKTINFO cmsg (4/16 bytes; unsupported on + Windows/macOS → 0). +- **R9.6** `bsd_recvmmsg` (bsd.c:130-177): Linux/FreeBSD recvmmsg (EINTR + retry); macOS `recvmsg_x` when supported (probed once via + `Bun__doesMacOSVersionSupportSendRecvMsgX`) else a recvmsg loop that + returns `i` on EAGAIN; Windows single recvfrom, swallowing + WSAECONNRESET/WSAENETRESET (per-destination ICMP, retry — matches libuv, + bsd.c:138-144). Returns packet count or −1. +- **R9.7** Send path: `us_udp_socket_send(s, payloads, lengths, addresses, +num)` (udp.c:47-72): batches through the loop's 16 KiB `send_buf` via + `bsd_udp_setup_sendbuf` (bsd.c:203-254 — builds mmsghdr+iovec arrays in + place, capacity `(16384 - hdr) / (sizeof(mmsghdr)+sizeof(iovec))`; + computes per-address socklen; tracks has_empty/has_addresses for the macOS + sendmsg_x eligibility), `bsd_sendmmsg(fd, buf, MSG_DONTWAIT)` (bsd.c:69-128: + Linux sendmmsg | MSG_NOSIGNAL; macOS sendmsg_x when supported and no + addresses/empties, else sendmsg loop returning i on EAGAIN; Windows + send/sendto loop). Negative send → return it. Partial (`sent < num` after + the bookkeeping — see OQ-1, the arithmetic is suspect) → re-arm W via + `us_poll_change(R|W)` so on_drain fires later. Returns packets sent. +- **R9.8** `bsd_create_udp_socket(host, port, options, *err)` + (bsd.c:1417-1556): getaddrinfo(AI_PASSIVE, SOCK_DGRAM); prefer AF_INET6 + result, else AF_INET; getaddrinfo failure reports `*err = -gai_code`. + Then: `bsd_set_reuse(options)` (same bits as TCP); + IPV6_V6ONLY per options for v6; enable destination-address reporting + (IPV6_RECVPKTINFO, falling back to IP_PKTINFO / IP_RECVDSTADDR); enable + ECN/TOS reporting (IPV6_RECVTCLASS → IP_RECVTOS fallback); Windows — + disable SIO_UDP_CONNRESET and SIO_UDP_NETRESET at the source; Linux — + IP_RECVERR always and IPV6_RECVERR for v6 (surface ICMP errors, matches + libuv); finally bind. Any failure closes the fd and reports errno. +- **R9.9** Connect/disconnect (udp.c:125-131 → bsd.c:1558-1610): + `bsd_connect_udp_socket` getaddrinfo's host:port (returning the gai error + as-is if nonzero) and connect()s the first address that succeeds (−1 if + none). `bsd_disconnect_udp_socket` connects to AF_UNSPEC, treating + EAFNOSUPPORT/WSAEAFNOSUPPORT as success. NOTE: `u->connected` bit is + declared but never written by the core. Option setters (broadcast, TTLs, + multicast loopback/interface/membership/source-specific, udp.c:113-147) + are direct pass-throughs to §R8.14 helpers. + +--- + +## 10. WAKEUP / DEFER + +- **R10.1** `us_wakeup_loop(loop)` (loop.c:160-165), callable from ANY + thread: on epoll/kqueue, `atomic_fetch_add(&loop->pending_wakeups, 1, +RELEASE)` FIRST, then `us_internal_async_wakeup(loop->data.wakeup_async)`. + On libuv, just uv_async_send (no pending_wakeups field is consumed there). +- **R10.2** Coalescing/GC-safepoint interplay: `pending_wakeups` is swapped + to 0 with ACQUIRE at the top of every bun tick (R1.10.5). Any nonzero + value (however many wakeups coalesced) makes `will_idle` false, which (a) + skips `Bun__JSC_onBeforeWait` (the GC safepoint must not run when a + cross-thread task is already waiting) and (b) on kqueue forces + KEVENT_FLAG_IMMEDIATE. The wakeup async ALSO fires as a ready poll, whose + CALLBACK dispatch invokes the loop's `wakeup_cb` (R1.4/R2.12) — the + counter is an optimization layered on top, not a replacement for the + async. Consumers: `src/jsc/event_loop.rs` `wakeup()` → + `us_wakeup_loop` (src/uws_sys/Loop.rs:239,461). +- **R10.3** The wakeup async is created with `fallthrough = 1` (does not + count toward num_polls → does not keep the loop alive; loop.c:136). +- **R10.4** Async backend implementations (all satisfy: N wakeup() calls + from any threads → ≥1 callback invocation on the loop thread; callback + receives the LOOP pointer since `cb_expects_the_loop = 1`): + - **Linux** (epoll_kqueue.c:608-668): eventfd(EFD_NONBLOCK|EFD_CLOEXEC), + PANIC (`BUN_PANIC`) if eventfd fails. Registered EPOLLIN, then upgraded + to EPOLLIN|EPOLLET; `leave_poll_ready = 1` so dispatch never reads the + eventfd (edge-triggered = self-clearing for our purposes). wakeup = + write(8-byte 1), on EAGAIN (counter overflow) drain via read and retry. + - **macOS** (epoll_kqueue.c:669-803): EVFILT_MACHPORT with + MACH_RCV_MSG|MACH_RCV_OVERWRITE into a 1024-byte buffer; port queue + limit 1 (qlimit 1) so sends coalesce; wakeup = non-blocking mach_msg + send where TIMED_OUT/NO_BUFFER count as success (port full = already + pending). `us_internal_async_set` aborts on registration failure. + Close: EV_DELETE, deallocate port, free buffer, `us_poll_free`. + - **FreeBSD** (epoll_kqueue.c:805-860): EVFILT_USER, EV_ADD|EV_ENABLE| + EV_CLEAR; wakeup submits NOTE_TRIGGER with NO eventlist (an eventlist + could consume the wakeup on the posting thread, comment + epoll_kqueue.c:856-858). + - **libuv** (libuv.c:325-366): uv_async, unreffed; async_cb passes + `cb->loop`. +- **R10.5** There is NO `us_loop_defer`/`defer_callback` in this fork — the + upstream deferring mechanism was removed. Cross-thread deferral is built + in Bun on top of `us_wakeup_loop` + the wakeup_cb (which drains Bun's own + concurrent task queue). The only C-side deferred queues are dns_ready + (R6.5) and the three closed lists (R1.15). The implementation MUST NOT invent + one. +- **R10.6** `us_internal_dns_callback[_threadsafe]` locking uses + `Bun__lock/Bun__unlock` on `loop->data.mutex` (a Zig-implemented mutex + whose size is ABI-checked at loop init, R1.4). All other loop state is + loop-thread-only; `pending_wakeups` and the fault-inject `us_fault_armed` + flag are the only atomics. + +--- + +## 11. FAULT INJECTION (fault_inject.c, internal/fault_inject.h) + +- **R11.1** Compiled only under `LIBUS_SOCKET_FAULT_INJECTION`; otherwise + `US_FAULT_CHECK(...)` is the constant 0 (fault_inject.h:95-98). In Rust + this becomes `#[cfg(feature = "fault-injection")]`. +- **R11.2** Hook points (all in bsd.c, before the real syscall): + `US_FAULT_RECV` in bsd_recv (bsd.c:850-851), `US_FAULT_SEND` in bsd_send + (bsd.c:957-958), `US_FAULT_WRITEV` in BOTH bsd_writev and bsd_write2 + (bsd.c:895-896, 913-914), `US_FAULT_SENDMSG` in bsd_sendmsg + (bsd.c:990-991), `US_FAULT_RECVMSG` in bsd_recvmsg (bsd.c:876-877), + `US_FAULT_CONNECT` in bsd_do_connect_raw (bsd.c:1645-1646 — on fire the + function returns `errno` as the connect error), `US_FAULT_ACCEPT` in + bsd_accept_socket (bsd.c:793-794 — fire → return LIBUS_SOCKET_ERROR). + `US_FAULT_SOCKET/CLOSE/SHUTDOWN` are reserved (no hooks); + `US_FAULT_SSL_LOOP_BUFFER` simulates the one-shot TLS loop-buffer + allocation failure (hook lives in crypto/openssl.c, ERRNO action only). +- **R11.3** Rule = `{action, errno_value, clamp_bytes, after_n_calls, +repeat (−1 = forever), target_fd (−1 = any)}` (fault_inject.h:61-71). + Actions: ERRNO → return −1 with errno (and WSASetLastError on Windows); + ZERO → return 0 (recv: peer closed; send: backpressure); SHORT → clamp + the length lvalue in place and let the real syscall run + (fault_inject.c:94-112). +- **R11.4** State: one slot per syscall, process-global (rules armed on the + JS thread must affect the HTTP/worker threads; per-socket isolation via + target_fd — fault_inject.c:17-20). Guarded by `us_fault_lock` + (zig_mutex_t); the hot path is a single acquire-load of `us_fault_armed` + (recomputed with release-store whenever any rule is non-NONE) + (fault_inject.c:26-40, macro fault_inject.h:91-93). +- **R11.5** Firing semantics (fault_inject.c:71-113): under the lock, + snapshot the rule; if action != NONE and fd matches: `calls_seen++`; fire + only once `calls_seen > after_n_calls` (i.e. skip the first N matching + calls); `fired++`; when `repeat >= 0 && fired > repeat` the rule disarms + itself instead of firing. The action switch runs OUTSIDE the lock on the + snapshot. API: `us_fault_set(sc, rule)` (resets counters), + `us_fault_clear(sc)`, `us_fault_clear_all()`. + +--- + +## 12. EXTERN HOOKS INTO BUN (become direct Rust calls) + +All are declared in internal.h / at use sites; the Rust implementation calls the +same symbols (or their Rust homes) directly: + +- **R12.1** `Bun__panic(msg, len)` — noreturn; via `BUN_PANIC(lit)` macro + (internal.h:71-72). Core call sites: mutex-size mismatch (loop.c:140, + ASSERT_ENABLED only) and eventfd failure (epoll_kqueue.c:617). +- **R12.2** `Bun__outOfMemory()` — noreturn (internal.h:76). Call site: + recv_buf/send_buf malloc failure (loop.c:133). Additionally + `us_malloc/us_calloc` are plain malloc/calloc by default + (libusockets.h:19-33) but in the Bun build map to mimalloc which aborts + on OOM — allocations in this library are otherwise unchecked (comment + context.c:607-610). +- **R12.3** `Bun__lock/Bun__unlock(zig_mutex_t*)` (internal.h:107-108) — used + for `loop->data.mutex` (dns_ready list) and the fault-inject lock. + `Bun__lock__size` ABI check (loop.c:44,138-142). +- **R12.4** DNS bridge: `Bun__addrinfo_get / _set / _cancel / _freeRequest / +_getRequestResult` (internal.h:140-144) — contract in R6.5. The result + shape is `struct addrinfo_result { addrinfo_result_entry *entries; int +error }` where each entry embeds an `addrinfo` + `sockaddr_storage` + (internal.h:110-118); entries are chained via `info.ai_next`. +- **R12.5** Dispatch layer: `us_dispatch_open/data/fd/writable/close/timeout/ +long_timeout/end/connect_error/connecting_error/handshake/session/keylog/ +ssl_raw_tap` (internal.h:120-138) — implemented in + `src/runtime/socket/uws_dispatch.rs`; switches on `s->kind`, falling back + to `s->group->vtable` for C++ (uWS) kinds. loop.c NEVER reads the vtable + directly. +- **R12.6** `Bun__internal_dispatch_ready_poll(loop, tagged_poll)` + (epoll_kqueue.c:24) — routes tagged (bits 48-63 set) ready-poll pointers + to Bun's FilePoll machinery. +- **R12.7** `Bun__JSC_onBeforeWait(jsc_vm)` (epoll_kqueue.c:357) — GC + safepoint before an idle-capable poll (R1.10.7). +- **R12.8** `Bun__isEpollPwait2SupportedOnLinuxKernel()` (epoll_kqueue.c:152) + and `sys_epoll_pwait2` (raw syscall shim, epoll_kqueue.c:119-120, lives in + src/platform). +- **R12.9** `Bun__internal_ensureDateHeaderTimerIsEnabled(loop)` (loop.c:47) + — called when the sweep refcount goes 0→1 (R5.5). +- **R12.10** `Bun__doesMacOSVersionSupportSendRecvMsgX()` (bsd.c:64) — gates + sendmsg_x/recvmsg_x. +- **R12.11** TLS boundary (crypto/openssl.c, out of scope but the symbols + the core links against): `us_internal_ssl_{attach, detach, close, on_open, +on_data, on_writable, on_close, on_end, shutdown, write, is_low_prio, +is_shut_down, is_handshake_finished, handshake_callback_has_fired, +get_native_handle, verify_error, socket_relocated, ctx_up_ref, ctx_unref}` + and `us_internal_listen_socket_ssl_free` (internal.h:162-234). +- **R12.12** QUIC boundary: `us_quic_loop_process(loop)` under + LIBUS_USE_QUIC (loop.c:401-413) plus `quic_next_tick_us` folding + (R1.10.3). + +--- + +## Documented C-parity quirks (OQ-1 … OQ-16) + +The replaced C implementation contained the following apparent bugs. Each is +preserved deliberately as a documented quirk (callers already compensate), +except where an entry states an explicit fix. + +- **OQ-1: `us_udp_socket_send` batching arithmetic is broken** + (udp.c:54-70). `num` is decremented by `count` per batch, yet both the + loop condition (`total_sent < num`) and the partial-send re-arm test + (`sent < num`) compare against the _post-decrement remaining_ count. + Observable consequences: (a) a partial send within the FINAL batch never + arms writable (`sent < 0` is false when num reached 0) — the drain + callback for the common single-batch case is never scheduled by this + function; (b) a fully-sent batch with more batches remaining SPURIOUSLY + arms writable; (c) the loop exits once `total_sent >= remaining`, which + can strand later batches unsent while still returning a short count. + Callers see the short return and handle retry themselves, which is why + this is latent. The arithmetic is preserved + bit-for-bit: callers see the short return and retry. +- **OQ-2: `us_socket_write` / `raw_write*` / `write2` / `ipc_write_fd` + re-arm READABLE on paused sockets.** They all issue `us_poll_change(R|W)` + as an absolute set on short write (socket.c:406,478,503,514,531,550,587), + which silently un-pauses the readable side of a socket paused via + `us_socket_pause`. `is_paused` remains 1, so `us_socket_resume` becomes a + no-op for the R bit it thinks it's restoring. Whether upper layers depend + on this accidental resume is unknown. +- **OQ-3: `us_socket_write2` does not set `flags.last_write_failed`** + (socket.c:399-410), unlike every other write. After a partial write2, the + next writable dispatch sees `last_write_failed == 0` and immediately + disarms W (loop.c:576-577) — the on_writable callback still fires once, + so callers that retry from on_writable are fine, but the "keep W armed + until drained" invariant differs from us_socket_write. Intentional or + oversight? +- **OQ-4: `us_poll_resize` on epoll with zero events leaves a stale kernel + data.ptr.** epoll_kqueue.c:499-502 strips polling bits then calls + `us_poll_change(new_p, loop, events)`; if `events == 0`, poll_change + no-ops (old==new==0) and no EPOLL_CTL_MOD updates `data.ptr` to `new_p`. + A subsequent EPOLLHUP/EPOLLERR (always delivered) would surface the OLD + (freed-after-adopt) pointer. Reachable only by adopting+resizing a socket + that polls for nothing (fully paused half-open). kqueue re-registers both + filters unconditionally and doesn't have this hole. Structurally fixed here: + dispatch validates the slot generation, so a stale kernel pointer resolves + to a dead slot and the event is dropped. +- **OQ-5: `us_connecting_socket_t` timeouts never fire during DNS + resolution.** The sweep only walks `head_sockets`; + `head_connecting_sockets` is never swept, so `c->timeout` is only a + template copied onto attempt sockets (context.c:688). A hostname whose + resolution hangs is bounded only by the resolver, not by + `us_connecting_socket_timeout`. This is the intended contract: the resolver bounds the DNS phase. +- **OQ-6: low-prio parking `break`s out of the whole dispatch case** + (loop.c:611,632), discarding a simultaneous eof/error flag for that + event. The socket is re-dispatched later from the queue with fabricated + `(0, 0, R)`-style events only via poll re-arm, so a coincident EOF is + re-learned from recv() returning 0 — behavior is preserved end-to-end and + the implementation must not "helpfully" handle eof before parking. +- **OQ-7: adopt of a happy-eyeballs attempt assumes it is + `connecting_head`.** context.c:307 sets `c->connecting_head = new_s` + unconditionally; if the adopted attempt were not the list head, the other + attempts would be dropped from the list (and the old head leaked from + c's perspective). Current Bun callers only adopt after promotion + (connect_state == NULL), so the branch may be dead in practice. +- **OQ-8: `us_internal_bind_and_listen` writes `*error = LIBUS_ERR` even on + success** (bsd.c:1039), i.e. `*error` may hold a stale errno from an + unrelated earlier syscall when listen succeeds. Callers only read it on + failure; the out-param is defined as failure-only. +- **OQ-9: `bsd_would_block` ignores EAGAIN** (bsd.c:1009 — `|| errno == +EAGAIN` commented out). Identical to EWOULDBLOCK on Linux/macOS/FreeBSD/ + Windows targets Bun supports, so no observable difference today; the + literal check is preserved. +- **OQ-10: SEMI_SOCKET skip test in close_raw uses a bitmask, not + equality** (socket.c:317: `!(poll_type & POLL_TYPE_SEMI_SOCKET)`). Since + SEMI_SOCKET == 2 and the other socket kinds are 0/1, this is equivalent + today, but UDP (4) and CALLBACK (3=0b011!) would also test true for bit + 2... CALLBACK (3) has bit 1 set (0b11): `3 & 2 = 2` → a CALLBACK poll + would be treated as SEMI_SOCKET here. close_raw is never called on + CALLBACK polls, so latent-only. Implemented as `kind == SEMI_SOCKET` (equality). +- **OQ-11: `us_socket_write` on fatal errors polls writable forever.** By + design (R4.1) fatal send errors look like would-block until the error + event arrives; on kqueue the EVFILT_WRITE re-add generally reports + EV_EOF/EV_ERROR promptly, on epoll EPOLLERR is level-triggered. This is + the pre-fc865b39 behavior retained for plain `us_socket_write`; only + `write_check_error` opts out. Preserve exactly. +- **OQ-12: `us_get_remote_address_info` / `us_get_local_address_info` never + write `dest`/`is_ipv6`** (socket.c:651-689) despite the signature. + Callers must already derive family from the returned length. Preserve + (don't start writing the out-params — callers may pass garbage pointers). +- **OQ-13: num_polls accounting asymmetry.** `us_create_poll(fallthrough=1)` + skips the increment but `us_poll_free` always decrements + (epoll_kqueue.c:63-74). The wakeup async is created fallthrough and freed + through `us_internal_async_close` → `us_poll_free`, so a loop's num_polls + can go negative at teardown (harmless there, but the invariant + "num_polls == live non-fallthrough polls" is not strictly maintained). + On macOS/FreeBSD the async is `us_calloc`'d directly (not via + us_create_poll) yet still honors `fallthrough` for the increment + (epoll_kqueue.c:683-685, 815-817) and frees via us_poll_free — same + asymmetry. The exact arithmetic is preserved, not the ideal. +- **OQ-14: DNS keep-alive uses `num_polls++` on POSIX** + (context.c:625-629) — a pending resolution keeps `us_loop_run` alive by + faking a poll. `us_loop_run_bun_tick`'s `num_polls == 0` early-return + interacts with this too. The loop reproduces this counter + semantics rather than a separate pending count. +- **OQ-15: `us_socket_group_connect`'s header comment names the out-param + `is_connecting`** (libusockets.h:378-386) with the opposite polarity of + the implementation's `has_dns_resolved` (context.c:570): the value is 1 + when a real `us_socket_t*` is returned. The implementation is the truth; + fix the doc, not the behavior. +- **OQ-16: libuv sweep refcount never actually disables the sweep** — see + R5.5: `us_internal_disable_sweep_timer`'s `us_timer_set(noop, 0, 0)` is + swallowed by the sweep-timer one-shot guard in libuv.c:300-305, so + `sweep_timer_count` reaching 0 has no effect on Windows. Harmless (empty + sweep, unreffed timer) but the POSIX and libuv backends genuinely differ. diff --git a/src/usockets/docs/tls.md b/src/usockets/docs/tls.md new file mode 100644 index 000000000000..f1d88871a2de --- /dev/null +++ b/src/usockets/docs/tls.md @@ -0,0 +1,1040 @@ +# bun_usockets TLS layer semantics + +Part 1 specifies the behavioral contract preserved from the replaced C TLS +layer (`packages/bun-usockets/src/crypto/`); Part 2 records the BoringSSL +bindings approach (bssl-sys) and its rationale. + +All file:line citations refer to the replaced C sources +(`packages/bun-usockets/src/crypto/openssl.c` @ 2572 lines unless another file is named). +Abbreviations: `openssl.c` = `packages/bun-usockets/src/crypto/openssl.c`, +`internal.h` = `packages/bun-usockets/src/internal/internal.h`, +`libusockets.h` = `packages/bun-usockets/src/libusockets.h`. + +--- + +# PART 1 — Behavioral spec (normative) + +## 1. Data flow, BIO plumbing, re-entrancy + +### 1.1 Object model + +- **MUST**: there is no per-socket SSL wrapper struct. `s->ssl` IS the `SSL*` + (`openssl.c:121-126`, macro `s_ssl(s)`), and all per-socket TLS state bits live in + `us_socket_t` bitfields (`internal.h:269-295`): + `ssl_handshake_state:2`, `ssl_write_wants_read:1`, `ssl_read_wants_write:1`, + `ssl_fatal_error:1`, `ssl_is_server:1`, `ssl_raw_tap:1`, `ssl_shutdown_after_spill:1`, + `ssl_close_after_spill:1`, `ssl_in_use:1`, `ssl_pending_detach:1`, and a full byte + `ssl_pending_close_code`. The Rust implementation MUST preserve equivalents of every one of these. +- **MUST**: `SSL_CTX` is owned externally (SecureContext / listener / HTTPContext); openssl.c + only borrows it. `SSL_new(ctx)` takes its own internal ref so a socket outlives its + SecureContext with no extra bookkeeping (`openssl.c:1259-1267`, + `us_internal_ssl_ctx_up_ref/unref` are just `SSL_CTX_up_ref/free`). +- Loop dispatch shape: `loop.c` readable → `s->ssl ? us_internal_ssl_on_data : us_dispatch_data` + (`openssl.c:52-64` header comment; `loop.c:685`); same split for writable (`loop.c:565`), + open, close, end. The `us_dispatch_*` functions are Rust exports + (`src/runtime/socket/uws_dispatch.rs:150-173`) that switch on socket kind and call typed + Rust handlers — this is the callback surface the implementation plugs into. + +### 1.2 Per-loop shared state (`struct loop_ssl_data`, openssl.c:71-113) + +One instance per `us_loop_t`, created lazily in `us_internal_init_loop_ssl_data` +(`openssl.c:690-714`), freed in `us_internal_free_loop_ssl_data` (`openssl.c:716-730`, +which MUST null `loop->data.ssl_data` after freeing). Contents: + +- `ssl_read_input` / `ssl_read_input_length` / `ssl_read_input_offset`: a **borrowed window + over the caller's ciphertext buffer** (the loop's recv buffer, or an upgrade feed). The + read BIO consumes from it (see 1.3). +- `ssl_read_output`: one shared plaintext buffer of + `LIBUS_RECV_BUFFER_LENGTH (524288) + 2*LIBUS_RECV_BUFFER_PADDING (32)` bytes + (`libusockets.h:59,66`; `openssl.c:681-695`). Plaintext is written at offset + `LIBUS_RECV_BUFFER_PADDING`. Allocation failure is a fatal OOM (`Bun__outOfMemory`). +- `ssl_socket`: **the socket currently being processed**. The custom BIO methods have no + per-socket state; they route through this pointer. Every entry point sets it via + `ssl_set_loop_data(s)` (`openssl.c:668-676`), which also zeroes the read window. +- `shared_rbio` / `shared_wbio`: ONE pair of custom BIOs shared by **every SSL on the loop** + (`openssl.c:699-710`). `SSL_set_bio` + `BIO_up_ref` per socket (`openssl.c:1294-1296`) — + the BIOs are refcounted, never per-socket. +- `ssl_last_fatal_error[256]` + `ssl_last_fatal_error_owner`: parked fatal-reason scratch + (see §3.4). `US_SSL_FATAL_ERROR_REASON_MAX = 256` (`openssl.c:66-69`). +- Write batching + spill slot fields (see §4). + +### 1.3 Custom BIO methods + +Both BIOs use one `BIO_METHOD` (`BIO_meth_new(BIO_TYPE_MEM, "µS BIO")`, `openssl.c:699-704`) +with create/write/read/ctrl hooks; `BIO_set_data` points at the `loop_ssl_data`. + +- **read** (`BIO_s_custom_read`, `openssl.c:648-666`): copies from the + `ssl_read_input` window at `ssl_read_input_offset`; when the window is empty returns −1 + with `BIO_set_retry_read` (→ `SSL_ERROR_WANT_READ`). MUST advance offset/length exactly. +- **write** (`BIO_s_custom_write`, `openssl.c:519-568`), in priority order: + 1. If `ssl_socket->ssl_pending_detach` (a JS callback inside the handshake/read destroyed + the socket): **swallow the bytes and report them written** — this drops BoringSSL's + fatal alert on the floor so the state machine completes its error path without touching + a dying fd (`openssl.c:522-531`). This is the mechanism behind "abort SNI without an + alert" (§2.6). + 2. If `ssl_write_batching`: append the sealed record to the loop's batch buffer (grow ×2 + from 64 KiB; on realloc failure set `ssl_fatal_error` on the socket and still report + written — sequence numbers already advanced, the connection cannot stay coherent, + `openssl.c:536-558`). Report full length so BoringSSL seals the next record instead of + parking a partial one. + 3. Otherwise: `us_socket_raw_write(ssl_socket, …)` directly (`openssl.c:560-567`); 0 bytes + → `BIO_set_retry_write` and −1 (→ `SSL_ERROR_WANT_WRITE`). + `us_socket_raw_write` (`socket.c:537`) NEVER re-enters the SSL layer and deliberately only + gates on fd-closed / FIN-sent — NOT on TLS shutdown — so close_notify can be flushed after + `SSL_shutdown` set SENT_SHUTDOWN (`socket.c:538-547` comment). Partial writes set + `flags.last_write_failed` and arm writable polling. +- **ctrl** (`openssl.c:486-493`): `BIO_CTRL_FLUSH` → 1, everything else → 0. + +### 1.4 Re-entrancy protocol (`us_internal_ssl_loop_state_save/restore`) + +Because the routing state is loop-global, **any JS callback that runs from inside +`SSL_do_handshake`/`SSL_read`** (SNI resolver, ALPN cb, handshake dispatch, data dispatch, +session/keylog dispatch) can write to or destroy a _different_ TLS socket on the same loop, +which repoints `ssl_socket` and clobbers the read window. Rules: + +- **MUST** save `{ssl_socket, ssl_read_input, ssl_read_input_length, ssl_read_input_offset}` + before such a callback and restore after (`openssl.c:500-517`; exported to Rust — the ALPN + callback in `src/runtime/socket/socket_body.rs` and the SNI dispatcher use it, + `internal.h:432-433`). +- Nesting triggers (exhaustive today): + 1. server SNI resolver call from `us_select_cert_cb` (`openssl.c:2385-2389` explicit + save/restore); + 2. ALPN select callback → JS `ALPNCallback` (Rust side, `socket_body.rs:70-215`); + 3. `ssl_trigger_handshake` fired mid-`SSL_read` (`openssl.c:1949-1966` — manual + save/restore of the read window + re-set `ssl_socket`); + 4. `us_dispatch_data` when the 512 KiB plaintext buffer filled mid-read + (`openssl.c:1971-1988` — same manual save/restore); + 5. session/keylog flushes are deliberately only run when `ssl_read_input_length == 0` + (`openssl.c:1933-1944`) so JS writes can't clobber pending ciphertext. +- **In-use / deferred-destruction protocol**: every `SSL_do_handshake`/`SSL_read` call is + bracketed with `ssl_was_in_use = s->ssl_in_use; s->ssl_in_use = 1; … restore` + (`openssl.c:1696-1699`, `1862-1867`). If a callback destroyed the socket while + `ssl_in_use`, teardown paths (`us_internal_ssl_detach` `openssl.c:1353-1361`, + `us_internal_ssl_close` `openssl.c:1611-1622`) MUST NOT `SSL_free`/re-enter; they set + `ssl_pending_detach = 1` (+ `ssl_pending_close_code`) and return. The driver's epilogue + (`openssl.c:1700-1705`, `1868-1873`) performs the deferred `us_socket_close` when the + outer call unwinds. The BIO-write swallow (§1.3.1) is part of the same protocol. +- After ANY dispatch, callers MUST re-check `ssl_gone(s)` (= closed or `s->ssl == NULL`, + `openssl.c:1523-1527`) before touching the SSL again. This check appears after every + single dispatch in the file; the implementation must be equally paranoid. + +## 2. Handshake + +### 2.1 Attach (client vs server) — `us_internal_ssl_attach` (openssl.c:1271-1345) + +- `SSL_new(ctx)`, shared BIOs attached (`SSL_set_bio` + 2×`BIO_up_ref`). +- **Client** (`openssl.c:1300-1324`): + - `SSL_set_renegotiate_mode(ssl, ssl_renegotiate_explicit)` (bounded renegotiation, + issues #6197/#5363); + - `SSL_set_connect_state`; + - `SSL_set_tlsext_host_name(ssl, sni)` when an SNI name was passed; + - **Verification is per-SSL, never per-CTX**: if `SSL_CTX_get_verify_mode(ctx) == +SSL_VERIFY_NONE` (context built without ca/requestCert), the socket gets + `SSL_set_verify(ssl, SSL_VERIFY_PEER, us_verify_callback)`, and — unless the CTX is + marked as carrying user CAs via the `us_ctx_user_ca_ex_idx` ex_data flag — a per-SSL + trust store: `SSL_set0_verify_cert_store(ssl, us_get_shared_default_ca_store())`. + Rationale (MUST preserve): a SecureContext is mode-neutral (may back both + `tls.connect` and `tls.createServer`); setting VERIFY_PEER on the CTX would make a + server sharing it send CertificateRequest (`openssl.c:1304-1313`, and + `openssl.c:1239-1244`). +- **Server** (`openssl.c:1325-1331`): `SSL_set_accept_state`, + `SSL_set_renegotiate_mode(ssl, ssl_renegotiate_never)` (server reneg = DoS vector), and + the accepting `us_listen_socket_t*` stored in per-SSL ex_data `us_ssl_listener_ex_idx` + (never as CTX-level servername arg — the CTX is shared and can outlive a listener; + storing there is a documented UAF, `openssl.c:147-150`). +- All the `ssl_*` bitfields are reset (`openssl.c:1333-1344`); state starts + `HANDSHAKE_PENDING` (enum `openssl.c:115-119`: PENDING=0, COMPLETED=1, + RENEGOTIATION_PENDING=2). +- Session/keylog opt-in marker: `us_ssl_is_socket_ex_idx` is set to 1 only for + `BUN_SOCKET_KIND_BUN_SOCKET_TLS` sockets (Bun.connect / node:tls) — checked against the + listener's `accept_kind` too because an accepted socket's kind isn't stamped yet at attach + time (`openssl.c:1278-1293`), and re-checked lazily in on_data (`openssl.c:1817-1825`). + Purpose: fetch/Bun.serve/postgres/websockets never pay session serialization. + +### 2.2 Driving the handshake — `ssl_update_handshake` (openssl.c:1671-1738) + +- **MUST** `ERR_clear_error()` first: the per-thread error queue may hold another socket's + leftovers (`openssl.c:1672-1676`). +- No-op unless `s->ssl && ssl_handshake_state == HANDSHAKE_PENDING`. +- If `SSL_is_init_finished` already → fire success (SSL_read can complete the handshake + before this is called; RECEIVED_SHUTDOWN after a completed handshake is a clean close, + NOT a handshake failure — `openssl.c:1679-1688`). +- If socket closed / TLS shut down / RECEIVED_SHUTDOWN while still in init → fire failure. +- Else `SSL_do_handshake` under the `ssl_in_use` bracket; on `ssl_pending_detach` do the + deferred close and return (`openssl.c:1696-1705`). +- After the call, if RECEIVED_SHUTDOWN → `ssl_close(s, 0, NULL)` (`openssl.c:1708-1711`). +- `result <= 0`: + - `SSL_ERROR_PENDING_CERTIFICATE` → async SNI suspension: stay HANDSHAKE_PENDING, no poll + re-arm; `us_socket_sni_resolve()` re-drives later (`openssl.c:1715-1721`). + - WANT_READ/WANT_WRITE → stay pending, set `ssl_write_wants_read = 1` and + `flags.last_write_failed = 1` (arms writable; `openssl.c:1729-1732`). + - anything else: on `SSL_ERROR_SSL`/`SSL_ERROR_SYSCALL` park the fatal reason (§3.4), + then fire failure (`openssl.c:1722-1727`). +- `result == 1` → fire success; then (if still alive) `ssl_write_wants_read = 1` so the + next readable event re-delivers a writable to flush user data buffered pre-handshake + (`openssl.c:1735-1737`). +- **on_open**: `us_internal_ssl_on_open` dispatches user on_open FIRST, then kicks the + handshake immediately ("some peers stall waiting for ClientHello", + `openssl.c:1742-1751`). +- **MUST NOT** call `ssl_update_handshake` before the `SSL_read` loop in on_data: SSL_read + drives the handshake itself, and firing on_handshake first lets JS `write()` → + `ssl_set_loop_data` clobber the BIO window holding piggybacked app data + (`openssl.c:1852-1857`). + +### 2.3 on_handshake firing rules (`ssl_trigger_handshake`, openssl.c:1495-1521) + +Fired **exactly once** per connection (state moves to HANDSHAKE_COMPLETED first, so +re-entry no-ops). Call sites: + +1. `ssl_update_handshake` success/failure paths (above); +2. inside the `SSL_read` loop when the handshake completes _with_ app data in the same + record flight — fired BEFORE delivering data so JS can read ALPN/cert and re-tag the + socket, with full loop-state save/restore around it (`openssl.c:1949-1967`); +3. inside the `SSL_read` loop when the handshake completed but no app data (peer's Finished + arrived alone) — fired immediately rather than deferred to the writable tail-call, + because the low-prio queue (§3.5) can reorder events under fan-out load + (`openssl.c:1918-1930`); +4. `us_internal_ssl_close` on a socket whose handshake never completed → the ECONNRESET + variant (§2.4); +5. renegotiation-policy violation → failure (§2.5). + +Payload: `us_dispatch_handshake(s, success, us_bun_verify_error_t)` +(`internal.h:135`; vtable slot `on_handshake`, `libusockets.h:265`). + +### 2.4 `us_bun_verify_error_t` and rejectUnauthorized (fail-closed split) + +`struct us_bun_verify_error_t { int error; const char* code; const char* reason; }` +(`libusockets.h:246-250`). + +- Normal path: `us_internal_ssl_verify_error(s)` (`openssl.c:1442-1447`) → + `us_ssl_socket_verify_error_from_ssl` (`openssl.c:1432-1440`): + - **Default when no peer cert and no exemption applies:** + `X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT` (`openssl.c:1413-1430`, + `us_internal_verify_peer_certificate`). Exemptions returning `X509_V_OK`: PSK-auth + cipher, or a TLS1.3 resumed session (`openssl.c:1421-1426`). + - With a peer cert: `SSL_get_verify_result(ssl)`. + - `code` = symbolic name from the `us_X509_error_code` table (`openssl.c:1376-1411`, + 28 X509_V_ERR cases, else "UNSPECIFIED"); `reason` = + `X509_verify_cert_error_string`. `error == 0` ⇒ code/reason NULL. +- Special errors: parked-fatal-reason dispatch uses `{error: -71, code: "EPROTO", +reason: }` (`openssl.c:1489-1491`); close-before-established + uses `{error: -46, code: "ECONNRESET", reason: "Client network socket disconnected +before secure TLS connection was established"}` (`openssl.c:1517-1520`). +- **The C layer never fails closed itself.** `us_verify_callback` always returns 1 + (`openssl.c:865-870`) so the handshake never aborts on verification; the verdict is + carried in the verify_error and **the fail-closed decision is made in Rust**: + `resolve_reject_unauthorized` (`src/runtime/socket/SSLConfig.rs:262-271`) — + enforce iff `(!is_server || request_cert) && reject_unauthorized`, defaulting for + clients to `vm.get_tls_reject_unauthorized()` (`NODE_TLS_REJECT_UNAUTHORIZED`). The Rust + `on_handshake` handlers close the socket when enforcement applies and + `verify_error.error != 0`. +- One exception where the handshake DOES abort in-protocol: when the CTX was built with + CAs or `request_cert` AND `reject_unauthorized`, build_raw sets CTX verify mode to + `SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT` (server refuses a client that sends + no cert; `openssl.c:998-1030`). Without reject_unauthorized it's `SSL_VERIFY_PEER` only. + +### 2.5 Renegotiation (client only) + +- Client: `ssl_renegotiate_explicit`; server: `ssl_renegotiate_never` (§2.1). +- `SSL_read` returning `SSL_ERROR_WANT_RENEGOTIATE` → `ssl_renegotiate(s)` + (`openssl.c:1529-1565`, called at `openssl.c:1884-1887`): + - policy from CTX ex_data `us_ctx_ex_idx`, packed `{limit:u32, window:u32}` in the + pointer value itself (`openssl.c:187-189`, `446-451`); defaults **3 per 600 s** + (Node's CLIENT_RENEG_LIMIT/WINDOW). Set from options + `client_renegotiation_limit/window` in `us_ssl_ctx_from_options` + (`openssl.c:1250-1254`). `limit==0` disables renegotiation; `window==0` = counter + never resets. + - per-connection counter mallocs lazily into SSL ex_data `us_ssl_reneg_state_idx` + (`openssl.c:453-461`); window reset only when wall-clock moved forward (NTP-step + guard, `openssl.c:1545-1554`). + - state → `HANDSHAKE_RENEGOTIATION_PENDING`; over-limit or `SSL_renegotiate` failure + ⇒ `ssl_trigger_handshake(s, 0)` and the caller treats it as `SSL_ERROR_SSL` (close). + - NOTE: after a successful `SSL_renegotiate` the read loop `continue`s; the + on_handshake for the renegotiated handshake fires again because state left + HANDSHAKE_COMPLETED (this is how node's `secureConnect`-after-reneg behaves). + +### 2.6 SNI (server) + +Two-callback design on the listener's default `SSL_CTX`: + +- **Early select-certificate callback** `us_select_cert_cb` + (`SSL_CTX_set_select_certificate_cb`, registered only when a dynamic JS resolver exists — + `us_listen_socket_on_server_name`, `openssl.c:2515-2526`). Flow (`openssl.c:2317-2425`): + 1. Consume a previously suspended resolution: state 2 (resolved) → `SSL_set_SSL_CTX` + with the resolved ctx and free the carried ref; resolved-to-NULL falls through to the + static tree exactly like a sync `cb(null,null)` (`openssl.c:2322-2352`). State 3 + (error) → `ssl_select_cert_error`. State 1 (still waiting, spurious re-drive) → + `ssl_select_cert_retry`. + 2. First call: read servername by **raw ClientHello parse** of the server_name extension + (`us_client_hello_servername`, `openssl.c:2284-2310`, hostname cap 256 incl. NUL) — + NOT `SSL_get_servername`, because only the early-callback contract guarantees the raw + hello. No SNI extension → success (default ctx). + 3. **Dynamic resolver runs FIRST** (Node: a user SNICallback replaces default SNI + handling entirely, including for the bind hostname which Listener.rs always puts in + the static tree — tree-first would shadow the callback; `openssl.c:2371-2378`). The + call is wrapped in loop-state save/restore; the resume handle (current + `ssl_socket`) is passed to JS (`openssl.c:2380-2389`). + 4. Resolver outcomes: `abort==1` → mark `ssl_pending_detach` on the socket (drop the + connection **without a TLS alert** — the BIO swallows the handshake_failure alert; + matches Node's SNICallback-error behavior) and return `ssl_select_cert_error` + (`openssl.c:2391-2400`); `abort==2` (async pending) → alloc/set + `us_ssl_sni_pending_t{state:1}` in SSL ex_data, return `ssl_select_cert_retry` → + `SSL_ERROR_PENDING_CERTIFICATE` (`openssl.c:2401-2411`); non-NULL ctx → owned ref: + `SSL_set_SSL_CTX(ssl, dyn); SSL_CTX_free(dyn)` (`openssl.c:2412-2416`); NULL → fall + back to the static SNI tree (`openssl.c:2418-2424`). +- **servername-stage callback** `sni_cb` (`SSL_CTX_set_tlsext_servername_callback`, + registered when the first server name is added — `us_listen_socket_add_server_name`, + `openssl.c:2456-2485`). Static-tree-only path (`openssl.c:2427-2454`): looks up + `SSL_get_servername` in `ls->sni`; **no-ops when a dynamic resolver exists** (the early + cb already ran resolver + fallback; running the tree again would overwrite the + per-connection selection). Returns `SSL_TLSEXT_ERR_OK` always (NOACK when idx + unregistered). +- **Resume** `us_socket_sni_resolve(s, ctx, error)` (`openssl.c:2186-2219`): no-op (freeing + the passed ref) when the socket died or wasn't suspended; `error!=0` → state 3 + + `ssl_pending_detach` (alert-free drop); else state 2 + stash ctx; then + `ssl_set_loop_data` + `ssl_update_handshake` re-drives, and `us_select_cert_cb` re-fires + and consumes the state. +- **SNI tree** (`sni_tree.cpp`, see §7.5): nodes hold `struct sni_node_t {SSL_CTX* ctx +(upref'd); void* user}` (`openssl.c:128-132`); destructor frees both + (`openssl.c:2266-2271`). `us_listen_socket_add_server_name` also stashes `user` in CTX + ex_data `us_sni_ex_idx` so per-socket lookup works via `SSL_get_SSL_CTX` regardless of + which ctx SNI selected (`openssl.c:2473-2476`; consumed by + `us_socket_server_name_userdata`, `openssl.c:2528-2531`). Duplicate hostname → returns 1 + so App.h rolls back (`openssl.c:2478-2483`). + `us_listen_socket_find_server_name_ctx` returns an **owned** ref (up_ref before return, + `openssl.c:2501-2513`). +- **Listener teardown** `us_internal_listen_socket_ssl_free` (`openssl.c:2537-2570`): + accepted sockets can outlive the listener (Node `server.close()` keeps connections), so + the per-SSL listener backref MUST be wiped on every accepted socket — including the ones + **parked on the loop's low-prio queue** (mid-handshake sockets are unlinked from + `head_sockets`; missing them is a UAF in sni_cb). Then unref `ls->ssl_ctx`, free the SNI + tree with the node destructor. + +### 2.7 Sessions, tickets, keylog + +- CTX config (`openssl.c:1077-1086`): session cache mode `CLIENT|SERVER|NO_INTERNAL| +NO_AUTO_CLEAR` + `SSL_CTX_sess_set_new_cb(us_ssl_new_session_cb)` + + `SSL_CTX_set_keylog_callback(us_ssl_keylog_cb)`. Rationale: for TLS 1.3 the resumable + session only exists when the peer's NewSessionTicket arrives, and BoringSSL only exposes + it via the new-session callback; NO_INTERNAL stops BoringSSL double-caching. +- **Parking protocol** (MUST preserve): both callbacks fire from _inside_ + `SSL_read`/`SSL_do_handshake`, where dispatching JS could free the SSL under the caller. + So they only serialize and park on SSL ex_data queues + (`us_ssl_pending_session_idx` / `us_ssl_pending_keylog_idx`), append-order preserved + (`openssl.c:226-337`). Caps: session i2d ≤ 65536 bytes, keylog line ≤ 4096 (+ appended + `\n`, Node-style) — oversize entries dropped at the parking site (`openssl.c:233-236`). + Only SSLs with the `us_ssl_is_socket_ex_idx` marker park anything (`openssl.c:259-261`, + `304-312`). +- **Flush points** (each guarded by `!closed && s->ssl`, each may run JS → + re-check `ssl_gone` after): before delivering decrypted data (`openssl.c:1933-1944`), + before ZERO_RETURN close (`openssl.c:1888-1896`, "ticket rode ahead of close_notify — + wire order"), when the 512 KiB buffer cycles (`openssl.c:1975-1980`), and after the read + loop fully unwinds (`openssl.c:2003-2007`). Delivery via `us_dispatch_session` / + `us_dispatch_keylog` (`uws_dispatch.rs:234-279`, only `BunSocketTls` kind consumes). +- **Non-us_socket consumers** (SSLWrapper for TLS-over-duplex/named pipes): opt in via + `us_ssl_enable_pending_events(ssl)` (`openssl.c:402-410`) and drain with + `us_ssl_pop_pending_session/keylog` (`openssl.c:412-439`) after their reads unwind. +- Undelivered entries are freed with the SSL by the ex_data free funcs + (`openssl.c:243-252`, `377-378`). +- **Ticket flush on write-less end** (MUST): BoringSSL defers post-handshake writes + (TLS 1.3 NewSessionTickets) until the first SSL_write/SSL_shutdown. A server doing + `s.end()` without writing takes the FIN path (no close_notify), so + `us_internal_ssl_shutdown` explicitly does `SSL_write(ssl, &zero, 0)` to push the + tickets through the BIO before the FIN (`openssl.c:2145-2159`). +- Client session **reuse** (`SSL_set_session`) is done from Rust via the native handle + (`us_internal_ssl_get_native_handle`, `openssl.c:2038-2040`), not in this file. + +### 2.8 ALPN + +ALPN is configured **entirely from Rust** via raw BoringSSL calls on the native handles; +openssl.c contains no ALPN code (only quic.c does for lsquic): + +- client: `SSL_set_alpn_protos` on the per-socket SSL + (`src/runtime/socket/socket_body.rs:1435`, `src/http/lib.rs:1134`); +- server: `SSL_CTX_set_alpn_select_cb(ctx, select_alpn_callback)` registered on the + listener CTX when static ALPNProtocols or a JS ALPNCallback exists + (`socket_body.rs:1398-1420`); the callback handles dynamic per-connection ALPN (Node + ALPNCallback contract) and falls back to the static list (`socket_body.rs:70-215`); +- read-back: `SSL_get0_alpn_selected` (`src/runtime/socket/tls_socket_functions.rs:1085-1102`). + An implementation that keeps the Rust side intact only needs to keep exposing the `SSL*` + (or equivalent hooks) — but note the ALPN callback runs inside the handshake and is a §1.4 + nesting trigger. + +## 3. Read path + +`us_internal_ssl_on_data(s, data, length)` (`openssl.c:1812-2011`): + +1. `ERR_clear_error()` (per-thread queue hygiene, `openssl.c:1813-1816`). +2. Lazy `us_ssl_is_socket_ex_idx` marker for accepted node:tls sockets (§2.1). +3. **Raw tap**: if `ssl_raw_tap && length > 0`, dispatch the ciphertext to + `us_dispatch_ssl_raw_tap` BEFORE decryption (upgradeTLS `[raw, tls]` pair, §6.1); bail + if the dispatch closed/detached (`openssl.c:1826-1831`). +4. `ssl_set_loop_data(s)`; point the read window at `data/length`. +5. Guards: closed → NULL; `!s->ssl || ssl_fatal_error` → `ssl_close(s,0,NULL)`. + **A half-closed socket still reads** — neither SENT_SHUTDOWN nor a sent FIN skips the + read loop (peer data may precede its close_notify; normal for TLS1.2 write()+end() + servers) (`openssl.c:1838-1850`). +6. **SSL_read loop** into `ssl_read_output + PADDING`, accumulating `read` up to + `LIBUS_RECV_BUFFER_LENGTH` (512 KiB), each call under the `ssl_in_use` bracket with the + `ssl_pending_detach` epilogue (`openssl.c:1860-1873`). + - `just_read > 0` while state != COMPLETED → fire on_handshake(1) mid-loop with + save/restore (§2.3.2). + - Buffer full → flush sessions/keylog, `us_dispatch_data(s, out+PADDING, read)`, + restore window, `read = 0`, `goto restart` (`openssl.c:1971-1989`). + - `just_read <= 0` → `SSL_get_error`: - `WANT_READ` / `WANT_WRITE` / `PENDING_CERTIFICATE`: + `WANT_WRITE` sets `ssl_read_wants_write = 1`; **leftover ciphertext in the window + here means broken TLS framing → `ssl_close`** (`openssl.c:1911-1918`); fire + "Finished-alone" handshake if applicable (§2.3.3); if `read > 0`, flush parked + sessions/keylog THEN dispatch the plaintext (order is normative — Node's + NewSessionCallback precedes data; and the data dispatch may close the socket, + dropping a deferred flush) (`openssl.c:1931-1947`); break. - `WANT_RENEGOTIATE` → §2.5; on policy failure treated as `SSL_ERROR_SSL`. - `ZERO_RETURN` (peer close_notify): flush sessions/keylog, dispatch any decrypted + `read` bytes, then `ssl_close(s, 0, NULL)` → clean close (`openssl.c:1888-1903`). - `SSL_ERROR_SSL` / `SSL_ERROR_SYSCALL`: park fatal reason (§3.4), `ssl_close(s,0, +NULL)`, clear the scratch (`openssl.c:1905-1910`). +7. Post-loop: if `ssl_write_wants_read && !ssl_read_wants_write` → clear flag and re-enter + `us_internal_ssl_on_writable(s)` (a prior SSL_write starved for handshake input can + proceed now; the `!ssl_read_wants_write` guard prevents recursion) + (`openssl.c:1992-2001`). +8. Final session/keylog flush (`openssl.c:2003-2008`). + +### 3.4 Fatal-reason parking (EPROTO reporting) + +- `ssl_park_fatal_reason(s)` (`openssl.c:1451-1469`): on `SSL_ERROR_SSL`/`SYSCALL`, + format `ERR_peek_last_error()` via `ERR_error_string_n` into the per-loop 256-byte + scratch **only while the handshake is unfinished** (the handshake-failure dispatch is + the sole consumer), tag the owner socket, then `ERR_clear_error()` and set + `ssl_fatal_error = 1`. +- Consumed by `ssl_dispatch_parked_reason` (`openssl.c:1478-1493`): copies to stack, + clears the scratch BEFORE running JS, dispatches `{-71, "EPROTO", reason}`. Owner check + is mandatory (server+client share a loop; a reason parked by one socket must never be + reported for another, `openssl.c:89-92`). Detach clears an unclaimed parked reason + (`openssl.c:1364-1370`); relocation transfers ownership (§6.3). +- This is how `wrong version number` etc. reach Node's `tlsClientError`. + +### 3.5 Low-prio throttling + +`us_internal_ssl_is_low_prio(s) = SSL_in_init(ssl)` (`openssl.c:2013-2018`): loop.c +deprioritizes mid-handshake sockets (throttled to a few per tick) to keep established +connections responsive. Interacts with event ordering — the reason for §2.3.3's immediate +fire — and with listener teardown (§2.6 low-prio walk). + +## 4. Write path + +`us_internal_ssl_write(s, data, length)` (`openssl.c:2042-2114`). Return value = plaintext +bytes consumed; 0 = caller must buffer and retry on writable. + +1. Guards: closed / TLS-shut-down / length==0 → 0. SEMI_SOCKET (fast-path connect attached + SSL eagerly; on_open hasn't fired, SNI/ALPN not set yet — writing would serialize a + ClientHello without them) → 0, drained later by on_open → update_handshake + (`openssl.c:2045-2053`). +2. **Spill discipline**: if the loop's spill slot holds this socket's ciphertext, try to + drain; if still pending → return 0 (SSL already counts those records written; nothing + new may be sealed) (`openssl.c:2057-2062`). +3. Zero the read window, set `ssl_socket = s`. +4. **Batching**: enabled iff no other socket's spill occupies the slot + (`batching = ssl_spill_owner == NULL`, `openssl.c:2075-2076`). Loop: SSL_write in + ≤16384-byte plaintext chunks (one record each); each sealed record lands in the batch + buffer via the BIO (§1.3.2); every ≥131072 batched bytes → `ssl_flush_write_batch`; + if the wire blocked (spill created) STOP consuming plaintext (`openssl.c:2078-2093`). + Final flush after the loop. **Honesty invariant (MUST)**: bytes reported consumed are + on the wire or in the bounded spill — never unboundedly parked in memory + (`openssl.c:2069-2074`). +5. `ssl_fatal_error` → 0. `total > 0` → total. Else decompose `SSL_get_error`: + `WANT_READ` → `ssl_write_wants_read = 1`; `SSL_ERROR_SSL`/`SYSCALL` → park fatal reason + (a pre-`secureConnect` write is where config failures like impossible version windows + surface) (`openssl.c:2098-2113`). + +### 4.1 Batch flush + spill slot + +- `ssl_flush_write_batch` (`openssl.c:575-598`): one `us_socket_raw_write` of the whole + batch. Partial → malloc a spill copy of the remainder into the loop's **single** spill + slot `{ssl_spill, len, off, owner}`; OOM here → `ssl_fatal_error` (records already + sequenced). Return 1 = wire took all, 0 = spill pending. +- `ssl_drain_spill` (`openssl.c:602-617`): raw-write the remaining slice; frees + clears + the slot when done. Returns 1 when clear or not-ours. +- **Ordering invariants (MUST)**: spilled ciphertext reaches _that_ socket's fd, in order, + before any of its later records; drained from the owner's writable event + (`openssl.c:1776-1791`); while another socket owns the slot, other sockets write + through per-record (pre-batching behavior). Deferred actions after drain: + `ssl_shutdown_after_spill` → `us_internal_ssl_shutdown`, `ssl_close_after_spill` → + `ssl_close(FAST_SHUTDOWN)` (`openssl.c:1783-1791`). +- `ssl_release_spill` on teardown: one last drain attempt, then free (`openssl.c:620-634`); + called from `ssl_detach` (error/RST paths reach detach without ssl_close — + `openssl.c:1348-1352`) and from deferred-close in `ssl_close`. +- There is **no msg_more/cork flag at this layer**; batching-within-one-write is the + coalescing mechanism (comment: node reaches the same shape via memory-BIO + writev, + `openssl.c:94-99`). uWS's cork buffer sits above and simply produces one large + `us_internal_ssl_write` call. +- The writable event (`us_internal_ssl_on_writable`, `openssl.c:1774-1810`): drain spill → + deferred shutdown/close → `ssl_update_handshake` → if `ssl_read_wants_write`, clear it + and re-enter `on_data(s, "", 0)` (lets a blocked decrypt flush) → dispatch user + on_writable only when handshake completed. + +## 5. Shutdown & close + +### 5.1 `us_internal_ssl_shutdown` (graceful half-close; openssl.c:2116-2180) + +- No-op when closed or already TLS-shut-down (`us_internal_ssl_is_shut_down` = + FIN-sent poll type ∨ no ssl ∨ SENT_SHUTDOWN ∨ fatal, `openssl.c:2022-2027`). +- Spill pending → set `ssl_shutdown_after_spill`, return (§4.1). +- **Core Node-compat rule (MUST)**: BoringSSL has no TLS half-close — after SSL_shutdown + sends close_notify, SSL_read refuses further app data (PROTOCOL_IS_SHUTDOWN). Node + (OpenSSL) keeps reading after sending close_notify and node:net/tls semantics depend on + it. Therefore: **send close_notify only when the peer's close_notify already arrived**; + otherwise do a TCP half-close (FIN via `us_internal_socket_raw_shutdown`) and keep + reading — preceded by the zero-length `SSL_write` ticket flush (§2.7) + (`openssl.c:2132-2160`). +- When close_notify IS sent (`SSL_shutdown`): still-in-init or quiet-shutdown → raw FIN; + `ret < 0` with SSL/SYSCALL → clear queue, `ssl_fatal_error = 1`, raw FIN + (`openssl.c:2162-2180`). + +### 5.2 `us_internal_ssl_close(s, code, reason)` (openssl.c:1610-1668) + +- `ssl_in_use` → deferred: release spill, set `ssl_pending_detach` + + `ssl_pending_close_code`, return (§1.4). +- `FAST_SHUTDOWN && !reason` (node `_handle.close()`): must not cut off spilled ciphertext + already reported written — if the spill won't drain now, set `ssl_close_after_spill` + and defer (at most once) (`openssl.c:1623-1633`). +- Release spill. SEMI_SOCKET or `ssl_gone` → straight `us_internal_socket_close_raw` + (firing on_handshake(0) after onConnectError tore down JS state is wrong, + `openssl.c:1634-1640`). +- `ssl_set_loop_data` + `ssl_update_handshake` (drives a final step; may fire handshake). +- Handshake never completed → `ssl_trigger_handshake_econnreset` exactly once (§2.4) + (`openssl.c:1645-1650`). +- **CloseCode semantics** (`openssl.c:1652-1667`): + - `code != 0` (forceful — destroy/abort/fast): `ssl_handle_shutdown(s, force_fast=1)` + best-effort, then raw-close now (the Rust destroy path unrefs immediately after; + deferring would orphan the socket). + - `code == 0` (graceful — `end()`): send close_notify and **defer the fd close until + the peer replies** — `ssl_handle_shutdown(s, 0)` returns 0 after a successful + `SSL_shutdown()==0` (sent, not yet received) and the function returns without + raw-closing; the actual close happens when on_end/ZERO_RETURN re-enters with + SENT_SHUTDOWN set (then `ssl_handle_shutdown` returns 1). +- `ssl_handle_shutdown(s, force_fast)` (`openssl.c:1567-1608`): done when no ssl / + shut down / fatal / init unfinished. Else `SSL_shutdown` (twice when force_fast — + fast-shutdown pattern); `ret<0`: SSL/SYSCALL → fatal+close; WANT_READ/WRITE → + **close now anyway** (the alert never left the BIO; no retry path exists once + SENT_SHUTDOWN is set — documented LSan leak otherwise, `openssl.c:1587-1601`). + +### 5.3 on_end / on_close / detach + +- `us_internal_ssl_on_end` (TCP FIN received): no close_notify reply is coming; send ours + best-effort (`ssl_close(s,0,NULL)`) and raw-close with CLEAN_SHUTDOWN — with native + allowHalfOpen the loop.c caller no longer raw-closes for us (`openssl.c:1761-1772`). +- `us_internal_ssl_on_close`: dispatch user on_close FIRST (JS may still inspect + ALPN/peer cert), then `us_internal_ssl_detach` frees the SSL (`openssl.c:1753-1759`). +- `us_internal_ssl_detach` (`openssl.c:1347-1372`): release spill (error/RST teardowns + come here without ssl_close), honor `ssl_in_use` deferral, `SSL_free`, null `s->ssl`, + clear an unclaimed parked fatal reason owned by `s`. + +## 6. upgradeTLS / adopt / feed / relocation + +### 6.1 `us_socket_adopt_tls` (openssl.c:2236-2256) + the JS upgradeTLS flow + +- Refuses closed sockets. Calls `us_socket_adopt` (group/kind/ext resize), then + `us_internal_ssl_attach(new_s, ctx, is_client, sni, NULL)` (no listener → SNI resolves + from the single ctx for server-side wraps), `us_socket_resume`. +- **MUST NOT** kick the handshake or dispatch on_open inside adopt: the caller hasn't + repointed the ext slot yet — any dispatch would land in the old TCP owner. The caller + sequence (see `src/runtime/socket/socket_body.rs:3480-3627`): stash ext → set kind → + fire its own onOpen → `us_socket_start_tls_handshake(s)` (`openssl.c:2258-2262`: + set_loop_data + update_handshake → sends ClientHello) → `resume()` → feed pre-read bytes. +- The `[raw, tls]` pair contract: index 0 (raw twin) keeps pre-upgrade handlers and + observes **ciphertext** via `us_socket_set_ssl_raw_tap(s, 1)` (`socket.c:88-90`) → + `us_dispatch_ssl_raw_tap` before every SSL_read (§3.3; `uws_dispatch.rs:177-222`); + index 1 sees plaintext. Raw-tap dispatch is skipped for the `length==0` flush call + from on_writable (`openssl.c:1826-1828`). + +### 6.2 `us_socket_tls_feed` (openssl.c:2231-2234) + +Feeds externally-obtained ciphertext (bytes already pulled off the fd pre-upgrade — e.g. a +ClientHello consumed by the plain-TCP layer) through `us_internal_ssl_on_data` exactly as +if from the kernel. Guarded on closed/`!ssl`/`length<=0`. +NOTE: UpgradedDuplex / WindowsNamedPipe do **not** use this — they use the separate Rust +`SSLWrapper` engine (`src/uws/lib.rs:150+`), which owns its own `SSL*` with **memory BIOs** +(`BIO_s_mem` pair, `BIO_write` ciphertext in / `BIO_read` ciphertext out, 64 KiB working +buffer, same reneg policy 3/600s) and only touches openssl.c via +`us_ssl_enable_pending_events` / `us_ssl_pop_pending_*` (§2.7). A unified Rust TlsState +could subsume both engines, but the normative contract above is openssl.c's. + +### 6.3 `us_internal_ssl_socket_relocated` (openssl.c:636-646) + +`us_socket_adopt` may `us_poll_resize`-reallocate the `us_socket_t` when ext size changes +(`context.c:265-303`). The ONLY TLS state that must chase the new address is +**loop-level ownership pointers**: `ssl_spill_owner` and `ssl_last_fatal_error_owner`. +Everything else lives inside the moved struct (bitfields) or hangs off the SSL (ex_data), +which moves by value/pointer. ⇒ For the goal of **eliminating relocation**, the +state that today transfers implicitly by memcpy of `us_socket_t` is: the `SSL*` and the 11 +bitfield bits + close-code byte (§1.1); plus these two loop-level owner pointers. If the +implementation keys loop-level state by stable socket identity (or stores spill per-socket), +relocation support can be dropped entirely. + +## 7. Context/options + +### 7.1 `us_bun_socket_context_options_t` fields and effects + +(Definition `libusockets.h` — see companion notes below; consumed by +`us_ssl_ctx_build_raw`, `openssl.c:893-1088`, and `us_ssl_ctx_from_options`, +`openssl.c:1234-1257`.) Effects, in application order: + +| field | effect | cite | +| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | +| — | `SSL_CTX_new(TLS_method())`; live-counter ex_data registered immediately so every exit balances | 897-901 | +| — | **Required modes**: `SSL_CTX_set_read_ahead(1)`, `SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER` — "changing these breaks the BIO logic" | 903-905 | +| `ssl_min_version`/`ssl_max_version` | `SSL_CTX_set_min/max_proto_version`; **default floor TLS1_2_VERSION** when min unset; max only set when nonzero | 906-911 | +| `ssl_prefer_low_memory_usage` | adds `SSL_MODE_RELEASE_BUFFERS` | 913-915 | +| `passphrase` | strdup'd into `SSL_CTX_set_default_passwd_cb_userdata` + `passphrase_cb` (copies the passphrase, fails if longer than buf, `openssl.c:473-479`); **dropped as soon as key loading finishes** (or on build failure) so `SSL_CTX_free` is sufficient everywhere downstream | 917-924, 876-889, 974-977 | +| `cert`/`key` arrays (`cert_count`/`key_count`) vs `cert_file_name`/`key_file_name` | **Pair-wise interleaved loading** when in-memory arrays with equal counts > 1 (multi-identity RSA+EC; loading all certs then all keys would fail KEY_TYPE_MISMATCH); else certs (file or each mem chain via `us_ssl_ctx_use_certificate_chain`, 812-863: `PEM_read_bio_X509_AUX` leaf + chain certs, trailing NO_START_LINE tolerated) then keys (file or mem PEM/DER via `us_ssl_ctx_use_privatekey_content`, 734-766) | 926-973 | +| `ca_file_name` | `SSL_load_client_CA_file` → `SSL_CTX_set_client_CA_list`; mark `us_ctx_user_ca_ex_idx`; `SSL_CTX_load_verify_locations` **into the fresh empty store** (explicit CA REPLACES default trust — Node semantics); then set verify mode | 979-1001 | +| `ca` array | mark user-CA; add each PEM (may contain multiple certs) to the CTX's own store AND client-CA list via `add_ca_cert_to_ctx_store` (768-810; a PEM doc with zero certs but a `-----BEGIN` block is tolerated Node-style — e.g. a private key passed as ca; non-PEM is an error); verify mode per cert-loop iteration | 1003-1021 | +| `request_cert` (no CAs) | `SSL_CTX_set_cert_store(us_get_shared_default_ca_store())` (process-shared bundled-roots store, refcounted); verify mode | 1022-1031 | +| `reject_unauthorized` | only chooses `SSL_VERIFY_PEER \| SSL_VERIFY_FAIL_IF_NO_PEER_CERT` vs `SSL_VERIFY_PEER` in the three branches above; **no CA/request_cert ⇒ CTX verify mode stays NONE** (client-side verification is per-SSL, §2.1) | 998-1030 | +| `dh_params_file_name` | `PEM_read_DHparams` from file → `SSL_CTX_set_tmp_dh`; then forces `SSL_CTX_set_cipher_list(DEFAULT_CIPHER_LIST)` (default_ciphers.h) | 1033-1057 | +| `ssl_ciphers` | `SSL_CTX_set_cipher_list`; failure → INVALID*CIPHERS **except** the empty-string+NO_CIPHER_MATCH combo which is tolerated; error is \_peeked* not consumed so the Rust caller can decompose the reason | 1059-1071 | +| `secure_options` | `SSL_CTX_set_options(secure_options)` verbatim (Node secureOptions bitmask) | 1073-1075 | +| — | session cache mode + new-session cb + keylog cb (§2.7) | 1077-1086 | +| `client_renegotiation_limit`/`window` | packed into ctx ex_data (§2.5) — applied by `us_ssl_ctx_from_options`, NOT build_raw | 1250-1254 | + +- Error reporting: `enum create_bun_socket_error_t*` out-param + (LOAD_CA_FILE / INVALID_CA_FILE / INVALID_CA / INVALID_CIPHERS); all other failures + return NULL with the reason left on the OpenSSL error queue for the Rust caller. + `ssl_ctx_build_fail` = drop passphrase + `SSL_CTX_free` (`openssl.c:884-889`). +- `us_ssl_ctx_build_raw` is also exported for quic.c (lsquic sets ALPN/transport params + itself, `openssl.c:891-893`). +- **pfx**: `us_ssl_parse_pkcs12` (`openssl.c:1153-1232`) converts a PKCS#12 blob (+pass) + into malloc'd PEM key/cert/ca strings for the normal option path; error tags + "parse"/"mac"/"key"/"cert"; len > INT_MAX rejected (BIO_new_mem_buf int truncation). +- **addCACert** (`us_ssl_ctx_add_ca_cert`, `openssl.c:1090-1132`): clone-on-write — if the + CTX's store IS the process-shared default store, or is still the empty store from + SSL_CTX_new, replace with a fresh **full default store** (`us_get_default_ca_store()`: + bundled roots + NODE_EXTRA_CA_CERTS + system CAs when enabled) before appending; mark + user-CA. Extends (not replaces) default trust, matching Node's SecureContext::AddCACert. +- **ex_data registration** is one-time via pthread_once/INIT_ONCE + (`openssl.c:140-185, 368-395`): SSL_CTX creation races between the JS thread and the + HTTP-client thread; a racy `<0` check would double-register free_funcs and corrupt the + `ssl_ctx_live` counter (`openssl.c:134-138`, counter decremented in the ex_data free + func so it tracks true refcount-zero destruction). `us_ctx_cache_ex_idx`'s free func is + the Rust `bun_ssl_ctx_cache_on_free` (SSLContextCache tombstone, `openssl.c:362-371`). + +### 7.2–7.6 Rust periphery (SSLConfig.asUSockets, SocketContext cache, SecureContext, HTTPContext, sni_tree, root certs) + +See companion findings appended in **Appendix A** (surveyed with citations). Summary of +normative points: + +- `SSLConfig.rs::asUSockets()` populates the options struct 1:1; `reject_unauthorized` + defaults from `NODE_TLS_REJECT_UNAUTHORIZED` via the VM + (`src/runtime/socket/SSLConfig.rs:173-183, 258`); fail-closed rule in + `resolve_reject_unauthorized` (§2.4). +- `src/uws_sys/SocketContext.rs` caches built `SSL_CTX*` keyed by an mtime-digest of + file-based inputs (`stat_for_digest`) + the value-based options; a false cache hit is a + security bug — the implementation must keep every input that shapes the CTX in the key. +- `src/http/HTTPContext.rs` keeps refcounted per-custom-TLS socket contexts on the HTTP + client thread (each distinct SSLConfig gets its own context; the default context is + shared). +- `sni_tree.cpp` (217 lines): label trie `{hostname → void* user}`; a `*` label matches + exactly one label at ANY position, exact match preferred per level; full semantics in + Appendix A §A.5. +- Root certs: `root_certs.cpp` builds the process-shared default `X509_STORE` + (`us_get_shared_default_ca_store`, refcount-incremented per return) from the bundled + Mozilla table + `NODE_EXTRA_CA_CERTS` (+ platform stores per + `root_certs_{linux,darwin,windows}.cpp` when `--use-system-ca`). These are + self-contained data/C++ providers behind a tiny C API — **they can and should remain + untouched** by the Rust implementation (Appendix A §A.6). + +## 8. OpenSSL-API quirks relied upon (implementation checklist) + +1. **Error-queue discipline**: the queue is per-thread and shared across sockets. + `ERR_clear_error()` at the top of on_data and update_handshake; clear after parking; + peek-don't-consume in cipher-list failure (§7.1); `ERR_peek_last_error` (not get) when + parking so the queue survives until cleared (`openssl.c:1460-1467`). +2. **`SSL_CTX_set_read_ahead(1)` + `SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER`** are load-bearing + for the custom-BIO design (`openssl.c:903-905`). ACCEPT*MOVING_WRITE_BUFFER matters + because retried `SSL_write`s after WANT*\* may present a different buffer address + (caller re-buffers plaintext). +3. **BIO retry flags**: read/write hooks must `BIO_clear_retry_flags` then set + retry-read/retry-write precisely; reporting a swallowed write as written is used + deliberately (§1.3.1, §1.3.2 OOM path). +4. **`SSL_get_error` contract**: called immediately after the failing call, before any + other SSL/queue operation. Distinguished codes used: WANT_READ, WANT_WRITE, + ZERO_RETURN, WANT_RENEGOTIATE, PENDING_CERTIFICATE (BoringSSL-specific, from + `ssl_select_cert_retry`), SSL, SYSCALL. +5. **`SSL_shutdown` bidirectional dance**: `ret==0` = sent-not-received (defer close), + `ret==1` = complete; double-call for fast shutdown; `SSL_get_shutdown` bits + (SENT/RECEIVED) consulted independently (§5). No TLS half-close in BoringSSL — FIN + half-close substitute is normative Node behavior (§5.1). +6. **Session callbacks fire mid-read** — the entire parking design (§2.7) exists because + running JS from inside `SSL_read` is a UAF. Any safe wrapper that surfaces sessions + via callback has the same constraint. +7. **`SSL_set_SSL_CTX` mid-handshake** for SNI (works from both servername and + select_certificate callbacks; takes its own ref). Per-SSL overrides that must survive + it: `SSL_set_verify`, `SSL_set0_verify_cert_store` (set0 = ownership transfer). +8. **ex_data with free_funcs** for: live counter, reneg policy (pointer-packed), reneg + counter, SNI pending state, listener backref, is-socket marker, pending + session/keylog queues, cache tombstone. The Rust implementation can move most of these into its + per-socket struct; the two that must stay CTX-associated are the reneg policy and the + cache tombstone hook. +9. **`SSL_early_callback_ctx_extension_get`** (BoringSSL-only) for raw SNI parse (§2.6). +10. **`i2d_SSL_SESSION`** double-call length+serialize pattern (§2.7). +11. `OPENSSL_init_ssl(0, NULL)` once per loop init (`openssl.c:697`); + `BIO_meth_new(BIO_TYPE_MEM, …)` custom method with `BIO_set_data`. +12. Zero-length `SSL_write` to flush deferred NewSessionTickets (§2.7) — BoringSSL seals + no record for len 0 but flushes pending post-handshake data. + +--- + +# PART 2 — BoringSSL bindings: bssl-sys rationale + +Crates present at `/root/bun/vendor/boringssl/rust/` (the worktree has no private vendor +copy; the shared repo checkout is authoritative; workspace `rust/Cargo.toml:1-11`, +resolver 3): `bssl-sys`, `bssl-crypto`, `bssl-macros`, `bssl-tls`, `bssl-tls-tokio`, +`bssl-rustls-adapters`, `bssl-x509`, `test-data`. Vendored fork commit matches Bun's +BoringSSL build: `oven-sh/boringssl@1a41b902` (`scripts/build/deps/boringssl.ts:27`). + +## (a) bssl-sys symbol coverage + +- Bindings are generated by **bindgen at CMake time, not cargo time** + (`vendor/boringssl/rust/CMakeLists.txt:32-73`): `bindgen wrapper.h` with + `--allowlist-file=".*[[:punct:]]include[[:punct:]]openssl[[:punct:]].*\.h"` — i.e. the + allowlist is a _file_ filter admitting **every** declaration in `include/openssl/*.h`. + `wrapper.h` includes ssl.h, bio.h, pem.h, pkcs8.h, pkcs12.h, dh.h, err.h, x509.h, etc. + (`bssl-sys/wrapper.h:1-90`). Static-inline functions are covered via + `--wrap-static-fns`, which emits a generated `wrapper.c` compiled into a small + `rust_wrapper` static lib (`CMakeLists.txt:76-82`). +- **Coverage verdict: no gaps.** Every symbol Part 1 needs — `SSL_new/SSL_set_bio`, + `BIO_meth_new` family + `BIO_set_data`, `BIO_new_mem_buf`/`BIO_s_mem`, + `SSL_do_handshake/SSL_read/SSL_write/SSL_get_error/SSL_shutdown/SSL_get_shutdown`, + `SSL_CTX_set_select_certificate_cb`/`SSL_CTX_set_tlsext_servername_callback`/ + `SSL_set_SSL_CTX`/`SSL_early_callback_ctx_extension_get`, + `SSL_get_verify_result/SSL_get_peer_certificate/SSL_set0_verify_cert_store`, + ALPN trio, `SSL_CTX_sess_set_new_cb/i2d_SSL_SESSION/SSL_set_session`, + `SSL_CTX_set_verify/SSL_CTX_set_client_CA_list/SSL_load_client_CA_file`, + PEM/PKCS8/PKCS12 loaders, cipher list, min/max proto version, `SSL_CTX_set_options`, + passwd cb, DH, keylog cb, renegotiate mode, `ERR_*`, ex_data — is within the bound + surface (confirmed empirically: bssl-tls itself calls the custom-BIO and handshake + symbols through bssl-sys, e.g. `bssl-tls/src/io.rs:334-343`, + `connection/lifecycle.rs:204`). +- Caveat: **no pre-generated bindings are vendored** (no `wrapper_.rs` files in + tree) and `bssl-sys/build.rs:93-124` only _copies_ CMake-produced bindings from + `$BORINGSSL_BUILD_DIR` and emits `cargo:rustc-link-lib=static=crypto/ssl/rust_wrapper` + (+ `links = "bssl"`, `bssl-sys/Cargo.toml:14`). + +## (b) bssl-tls viability for the event-loop design + +Status: explicitly WIP (`bssl-tls/src/lib.rs:31` "_WARNING_ this crate is still work in +progress"). + +**What fits (genuinely sans-I/O — it does NOT own fds or require std::io/tokio):** + +- I/O is a **custom BIO over user traits**: `AbstractReader::read(&mut self, +async_ctx: Option<&mut Context>, buf) -> AbstractSocketResult{Ok(n), Retry, +EndOfStream, Err}` / `AbstractWriter::{write, flush}` (`bssl-tls/src/io.rs:267-295`); + `Retry` maps to `BIO_set_retry_read/write` (`io.rs:400-406, 459-465`); attach via + `TlsConnection::set_io`/`set_split_io` → `SSL_set_bio` + (`connection/transport.rs:47-78`). Bun would implement these over ciphertext buffers — + the same shape as §1.3 (there is no public `BIO_s_mem` pair API; the trait IS the + memory-BIO analogue). +- Manual handshake driving: `TlsConnectionInHandshake::do_handshake() -> +Result, Error>` (`connection/lifecycle.rs:202-205`), typed + `accept()/connect()`, sync `sync_read/sync_write/flush` with + `IoStatus::{Ok,EndOfStream,Retry,Err}` (`connection/io.rs:81-183`), `sync_shutdown` + close_notify state machine (`lifecycle.rs:289-317`). +- Verification: `VerifyCertificate` callback trait + `VerifyCertificateContext` (peer + chain, OCSP, SCT) (`credentials.rs:560-703`); chain verify via bssl-x509; + client-cert request modes (`credentials.rs:909`). +- Sessions: `TlsSession::{to_bytes, from_bytes}`, `with_session`, context cache + controls, `get_session` (`sessions.rs:56-324`, `connection.rs:111-120`) — but **no + new-session callback wrapper** (`SSL_CTX_sess_set_new_cb` unbound in the safe layer), + so TLS 1.3 tickets must be polled, which does NOT reproduce Node's `'session'` event + timing (§2.7's parked-queue design needs the callback). + +**Hard gaps (all must-haves for Bun.serve / node:tls):** + +1. **No ALPN API at all** (no set_alpn_protos / alpn_select_cb / get0_alpn_selected + wrappers; only error-code enum mentions). +2. **No server SNI / certificate-selection callback** (no servername_callback, + select_certificate_cb, or SSL_set_SSL_CTX wrapper; only client `set_host`). +3. **No client-CA-list API.** +4. No PKCS12; credentials go through the modern `SSL_CREDENTIAL` API rather than + `SSL_CTX_use_certificate` (`credentials.rs:77-311`) — a behavioral divergence from + §7.1's legacy-slot semantics (multi-identity replacement rules). +5. Escape hatches exist (`TlsConnection::as_mut_ptr() -> *mut SSL`, + `TlsContext::as_mut_ptr()`, `connection.rs:181-183`, `context.rs:458-460`) but the + crate stores its own state in ex_data and declares user ex_data interaction UB + (`context.rs:449-450`) — hand-rolled SNI/session callbacks through the escape hatch + are delicate. + +`bssl-tls-tokio` is an async adapter (irrelevant). `bssl-rustls-adapters` is **not a TLS +layer**: it's a `rustls::crypto::CryptoProvider` backed by BoringSSL primitives +(`bssl-rustls-adapters/src/lib.rs:26-44`) — only relevant if Bun adopted rustls. + +**(c) sibling crates**: `bssl-crypto` = safe crypto primitives (AEAD/digest/EC/RSA/HKDF/ +HPKE/PQC, no_std-able; API unstable, "must be updated atomically with BoringSSL", +`bssl-crypto/README.md:12-16`) — irrelevant to the socket layer, possibly useful +elsewhere. `bssl-x509` = safe X509: `X509Certificate` (DER/PEM parse, SAN, validity), +`PrivateKey::from_pem` with passphrase closure, `X509StoreBuilder`, typed chain verifier +(`bssl-x509/src/{certificates.rs:410-663, keys.rs:91-265, store.rs:47-149, +verify.rs:72-147}`) — a good fit for cert loading (§7.1) and verify-detail extraction +(§2.4) if we want safety there. + +## (c) Build integration + +- Bun compiles BoringSSL itself as a `DirectBuild` — objects straight into Bun's deps + archive, **no CMake, no libcrypto.a/libssl.a produced** + (`scripts/build/deps/boringssl.ts:44-90`, `provides.libs: []`). +- Bun's current bindings crate `bun_boringssl_sys` (`src/boringssl_sys/`) is hand-written + externs (~115 fns), **no build.rs, no links key** — symbols resolve at final-binary + link. +- Therefore bssl-sys **as-is cannot build** in Bun: its build.rs expects + CMake-generated `wrapper_.rs` + prebuilt static libs at `$BORINGSSL_BUILD_DIR` + and would try to link a second BoringSSL. Clean integration path (all supported by the + crate itself): + 1. pre-generate `wrapper_.rs` per target against `vendor/boringssl/include` + (from Bun's codegen scripts, or vendor the outputs); + 2. use the crate's Bazel-style escape: build with `--cfg bindgen_rs_file` + + `BINDGEN_RS_FILE=` (`bssl-sys/src/lib.rs:17-24`), neutering build.rs's copy + step and link directives; + 3. add the generated static-inline `wrapper.c` shims to `boringssl.ts` sources. + Version skew is structurally impossible (same vendored commit provides headers and + rust/ tree). +- **Consumers of `bun_boringssl_sys`** (must keep compiling if we replace/augment it): + see Appendix A §A.7 for the grep'd list — spanning node:crypto (EVP/HMAC/X509/etc.), + `src/http` (client TLS + proxy tunnels), `src/uws` (SSLWrapper), `src/runtime/socket` + (tls_socket_functions, socket_body, SSLConfig, UpgradedDuplex), sql drivers, websocket + client. Replacing it wholesale is a large blast radius; **coexistence** (bssl-sys and + bun_boringssl_sys both declaring externs against the same linked objects) is legal at + link time as long as signatures agree, enabling incremental migration. + +## (d) Recommendation + +**Use `bssl-sys` (pre-generated bindings via `BINDGEN_RS_FILE`) as the raw layer inside a +hand-written `TlsState` state machine; do NOT build on `bssl-tls`. Optionally adopt +`bssl-x509` for cert/key loading and verify-detail extraction. Keep root*certs*\* and +sni_tree as-is (or port sni_tree trivially — see A.5).** + +Rationale: + +1. Part 1's contract is dominated by things no safe layer expresses: the loop-shared BIO + routing + save/restore re-entrancy protocol (§1.4), deferred-destruction + (`ssl_in_use`/`ssl_pending_detach` + alert-swallowing BIO), write batching with the + single spill slot and its honesty invariant (§4), the FIN-instead-of-close*notify + half-close substitute (§5.1), parked session/keylog queues (§2.7), async-SNI + suspension via `ssl_select_cert_retry` (§2.6), and per-SSL verify-store overrides + (§2.1). The Rust implementation is a port of \_this* state machine; bssl-tls would sit at the + wrong altitude even if complete. +2. bssl-tls is WIP and missing ALPN, server SNI dispatch, client-CA-list, the + new-session callback, and PKCS12 — each a hard requirement. Filling them means + forking its API anyway, while its ex_data-is-UB rule conflicts with our need for + ex_data-adjacent state. +3. bssl-sys gives the complete, mechanically-generated, fork-synchronized symbol surface + — eliminating the main risk of `bun_boringssl_sys` (hand-written signatures drifting + from the fork) — at zero link-time cost given the `BINDGEN_RS_FILE` path. +4. bssl-tls remains valuable as a **design reference** (its AbstractReader/Writer trait + BIO and IoStatus enums are a good shape for our TlsState's ciphertext interface), and + bssl-x509's typed verify results map cleanly onto `us_bun_verify_error_t`. +5. Migration of the ~15 existing `bun_boringssl_sys` consumers can be incremental: + re-export bssl-sys types from `bun_boringssl_sys` (or alias the crate) rather than a + big-bang replacement. + +--- + +# Appendix A — Rust/C++ periphery detail + +## A.1 `us_bun_socket_context_options_t` (libusockets.h:418-440) and the JS mapping + +Fields, in declaration order: `key_file_name`, `cert_file_name`, `passphrase`, +`dh_params_file_name`, `ca_file_name`, `ssl_ciphers` (`const char*`, 419-424); +`ssl_prefer_low_memory_usage` (int, 425); `key`/`key_count`, `cert`/`cert_count`, +`ca`/`ca_count` (`const char* const*` + `unsigned int` — arrays of inline PEM strings, +426-431); `secure_options` (unsigned, 432); `ssl_min_version`/`ssl_max_version` (int, +TLS1_VERSION..TLS1_3_VERSION, 0 = default, 433-435); `reject_unauthorized`, +`request_cert` (int, 436-437); `client_renegotiation_limit`/`window` (unsigned, +438-439). Effects: §7.1. Error enum `create_bun_socket_error_t` (442-448). + +- Rust `#[repr(C)]` mirror: `BunSocketContextOptions`, + `src/uws_sys/SocketContext.rs:98-121`; `Default` sets **reneg 3/600** + (`SocketContext.rs:123-148`). +- Canonical config struct: `bun_http::ssl_config::SSLConfig` + (`src/http/ssl_config.rs:21-53`); all strings are `dupe_z` allocations freed with a + secure-zeroing `free_sensitive` (`ssl_config.rs:378-391`); content hash (wyhash, + memoized) `316-368`; process-wide intern registry (content-hash + weak dedup) + `529-654` — pointer equality of interned configs is the HTTP-client cache key (A.4). +- `asUSockets()` = `SSLConfig::as_usockets()` (`ssl_config.rs:174-219`) — 1:1 field + projection. **Not projected: `server_name` and `protos` (ALPN)** — per-socket concerns + applied via `SSL_set_tlsext_host_name` / `SSL_set_alpn_protos` (§2.8). + `as_usockets_for_client_verification()` (`224-231`) forces + `request_cert=1, reject_unauthorized=0` so the HTTP client always gets a verify result + and enforces manually in its on_handshake. +- JS options → SSLConfig: `SSLConfigFromJs::from_generated` + (`src/runtime/socket/SSLConfig.rs:150-241`): passphrase duped (159-162); the four + `*File` paths existence-checked with `bun_sys::access` (163-166, 197-208); + `serverName` sets `requires_custom_request_ctx` (167-170); `rejectUnauthorized` + defaults from `vm.get_tls_reject_unauthorized()` (173-176); ca/cert/key accept + string | Buffer | BunFile-Blob | arrays (189-195, helpers 299-404, empty files + rejected); `ALPNProtocols` string/Buffer → `protos` (210-225); `ciphers` (226-230); + reneg limit/window (232-233); returns `None` when nothing set (= "no custom TLS"). +- **`sessionTimeout` and `ticketKeys` are NOT plumbed** anywhere in this layer (open + question Q3). + +## A.2 SSL_CTX digest cache + +- **Digest**: `BunSocketContextOptions::digest()` (`SocketContext.rs:172-249`) — + SHA-256 over EVERY options field, injectively framed (presence byte + terminator so + null ≠ ""; arrays with count). The four file-name fields additionally feed + `[mtime_sec, mtime_nsec, size]` from `stat_for_digest` (unix `stat` + `SocketContext.rs:19-34`; Windows `GetFileInformationByHandle` following symlinks, + matching libuv, `37-96`) so in-place cert rotation invalidates. Stat failure feeds + zeros AND context build fails on the same path, so the entry never caches (16-18, + 206-209). +- **Cache**: `src/runtime/api/bun/SSLContextCache.rs` — per-VM + `ArrayHashMap<[u8;32], *mut Entry>` holding **zero SSL_CTX refs**; each cached CTX + carries an ex_data back-pointer whose `CRYPTO_EX_free` (`bun_ssl_ctx_cache_on_free`, + `220-242`; registered via `us_ctx_cache_ex_idx`, openssl.c:362-371, 441-444) + tombstones the entry when the real refcount hits 0 — that IS invalidation. + `get_or_create_digest` (`96-190`): hit up-refs under mutex; miss builds outside the + lock (file I/O) then converges on racing insert; tombstones compacted every 16 ops. + MUST-preserve invariant: the cache key covers every input shaping the CTX (a false + hit is a security bug); `server_name`/`protos` are legitimately excluded because they + never enter the CTX. + +## A.3 SecureContext.rs + +`src/runtime/api/bun/SecureContext.rs` (struct 35-47): owns one `SSL_CTX` ref (the +CTX's own refcount is the only refcount — sockets `SSL_new()` up-ref), the options +digest, and `extra_memory` for GC accounting. `intern()` (78-84, 234) memoizes at two +levels: per-global `WeakGCMap` keyed by digest (`===` stability) + the per-VM +SSLContextCache. Users: `tls.createSecureContext`, Listener/`addContext`/SNICallback +(which can return a SecureContext to install on the in-flight SSL, +`src/runtime/socket/Listener.rs:678-681, 1016-1030, 1869-1894`), `setKeyCert` +(`tls_socket_functions.rs:878-886`), SQL clients, named pipes. `us_ssl_parse_pkcs12` +backs `pfx` via `SecureContext.parse_pkcs12` (`SecureContext.rs:95`). + +## A.4 HTTP client custom-TLS contexts + +`HTTPContext` (`src/http/HTTPContext.rs:24-64`): HTTP-thread-only +intrusive refcount; `secure: Option<*mut SSL_CTX>` = one owned ref freed on deinit. +Refcount contract: cache entry holds 1; each in-flight HTTPClient with +`custom_ssl_ctx` holds 1; the two global http/https contexts never die. +Cache `CUSTOM_SSL_CONTEXT_MAP` (`src/http/HTTPThread.rs:63-82, 494-620`): keyed on the +**interned `SSLConfig` pointer**; only `requires_custom_request_ctx` configs take this +path; TTL 30 min + max 60 entries. Pooled keepalive sockets remember their +`ssl_config` SharedPtr and match by pointer on reuse, with an +`established_with_reject_unauthorized` monotonic reuse guard +(`HTTPContext.rs:167-177, 694-717`). rejectUnauthorized enforcement in +`HTTPContext::on_handshake` (`HTTPContext.rs:1141-1219`, esp. 1156-1189). + +## A.5 sni_tree.cpp (verified first-hand) + +Label trie: `sni_node { void* user; std::map> }` +(`sni_tree.cpp:39-56`), labels split on `.` left-to-right, byte-wise **case-sensitive** +comparison (no normalization — callers must lowercase). + +- `sni_add` (133-163): creates one node per label (label text malloc-duped); `*` stored + verbatim; returns 1 (rejects, caller keeps ownership) when the terminal node already + has a user — never overwrites. No label-count limit on add. +- `sni_find` (190-212) / `getUser` (92-117): hostnames with **>10 labels → NULL** + (MAX_LABELS, 33-34, enforced 203-205). At each depth: try exact label; if that + subtree yields no user, **fall back to the `"*"` child**. So a wildcard matches + exactly ONE label at ANY position (`foo.*.com` works), exact beats wildcard per + level with backtracking, and full-depth match is required: `*.example.com` matches + `a.example.com` but NOT `example.com` or `a.b.example.com`. +- `sni_remove` (165-188): exact match only — `*` is the literal character; returns the + user pointer (ownership back to caller); culls empty nodes upward. +- `sni_free(sni, cb)` (125-130): sets a `thread_local sni_free_cb` (37) then deletes; + destructor runs `cb(user)` for every remaining user (44-55). No locking; the + thread_local makes `sni_free` per-thread non-reentrant. +- Ownership summary: tree owns users only via sni_free's callback; remove transfers + back; rejected add never frees. + +## A.6 Root certs (per platform) — can stay as-is + +- `root_certs.h`: pure data (Mozilla NSS-derived PEM bundle, `us_cert_string_t +root_certs[]`). +- `root_certs.cpp` (314 lines): `std::call_once` parse of bundled PEMs + + `NODE_EXTRA_CA_CERTS` (`136-165`; load failure warns via + `BUN__warn__extra_ca_load_failed`); API consumed by openssl.c and NodeTLS.cpp: + `us_internal_raw_root_certs` (tls.rootCertificates), `us_get_root_extra_cert_instances`, + `us_get_root_system_cert_instances` (195-208, per-platform loader, on demand for + `tls.getCACertificates('system')`), `us_get_default_ca_store` (210-254: fresh store = + default paths + bundled + extra + system when `--use-system-ca`/`NODE_USE_SYSTEM_CA`, + gate 31-40), `us_get_shared_default_ca_store` (262-268: process-wide immutable + call_once store, **up-ref'd per return** — callers must free their ref; used at + openssl.c:1026, 1104, 1321), `us_get_default_ciphers`, `us_no_password_callback`. +- `root_certs_linux.cpp` (184): `SSL_CERT_FILE`/`SSL_CERT_DIR` exclusive when set; + else distro bundle paths + cert dirs; Android hashed-PEM stores. +- `root_certs_darwin.cpp` (575): dlopens Security.framework/CF at runtime; + `SecItemCopyMatching` over keychain (deliberately not kSecMatchTrustedOnly — avoids + trustd network fetches), keeps CA certs passing per-cert SSL-policy trust. +- `root_certs_windows.cpp` (153): pure WinCrypt, returns raw DER (no OpenSSL headers); + ROOT/CA/TrustedPeople across machine+user(+GP,+Enterprise) stores, EKU + server-auth-filtered like Node. +- **Verdict**: all self-contained behind a narrow `extern "C"` surface exchanging + opaque `X509_STORE*`/DER; the Rust implementation keeps calling them unchanged. + +## A.7 `bun_boringssl_sys` consumers (blast radius of replacing the bindings crate) + +Crate `bun_boringssl_sys` (`src/boringssl_sys/`, hand-rolled externs, ~126 fns, no +build.rs/links key). Cargo dependents (9): `bun_boringssl` (`src/boringssl` — safe +tier: `ssl_ctx_setup`, `init_client`, `check_server_identity`, `canonicalize_ip`; +`src/boringssl/lib.rs:19-516`), `src/csrf`, `src/http` (client contexts, ProxyTunnel, +digest), `src/runtime`, `src/s3_signing`, `src/sha_hmac`, `src/sql_jsc`, `src/uws_sys`, +root workspace. `use`-sites (33 files) include: `src/runtime/crypto/{CryptoHasher,EVP, +HMAC,PBKDF2,boringssl_jsc,pwhash}.rs` (node:crypto), `src/runtime/api/bun/{ +SSLContextCache,SecureContext,x509}.rs`, `src/runtime/socket/{Listener,UpgradedDuplex, +WindowsNamedPipe*,socket_body,tls_socket_functions,uws_jsc}.rs`, +`src/runtime/webcore/Crypto.rs`, `src/sql_jsc/{jsc,mysql/MySQLConnection, +postgres/SASL,shared/ConnectionCtorArgs}.rs`, `src/uws_sys/{SocketContext,lib,socket, +us_socket_t}.rs`, `src/http/{HTTPContext,ProxyTunnel}.rs`, `src/csrf/lib.rs`, +`src/sha_hmac/sha.rs`. Most are crypto-primitive users unaffected by the TLS-layer +replacement; the socket/uws_sys/http files are the ones it touches anyway. + +## A.8 Callback surface the implementation must preserve + +- C vtable `us_socket_vtable_t` (`libusockets.h:253-266`) incl. SSL-specific + `on_handshake(s, success, us_bun_verify_error_t, custom_data=NULL)`. +- Dispatch is Rust-owned: `us_dispatch_*` exports in + `src/runtime/socket/uws_dispatch.rs` switch on `socket->kind` (static per-kind + vtables via `src/uws_sys/vtable.rs::make::()`; uWS C++ kinds use + `group->vtable`). loop.c routes readable/writable/end into `us_internal_ssl_on_*` + first when `s->ssl != NULL`; the decrypted re-entry into `us_dispatch_*` is the + contract (§1.1). All dispatchers return the possibly-swapped `us_socket_t*`. +- SSLWrapper (TLS-over-duplex/pipes) consumes `us_ssl_enable_pending_events` / + `us_ssl_pop_pending_{session,keylog}` (`libusockets.h:479-489`) — the only openssl.c + API it uses (§6.2). + +--- + +# Resolved design notes + +1. **SSLWrapper**: `ssl_wrapper` (memory `BIO_s_mem` pair, own 3/600 reneg + policy, own shutdown logic) remains a separate engine serving + UpgradedDuplex / WindowsNamedPipe / HTTP proxy tunnels / WebSocket tunnels. + `TlsState` is designed transport-agnostic so SSLWrapper can be folded in + later; unification is a follow-up. +2. **Loop-shared vs per-socket buffers**: the loop-shared design is kept — one + plaintext scratch, one batch buffer, ONE spill slot per loop (other sockets + degrade to per-record writes while a spill is pending, §4). The stable slab + already eliminated relocation, so per-socket spill would cost + O(congested sockets) memory with no benefit. The two C hazards are made + safe: the spill/fatal-reason OWNER is a generation-checked `SocketRef` + (stale = drop, never dangles), and the save/restore re-entrancy protocol + around JS re-entry is an RAII scope guard (restores on drop, enforced by + type). Batch thresholds are preserved verbatim; the honesty invariant §4.4 + is the contract, not the sharing. +3. **`sessionTimeout` / `ticketKeys`**: stay unplumbed, matching the replaced + layer (Node supports both on tls.Server; adding them is a follow-up, not + parity). +4. **bssl-sys binding generation**: bindings are pre-generated per target and + consumed via `BINDGEN_RS_FILE`; they must be regenerated on every BoringSSL + bump (folded into the BoringSSL upgrade procedure). +5. **`--wrap-static-fns` shims**: the bindgen-emitted `wrapper.c` for + static-inline accessors is compiled into the deps build + (`scripts/build/deps/boringssl.ts`). +6. **wolfSSL**: support is dropped — no Bun build configuration used the + `LIBUS_USE_WOLFSSL` paths. +7. **quic.c**: keeps linking against `us_ssl_ctx_build_raw`; this crate + exports an equivalent CTX builder for lsquic. +8. **SNI case sensitivity**: matching stays byte-wise case-sensitive (A.5); + RFC 6066 hostnames are case-insensitive, so correctness depends on callers + normalizing on both add and lookup (Listener.rs lowercases both paths). +9. **`us_socket_raw_writev`** exists but the batch flush keeps the single copy + - `raw_write`; iovec batching (memory-BIO + writev, as Node does) is a + possible perf follow-up, not required for parity. diff --git a/src/uws_sys/error.rs b/src/usockets/error.rs similarity index 100% rename from src/uws_sys/error.rs rename to src/usockets/error.rs diff --git a/src/usockets/fault.rs b/src/usockets/fault.rs new file mode 100644 index 000000000000..f2f2ab2bd41a --- /dev/null +++ b/src/usockets/fault.rs @@ -0,0 +1,167 @@ +//! Syscall fault injection for tests. Implements docs/semantics.md §11 +//! (FAULT INJECTION) — same `us_fault_*` API and rule shape as +//! fault_inject.c. Whole module gated on the `socket_fault_injection` +//! feature (never in release builds). +#![cfg(feature = "socket_fault_injection")] + +use core::ffi::c_int; +use core::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Mutex; + +pub const RECV: c_int = 0; +pub const SEND: c_int = 1; +pub const WRITEV: c_int = 2; +pub const SENDMSG: c_int = 3; +pub const RECVMSG: c_int = 4; +pub const CONNECT: c_int = 5; +pub const ACCEPT: c_int = 6; +pub const SOCKET: c_int = 7; +pub const CLOSE: c_int = 8; +pub const SHUTDOWN: c_int = 9; +/// Not a syscall: the per-loop TLS plaintext buffer allocation. +pub const SSL_LOOP_BUFFER: c_int = 10; + +pub const US_FAULT_COUNT: usize = 11; + +pub const ACTION_NONE: c_int = 0; +pub const ACTION_ERRNO: c_int = 1; +pub const ACTION_SHORT: c_int = 2; +pub const ACTION_ZERO: c_int = 3; + +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UsFaultRule { + pub action: c_int, + pub errno_value: c_int, + pub clamp_bytes: c_int, + pub after_n_calls: c_int, + pub repeat: c_int, + pub target_fd: c_int, +} + +const NO_RULE: UsFaultRule = UsFaultRule { + action: ACTION_NONE, + errno_value: 0, + clamp_bytes: 0, + after_n_calls: 0, + repeat: 0, + target_fd: -1, +}; + +#[derive(Clone, Copy)] +struct Slot { + rule: UsFaultRule, + calls_seen: c_int, + fired: c_int, +} + +const EMPTY_SLOT: Slot = Slot { + rule: NO_RULE, + calls_seen: 0, + fired: 0, +}; + +/// Lock-free hot-path flag; release-stored under the state lock whenever any +/// rule is non-NONE, acquire-loaded by `check` (R11.4). +static ARMED: AtomicBool = AtomicBool::new(false); + +/// Process-global so rules armed on the JS thread also affect HTTP/worker +/// threads; per-socket isolation via `target_fd` (R11.4). +static STATE: Mutex<[Slot; US_FAULT_COUNT]> = Mutex::new([EMPTY_SLOT; US_FAULT_COUNT]); + +fn recompute_armed(slots: &[Slot; US_FAULT_COUNT]) { + let any = slots.iter().any(|s| s.rule.action != ACTION_NONE); + ARMED.store(any, Ordering::Release); +} + +pub fn us_fault_set(syscall: c_int, rule: &UsFaultRule) { + let Ok(idx) = usize::try_from(syscall) else { + return; + }; + if idx >= US_FAULT_COUNT { + return; + } + let mut slots = STATE.lock().unwrap(); + slots[idx] = Slot { + rule: *rule, + calls_seen: 0, + fired: 0, + }; + recompute_armed(&slots); +} + +pub fn us_fault_clear(syscall: c_int) { + let Ok(idx) = usize::try_from(syscall) else { + return; + }; + if idx >= US_FAULT_COUNT { + return; + } + let mut slots = STATE.lock().unwrap(); + slots[idx] = EMPTY_SLOT; + recompute_armed(&slots); +} + +pub fn us_fault_clear_all() { + let mut slots = STATE.lock().unwrap(); + for slot in slots.iter_mut() { + slot.rule.action = ACTION_NONE; + } + ARMED.store(false, Ordering::Release); +} + +/// What a fired rule wants the hook site to do. +pub(crate) enum Fault { + /// Return failure with this errno (`-errno` in the negative-errno return + /// convention of `unsafe_core::io`). + Errno(c_int), + /// Return 0 (recv: peer closed; send: backpressure). + Zero, + /// Clamp the operation length to this and run the real syscall. + Clamp(usize), +} + +/// Hook entry (R11.5). `len` is the operation length for SHORT clamping; pass +/// 0 for length-less hooks (connect/accept/writev — clamp is then a no-op, +/// matching the C `unused` lvalue). Returns None when the call proceeds as-is. +pub(crate) fn check(syscall: c_int, fd: c_int, len: usize) -> Option { + if !ARMED.load(Ordering::Acquire) { + return None; + } + let idx = usize::try_from(syscall).ok()?; + if idx >= US_FAULT_COUNT { + return None; + } + let mut slots = STATE.lock().unwrap(); + // Snapshot under the lock; the action dispatch below runs on the snapshot + // after unlock so a concurrent re-arm cannot tear the rule (R11.4). + let rule = slots[idx].rule; + if rule.action == ACTION_NONE || (rule.target_fd >= 0 && rule.target_fd != fd) { + return None; + } + let seen = slots[idx].calls_seen; + slots[idx].calls_seen += 1; + if seen < rule.after_n_calls { + return None; + } + let fired = slots[idx].fired; + slots[idx].fired += 1; + if rule.repeat >= 0 && fired >= rule.repeat { + slots[idx].rule.action = ACTION_NONE; + recompute_armed(&slots); + return None; + } + drop(slots); + match rule.action { + ACTION_ERRNO => Some(Fault::Errno(rule.errno_value)), + ACTION_ZERO => Some(Fault::Zero), + ACTION_SHORT => { + if rule.clamp_bytes >= 0 && len > rule.clamp_bytes as usize { + Some(Fault::Clamp(rule.clamp_bytes as usize)) + } else { + None + } + } + _ => None, + } +} diff --git a/src/usockets/group.rs b/src/usockets/group.rs new file mode 100644 index 000000000000..117e1bd3fd51 --- /dev/null +++ b/src/usockets/group.rs @@ -0,0 +1,1753 @@ +//! `us_socket_group_t` — PUBLIC repr(C), embedded by value in its owner +//! (Listener, VirtualMachine RareData, uWS App, HTTPThread). Layout FROZEN +//! (docs/cabi.md §3.1: uWS C++ embeds it and static_asserts offset/size). +//! Zero-initialization must remain a valid pre-init state. Semantics per +//! docs/semantics.md §3 (group lifecycle, linkage, adopt, close_all), +//! §6 (connect entry), §7 (listen/accept). Socket close/dispatch paths live +//! in socket.rs and call back into the linkage helpers here. + +use core::ffi::{CStr, c_int, c_void}; +use core::ptr; + +use crate::backend::{Events, PollType}; +use crate::connecting::{self, ConnectingSocket}; +use crate::dispatch; +use crate::handle::{CloseCode, ListenSocket}; +use crate::kind::SocketKind; +use crate::loop_::{Loop, timeouts}; +use crate::socket::{self, SocketFlags, close_raw, socket_close, us_socket_t}; +use crate::tls::Transport; +use crate::tls::context::{self as tls_context, SslCtx, us_bun_verify_error_t}; +use crate::tls::sni::{OnServerName, SniMap}; +use crate::tls::state::TlsState; +use crate::unsafe_core::ext::{deref_mut, drop_box, header_mut}; +use crate::unsafe_core::{ffi, io, trampolines}; +use crate::{LIBUS_LISTEN_DEFER_ACCEPT, LIBUS_SOCKET_ALLOW_HALF_OPEN, LIBUS_SOCKET_DESCRIPTOR}; + +#[repr(C)] +pub struct SocketGroup { + pub loop_: *mut Loop, + pub vtable: Option<&'static VTable>, + /// Embedding owner — typed access via `owner()` only. + ext: *mut c_void, + pub head_sockets: *mut us_socket_t, + pub head_connecting_sockets: *mut ConnectingSocket, + pub head_listen_sockets: *mut ListenSocket, + pub iterator: *mut us_socket_t, + pub prev: *mut SocketGroup, + pub next: *mut SocketGroup, + pub global_tick: u32, + /// Sockets currently parked in `loop.data.low_prio_head` with + /// `s->group == this` (NOT in `head_sockets` while queued) — C8. + pub low_prio_count: u16, + pub timestamp: u8, + pub long_timestamp: u8, + pub linked: u8, +} + +/// Per-group C vtable (`us_socket_vtable_t`) — 11 slots, order FROZEN +/// (docs/cabi.md §3.7). NULL slots are skipped by dispatch. The C ABI keeps +/// the `-> *mut us_socket_t` return for stability, but with in-place adoption +/// it is always the input pointer (docs/design.md §Strategy 3). +#[repr(C)] +pub struct VTable { + pub on_open: + Option *mut us_socket_t>, + pub on_data: Option *mut us_socket_t>, + pub on_fd: Option *mut us_socket_t>, + pub on_writable: Option *mut us_socket_t>, + pub on_close: + Option *mut us_socket_t>, + pub on_timeout: Option *mut us_socket_t>, + pub on_long_timeout: Option *mut us_socket_t>, + pub on_end: Option *mut us_socket_t>, + pub on_connect_error: Option *mut us_socket_t>, + pub on_connecting_error: + Option *mut ConnectingSocket>, + pub on_handshake: + Option, +} + +// Must match `struct us_socket_group_t` in the surviving C header: +// 9 ptrs + u32 + u16 + 3×u8, padded to pointer alignment. +const _: () = assert!( + core::mem::size_of::() == 9 * core::mem::size_of::<*mut c_void>() + 16, + "SocketGroup layout drifted from us_socket_group_t" +); +const _: () = assert!( + core::mem::size_of::() == 11 * core::mem::size_of::<*mut c_void>(), + "VTable layout drifted from us_socket_vtable_t" +); + +// All-zero is valid for both (raw null pointers / None-via-NPO / zero ints); +// C++ owners zero-init embedded groups before `init`. +impl Default for SocketGroup { + fn default() -> Self { + SocketGroup { + loop_: core::ptr::null_mut(), + vtable: None, + ext: core::ptr::null_mut(), + head_sockets: core::ptr::null_mut(), + head_connecting_sockets: core::ptr::null_mut(), + head_listen_sockets: core::ptr::null_mut(), + iterator: core::ptr::null_mut(), + prev: core::ptr::null_mut(), + next: core::ptr::null_mut(), + global_tick: 0, + low_prio_count: 0, + timestamp: 0, + long_timestamp: 0, + linked: 0, + } + } +} + +impl Default for VTable { + fn default() -> Self { + VTable { + on_open: None, + on_data: None, + on_fd: None, + on_writable: None, + on_close: None, + on_timeout: None, + on_long_timeout: None, + on_end: None, + on_connect_error: None, + on_connecting_error: None, + on_handshake: None, + } + } +} + +pub enum ConnectResult { + Socket(*mut us_socket_t), + Connecting(*mut ConnectingSocket), + Failed, +} + +// ────────────────────────────────────────────────────────────────────────── +// Listener accept state +// ────────────────────────────────────────────────────────────────────────── + +/// Accept state of a `ListenSocket` (`us_listen_socket_t` fields beyond the +/// embedded socket — R7.1). Boxed; the listener header's `ext` word owns it +/// (`kind == Invalid` is the listener tag) until `close_listen_socket` drops +/// it. The listener list itself is chained through the header's `next` +/// (listeners are never in `head_sockets`, so the field is free; cabi walks +/// it the same way). +pub(crate) struct ListenerData { + /// Borrowed SSL_CTX, up_ref'd at listen; released at close. Null = plain. + pub(crate) ssl_ctx: *mut SslCtx, + /// Server-name tree; lazily created by `add_server_name`. + pub(crate) sni: Option>, + /// Dynamic missing-SNI resolver (docs/cabi.md §4.3). + pub(crate) on_server_name: Option, + /// Ext size stamped onto every accepted socket. + pub(crate) socket_ext_size: c_int, + /// Kind stamped onto every accepted socket. + pub(crate) accept_kind: SocketKind, + /// True only if the defer-accept setsockopt succeeded (R7.2/R8.8). + pub(crate) deferred_accept: bool, + /// Owner word backing `ListenSocket::ext()` (8-byte slot). + pub(crate) owner_ext: *mut c_void, + /// Protocol v2 accept hook (`Listener::on_create`, docs/design.md): runs + /// per accepted socket BEFORE its on_open so the handler sees the owner. + /// Static fn + context word — the accept path stays allocation-free. + pub(crate) on_create: Option<(fn(*mut c_void, crate::handle::AnySocket), *mut c_void)>, +} + +/// Recover the accept state of a not-yet-closed listener. The listener +/// header keeps `kind == Invalid` ("listener itself never dispatches", R7.2) +/// — that tag doubles as the listener discriminator. +pub(crate) fn listener_data<'a>(ls: *mut ListenSocket) -> &'a mut ListenerData { + let h = header_mut(ls.cast::()); + debug_assert!(matches!(h.kind, SocketKind::Invalid)); + debug_assert!(!h.ext.is_null()); + deref_mut(h.ext.cast::()) +} + +// ────────────────────────────────────────────────────────────────────────── +// SocketGroup surface +// ────────────────────────────────────────────────────────────────────────── + +impl SocketGroup { + /// Initialise an embedded, zero-initialized group. Does NOT link into the + /// loop (lazy on first socket). Idempotent. `owner_ptr` is what + /// `owner::()` recovers inside handlers. (context.c:49-55) + pub fn init(&mut self, loop_: *mut Loop, vt: Option<&'static VTable>, owner_ptr: *mut c_void) { + *self = SocketGroup::default(); + self.loop_ = loop_; + self.vtable = vt; + self.ext = owner_ptr; + } + + /// Explicit teardown — unlinks from the loop; asserts socket list empty. + /// Not `Drop`: the group is `#[repr(C)]`, embedded by-value, FFI-managed. + /// (R3.13, context.c:57-74) + /// + /// # Safety + /// `this` must point to a group previously passed to `init`; not called + /// concurrently with the loop walking this group. + // Frozen surface requires this to stay an `unsafe fn` outside unsafe_core. + #[allow(unsafe_code)] + pub unsafe fn destroy(this: *mut Self) { + let (linked, loop_) = { + let g = deref_mut(this); + debug_assert!(g.head_sockets.is_null()); + debug_assert!(g.head_connecting_sockets.is_null()); + debug_assert!(g.head_listen_sockets.is_null()); + debug_assert!(g.low_prio_count == 0); + debug_assert!(g.iterator.is_null()); + (g.linked != 0, g.loop_) + }; + if linked { + loop_unlink_group(loop_, this); + deref_mut(this).linked = 0; + } + } + + /// Close every socket AND listen socket in the group (fires `on_close` + /// per socket, and accounts for low-prio-parked sockets). Group stays valid. + pub fn close_all(&mut self) { + close_all_ex(self, true); + } + + /// Non-null after `init`. + pub fn get_loop(&self) -> *mut Loop { + debug_assert!(!self.loop_.is_null()); + self.loop_ + } + + /// Recover the embedding owner. Only valid for groups whose `init` passed + /// a non-null owner; per-kind VM groups in `RareData` pass null. The deref + /// obligation (correct `T`) lives at the deref site. + pub fn owner(&self) -> *mut T { + debug_assert!(!self.ext.is_null()); + self.ext.cast::() + } + + /// Raw `ext` word for the C accessor surface — nullable, unlike `owner` + /// (per-kind VM groups init with null; docs/cabi.md §1.5). + pub(crate) fn ext_raw(&self) -> *mut c_void { + self.ext + } + + pub fn is_empty(&self) -> bool { + self.head_sockets.is_null() + && self.head_connecting_sockets.is_null() + && self.head_listen_sockets.is_null() + && self.low_prio_count == 0 + } + + /// Listener owns embedded accept state; accepted sockets get `kind` + /// stamped, `socket_ext_size` ext, link into THIS group. `*err` receives + /// an errno-ish code on null return (failure-only write, OQ-8 resolved). + /// docs/semantics.md §7 (R7.2). CONTRACT: `socket_ext_size` is the + /// adoption FAMILY's max — capacity is fixed here; larger adopts panic. + pub fn listen( + &mut self, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + host: Option<&core::ffi::CStr>, + port: c_int, + options: c_int, + socket_ext_size: c_int, + err: &mut c_int, + ) -> *mut ListenSocket { + let fd = match io::create_listen_socket(host, port, options) { + Ok(fd) => fd, + Err(e) => { + // e == 0: getaddrinfo failed — C leaves *error untouched. + if e != 0 { + *err = e; + } + return ptr::null_mut(); + } + }; + finish_listen( + self, + kind, + ssl_ctx.unwrap_or(ptr::null_mut()), + fd, + options, + socket_ext_size, + options & LIBUS_LISTEN_DEFER_ACCEPT != 0, + err, + ) + } + + /// Unix-domain variant; `path` supports abstract sockets (leading NUL). + /// Identical minus defer-accept (R7.2). + pub fn listen_unix( + &mut self, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + path: &[u8], + options: c_int, + socket_ext_size: c_int, + err: &mut c_int, + ) -> *mut ListenSocket { + let fd = match io::create_listen_socket_unix(path, options) { + Ok(fd) => fd, + Err(e) => { + if e != 0 { + *err = e; + } + return ptr::null_mut(); + } + }; + finish_listen( + self, + kind, + ssl_ctx.unwrap_or(ptr::null_mut()), + fd, + options, + socket_ext_size, + false, + err, + ) + } + + /// May return a synchronous `Socket` (DNS already resolved), a + /// `Connecting` placeholder, or `Failed`. May dispatch connect_error + /// synchronously before returning (C5). docs/semantics.md §6 (R6.2). + pub fn connect( + &mut self, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + host: &core::ffi::CStr, + port: c_int, + local_binding: Option<(&core::ffi::CStr, u16)>, + options: c_int, + socket_ext_size: c_int, + ) -> ConnectResult { + let this: *mut SocketGroup = self; + let ssl_ctx = ssl_ctx.unwrap_or(ptr::null_mut()); + let port16 = port as u16; + + // 1. local_host is only ever a literal IP — never resolved. An + // unparseable one is silently ignored: connect proceeds unbound + // (context.c:574-578 has no failure branch). + let local = local_binding + .and_then(|(local_host, local_port)| io::try_parse_ip(local_host, local_port)); + + // 2. Literal host: direct connect, no DNS. + if let Some(addr) = io::try_parse_ip(host, port16) { + let s = connect_resolved_dns( + this, + kind, + ssl_ctx, + &addr, + local.as_ref(), + options, + socket_ext_size, + ); + return if s.is_null() { + ConnectResult::Failed + } else { + ConnectResult::Socket(s) + }; + } + + // 3. Cache hit with a single clean address: fast path. + let loop_ = deref_mut(this).loop_; + let (req, already_resolved) = ffi::addrinfo_get(loop_, host.as_ptr(), port16); + if already_resolved { + let (entries, dns_err) = ffi::addrinfo_result(req); + if dns_err == 0 && !entries.is_null() && ffi::addrinfo_next(entries).is_null() { + let addr = io::addr_from_entry(entries, port16); + let s = connect_resolved_dns( + this, + kind, + ssl_ctx, + &addr, + local.as_ref(), + options, + socket_ext_size, + ); + // Invalidate the cache entry if the connect failed (R6.2.3). + ffi::addrinfo_free_request(req, s.is_null()); + return if s.is_null() { + ConnectResult::Failed + } else { + ConnectResult::Socket(s) + }; + } + // Cached ERROR or multi-address result: connecting-socket path. + } + + // 4. Slow path: connecting socket owns the request from here. + ConnectResult::Connecting(connecting::create( + this, kind, ssl_ctx, req, port16, options, + )) + } + + /// Same shape via the unix connect syscalls; no DNS, no connecting + /// socket (R6.4, context.c:636-663). Thread-local errno preserved on null. + pub fn connect_unix( + &mut self, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + path: &[u8], + options: c_int, + socket_ext_size: c_int, + ) -> *mut us_socket_t { + let this: *mut SocketGroup = self; + let fd = match io::create_connect_socket_unix(path, options) { + Ok(fd) => fd, + Err(e) => { + io::set_errno(e); + return ptr::null_mut(); + } + }; + let ssl_ctx = ssl_ctx.unwrap_or(ptr::null_mut()); + let s = start_semi_socket(this, kind, fd, options, socket_ext_size, ptr::null_mut()); + if s.is_null() { + return ptr::null_mut(); + } + if !ssl_ctx.is_null() { + attach_tls(s, ssl_ctx, true, None); + } + link_socket(this, s); + s + } + + /// Wrap an existing fd (C14: owns the fd only on success; sets + /// nonblocking itself; no on_open self-dispatch; `ipc` enables + /// SCM_RIGHTS receive and `write_fd`). POSIX only (R3.27). + pub fn from_fd( + &mut self, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + socket_ext_size: c_int, + fd: LIBUS_SOCKET_DESCRIPTOR, + ipc: bool, + ) -> *mut us_socket_t { + #[cfg(windows)] + { + let _ = (kind, ssl_ctx, socket_ext_size, fd, ipc); + ptr::null_mut() + } + #[cfg(not(windows))] + { + let this: *mut SocketGroup = self; + let loop_ = deref_mut(this).loop_; + let mut flags = SocketFlags::default(); + flags.set(SocketFlags::IS_IPC, ipc); + let s = socket::alloc( + loop_, + PollType::Socket, + fd, + this, + kind, + flags, + socket_ext_size, + ); + poll_created(loop_); + if start_poll(loop_, s, Events::READABLE | Events::WRITABLE) != 0 { + // The caller keeps ownership of `fd` on failure (C14). + poll_freed(loop_); + socket::free_unstarted(loop_, s); + return ptr::null_mut(); + } + io::nodelay(fd, true); + io::no_sigpipe(fd); + io::set_nonblocking(fd); + link_socket(this, s); + let ssl_ctx = ssl_ctx.unwrap_or(ptr::null_mut()); + if !ssl_ctx.is_null() { + // Bun.connect({fd, tls}): TLS from the first byte, client + // role, like connect_resolved_dns (socket.c:444-451). + attach_tls(s, ssl_ctx, true, None); + } + s + } + } + + /// socketpair(2): returns one end as a socket, both fds in `fds`. + /// POSIX only (R3.28); fds stay with the caller on from_fd failure. + pub fn pair( + &mut self, + kind: SocketKind, + ext_size: c_int, + fds: &mut [LIBUS_SOCKET_DESCRIPTOR; 2], + ) -> *mut us_socket_t { + if io::socketpair_stream(fds) != 0 { + return ptr::null_mut(); + } + self.from_fd(kind, None, ext_size, fds[0], false) + } +} + +// ────────────────────────────────────────────────────────────────────────── +// close_all (R3.30/R3.31) +// ────────────────────────────────────────────────────────────────────────── + +/// `us_socket_group_close_all_ex` (context.c:81-147). `also_listeners=false` +/// is the process-exit path (`Loop::close_all_groups`) — listeners are 1:1 +/// owned by a Listener/uWS App holding a raw pointer; closing them here +/// would UAF at finalize (R3.30). +pub(crate) fn close_all_ex(group: *mut SocketGroup, also_listeners: bool) { + // C6: raw slot pointers held across dispatch, possibly at tick_depth 0 — + // hold a depth ref so a nested tick's postlude cannot recycle them. + // Null loop_ = zero-initialized pre-init group: nothing to walk. + let loop_ = deref_mut(group).loop_; + if loop_.is_null() { + return; + } + ffi::ld_tick_depth_add(loop_, 1); + if also_listeners { + // Listeners first — stops new sockets from being accepted into + // head_sockets while we drain it. + loop { + let head = deref_mut(group).head_listen_sockets; + if head.is_null() { + break; + } + close_listen_socket(head); + } + } + + drain_connecting(group); + + // Graceful walk, snapshot-then-act: the tick-depth ref above keeps every + // snapshotted slot allocated for the whole walk (nested ticks defer the + // closed drain), so collect once and revalidate per entry — a dispatch + // may close or in-place adopt ANY sibling, but never recycle its slot. + let mut snapshot: Vec<*mut us_socket_t> = Vec::new(); + let mut s = deref_mut(group).head_sockets; + while !s.is_null() { + // Every close path unlinks BEFORE setting IS_CLOSED, so a closed + // node here means a corrupt chain (its `next` aims at the loop's + // closed list) — stop rather than walk it. + if header_mut(s).is_closed() { + debug_assert!(false, "closed socket linked in head_sockets"); + break; + } + snapshot.push(s); + s = header_mut(s).next; + } + for s in snapshot { + // Revalidate: an earlier dispatch may have closed `s` or adopted it + // into a foreign group. Sockets linked in mid-walk are not in the + // snapshot; the force-drain below catches them. + if !trampolines::socket_slot_live(s) + || header_mut(s).is_closed() + || header_mut(s).group != group + { + continue; + } + if !header_mut(s).is_established() { + // In-flight connect: SEMI_SOCKET close dispatches nothing (C1), + // so deliver the connect_error the natural failure path would + // have — it detaches the owner wrapper (context.c:100-115). + dispatch::dispatch_connect_error(s, libc::ECONNABORTED); + // Header reads stay valid after the dispatch: the tick-depth + // ref above keeps the slot undrained even across nested ticks. + if !header_mut(s).is_closed() { + close_raw(s, CloseCode::failure, ptr::null_mut()); + } + } else { + socket_close(s, CloseCode::normal, ptr::null_mut()); + } + } + + // TLS graceful closes may have deferred (close_notify awaiting reply); + // force-drain survivors so no socket outlives the owner's storage. + loop { + let mut s = deref_mut(group).head_sockets; + let mut progress = false; + while !s.is_null() { + close_raw(s, CloseCode::failure, ptr::null_mut()); + if header_mut(s).is_closed() { + progress = true; + break; + } + // §1.4 in-use deferral keeps `s` linked (the SSL driver epilogue + // on this stack closes it) — step past it instead of spinning. + s = header_mut(s).next; + } + if !progress { + break; + } + } + + // Backstop: a close dispatch above may have opened new connecting + // sockets; drain them so close_all leaves the group's connecting list + // empty even past the caller's retry cap (rare_data C16). + drain_connecting(group); + + // Low-prio-parked sockets reuse prev/next for the loop-wide queue, so + // they survived the walk above. Leave low_prio_state==1 so close takes + // its low-prio branch (unlink + low_prio_count--). + if deref_mut(group).low_prio_count > 0 { + // Restart from the queue head after every close: a re-entrant close + // of the cached next nulls its parked links (unlink_for_death) and + // then re-aims `next` at the closed chain (push_closed). + 'low_prio: loop { + let mut q = ffi::ld_low_prio_head(loop_); + let mut progress = false; + while !q.is_null() { + debug_assert!(!header_mut(q).is_closed()); + if header_mut(q).group != group { + q = header_mut(q).next; + continue; + } + socket_close(q, CloseCode::normal, ptr::null_mut()); + if !header_mut(q).is_closed() && header_mut(q).low_prio_state == 1 { + // §1.4 deferral kept it parked — skip so the drain ends. + q = header_mut(q).next; + continue; + } + progress = true; + break; + } + if !progress { + break 'low_prio; + } + } + debug_assert!(deref_mut(group).low_prio_count == 0); + } + ffi::ld_tick_depth_add(loop_, -1); +} + +/// Close every live connecting socket, restarting from the head after each +/// dispatch (a callback may relink ANY cached sibling). Terminates: close_raw +/// detaches `c` from the group on every path before returning, so each pass +/// strictly shrinks the live prefix. A closed node still linked belongs to a +/// close_raw frame below us mid-dispatch — step past it; its `next_pending` +/// stays intact until that frame's detach. Raw field access only (C13/C17). +fn drain_connecting(group: *mut SocketGroup) { + 'restart: loop { + let mut c = deref_mut(group).head_connecting_sockets; + while !c.is_null() { + if !ffi::conn_closed(c) { + connecting::close_raw(c); + continue 'restart; + } + c = ffi::conn_next_pending(c); + } + return; + } +} + +// ────────────────────────────────────────────────────────────────────────── +// Listen / accept (docs/semantics.md §7) +// ────────────────────────────────────────────────────────────────────────── + +#[allow(clippy::too_many_arguments)] +fn finish_listen( + group: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: *mut SslCtx, + fd: LIBUS_SOCKET_DESCRIPTOR, + options: c_int, + socket_ext_size: c_int, + defer_accept: bool, + err: &mut c_int, +) -> *mut ListenSocket { + let this: *mut SocketGroup = group; + let loop_ = deref_mut(this).loop_; + + // kind = Invalid: the listener itself never dispatches (R7.2); + // allow_half_open is inherited by accepted sockets. + let mut flags = SocketFlags::default(); + flags.set( + SocketFlags::ALLOW_HALF_OPEN, + options & LIBUS_SOCKET_ALLOW_HALF_OPEN != 0, + ); + let s = socket::alloc( + loop_, + PollType::SemiSocket, + fd, + this, + SocketKind::Invalid, + flags, + 0, + ); + poll_created(loop_); + if start_poll(loop_, s, Events::READABLE) != 0 { + // EPOLL_CTL_ADD failed (e.g. ENOSPC at max_user_watches). Report via + // BOTH the out-param and thread-local errno: Bun.listen reads *err, + // Bun.serve reads errno (context.c:379-389). + let saved = io::errno(); + io::close(fd, false); + poll_freed(loop_); + socket::free_unstarted(loop_, s); + *err = saved; + io::set_errno(saved); + return ptr::null_mut(); + } + + if !ssl_ctx.is_null() { + tls_context::ssl_ctx_up_ref(ssl_ctx); + } + let data = ListenerData { + ssl_ctx, + sni: None, + on_server_name: None, + socket_ext_size, + accept_kind: kind, + deferred_accept: false, + owner_ext: ptr::null_mut(), + on_create: None, + }; + let ls = s.cast::(); + { + let h = header_mut(s); + h.ext = bun_core::heap::into_raw(Box::new(data)).cast::(); + // Listener list chains through the header's `next` (never in + // head_sockets, so the field is free — cabi walks it the same way). + h.next = deref_mut(this).head_listen_sockets.cast::(); + } + deref_mut(this).head_listen_sockets = ls; + group_touched(this); + + if defer_accept { + listener_data(ls).deferred_accept = io::set_defer_accept(fd) == 1; + } + ls +} + +/// The SEMI_SOCKET/readable dispatch arm — the accept loop (R7.3, +/// loop.c:468-541). Called by the backend when a ready poll resolves to a +/// listener (SEMI_SOCKET without WRITABLE interest). +pub(crate) fn on_accept_poll_ready(ls: *mut ListenSocket) { + let listen_s: *mut us_socket_t = ls.cast::(); + let loop_ = { + let group = header_mut(listen_s).group; + deref_mut(group).loop_ + }; + + loop { + let listen_fd = header_mut(listen_s).fd; + let Ok((client_fd, addr)) = io::accept(listen_fd) else { + // EAGAIN drains the backlog; EMFILE/ENFILE silently dropped + // until the next readable event (TODO-in-source parity, R7.3). + return; + }; + + // Snapshot per iteration BEFORE dispatching: a callback may close + // the listener, which frees its ListenerData. + let (accept_group, accept_kind, ext_size, ssl_ctx, deferred) = { + let ld = listener_data(ls); + ( + header_mut(listen_s).group, + ld.accept_kind, + ld.socket_ext_size, + ld.ssl_ctx, + ld.deferred_accept, + ) + }; + let mut flags = SocketFlags::default(); + flags.set( + SocketFlags::ALLOW_HALF_OPEN, + header_mut(listen_s).flags.get(SocketFlags::ALLOW_HALF_OPEN), + ); + + let s = socket::alloc( + loop_, + PollType::Socket, + client_fd, + accept_group, + accept_kind, + flags, + ext_size, + ); + poll_created(loop_); + if start_poll(loop_, s, Events::READABLE) != 0 { + // Registration failed (e.g. ENOSPC): close the fd so the peer + // sees RST instead of a black hole; accept the next one. + io::close(client_fd, false); + poll_freed(loop_); + socket::free_unstarted(loop_, s); + continue; + } + + // We always use nodelay. + io::nodelay(client_fd, true); + link_socket(accept_group, s); + + if !ssl_ctx.is_null() { + attach_tls_accepted(s, ssl_ctx, ls); + } + // Protocol v2 owner attach (`Listener::on_create`): copy the hook out + // of ListenerData first — the hook may close the listener, which + // drops the ListenerData box (no borrow may span the call). + if let Some((hook, ctx)) = listener_data(ls).on_create { + hook(ctx, crate::unsafe_core::trampolines::any_socket(s)); + // Design-shape deviation (docs/design.md has on_create SUPPLY the + // owner): the hook attaches manually — surface a forgotten attach. + debug_assert!( + header_mut(s).is_closed() + || crate::dispatch::owner_ops(header_mut(s).kind).is_none() + || !header_mut(s).ext.is_null(), + "on_create hook did not attach_owner on a Protocol v2 socket" + ); + } + if !header_mut(s).is_closed() { + socket::socket_open(s, false, addr.ip()); + } + // In-place adoption (docs/design.md §Strategy 3): `s` stays the live pointer + // even if a callback adopted it — no forwarding needed (vs R3.6). + + if deferred && !header_mut(s).is_closed() { + // Kernel deferred the accept until data arrived: the first bytes + // are already buffered — dispatch readable now. The recv loop + // tolerates EWOULDBLOCK if the defer timed out with no data. + socket::on_socket_poll_ready(s, false, false, Events::READABLE); + } + + // Exit if the listen socket was closed in on_open / request handler. + if header_mut(listen_s).is_closed() { + return; + } + } +} + +/// `us_listen_socket_close` (R3.29, context.c:426-449). Never dispatches +/// on_close. The header itself is freed in the tick postlude — we can be +/// inside the accept loop right now; the accept loop snapshots everything it +/// needs before dispatching, so the `ListenerData` box is dropped here. +pub(crate) fn close_listen_socket(ls: *mut ListenSocket) { + let s: *mut us_socket_t = ls.cast::(); + if header_mut(s).is_closed() { + return; + } + let group = header_mut(s).group; + let loop_ = deref_mut(group).loop_; + let fd = header_mut(s).fd; + + stop_poll(loop_, s); + io::close(fd, false); + + // us_internal_listen_socket_ssl_free (openssl.c:2537-2570): accepted + // sockets carry `ls` in per-SSL ex_data; they may outlive the listener, + // so wipe the backref before the ListenerData box drops — sni resolution + // treats a null backref as OK. + wipe_listener_backrefs(group, loop_, ls); + + // us_internal_listen_socket_ssl_free: SSL_CTX ref + SNI tree, then the + // accept state itself (nulled so the drain sees nothing left to free). + { + let ld = listener_data(ls); + if !ld.ssl_ctx.is_null() { + tls_context::ssl_ctx_unref(ld.ssl_ctx); + ld.ssl_ctx = ptr::null_mut(); + } + ld.sni = None; + } + let ext = header_mut(s).ext; + header_mut(s).ext = ptr::null_mut(); + drop_box(ext.cast::()); + + unlink_listen_socket(group, ls); + group_maybe_unlink(group); + + socket::push_closed(s, loop_); + header_mut(s).flags.set(SocketFlags::IS_CLOSED, true); +} + +/// Clear the per-SSL listener backref (== `ls`) on every accepted socket +/// still alive: `head_sockets` AND the low-prio-parked population, which is +/// unlinked from `head_sockets` and is exactly the mid-handshake set that +/// runs SNI resolution next tick (openssl.c:2537-2570, docs/tls.md §2.6). +fn wipe_listener_backrefs(group: *mut SocketGroup, loop_: *mut Loop, ls: *mut ListenSocket) { + let target = ls.cast::(); + let mut s = deref_mut(group).head_sockets; + while !s.is_null() { + wipe_one_backref(s, target); + s = header_mut(s).next; + } + let mut q = ffi::ld_low_prio_head(loop_); + while !q.is_null() { + if header_mut(q).group == group { + wipe_one_backref(q, target); + } + q = header_mut(q).next; + } +} + +fn wipe_one_backref(s: *mut us_socket_t, target: *mut c_void) { + if let Transport::Tls(t) = &mut header_mut(s).transport { + if !t.ssl.is_null() && tls_context::listener_backref(t.ssl) == target { + tls_context::clear_listener_backref(t.ssl); + } + } +} + +/// Unlink from the singly-linked `head_listen_sockets` (pointer scan). +fn unlink_listen_socket(group: *mut SocketGroup, ls: *mut ListenSocket) { + let ls_next = header_mut(ls.cast::()).next; + let g = deref_mut(group); + if g.head_listen_sockets == ls { + g.head_listen_sockets = ls_next.cast::(); + } else { + let mut cur = g.head_listen_sockets; + while !cur.is_null() { + let cur_h = header_mut(cur.cast::()); + if cur_h.next.cast::() == ls { + cur_h.next = ls_next; + break; + } + cur = cur_h.next.cast::(); + } + } + header_mut(ls.cast::()).next = ptr::null_mut(); +} + +// ────────────────────────────────────────────────────────────────────────── +// Connect socket creation (R6.3/R6.7; the state machine lives in connecting.rs) +// ────────────────────────────────────────────────────────────────────────── + +/// Shared SEMI_SOCKET bring-up: alloc + poll(W). Null on registration +/// failure with the fd closed and errno preserved. Does NOT link. +fn start_semi_socket( + group: *mut SocketGroup, + kind: SocketKind, + fd: LIBUS_SOCKET_DESCRIPTOR, + options: c_int, + ext_size: c_int, + connect_state: *mut ConnectingSocket, +) -> *mut us_socket_t { + let loop_ = deref_mut(group).loop_; + let mut flags = SocketFlags::default(); + flags.set( + SocketFlags::ALLOW_HALF_OPEN, + options & LIBUS_SOCKET_ALLOW_HALF_OPEN != 0, + ); + let s = socket::alloc( + loop_, + PollType::SemiSocket, + fd, + group, + kind, + flags, + ext_size, + ); + header_mut(s).connect_state = connect_state; + poll_created(loop_); + // Polls WRITABLE-only until the connect completes (R6.3). + if start_poll(loop_, s, Events::WRITABLE) != 0 { + let saved = io::errno(); + io::close(fd, false); + poll_freed(loop_); + socket::free_unstarted(loop_, s); + io::set_errno(saved); + return ptr::null_mut(); + } + s +} + +/// `us_socket_group_connect_resolved_dns` (R6.3, context.c:496-528). +fn connect_resolved_dns( + group: *mut SocketGroup, + kind: SocketKind, + ssl_ctx: *mut SslCtx, + addr: &io::ConnectAddr, + local: Option<&io::ConnectAddr>, + options: c_int, + ext_size: c_int, +) -> *mut us_socket_t { + let fd = match io::create_connect_socket(addr, local, options) { + Ok(fd) => fd, + Err(e) => { + io::set_errno(e); + return ptr::null_mut(); + } + }; + io::nodelay(fd, true); + let s = start_semi_socket(group, kind, fd, options, ext_size, ptr::null_mut()); + if s.is_null() { + return ptr::null_mut(); + } + if !ssl_ctx.is_null() { + // Fast path has no connecting socket to stage the ctx on — + // attach client TLS now (R6.3). + attach_tls(s, ssl_ctx, true, None); + } + link_socket(group, s); + s +} + +/// One happy-eyeballs attempt (R6.7): built like R6.3 but no local bind, no +/// TLS (staged on `c`), ext word installed by the caller. Null on failure — +/// the caller skips to the next address. +pub(crate) fn connect_attempt( + group: *mut SocketGroup, + kind: SocketKind, + addr: &io::ConnectAddr, + options: c_int, + c: *mut ConnectingSocket, +) -> *mut us_socket_t { + let fd = match io::create_connect_socket(addr, None, options) { + Ok(fd) => fd, + Err(_) => return ptr::null_mut(), + }; + io::nodelay(fd, true); + // ext_size 0: the caller installs the connecting's 8-byte ext word. + let s = start_semi_socket(group, kind, fd, options, 0, c); + if s.is_null() { + return ptr::null_mut(); + } + link_socket(group, s); + s +} + +// ────────────────────────────────────────────────────────────────────────── +// Adopt (R3.5, in-place — docs/design.md §Strategy 3; contract C10). The +// connect_state fixup half of R3.5 lives in `SocketHeader::adopt`. +// ────────────────────────────────────────────────────────────────────────── + +/// `us_socket_adopt` minus relocation: re-stamp group/kind in place, clear +/// timeouts, fix group linkage (including low-prio parked accounting). +/// Precondition (R3.5): no adoption of closed or shut-down sockets. +pub(crate) fn adopt_socket(s: *mut us_socket_t, group: *mut SocketGroup, kind: SocketKind) { + if header_mut(s).is_closed() || socket::is_shut_down_full(s) { + return; + } + // Adoption stays within one ext-storage family (word vs inline area); + // crossing families would reinterpret the ext word (docs/design.md §Strategy 3). + debug_assert!( + dispatch::uses_group_vtable(header_mut(s).kind) == dispatch::uses_group_vtable(kind) + ); + let old_group = header_mut(s).group; + let parked = header_mut(s).low_prio_state == 1; + if !parked { + // Also fixes group->iterator if we're inside on_timeout (R3.14). + unlink_socket(old_group, s); + } else if old_group != group { + // Stays on the loop-wide low-prio queue, but ownership moves — keep + // both groups' invariants consistent so old_group can deinit. + deref_mut(old_group).low_prio_count -= 1; + deref_mut(group).low_prio_count += 1; + group_touched(group); + group_maybe_unlink(old_group); + } + { + let h = header_mut(s); + h.group = group; + h.kind = kind; + h.timeout = 255; + h.long_timeout = 255; + } + if !parked { + link_socket(group, s); + } + // Parked (state 1): queue pointers are unchanged — the loop-queue splice + // of R3.5 step 4 is structurally unnecessary without relocation. +} + +/// `adopt` + attach a fresh `SSL*`. Does NOT kick the handshake — the caller +/// repoints ext then calls `start_tls_handshake` (C10). +pub(crate) fn adopt_tls_socket( + s: *mut us_socket_t, + group: *mut SocketGroup, + kind: SocketKind, + ssl_ctx: *mut SslCtx, + sni: Option<&CStr>, + is_client: bool, +) { + // Only closed sockets refuse adopt-TLS (openssl.c:2236-2257): shut-down + // ones skip the relink (adopt_socket no-ops, like us_socket_adopt + // returning `s` unchanged) but still get the SSL attached. + if header_mut(s).is_closed() { + return; + } + adopt_socket(s, group, kind); + attach_tls(s, ssl_ctx, is_client, sni); +} + +// ────────────────────────────────────────────────────────────────────────── +// Ext + TLS attach helpers +// ────────────────────────────────────────────────────────────────────────── + +/// Release whatever the header's `ext` word owns; called from the +/// closed-socket drain right before the slab slot is returned. Rust kinds +/// own nothing (the word is the consumer's back-pointer); group-vtable ext +/// is inline in the slab slot and dies with it; listeners normally +/// dropped their `ListenerData` in `close_listen_socket` already (null here). +pub(crate) fn free_socket_ext(s: *mut us_socket_t) { + let (kind, ext) = { + let h = header_mut(s); + (h.kind, h.ext) + }; + if matches!(kind, SocketKind::Invalid) && !ext.is_null() { + header_mut(s).ext = ptr::null_mut(); + drop_box(ext.cast::()); + } +} + +/// Attach TLS to a plain socket (no handshake kick — C10/R6.3). +fn attach_tls(s: *mut us_socket_t, ssl_ctx: *mut SslCtx, is_client: bool, sni: Option<&CStr>) { + // C6: a live Transport::Tls Box must stay in place until the tick + // postlude — overwriting would Drop (SSL_free) it past the §1.4 + // deferral. adopt_tls also refuses is_tls(). + if header_mut(s).is_tls() { + debug_assert!(false, "attach_tls on an already-TLS socket"); + return; + } + let tls = TlsState::attach(s, ssl_ctx, is_client, sni); + header_mut(s).transport = Transport::Tls(tls); +} + +/// Server-side accept attach: also stores the listener backref for SNI / +/// on_server_name resolution during the handshake (per-SSL ex_data — never +/// on the shared CTX, which can outlive the listener). +fn attach_tls_accepted(s: *mut us_socket_t, ssl_ctx: *mut SslCtx, ls: *mut ListenSocket) { + let tls = TlsState::attach(s, ssl_ctx, false, None); + if !tls.ssl.is_null() { + tls_context::set_listener_backref(tls.ssl, ls.cast::()); + } + header_mut(s).transport = Transport::Tls(tls); +} + +// ────────────────────────────────────────────────────────────────────────── +// Group ⟷ loop linkage (R3.8-R3.12; context.c:171-261, loop.c:160-196) +// ────────────────────────────────────────────────────────────────────────── + +/// Lazy linking: first insertion of any socket/connecting/listener links the +/// group at the head of `loop.data.head` (R3.8). +pub(crate) fn group_touched(group: *mut SocketGroup) { + let (linked, loop_) = { + let g = deref_mut(group); + (g.linked != 0, g.loop_) + }; + if !linked { + loop_link_group(loop_, group); + deref_mut(group).linked = 1; + } +} + +/// Unlink iff linked and fully empty (incl. low_prio_count — C8). +pub(crate) fn group_maybe_unlink(group: *mut SocketGroup) { + let (linked, empty, loop_) = { + let g = deref_mut(group); + (g.linked != 0, g.is_empty(), g.loop_) + }; + if linked && empty { + loop_unlink_group(loop_, group); + deref_mut(group).linked = 0; + } +} + +pub(crate) fn loop_link_group(loop_: *mut Loop, group: *mut SocketGroup) { + let head = ffi::ld_group_head(loop_); + { + let g = deref_mut(group); + g.next = head; + g.prev = ptr::null_mut(); + } + if !head.is_null() { + deref_mut(head).prev = group; + } + ffi::ld_set_group_head(loop_, group); +} + +/// If the group is the loop's sweep cursor, advance it BEFORE unlinking so a +/// timeout handler that deinits the current group doesn't strand the sweep +/// in freed storage (R3.12). +pub(crate) fn loop_unlink_group(loop_: *mut Loop, group: *mut SocketGroup) { + let (g_prev, g_next) = { + let g = deref_mut(group); + (g.prev, g.next) + }; + let head_is_group = { + if ffi::ld_iterator(loop_) == group { + ffi::ld_set_iterator(loop_, g_next); + } + let is_head = ffi::ld_group_head(loop_) == group; + if is_head { + ffi::ld_set_group_head(loop_, g_next); + } + is_head + }; + if head_is_group { + if !g_next.is_null() { + deref_mut(g_next).prev = ptr::null_mut(); + } + } else { + // C derefs group->prev unconditionally here (a non-head linked group + // always has one). + deref_mut(g_prev).next = g_next; + if !g_next.is_null() { + deref_mut(g_next).prev = g_prev; + } + } +} + +/// Push at the head of `head_sockets`; no-op for closed sockets (R3.9). +pub(crate) fn link_socket(group: *mut SocketGroup, s: *mut us_socket_t) { + if header_mut(s).is_closed() { + return; + } + let head = deref_mut(group).head_sockets; + { + let h = header_mut(s); + h.group = group; + h.next = head; + h.prev = ptr::null_mut(); + } + if !head.is_null() { + header_mut(head).prev = s; + } + deref_mut(group).head_sockets = s; + group_touched(group); + timeouts::sweep_enable(deref_mut(group).loop_, group); +} + +/// Unlink from `head_sockets`, advancing the sweep iterator when it points +/// at `s` (R3.10/R3.14). +pub(crate) fn unlink_socket(group: *mut SocketGroup, s: *mut us_socket_t) { + { + let next = header_mut(s).next; + let g = deref_mut(group); + if g.iterator == s { + g.iterator = next; + } + } + let (prev, next) = { + let h = header_mut(s); + (h.prev, h.next) + }; + if prev == next { + // Both null ⟺ only element (head-detection idiom, context.c:215). + deref_mut(group).head_sockets = ptr::null_mut(); + } else { + if prev.is_null() { + deref_mut(group).head_sockets = next; + } else { + header_mut(prev).next = next; + } + if !next.is_null() { + header_mut(next).prev = prev; + } + } + { + let h = header_mut(s); + h.prev = ptr::null_mut(); + h.next = ptr::null_mut(); + } + timeouts::sweep_disable(deref_mut(group).loop_, group); + group_maybe_unlink(group); +} + +/// Same shape over `head_connecting_sockets` via `{prev,next}_pending` +/// (R3.11); no-op for closed connecting sockets. Raw field access only: +/// neighbor nodes may be inside their pending-resolve window (C13), where a +/// whole-struct `&mut` would span the resolver-owned `next` bytes. +pub(crate) fn link_connecting_socket(group: *mut SocketGroup, c: *mut ConnectingSocket) { + if ffi::conn_closed(c) { + return; + } + let head = deref_mut(group).head_connecting_sockets; + ffi::conn_set_group(c, group); + ffi::conn_set_next_pending(c, head); + ffi::conn_set_prev_pending(c, ptr::null_mut()); + if !head.is_null() { + ffi::conn_set_prev_pending(head, c); + } + deref_mut(group).head_connecting_sockets = c; + group_touched(group); + timeouts::sweep_enable(deref_mut(group).loop_, group); +} + +pub(crate) fn unlink_connecting_socket(group: *mut SocketGroup, c: *mut ConnectingSocket) { + let prev = ffi::conn_prev_pending(c); + let next = ffi::conn_next_pending(c); + if prev == next { + deref_mut(group).head_connecting_sockets = ptr::null_mut(); + } else { + if prev.is_null() { + deref_mut(group).head_connecting_sockets = next; + } else { + ffi::conn_set_next_pending(prev, next); + } + if !next.is_null() { + ffi::conn_set_prev_pending(next, prev); + } + } + // C parity (context.c:247-261): links stay intact after unlink so + // close_all's restart walk can step past a closed-but-still-linked + // sibling mid-dispatch (its next_pending must remain readable). + timeouts::sweep_disable(deref_mut(group).loop_, group); + group_maybe_unlink(group); +} + +// ────────────────────────────────────────────────────────────────────────── +// Poll plumbing shims (num_polls accounting mirrors us_create_poll/us_poll_free) +// ────────────────────────────────────────────────────────────────────────── + +fn start_poll(loop_: *mut Loop, s: *mut us_socket_t, events: Events) -> i32 { + #[cfg(not(windows))] + { + // PollState is the FIRST field of the header (repr(C), R2.2) — the + // header pointer IS the poll pointer. + crate::backend::poll_start_rc(s.cast::(), loop_, events) + } + #[cfg(windows)] + crate::backend::libuv::socket_poll_start(s, loop_, events) +} + +fn stop_poll(loop_: *mut Loop, s: *mut us_socket_t) { + #[cfg(not(windows))] + crate::backend::poll_stop(s.cast::(), loop_); + #[cfg(windows)] + crate::backend::libuv::socket_poll_stop(s, loop_); +} + +/// `us_create_poll` counts the poll; libuv counts active handles itself. +fn poll_created(loop_: *mut Loop) { + #[cfg(not(windows))] + { + crate::unsafe_core::poll_access::num_polls_add(loop_, 1); + } + #[cfg(windows)] + let _ = loop_; +} + +/// Failed-registration unwind only — successful sockets decrement via the +/// close path's `us_poll_free` equivalent in the drain. +fn poll_freed(loop_: *mut Loop) { + #[cfg(not(windows))] + { + crate::unsafe_core::poll_access::num_polls_add(loop_, -1); + } + #[cfg(windows)] + let _ = loop_; +} + +// Test-only: raw fd + C-ABI vtable handler need `unsafe` outside unsafe_core. +#[cfg(all(test, not(miri), any(target_os = "linux", target_os = "android")))] +#[allow(unsafe_code)] +mod tests { + use super::*; + use crate::loop_::tick; + use crate::unsafe_core::test_support::{create_test_loop, free_test_loop}; + use crate::unsafe_core::trampolines::socket_slot_live; + use bun_core::Timespec; + use std::sync::Mutex; + use std::sync::atomic::{AtomicI32, AtomicUsize, Ordering}; + + static SLOT_LIVE_AFTER_NESTED_TICK: AtomicI32 = AtomicI32::new(-1); + + unsafe extern "C" fn close_and_pump_connect_error( + s: *mut us_socket_t, + _code: c_int, + ) -> *mut us_socket_t { + let loop_ = deref_mut(header_mut(s).group).loop_; + close_raw(s, CloseCode::normal, ptr::null_mut()); + // Nested tick while the close_all walk (depth-held) still owns `s`. + tick::run_bun_tick(loop_, Some(&Timespec::EPOCH)); + SLOT_LIVE_AFTER_NESTED_TICK.store(socket_slot_live(s) as i32, Ordering::SeqCst); + s + } + + static VT: VTable = VTable { + on_open: None, + on_data: None, + on_fd: None, + on_writable: None, + on_close: None, + on_timeout: None, + on_long_timeout: None, + on_end: None, + on_connect_error: Some(close_and_pump_connect_error), + on_connecting_error: None, + on_handshake: None, + }; + + /// C6: close_all at tick_depth 0 holds raw slot pointers across dispatch; + /// a handler-pumped nested tick's postlude must defer the closed drain. + #[test] + fn close_all_defers_drain_under_nested_tick() { + let loop_ = create_test_loop(); + let mut group = Box::new(SocketGroup::default()); + group.init(loop_, Some(&VT), ptr::null_mut()); + let g: *mut SocketGroup = &mut *group; + + // SAFETY: plain fd creation; close_raw closes it during the test. + let fd = unsafe { libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0) }; + assert!(fd >= 0); + let s = socket::alloc( + loop_, + PollType::SemiSocket, + fd, + g, + SocketKind::Dynamic, + SocketFlags(0), + 0, + ); + link_socket(g, s); + poll_created(loop_); // model the armed connect poll (drain decrements) + + close_all_ex(g, false); + + assert_eq!( + SLOT_LIVE_AFTER_NESTED_TICK.load(Ordering::SeqCst), + 1, + "nested tick drained a slot the depth-0 close_all walk still holds" + ); + assert!( + socket_slot_live(s), + "slot stays queued until an outermost drain" + ); + + tick::drain_closed_sockets(loop_); + assert!(!socket_slot_live(s), "explicit drain frees the queued slot"); + + // SAFETY: heads drained above; group unlinks itself from the loop. + unsafe { SocketGroup::destroy(g) }; + drop(group); + free_test_loop(loop_); + } + + // ── shared fixture helpers for the close_all walk tests ──────────────── + + const VT_NONE: VTable = VTable { + on_open: None, + on_data: None, + on_fd: None, + on_writable: None, + on_close: None, + on_timeout: None, + on_long_timeout: None, + on_end: None, + on_connect_error: None, + on_connecting_error: None, + on_handshake: None, + }; + + /// Established plain socket linked into `g` (the close paths under test + /// own the fd from here). + fn make_test_socket(loop_: *mut Loop, g: *mut SocketGroup) -> *mut us_socket_t { + // SAFETY: plain fd creation; close_raw/socket_close closes it. + let fd = unsafe { libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0) }; + assert!(fd >= 0); + let s = socket::alloc( + loop_, + PollType::Socket, + fd, + g, + SocketKind::Dynamic, + SocketFlags(0), + 0, + ); + poll_created(loop_); + link_socket(g, s); + s + } + + /// Group-linked connecting socket with no live resolve (close_raw takes + /// the non-pending terminal arm: dispatch + detach, no keep-alive dec). + fn make_test_connecting(loop_: *mut Loop, g: *mut SocketGroup) -> *mut ConnectingSocket { + let c = crate::loop_::alloc_connecting( + loop_, + ConnectingSocket { + kind: SocketKind::Dynamic, + group: ptr::null_mut(), + loop_, + addrinfo_req: ptr::null_mut(), + ssl_ctx: ptr::null_mut(), + options: 0, + port: 0, + dns_error: 0, + error: 0, + closed: false, + shut_down: false, + shut_down_read: false, + pending_resolve_callback: false, + timeout: 255, + long_timeout: 255, + next: ptr::null_mut(), + prev_pending: ptr::null_mut(), + next_pending: ptr::null_mut(), + addrinfo_head: ptr::null_mut(), + attempts: [ptr::null_mut(); connecting::CONCURRENT_CONNECTIONS], + ext: ptr::null_mut(), + }, + ); + link_connecting_socket(g, c); + c + } + + fn dispatch_count(events: &Mutex>, addr: usize) -> usize { + events + .lock() + .unwrap() + .iter() + .filter(|&&a| a == addr) + .count() + } + + // ── graceful walk: snapshot-then-act is single-pass ───────────────────── + + static A_EVENTS: Mutex> = Mutex::new(Vec::new()); + static A_LINKER: AtomicUsize = AtomicUsize::new(0); // socket whose on_close links + static A_NEW: AtomicUsize = AtomicUsize::new(0); + + unsafe extern "C" fn a_on_close( + s: *mut us_socket_t, + _code: c_int, + _reason: *mut c_void, + ) -> *mut us_socket_t { + A_EVENTS.lock().unwrap().push(s as usize); + if s as usize == A_LINKER.load(Ordering::SeqCst) { + let g = header_mut(s).group; + let n = make_test_socket(deref_mut(g).loop_, g); + A_NEW.store(n as usize, Ordering::SeqCst); + } + s + } + + static VT_A: VTable = VTable { + on_close: Some(a_on_close), + ..VT_NONE + }; + + /// The graceful walk must visit each snapshotted socket exactly once: a + /// §5.2-deferred close (simulated via socket::test_defer_close) must NOT + /// be re-attempted when a sibling's on_close shifts list positions, and + /// a socket linked mid-walk is closed once by the force-drain backstop. + #[test] + fn close_all_graceful_walk_is_single_pass() { + let loop_ = create_test_loop(); + let mut group = Box::new(SocketGroup::default()); + group.init(loop_, Some(&VT_A), ptr::null_mut()); + let g: *mut SocketGroup = &mut *group; + + let s1 = make_test_socket(loop_, g); + let s2 = make_test_socket(loop_, g); + let s3 = make_test_socket(loop_, g); // head order: [s3, s2, s1] + A_LINKER.store(s2 as usize, Ordering::SeqCst); + socket::test_defer_close::TARGET.store(s3, Ordering::SeqCst); + socket::test_defer_close::ATTEMPTS.store(0, Ordering::SeqCst); + + close_all_ex(g, false); + + socket::test_defer_close::TARGET.store(ptr::null_mut(), Ordering::SeqCst); + assert_eq!( + socket::test_defer_close::ATTEMPTS.load(Ordering::SeqCst), + 1, + "deferred socket got more than one graceful close attempt (walk not single-pass)" + ); + let n = A_NEW.load(Ordering::SeqCst); + assert_ne!(n, 0, "mid-walk link never happened"); + for addr in [s1 as usize, s2 as usize, s3 as usize, n] { + assert_eq!( + dispatch_count(&A_EVENTS, addr), + 1, + "each socket dispatches on_close exactly once" + ); + } + assert!(deref_mut(g).head_sockets.is_null()); + + tick::drain_closed_sockets(loop_); + // SAFETY: heads drained above; group unlinks itself from the loop. + unsafe { SocketGroup::destroy(g) }; + drop(group); + free_test_loop(loop_); + } + + // ── connecting walk: restart sees nodes linked at the head mid-walk ───── + + static B_EVENTS: Mutex> = Mutex::new(Vec::new()); + static B_LINKER: AtomicUsize = AtomicUsize::new(0); + static B_NEW: AtomicUsize = AtomicUsize::new(0); + + unsafe extern "C" fn b_on_connecting_error( + c: *mut ConnectingSocket, + _code: c_int, + ) -> *mut ConnectingSocket { + B_EVENTS.lock().unwrap().push(c as usize); + if c as usize == B_LINKER.load(Ordering::SeqCst) { + let g = ffi::conn_group(c); + let n = make_test_connecting(ffi::connecting_loop(c), g); + B_NEW.store(n as usize, Ordering::SeqCst); + } + c + } + + static VT_B: VTable = VTable { + on_connecting_error: Some(b_on_connecting_error), + ..VT_NONE + }; + + /// A connecting socket linked at the head by an on_connecting_error + /// callback must still be closed by the same close_all (the cached-next + /// walk missed it; the restart walk must not). + #[test] + fn close_all_connecting_walk_restarts_from_head() { + let loop_ = create_test_loop(); + let mut group = Box::new(SocketGroup::default()); + group.init(loop_, Some(&VT_B), ptr::null_mut()); + let g: *mut SocketGroup = &mut *group; + + let c1 = make_test_connecting(loop_, g); + B_LINKER.store(c1 as usize, Ordering::SeqCst); + + close_all_ex(g, false); + + assert!( + deref_mut(g).head_connecting_sockets.is_null(), + "connecting socket linked mid-walk escaped close_all" + ); + let n = B_NEW.load(Ordering::SeqCst); + assert_ne!(n, 0, "mid-walk link never happened"); + for addr in [c1 as usize, n] { + assert_eq!( + dispatch_count(&B_EVENTS, addr), + 1, + "each connecting socket dispatches exactly once" + ); + } + + tick::drain_closed_sockets(loop_); + // SAFETY: heads drained above; group unlinks itself from the loop. + unsafe { SocketGroup::destroy(g) }; + drop(group); + free_test_loop(loop_); + } + + // ── force-drain backstop covers connecting sockets opened by on_close ─── + + static C_CONN_EVENTS: Mutex> = Mutex::new(Vec::new()); + static C_NEW: AtomicUsize = AtomicUsize::new(0); + + unsafe extern "C" fn c_on_close( + s: *mut us_socket_t, + _code: c_int, + _reason: *mut c_void, + ) -> *mut us_socket_t { + if C_NEW.load(Ordering::SeqCst) == 0 { + let g = header_mut(s).group; + let n = make_test_connecting(deref_mut(g).loop_, g); + C_NEW.store(n as usize, Ordering::SeqCst); + } + s + } + + unsafe extern "C" fn c_on_connecting_error( + c: *mut ConnectingSocket, + _code: c_int, + ) -> *mut ConnectingSocket { + C_CONN_EVENTS.lock().unwrap().push(c as usize); + c + } + + static VT_C: VTable = VTable { + on_close: Some(c_on_close), + on_connecting_error: Some(c_on_connecting_error), + ..VT_NONE + }; + + /// A connecting socket opened by an on_close callback (after the initial + /// connecting walk already ran) must be drained before close_all returns + /// — otherwise it outlives the owner's storage past the retry cap. + #[test] + fn close_all_drains_connecting_opened_during_close() { + let loop_ = create_test_loop(); + let mut group = Box::new(SocketGroup::default()); + group.init(loop_, Some(&VT_C), ptr::null_mut()); + let g: *mut SocketGroup = &mut *group; + + make_test_socket(loop_, g); + + close_all_ex(g, false); + + assert!( + deref_mut(g).head_connecting_sockets.is_null(), + "connecting socket opened by on_close escaped close_all" + ); + let n = C_NEW.load(Ordering::SeqCst); + assert_ne!(n, 0, "on_close never opened the connecting socket"); + assert_eq!(dispatch_count(&C_CONN_EVENTS, n), 1); + + tick::drain_closed_sockets(loop_); + // SAFETY: heads drained above; group unlinks itself from the loop. + unsafe { SocketGroup::destroy(g) }; + drop(group); + free_test_loop(loop_); + } + + // ── loop walk: freeing the next group during dispatch must be safe ────── + + static D_EVENTS: Mutex> = Mutex::new(Vec::new()); + static D_A_SOCK: AtomicUsize = AtomicUsize::new(0); + static D_B_SOCK: AtomicUsize = AtomicUsize::new(0); + static D_B_GROUP: AtomicUsize = AtomicUsize::new(0); + static D_POISON: AtomicUsize = AtomicUsize::new(0); + + unsafe extern "C" fn d_on_close( + s: *mut us_socket_t, + _code: c_int, + _reason: *mut c_void, + ) -> *mut us_socket_t { + D_EVENTS.lock().unwrap().push(s as usize); + if s as usize == D_A_SOCK.load(Ordering::SeqCst) { + let sb = D_B_SOCK.load(Ordering::SeqCst) as *mut us_socket_t; + close_raw(sb, CloseCode::normal, ptr::null_mut()); + let b = D_B_GROUP.swap(0, Ordering::SeqCst) as *mut SocketGroup; + // SAFETY: b's heads drained by the close above; freeing the + // walk's `next` group mid-dispatch is the scenario under test. + unsafe { + SocketGroup::destroy(b); + drop(Box::from_raw(b)); + } + // Same-size-class realloc typically reuses b's chunk, so a walk + // that still probes the cached `next` reads hostile bytes + // instead of benign stale ones (freed at the end of the test). + let poison = Box::into_raw(Box::new([0xFFu8; size_of::()])); + D_POISON.store(poison as usize, Ordering::SeqCst); + } + s + } + + static VT_D: VTable = VTable { + on_close: Some(d_on_close), + ..VT_NONE + }; + + /// close_all_groups must never touch a cached `next` group after + /// dispatch: here A's on_close closes B's socket and frees B outright + /// (UAF under ASAN if the walk probes B afterwards). + #[test] + fn close_all_groups_survives_next_group_freed_mid_walk() { + let loop_ = create_test_loop(); + let b = Box::into_raw(Box::new(SocketGroup::default())); + deref_mut(b).init(loop_, Some(&VT_D), ptr::null_mut()); + let mut a = Box::new(SocketGroup::default()); + a.init(loop_, Some(&VT_D), ptr::null_mut()); + let ga: *mut SocketGroup = &mut *a; + + // Link B's socket first, then A's: loop head = [A, B], A.next == B. + let sb = make_test_socket(loop_, b); + let sa = make_test_socket(loop_, ga); + assert_eq!(ffi::ld_group_head(loop_), ga); + assert_eq!(deref_mut(ga).next, b); + D_A_SOCK.store(sa as usize, Ordering::SeqCst); + D_B_SOCK.store(sb as usize, Ordering::SeqCst); + D_B_GROUP.store(b as usize, Ordering::SeqCst); + + assert!(Loop::close_all_groups(loop_)); + + assert_eq!(D_B_GROUP.load(Ordering::SeqCst), 0, "B was never freed"); + for addr in [sa as usize, sb as usize] { + assert_eq!(dispatch_count(&D_EVENTS, addr), 1); + } + assert!(deref_mut(ga).head_sockets.is_null()); + + tick::drain_closed_sockets(loop_); + // SAFETY: heads drained above; group unlinks itself from the loop; + // the poison box was leaked by the handler and is reclaimed here. + unsafe { + SocketGroup::destroy(ga); + drop(Box::from_raw( + D_POISON.swap(0, Ordering::SeqCst) as *mut [u8; size_of::()] + )); + } + drop(a); + free_test_loop(loop_); + } +} diff --git a/src/usockets/handle.rs b/src/usockets/handle.rs new file mode 100644 index 000000000000..79a4ced9b490 --- /dev/null +++ b/src/usockets/handle.rs @@ -0,0 +1,1726 @@ +//! Consumer-facing handles. Method surface preserved verbatim from the +//! replaced crates; internals per docs/design.md §Handle surface +//! (`SocketRef` generational handles replace raw `*mut us_socket_t`). +//! Stale-generation behavior == Detached behavior for every method. + +use core::ffi::{c_int, c_uint, c_void}; +use core::ptr::NonNull; + +use bun_core::Fd; + +use crate::LIBUS_SOCKET_ALLOW_HALF_OPEN; +use crate::connecting::{self, ConnectingSocket}; +use crate::group::{ConnectResult, SocketGroup}; +use crate::kind::SocketKind; +use crate::protocol::OwnerRef; +use crate::socket::{SocketHeader, us_socket_t}; +use crate::tls::SSL; +use crate::tls::context::{SslCtx, ssl_ctx_unref, us_bun_verify_error_t}; +use crate::unsafe_core::ext as uext; +use crate::unsafe_core::ffi::duplex; +#[cfg(windows)] +use crate::unsafe_core::ffi::named_pipe; +use crate::unsafe_core::trampolines; +use crate::unsafe_core::{ffi, slab}; +use crate::write::UsIoVec; + +// ────────────────────────────────────────────────────────────────────────── +// CloseCode +// ────────────────────────────────────────────────────────────────────────── + +/// Close semantics selector (`LIBUS_SOCKET_CLOSE_CODE_*`, contract C12). +#[repr(i32)] +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +#[allow(non_camel_case_types)] +pub enum CloseCode { + /// TLS: send close_notify, defer fd close until peer replies; TCP: FIN. + normal = 0, + /// TLS: fast-shutdown; TCP: SO_LINGER{1,0} → RST dropping unflushed + /// buffer. For `terminate()` / GC abort. + failure = 1, + /// TLS: fast-shutdown; TCP: FIN. For `_handle.close()` where JS detaches + /// immediately but written data must drain. + fast_shutdown = 2, +} + +#[allow(non_upper_case_globals)] +impl CloseCode { + pub const Normal: CloseCode = CloseCode::normal; + pub const Failure: CloseCode = CloseCode::failure; + pub const FastShutdown: CloseCode = CloseCode::fast_shutdown; +} + +// ────────────────────────────────────────────────────────────────────────── +// Generational references +// ────────────────────────────────────────────────────────────────────────── + +/// 16-byte Copy generational handle to a slab-resident socket header. +/// Every operation validates the generation against the slab slot; a +/// mismatch behaves exactly like `Detached` (no-op / 0 / None). Reading a +/// stale slot is safe: slab memory is never returned to the OS while the +/// loop lives (docs/design.md §Strategy 1-2). +// `gen` is a reserved keyword in edition 2024, hence `generation`. +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct SocketRef { + pub ptr: NonNull, + pub generation: u64, +} + +impl SocketRef { + /// Capture the current generation of a live slab-resident header. + pub fn from_live(ptr: NonNull) -> SocketRef { + SocketRef { + ptr, + generation: slab::generation_of(ptr), + } + } + + /// `Some(ptr)` iff the generation still matches (slot not recycled). + pub(crate) fn resolve(self) -> Option> { + (slab::generation_of(self.ptr) == self.generation).then_some(self.ptr) + } +} + +/// Generational handle to an in-flight connect (connecting.rs). +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct ConnectingRef { + pub ptr: NonNull, + pub generation: u64, +} + +impl ConnectingRef { + /// Capture the current generation of a live connecting-socket slot. + pub fn from_live(ptr: NonNull) -> ConnectingRef { + ConnectingRef { + ptr, + generation: slab::generation_of(ptr), + } + } + + pub(crate) fn resolve(self) -> Option> { + (slab::generation_of(self.ptr) == self.generation).then_some(self.ptr) + } +} + +/// Generation-validated reborrow; `None` == stale == Detached behavior. +/// ONLY for methods that cannot dispatch consumer callbacks: a re-entrant +/// `header_mut` inside a dispatch would invalidate this `&mut` while its +/// frame is live (C17) — dispatch-capable paths go raw via `r.resolve()`. +fn sock<'a>(r: SocketRef) -> Option<&'a mut SocketHeader> { + r.resolve().map(|p| uext::header_mut(p.as_ptr())) +} + +/// Connecting sockets are accessed via `connecting::*_raw` on the resolved +/// pointer — never through `&mut ConnectingSocket` (pending window, C13). +fn conn_ptr(r: ConnectingRef) -> Option<*mut ConnectingSocket> { + r.resolve().map(NonNull::as_ptr) +} + +// ────────────────────────────────────────────────────────────────────────── +// Opaque non-socket transports +// ────────────────────────────────────────────────────────────────────────── + +/// Opaque handle implemented in `bun_runtime::socket` (cycle-break shim). +#[repr(C)] +pub struct UpgradedDuplex { + _opaque: [u8; 0], +} + +#[cfg(windows)] +#[repr(C)] +pub struct WindowsNamedPipe { + _opaque: [u8; 0], +} + +// ────────────────────────────────────────────────────────────────────────── +// InternalSocket +// ────────────────────────────────────────────────────────────────────────── + +/// State of a single connection. `Copy` — passed by value through the +/// HTTP-client / Bun.Socket state machines. +#[derive(Copy, Clone)] +pub enum InternalSocket { + Connected(SocketRef), + Connecting(ConnectingRef), + Detached, + UpgradedDuplex(*mut UpgradedDuplex), + #[cfg(windows)] + Pipe(*mut WindowsNamedPipe), + #[cfg(not(windows))] + Pipe, +} + +// Variant + pointer-identity equality; `(Pipe, Pipe)` is deliberately `false` +// on non-Windows (no payload → identity is meaningless), matching the +// original `InternalSocket.eq` semantics. +impl PartialEq for InternalSocket { + fn eq(&self, other: &Self) -> bool { + match (*self, *other) { + (InternalSocket::Connected(a), InternalSocket::Connected(b)) => a == b, + (InternalSocket::Connecting(a), InternalSocket::Connecting(b)) => a == b, + (InternalSocket::Detached, InternalSocket::Detached) => true, + (InternalSocket::UpgradedDuplex(a), InternalSocket::UpgradedDuplex(b)) => { + core::ptr::eq(a, b) + } + #[cfg(windows)] + (InternalSocket::Pipe(a), InternalSocket::Pipe(b)) => core::ptr::eq(a, b), + #[cfg(not(windows))] + (InternalSocket::Pipe, InternalSocket::Pipe) => false, + _ => false, + } + } +} + +impl InternalSocket { + /// `Some` only for `Connected`. + #[inline] + pub fn get(&self) -> Option { + match *self { + InternalSocket::Connected(s) => Some(s), + _ => None, + } + } + #[inline] + pub fn is_detached(&self) -> bool { + matches!(self, InternalSocket::Detached) + } + #[inline] + pub fn is_named_pipe(&self) -> bool { + #[cfg(windows)] + return matches!(self, InternalSocket::Pipe(_)); + #[cfg(not(windows))] + return matches!(self, InternalSocket::Pipe); + } +} + +// ────────────────────────────────────────────────────────────────────────── +// NewSocketHandler +// ────────────────────────────────────────────────────────────────────────── + +/// The const generic only selects `SSL*` vs fd for `get_native_handle`; TLS +/// itself is per-socket (`Transport`). +#[derive(Copy, Clone)] +pub struct NewSocketHandler { + pub socket: InternalSocket, +} + +pub type SocketTCP = NewSocketHandler; +pub type SocketTLS = NewSocketHandler; +pub type SocketTcp = NewSocketHandler; +pub type SocketTls = NewSocketHandler; +pub type SocketHandler = NewSocketHandler<{ SSL }>; + +impl NewSocketHandler { + pub const DETACHED: Self = Self { + socket: InternalSocket::Detached, + }; + + /// Constructor form of [`Self::DETACHED`]. + #[inline] + pub const fn detached() -> Self { + Self::DETACHED + } + + // ── const-generic discriminant casts (debug-asserted) ─────────────────── + + #[inline] + pub const fn assume_ssl(self) -> NewSocketHandler { + debug_assert!(IS_SSL); + NewSocketHandler { + socket: self.socket, + } + } + #[inline] + pub const fn assume_tcp(self) -> NewSocketHandler { + debug_assert!(!IS_SSL); + NewSocketHandler { + socket: self.socket, + } + } + #[inline] + pub const fn cast_ssl(self) -> NewSocketHandler { + debug_assert!(IS_SSL == NEW_SSL); + NewSocketHandler { + socket: self.socket, + } + } + + #[inline] + pub fn detach(&mut self) { + self.socket = InternalSocket::Detached; + } + #[inline] + pub fn is_detached(&self) -> bool { + self.socket.is_detached() + } + #[inline] + pub fn is_named_pipe(&self) -> bool { + self.socket.is_named_pipe() + } + + // ── io ────────────────────────────────────────────────────────────────── + + /// Raw-TCP write that also reports a fatal send error; non-Connected and + /// duplex/pipe fall back to the plain write (no fatal signal). + /// Write paths go raw: TLS writes can dispatch (on_handshake), so no + /// `&mut SocketHeader` may span the call (C17). + pub fn write_check_error(&self, data: &[u8]) -> (i32, bool) { + match self.socket { + InternalSocket::Connected(r) => match r.resolve() { + Some(p) => crate::write::write_check_error(p.as_ptr(), data), + None => (0, false), + }, + InternalSocket::UpgradedDuplex(d) => (duplex::encode_and_write(d, data), false), + #[cfg(windows)] + InternalSocket::Pipe(p) => (named_pipe::encode_and_write(p, data), false), + _ => (0, false), + } + } + + pub fn write(&self, data: &[u8]) -> i32 { + match self.socket { + InternalSocket::Connected(r) => r + .resolve() + .map_or(0, |p| crate::write::write(p.as_ptr(), data)), + InternalSocket::UpgradedDuplex(d) => duplex::encode_and_write(d, data), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::encode_and_write(p, data), + _ => 0, + } + } + + /// POSIX only; duplex/pipe drop the fd and do a plain write. + pub fn write_fd(&self, data: &[u8], fd: c_int) -> i32 { + match self.socket { + InternalSocket::Connected(r) => match r.resolve() { + #[cfg(not(windows))] + Some(p) => crate::write::write_fd(p.as_ptr(), data, Fd::from_native(fd)), + #[cfg(windows)] + Some(p) => { + let _ = (p, fd); + unreachable!("write_fd is not implemented on Windows") + } + None => 0, + }, + #[cfg(windows)] + InternalSocket::Pipe(_) => self.write(data), + #[cfg(not(windows))] + InternalSocket::Pipe => self.write(data), + InternalSocket::UpgradedDuplex(_) => self.write(data), + InternalSocket::Connecting(_) | InternalSocket::Detached => 0, + } + } + + /// One writev on a real socket; sequential raw writes on duplex/pipe. + pub fn raw_writev(&self, iov: &[UsIoVec]) -> i32 { + match self.socket { + InternalSocket::Connected(r) => r + .resolve() + .map_or(0, |p| crate::write::raw_writev(p.as_ptr(), iov)), + InternalSocket::UpgradedDuplex(d) => { + let mut total: i32 = 0; + for v in iov { + let slice = ffi::iovec_as_slice(v); + let w = duplex::raw_write(d, slice); + if w > 0 { + total += w; + } + if w < slice.len() as i32 { + break; + } + } + total + } + #[cfg(windows)] + InternalSocket::Pipe(p) => { + let mut total: i32 = 0; + for v in iov { + let slice = ffi::iovec_as_slice(v); + let w = named_pipe::raw_write(p, slice); + if w > 0 { + total += w; + } + if w < slice.len() as i32 { + break; + } + } + total + } + _ => 0, + } + } + + /// Two-buffer write (frame header + payload, no copy); Connected only — + /// the POSIX writev fast path has no duplex/pipe equivalent. + /// Raw entry: TLS writes can dispatch (C17). + pub fn write2(&self, first: &[u8], second: &[u8]) -> i32 { + match self.socket { + InternalSocket::Connected(r) => r + .resolve() + .map_or(0, |p| crate::write::write2(p.as_ptr(), first, second)), + _ => 0, + } + } + + /// Bypass TLS even if `is_tls()`. + pub fn raw_write(&self, data: &[u8]) -> i32 { + match self.socket { + InternalSocket::Connected(r) => r + .resolve() + .map_or(0, |p| crate::write::raw_write(p.as_ptr(), data)), + InternalSocket::UpgradedDuplex(d) => duplex::raw_write(d, data), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::raw_write(p, data), + _ => 0, + } + } + + pub fn flush(&self) { + match self.socket { + InternalSocket::Connected(r) => { + if let Some(p) = r.resolve() { + crate::write::flush(p.as_ptr()); + } + } + InternalSocket::UpgradedDuplex(d) => duplex::flush(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::flush(p), + _ => {} + } + } + + // ── state ─────────────────────────────────────────────────────────────── + + pub fn is_closed(&self) -> bool { + match self.socket { + InternalSocket::Connected(r) => sock(r).is_none_or(|h| h.is_closed()), + InternalSocket::Connecting(r) => conn_ptr(r).is_none_or(connecting::is_closed_raw), + InternalSocket::Detached => true, + InternalSocket::UpgradedDuplex(d) => duplex::is_closed(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::is_closed(p), + #[cfg(not(windows))] + InternalSocket::Pipe => true, + } + } + + pub fn is_shutdown(&self) -> bool { + match self.socket { + // TLS-aware query (SSL SENT_SHUTDOWN counts) — R3.21. + InternalSocket::Connected(r) => match r.resolve() { + Some(p) => crate::socket::is_shut_down_full(p.as_ptr()), + None => true, + }, + InternalSocket::Connecting(r) => conn_ptr(r).is_none_or(connecting::is_shutdown_raw), + InternalSocket::Detached => true, + InternalSocket::UpgradedDuplex(d) => duplex::is_shutdown(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::is_shutdown(p), + #[cfg(not(windows))] + InternalSocket::Pipe => true, + } + } + + pub fn is_established(&self) -> bool { + match self.socket { + InternalSocket::Connected(r) => sock(r).is_some_and(|h| h.is_established()), + InternalSocket::UpgradedDuplex(d) => duplex::is_established(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::is_established(p), + _ => false, + } + } + + #[inline] + pub fn is_closed_or_has_error(&self) -> bool { + self.is_closed() || self.is_shutdown() || self.get_error() != 0 + } + + pub fn get_verify_error(&self) -> us_bun_verify_error_t { + match self.socket { + InternalSocket::Connected(r) => { + sock(r).map_or_else(us_bun_verify_error_t::default, |h| h.get_verify_error()) + } + InternalSocket::UpgradedDuplex(d) => duplex::ssl_error(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::ssl_error(p), + _ => us_bun_verify_error_t::default(), + } + } + + /// errno namespace (distinct from `dns_error`). + pub fn get_error(&self) -> i32 { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(0, |h| h.get_error()), + InternalSocket::Connecting(r) => conn_ptr(r).map_or(0, connecting::get_error_raw), + InternalSocket::Detached => 0, + InternalSocket::UpgradedDuplex(d) => duplex::ssl_error(d).error_no, + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::ssl_error(p).error_no, + #[cfg(not(windows))] + InternalSocket::Pipe => 0, + } + } + + /// Raw getaddrinfo rc for `Connecting`; 0 otherwise. + pub fn dns_error(&self) -> i32 { + match self.socket { + InternalSocket::Connecting(r) => conn_ptr(r).map_or(0, connecting::get_dns_error_raw), + _ => 0, + } + } + + // ── lifecycle ─────────────────────────────────────────────────────────── + + pub fn close(&self, code: CloseCode) { + match self.socket { + InternalSocket::Connected(r) => { + // Raw entry: on_close / on_handshake re-entry must not see a + // live `&mut SocketHeader` from this frame (C17). + if let Some(p) = r.resolve() { + crate::socket::socket_close(p.as_ptr(), code, core::ptr::null_mut()); + } + } + InternalSocket::Connecting(r) => { + // Raw entry: the synchronous connecting_error dispatch may + // re-enter through an aliasing handle (C17). + if let Some(c) = conn_ptr(r) { + connecting::close_raw(c); + } + } + InternalSocket::UpgradedDuplex(d) => duplex::close(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::close(p), + _ => {} + } + } + + pub fn shutdown(&self) { + match self.socket { + InternalSocket::Connected(r) => { + // Raw entry: the TLS shutdown path can fire on_handshake (C17). + if let Some(p) = r.resolve() { + crate::socket::socket_shutdown(p.as_ptr()); + } + } + InternalSocket::Connecting(r) => { + if let Some(c) = conn_ptr(r) { + connecting::shutdown_raw(c); + } + } + InternalSocket::UpgradedDuplex(d) => duplex::shutdown(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::shutdown(p), + _ => {} + } + } + + pub fn shutdown_read(&self) { + match self.socket { + InternalSocket::Connected(r) => { + if let Some(h) = sock(r) { + h.shutdown_read(); + } + } + InternalSocket::Connecting(r) => { + if let Some(c) = conn_ptr(r) { + connecting::shutdown_read_raw(c); + } + } + InternalSocket::UpgradedDuplex(d) => duplex::shutdown_read(d), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::shutdown_read(p), + _ => {} + } + } + + // ── timeouts / options ────────────────────────────────────────────────── + + /// Direct seconds-wheel set; no long-timeout split. + pub fn timeout(&self, seconds: c_uint) { + match self.socket { + InternalSocket::Connected(r) => { + if let Some(h) = sock(r) { + h.set_timeout(seconds); + } + } + InternalSocket::Connecting(r) => { + if let Some(c) = conn_ptr(r) { + connecting::timeout_raw(c, seconds); + } + } + InternalSocket::UpgradedDuplex(d) => duplex::set_timeout(d, seconds), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::set_timeout(p, seconds), + _ => {} + } + } + + /// >240 s splits onto the minute-granularity long-timeout wheel (C9). + pub fn set_timeout(&self, seconds: c_uint) { + match self.socket { + InternalSocket::Connected(r) => { + if let Some(h) = sock(r) { + if seconds > 240 { + h.set_timeout(0); + h.set_long_timeout(seconds / 60); + } else { + h.set_timeout(seconds); + h.set_long_timeout(0); + } + } + } + InternalSocket::Connecting(r) => { + if let Some(c) = conn_ptr(r) { + if seconds > 240 { + connecting::timeout_raw(c, 0); + connecting::long_timeout_raw(c, seconds / 60); + } else { + connecting::timeout_raw(c, seconds); + connecting::long_timeout_raw(c, 0); + } + } + } + InternalSocket::UpgradedDuplex(d) => duplex::set_timeout(d, seconds), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::set_timeout(p, seconds), + _ => {} + } + } + + pub fn set_timeout_minutes(&self, minutes: c_uint) { + match self.socket { + InternalSocket::Connected(r) => { + if let Some(h) = sock(r) { + h.set_timeout(0); + h.set_long_timeout(minutes); + } + } + InternalSocket::Connecting(r) => { + if let Some(c) = conn_ptr(r) { + connecting::timeout_raw(c, 0); + connecting::long_timeout_raw(c, minutes); + } + } + InternalSocket::UpgradedDuplex(d) => duplex::set_timeout(d, minutes * 60), + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::set_timeout(p, minutes * 60), + _ => {} + } + } + + pub fn pause_stream(&self) -> bool { + match self.socket { + InternalSocket::Connected(r) => match sock(r) { + Some(h) => { + h.pause(); + true + } + None => true, // stale == Detached behavior (true) + }, + InternalSocket::Connecting(_) => false, + InternalSocket::Detached => true, + // TODO: pause/resume upgraded duplex (parity with the old code). + InternalSocket::UpgradedDuplex(_) => false, + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::pause_stream(p), + // Never constructed off-Windows; the old on_socket! macro routed + // it to the detached default (true). + #[cfg(not(windows))] + InternalSocket::Pipe => true, + } + } + + pub fn resume_stream(&self) -> bool { + match self.socket { + InternalSocket::Connected(r) => match sock(r) { + Some(h) => { + h.resume(); + true + } + None => true, + }, + InternalSocket::Connecting(_) => false, + InternalSocket::Detached => true, + InternalSocket::UpgradedDuplex(_) => false, + #[cfg(windows)] + InternalSocket::Pipe(p) => named_pipe::resume_stream(p), + #[cfg(not(windows))] + InternalSocket::Pipe => true, + } + } + + pub fn set_no_delay(&self, enabled: bool) -> bool { + match self.socket { + InternalSocket::Connected(r) => match sock(r) { + Some(h) => { + h.set_nodelay(enabled); + true + } + None => false, + }, + _ => false, + } + } + + pub fn set_keep_alive(&self, enabled: bool, delay: u32) -> bool { + match self.socket { + InternalSocket::Connected(r) => { + sock(r).is_some_and(|h| h.set_keepalive(enabled, delay) == 0) + } + _ => false, + } + } + + /// Non-Connected reports -9 (-EBADF, node no-handle fallback). + pub fn set_tos(&self, tos: i32) -> i32 { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(-9, |h| h.set_tos(tos)), + _ => -9, + } + } + + pub fn get_tos(&self) -> i32 { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(-9, |h| h.get_tos()), + _ => -9, + } + } + + // ── TLS ───────────────────────────────────────────────────────────────── + + /// Non-Connected frees the passed (owned) SSL_CTX ref. Raw entry: resumes + /// the handshake driver, which dispatches (C17). + pub fn sni_resolve(&self, ctx: *mut SslCtx, error: bool) { + match self.socket { + InternalSocket::Connected(r) => match r.resolve() { + Some(p) => crate::socket::socket_sni_resolve(p.as_ptr(), ctx, error), + None => release_ctx(ctx), + }, + _ => release_ctx(ctx), + } + } + + /// Kick the deferred post-adopt handshake (C10 split: adopt → repoint + /// ext → handshake). Raw entry: SSL_do_handshake dispatches on_handshake + /// and the ALPN/SNI callbacks (C17). + pub fn start_tls_handshake(&self) { + if let InternalSocket::Connected(r) = self.socket { + if let Some(p) = r.resolve() { + crate::socket::socket_start_tls_handshake(p.as_ptr()); + } + } + } + + /// Feed already-read wire bytes through the TLS decrypt path. Raw entry: + /// dispatches decrypted on_data / on_handshake (C17). + pub fn tls_feed(&self, data: &[u8]) { + if let InternalSocket::Connected(r) = self.socket { + if let Some(p) = r.resolve() { + crate::socket::socket_tls_feed(p.as_ptr(), data); + } + } + } + + /// Tee inbound ciphertext to the ssl_raw_tap hook (flag write; no dispatch). + pub fn set_ssl_raw_tap(&self, enabled: bool) { + if let InternalSocket::Connected(r) = self.socket { + if let Some(h) = sock(r) { + h.set_ssl_raw_tap(enabled); + } + } + } + + /// `None` unless `IS_SSL`. + pub fn ssl(&self) -> Option<*mut SSL> { + if !IS_SSL { + return None; + } + self.get_native_handle().map(|h| h.cast()) + } + + /// `SSL*` when `IS_SSL`, fd-as-pointer otherwise. + pub fn get_native_handle(&self) -> Option<*mut c_void> { + match self.socket { + InternalSocket::Connected(r) => sock(r).and_then(|h| h.get_native_handle()), + // `(void*)-1` for live connecting sockets (R3.24, R6.13). + InternalSocket::Connecting(r) => conn_ptr(r).map(|_| usize::MAX as *mut c_void), + InternalSocket::UpgradedDuplex(d) if IS_SSL => { + let p = duplex::ssl(d); + if p.is_null() { None } else { Some(p) } + } + InternalSocket::UpgradedDuplex(_) => None, + #[cfg(windows)] + InternalSocket::Pipe(p) if IS_SSL => { + let h = named_pipe::ssl(p); + if h.is_null() { None } else { Some(h) } + } + #[cfg(windows)] + InternalSocket::Pipe(_) => None, + #[cfg(not(windows))] + InternalSocket::Pipe => None, + InternalSocket::Detached => None, + } + } + + // ── identity ──────────────────────────────────────────────────────────── + + /// Raw ext pointer (`None` for duplex/pipe/detached). Raw `*mut T` only — + /// never materializes `&mut T` (validity is the caller's), and derived + /// without `&mut SocketHeader` so a stored copy survives later header + /// reborrows (C17). + pub fn ext(&self) -> Option<*mut T> { + match self.socket { + InternalSocket::Connected(r) => r + .resolve() + .map(|p| uext::ext_ptr_raw(p.as_ptr()).cast::()), + InternalSocket::Connecting(r) => { + conn_ptr(r).map(|c| connecting::ext_place_raw(c).cast::()) + } + _ => None, + } + } + + /// Dispatch tag; `Invalid` for non-Connected/stale handles. + pub fn kind(&self) -> SocketKind { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(SocketKind::Invalid, |h| h.kind()), + _ => SocketKind::Invalid, + } + } + + /// Re-stamp the dispatch tag in place (accept-path Listener → BunSocket). + pub fn set_kind(&self, kind: SocketKind) { + if let InternalSocket::Connected(r) = self.socket { + if let Some(h) = sock(r) { + h.set_kind(kind); + } + } + } + + pub fn group(&self) -> Option<*mut SocketGroup> { + match self.socket { + InternalSocket::Connected(r) => sock(r).map(|h| h.raw_group()), + InternalSocket::Connecting(r) => conn_ptr(r).map(connecting::group_raw), + _ => None, + } + } + + /// `Fd::INVALID` unless `Connected`. + pub fn fd(&self) -> Fd { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(Fd::INVALID, |h| h.get_fd()), + _ => Fd::INVALID, + } + } + + pub fn local_port(&self) -> i32 { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(0, |h| h.local_port()), + _ => 0, + } + } + + pub fn remote_port(&self) -> i32 { + match self.socket { + InternalSocket::Connected(r) => sock(r).map_or(0, |h| h.remote_port()), + _ => 0, + } + } + + pub fn local_address<'a>(&self, buf: &'a mut [u8]) -> Option<&'a [u8]> { + match self.socket { + InternalSocket::Connected(r) => match sock(r) { + // The Err arm is unreachable in practice (verbatim C quirk: + // failures yield an empty view) — kept for shape parity. + Some(h) => match h.local_address(buf) { + Ok(v) => Some(v), + Err(e) => bun_core::Output::panic(format_args!( + "Failed to get socket's local address: {}", + e.name() + )), + }, + None => None, + }, + _ => None, + } + } + + pub fn remote_address<'a>(&self, buf: &'a mut [u8]) -> Option<&'a [u8]> { + match self.socket { + InternalSocket::Connected(r) => match sock(r) { + Some(h) => match h.remote_address(buf) { + Ok(v) => Some(v), + Err(e) => bun_core::Output::panic(format_args!( + "Failed to get socket's remote address: {}", + e.name() + )), + }, + None => None, + }, + _ => None, + } + } + + /// Sendfile short-write marker; plain-TCP only. + pub fn mark_needs_more_for_sendfile(&self) { + const { + assert!(!IS_SSL, "sendfile path is plain-TCP only"); + } + if let InternalSocket::Connected(r) = self.socket { + if let Some(h) = sock(r) { + h.send_file_needs_more(); + } + } + } + + // ── constructors ──────────────────────────────────────────────────────── + + #[inline] + pub fn from(socket: SocketRef) -> Self { + Self { + socket: InternalSocket::Connected(socket), + } + } + #[inline] + pub fn from_connecting(connecting: ConnectingRef) -> Self { + Self { + socket: InternalSocket::Connecting(connecting), + } + } + #[inline] + pub fn from_any(socket: InternalSocket) -> Self { + Self { socket } + } + #[inline] + pub fn from_duplex(d: *mut UpgradedDuplex) -> Self { + Self { + socket: InternalSocket::UpgradedDuplex(d), + } + } + /// Wrap an already-open fd; ext stores `Option>` (8-byte + /// niche layout). C14: owns the fd only on success. + pub fn from_fd( + g: &mut SocketGroup, + k: SocketKind, + handle: Fd, + this: *mut This, + is_ipc: bool, + ) -> Option { + // Fail closed (release-checked): a raw non-refcounted pointer on a + // Protocol v2 kind would be rc_deref'd at the terminal (confusion). + if crate::dispatch::owner_ops(k).is_some() { + debug_assert!( + false, + "from_fd: {k:?} is a Protocol v2 kind (use from_fd_owned)" + ); + return None; + } + Self::from_fd_raw(g, k, handle, this, is_ipc) + } + + fn from_fd_raw( + g: &mut SocketGroup, + k: SocketKind, + handle: Fd, + this: *mut This, + is_ipc: bool, + ) -> Option { + let ext_size = size_of::>>() as c_int; + let raw = g.from_fd( + k, + None, + ext_size, + handle.native() as crate::LIBUS_SOCKET_DESCRIPTOR, + is_ipc, + ); + let nn = NonNull::new(raw)?; + // Rust kinds: the ext word IS the storage (null-niche pointer bits). + // Group-vtable (Dynamic) kinds keep the slot's inline-ext-area pointer + // there instead (inline ext) — stamping would clobber it. Not for them. + debug_assert!(!crate::dispatch::uses_group_vtable(k)); + uext::header_mut(raw).ext = this.cast::(); + Some(Self { + socket: InternalSocket::Connected(SocketRef::from_live(nn)), + }) + } + + /// Connect via a `SocketGroup`, stashing `owner` in the socket ext on + /// both the fast (resolved) and slow (Connecting) arms. Strips `[v6]` + /// brackets and NUL-terminates the host. + pub fn connect_group( + g: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + raw_host: &[u8], + port: c_int, + owner: *mut Owner, + allow_half_open: bool, + ) -> Result { + // Fail closed (release-checked): a raw non-refcounted pointer on a + // Protocol v2 kind would be rc_deref'd at the terminal (confusion). + if crate::dispatch::owner_ops(kind).is_some() { + debug_assert!( + false, + "connect_group: {kind:?} is a Protocol v2 kind (use connect_owned)" + ); + return Err(ConnectError::FailedToOpenSocket); + } + Self::connect_group_raw(g, kind, ssl_ctx, raw_host, port, owner, allow_half_open) + } + + fn connect_group_raw( + g: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + raw_host: &[u8], + port: c_int, + owner: *mut Owner, + allow_half_open: bool, + ) -> Result { + let opts: c_int = if allow_half_open { + LIBUS_SOCKET_ALLOW_HALF_OPEN + } else { + 0 + }; + // getaddrinfo doesn't understand bracketed IPv6 literals; URL parsing + // leaves them in (`[::1]`), so strip here like the old connectAnon. + let host = + if raw_host.len() > 1 && raw_host[0] == b'[' && raw_host[raw_host.len() - 1] == b']' { + &raw_host[1..raw_host.len() - 1] + } else { + raw_host + }; + if host.contains(&0) { + return Err(ConnectError::FailedToOpenSocket); + } + // SocketGroup::connect needs a NUL-terminated host. + let mut stack = [0u8; 256]; + let heap: Vec; + let host_z: &core::ffi::CStr = if host.len() < stack.len() { + stack[..host.len()].copy_from_slice(host); + stack[host.len()] = 0; + core::ffi::CStr::from_bytes_with_nul(&stack[..host.len() + 1]).expect("no interior NUL") + } else { + heap = { + let mut v = Vec::with_capacity(host.len() + 1); + v.extend_from_slice(host); + v.push(0); + v + }; + core::ffi::CStr::from_bytes_with_nul(&heap).expect("no interior NUL") + }; + + let ext_size = size_of::>>() as c_int; + match g.connect(kind, ssl_ctx, host_z, port, None, opts, ext_size) { + ConnectResult::Failed => Err(ConnectError::FailedToOpenSocket), + ConnectResult::Socket(s) => { + let nn = NonNull::new(s).ok_or(ConnectError::FailedToOpenSocket)?; + uext::header_mut(s).ext = owner.cast::(); + Ok(Self { + socket: InternalSocket::Connected(SocketRef::from_live(nn)), + }) + } + ConnectResult::Connecting(cs) => { + let nn = NonNull::new(cs).ok_or(ConnectError::FailedToOpenSocket)?; + // Raw store: `cs` is already published to the resolver (C13). + connecting::set_ext_raw(cs, owner.cast::()); + Ok(Self { + socket: InternalSocket::Connecting(ConnectingRef::from_live(nn)), + }) + } + } + } + + pub fn connect_unix_group( + g: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + path: &[u8], + owner: *mut Owner, + allow_half_open: bool, + ) -> Result { + // Same release-checked v2-kind guard as `connect_group`. + if crate::dispatch::owner_ops(kind).is_some() { + debug_assert!( + false, + "connect_unix_group: {kind:?} is a Protocol v2 kind (use connect_unix_owned)" + ); + return Err(ConnectError::FailedToOpenSocket); + } + Self::connect_unix_group_raw(g, kind, ssl_ctx, path, owner, allow_half_open) + } + + fn connect_unix_group_raw( + g: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + path: &[u8], + owner: *mut Owner, + allow_half_open: bool, + ) -> Result { + let opts: c_int = if allow_half_open { + LIBUS_SOCKET_ALLOW_HALF_OPEN + } else { + 0 + }; + let ext_size = size_of::>>() as c_int; + let s = g.connect_unix(kind, ssl_ctx, path, opts, ext_size); + let nn = NonNull::new(s).ok_or(ConnectError::FailedToOpenSocket)?; + uext::header_mut(s).ext = owner.cast::(); + Ok(Self { + socket: InternalSocket::Connected(SocketRef::from_live(nn)), + }) + } + + /// Move an open socket into a new group/kind, stashing `owner` in the ext. + /// `set_socket_field` writes the resulting handle through the raw + /// `*mut Owner` (never materialize `&mut Owner` here — callers may hold + /// one across this call). + pub fn adopt_group( + tcp: SocketRef, + g: *mut SocketGroup, + kind: SocketKind, + owner: *mut Owner, + set_socket_field: impl FnOnce(*mut Owner, Self), + ) -> bool { + // Same release-checked v2-kind guard as `connect_group`. + if crate::dispatch::owner_ops(kind).is_some() { + debug_assert!( + false, + "adopt_group: {kind:?} is a Protocol v2 kind (use adopt_owned)" + ); + return false; + } + let Some(p) = tcp.resolve() else { + return false; + }; + let word = size_of::<*mut c_void>() as i32; + // In-place: the returned pointer is always the input; the generation + // is unchanged, so `tcp` stays valid. + let h = uext::header_mut(p.as_ptr()); + if h.adopt(uext::deref_mut(g), kind, word, word).is_none() { + return false; + } + h.ext = owner.cast::(); + set_socket_field( + owner, + Self { + socket: InternalSocket::Connected(tcp), + }, + ); + true + } + + // ── Protocol v2 owner surface (docs/design.md) ───────────────────────── + // Attach methods TRANSFER the passed strong ref to core; core releases it + // exactly once at the terminal (on_close / on_connect_error / silent + // SEMI_SOCKET close). On failure the ref is released here instead. + + /// Clear the core-held owner ref; subsequent dispatch on this socket + /// no-ops (cancel paths — replaces hand-nulling the raw ext). Idempotent; + /// stale/detached handles are a no-op. + pub fn detach_owner(&self) { + match self.socket { + InternalSocket::Connected(r) => { + if let Some(p) = r.resolve() { + let cs = trampolines::socket_connect_state(p.as_ptr()); + if cs.is_null() { + trampolines::release_owner_ext(p.as_ptr()); + } else { + // Live happy-eyeballs attempt: the owned ref lives on + // the ConnectingSocket — release there (also nulls + // every attempt's borrowed copy). + trampolines::release_owner_ext_connecting(cs); + } + } + } + InternalSocket::Connecting(r) => { + if let Some(c) = conn_ptr(r) { + trampolines::release_owner_ext_connecting(c); + } + } + _ => {} + } + } + + /// Stamp (or swap) the core-held owner on an already-created v2 socket + /// (accept-path `on_create`, post-connect attach). Any previous owner ref + /// is released AFTER the new one is stamped; wrapped/stale/closed handles + /// release `owner` (a closed socket's terminal already ran — no future + /// release). + pub fn attach_owner(&self, owner: OwnerRef) + where + O: bun_ptr::RefCounted + 'static, + { + let r = match self.socket { + InternalSocket::Connected(r) => r, + InternalSocket::Connecting(r) => { + let Some(c) = conn_ptr(r) else { + owner.deref(); + return; + }; + // Closed connecting socket: its terminal already released the + // owner word — a stamp here would leak the ref forever. + if connecting::is_closed_raw(c) { + owner.deref(); + return; + } + let kind = trampolines::connecting_kind(c); + if !crate::dispatch::owner_registered_as::(kind) { + debug_assert!( + false, + "attach_owner: {kind:?} not registered for this owner type" + ); + owner.deref(); + return; + } + // Owned word lives on the ConnectingSocket; attempts get + // borrowed copies (same routing as detach_owner). + let old = + trampolines::swap_owner_ext_connecting(c, owner.into_raw().cast::()); + trampolines::release_owner_for_kind(old, kind); + return; + } + _ => { + owner.deref(); + return; + } + }; + let Some(p) = r.resolve() else { + owner.deref(); + return; + }; + let h = uext::header_mut(p.as_ptr()); + // Closed-but-not-yet-freed: the terminal release already ran and no + // future terminal exists — a stamp here would leak the ref forever. + if h.is_closed() { + owner.deref(); + return; + } + let kind = h.kind(); + // Fail closed (release-checked): the kind must be a v2 kind whose + // registered owner type is exactly `O` — anything else is type + // confusion in dispatch or a permanent leak at the terminal. + if !crate::dispatch::owner_registered_as::(kind) { + debug_assert!( + false, + "attach_owner: {kind:?} not registered for this owner type" + ); + owner.deref(); + return; + } + let cs = h.connect_state; + if !cs.is_null() { + // Live happy-eyeballs attempt: attempt ext words are BORROWS — + // the owned ref lives on the ConnectingSocket. Swap it there + // (mirrors detach_owner's connect_state routing). + let old = trampolines::swap_owner_ext_connecting(cs, owner.into_raw().cast::()); + trampolines::release_owner_for_kind(old, kind); + return; + } + let old_word = h.ext; + h.ext = owner.into_raw().cast::(); + trampolines::release_owner_for_kind(old_word, kind); + } + + /// [`Self::connect_group`] with a transferred [`OwnerRef`]. + pub fn connect_owned( + g: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + raw_host: &[u8], + port: c_int, + owner: OwnerRef, + allow_half_open: bool, + ) -> Result + where + O: bun_ptr::RefCounted + 'static, + { + // Same fail-closed typed-owner check as `attach_owner`. + if !crate::dispatch::owner_registered_as::(kind) { + debug_assert!( + false, + "connect_owned: {kind:?} not registered for this owner type" + ); + owner.deref(); + return Err(ConnectError::FailedToOpenSocket); + } + match Self::connect_group_raw::( + g, + kind, + ssl_ctx, + raw_host, + port, + owner.as_ptr(), + allow_half_open, + ) { + Ok(s) => { + // The stamped word now carries this ref. + let _ = owner.into_raw(); + Ok(s) + } + Err(e) => { + owner.deref(); + Err(e) + } + } + } + + /// [`Self::connect_unix_group`] with a transferred [`OwnerRef`]. + pub fn connect_unix_owned( + g: &mut SocketGroup, + kind: SocketKind, + ssl_ctx: Option<*mut SslCtx>, + path: &[u8], + owner: OwnerRef, + allow_half_open: bool, + ) -> Result + where + O: bun_ptr::RefCounted + 'static, + { + if !crate::dispatch::owner_registered_as::(kind) { + debug_assert!( + false, + "connect_unix_owned: {kind:?} not registered for this owner type" + ); + owner.deref(); + return Err(ConnectError::FailedToOpenSocket); + } + match Self::connect_unix_group_raw::( + g, + kind, + ssl_ctx, + path, + owner.as_ptr(), + allow_half_open, + ) { + Ok(s) => { + let _ = owner.into_raw(); + Ok(s) + } + Err(e) => { + owner.deref(); + Err(e) + } + } + } + + /// [`Self::from_fd`] with a transferred [`OwnerRef`]. + pub fn from_fd_owned( + g: &mut SocketGroup, + k: SocketKind, + handle: Fd, + owner: OwnerRef, + is_ipc: bool, + ) -> Option + where + O: bun_ptr::RefCounted + 'static, + { + if !crate::dispatch::owner_registered_as::(k) { + debug_assert!( + false, + "from_fd_owned: {k:?} not registered for this owner type" + ); + owner.deref(); + return None; + } + match Self::from_fd_raw::(g, k, handle, owner.as_ptr(), is_ipc) { + Some(s) => { + let _ = owner.into_raw(); + Some(s) + } + None => { + owner.deref(); + None + } + } + } + + /// Owner-swapping adopt: moves the socket into `g`/`kind` and stamps + /// `owner` before the OLD kind's owner ref is released — no window where + /// dispatch sees a stale owner. Refused adopts release `owner` and leave + /// the old owner attached. + pub fn adopt_owned( + tcp: SocketRef, + g: *mut SocketGroup, + kind: SocketKind, + owner: OwnerRef, + ) -> Option + where + O: bun_ptr::RefCounted + 'static, + { + let Some(p) = tcp.resolve() else { + owner.deref(); + return None; + }; + if !crate::dispatch::owner_registered_as::(kind) { + debug_assert!( + false, + "adopt_owned: {kind:?} not registered for this owner type" + ); + owner.deref(); + return None; + } + let word = size_of::<*mut c_void>() as i32; + let h = uext::header_mut(p.as_ptr()); + // Live connect_state (release-checked): the ext word is a borrowed + // attempt copy owned by the ConnectingSocket — releasing it as owned + // would double-release at the connecting terminal. + if !h.connect_state.is_null() { + owner.deref(); + return None; + } + let (old_word, old_kind) = (h.ext, h.kind()); + // Adoption-family invariant (docs/design.md §Strategy 3), release-checked: a group-vtable + // source's ext word is an inline-area pointer, not an owner ref. + if crate::dispatch::uses_group_vtable(old_kind) { + debug_assert!(false, "adopt_owned from a group-vtable kind {old_kind:?}"); + owner.deref(); + return None; + } + if h.adopt(uext::deref_mut(g), kind, word, word).is_none() { + owner.deref(); + return None; + } + h.ext = owner.into_raw().cast::(); + trampolines::release_owner_for_kind(old_word, old_kind); + Some(Self { + socket: InternalSocket::Connected(tcp), + }) + } + + /// Owner-swapping TLS adopt (C10 upgrade path). Same swap ordering as + /// [`Self::adopt_owned`]; caller kicks `start_tls_handshake` afterwards. + pub fn adopt_tls_owned( + tcp: SocketRef, + g: *mut SocketGroup, + kind: SocketKind, + ssl_ctx: &mut SslCtx, + sni: Option<&core::ffi::CStr>, + is_client: bool, + owner: OwnerRef, + ) -> Option + where + O: bun_ptr::RefCounted + 'static, + { + let Some(p) = tcp.resolve() else { + owner.deref(); + return None; + }; + // Shut-down sockets refuse adoption (C parity): the kind would not be + // restamped, so stamping the new owner would dispatch it under the + // old kind's ops — type confusion. Fail closed here, not per caller. + if uext::header_mut(p.as_ptr()).is_shutdown() { + owner.deref(); + return None; + } + if !crate::dispatch::owner_registered_as::(kind) { + debug_assert!( + false, + "adopt_tls_owned: {kind:?} not registered for this owner type" + ); + owner.deref(); + return None; + } + let word = size_of::<*mut c_void>() as i32; + let h = uext::header_mut(p.as_ptr()); + // Same release-checked borrowed-attempt guard as `adopt_owned`. + if !h.connect_state.is_null() { + owner.deref(); + return None; + } + let (old_word, old_kind) = (h.ext, h.kind()); + // Same release-checked adoption-families guard as `adopt_owned`. + if crate::dispatch::uses_group_vtable(old_kind) { + debug_assert!( + false, + "adopt_tls_owned from a group-vtable kind {old_kind:?}" + ); + owner.deref(); + return None; + } + if h.adopt_tls( + uext::deref_mut(g), + kind, + ssl_ctx, + sni, + is_client, + word, + word, + ) + .is_none() + { + owner.deref(); + return None; + } + h.ext = owner.into_raw().cast::(); + trampolines::release_owner_for_kind(old_word, old_kind); + Some(Self { + socket: InternalSocket::Connected(tcp), + }) + } +} + +fn release_ctx(ctx: *mut SslCtx) { + if !ctx.is_null() { + ssl_ctx_unref(ctx); + } +} + +// ────────────────────────────────────────────────────────────────────────── +// ConnectError +// ────────────────────────────────────────────────────────────────────────── + +#[derive(Debug)] +pub enum ConnectError { + FailedToOpenSocket, +} + +impl From for crate::Error { + fn from(_: ConnectError) -> Self { + crate::Error::FailedToOpenSocket + } +} + +// ────────────────────────────────────────────────────────────────────────── +// AnySocket +// ────────────────────────────────────────────────────────────────────────── + +/// TODO(rename): ConnectedSocket. +#[derive(Copy, Clone)] +pub enum AnySocket { + SocketTcp(SocketTCP), + SocketTls(SocketTLS), +} + +/// Stamp out `AnySocket::$m` as a two-arm forward to `NewSocketHandler::$m`. +macro_rules! any_socket_forward { + ($( fn $name:ident(&self $(, $arg:ident : $ty:ty)* ) $(-> $ret:ty)? ; )*) => {$( + #[inline] + pub fn $name(&self $(, $arg: $ty)*) $(-> $ret)? { + match self { + AnySocket::SocketTcp(s) => s.$name($($arg),*), + AnySocket::SocketTls(s) => s.$name($($arg),*), + } + } + )*}; +} + +impl AnySocket { + #[inline] + pub fn is_ssl(&self) -> bool { + matches!(self, AnySocket::SocketTls(_)) + } + #[inline] + pub fn socket(&self) -> &InternalSocket { + match self { + AnySocket::SocketTcp(s) => &s.socket, + AnySocket::SocketTls(s) => &s.socket, + } + } + #[inline] + pub fn ext(&self) -> Option<*mut T> { + match self { + AnySocket::SocketTcp(s) => s.ext::(), + AnySocket::SocketTls(s) => s.ext::(), + } + } + #[inline] + pub fn terminate(&self) { + self.close(CloseCode::failure) + } + /// Null for detached/stale/duplex/pipe sockets (the old surface returned + /// the raw context pointer; a panic here would turn that into an abort). + #[inline] + pub fn group(&self) -> *mut SocketGroup { + match self { + AnySocket::SocketTcp(s) => s.group(), + AnySocket::SocketTls(s) => s.group(), + } + .unwrap_or(core::ptr::null_mut()) + } + + /// Forward of [`NewSocketHandler::attach_owner`] (generic — outside the + /// non-generic forwarding macro). + #[inline] + pub fn attach_owner(&self, owner: OwnerRef) + where + O: bun_ptr::RefCounted + 'static, + { + match self { + AnySocket::SocketTcp(s) => s.attach_owner(owner), + AnySocket::SocketTls(s) => s.attach_owner(owner), + } + } + + any_socket_forward! { + fn detach_owner(&self); + fn is_closed(&self) -> bool; + fn is_shutdown(&self) -> bool; + fn is_established(&self) -> bool; + fn close(&self, code: CloseCode); + fn write(&self, data: &[u8]) -> i32; + fn set_timeout(&self, seconds: c_uint); + fn shutdown(&self); + fn shutdown_read(&self); + fn local_port(&self) -> i32; + fn get_native_handle(&self) -> Option<*mut c_void>; + } +} + +// ────────────────────────────────────────────────────────────────────────── +// ListenSocket +// ────────────────────────────────────────────────────────────────────────── + +/// A listen socket IS a socket (layout-compatible header-first; same slab). +/// Accept state (`group::ListenerData`) hangs off the header's ext word. +/// Live only while linked into its group's `head_listen_sockets` list — +/// caching a `*mut ListenSocket` across ticks is a documented UAF +/// (docs/cabi.md §1.5). +#[repr(C)] +pub struct ListenSocket { + s: SocketHeader, +} + +impl ListenSocket { + /// R3.29: never dispatches on_close; memory is freed in the tick postlude. + pub fn close(&mut self) { + crate::group::close_listen_socket(self); + } + + /// Returned slice is a view into `buf`. + pub fn get_local_address<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], crate::Error> { + self.s.local_address(buf) + } + + pub fn get_local_port(&self) -> i32 { + self.s.local_port() + } + + pub fn get_socket(&mut self) -> &mut us_socket_t { + &mut self.s + } + + pub fn socket(&mut self) -> NewSocketHandler { + NewSocketHandler::from(SocketRef::from_live(NonNull::from(&mut self.s))) + } + + /// The group accepted sockets link into. + pub fn group(&mut self) -> &mut SocketGroup { + uext::deref_mut(self.s.group) + } + + /// Owner word of the accept state (R7.5 — the C version pointed past the + /// struct into nothing usable; this one is at least real storage). + pub fn ext(&mut self) -> &mut T { + debug_assert!( + core::mem::size_of::() <= core::mem::size_of::<*mut c_void>() + && core::mem::align_of::() <= core::mem::align_of::<*mut c_void>(), + "listener ext type does not fit the 8-byte owner word" + ); + let ls: *mut Self = self; + let ld = crate::group::listener_data(ls); + uext::deref_mut((&raw mut ld.owner_ext).cast::()) + } + + pub fn fd(&self) -> Fd { + self.s.get_fd() + } + + /// SNI node; `ssl_ctx` is up_ref'd, dropped on close/remove. `user` is + /// stashed on the selected CTX for the missing-SNI resolver. + pub fn add_server_name( + &mut self, + hostname: &core::ffi::CStr, + ssl_ctx: *mut SslCtx, + user: *mut c_void, + ) -> bool { + let ls: *mut Self = self; + let ld = crate::group::listener_data(ls); + // No default ctx → no SNI (C returns -1, openssl.c:2459-2460). + if ld.ssl_ctx.is_null() { + return false; + } + if ld.sni.is_none() { + ld.sni = Some(Box::new(crate::tls::sni::SniMap::new())); + // Idempotent across listeners sharing this SSL_CTX — the callback + // reads the listener off the SSL, not the arg (openssl.c:2463-2467). + crate::unsafe_core::ffi::register_servername_cb(ld.ssl_ctx); + } + // Stash userdata on the SSL_CTX too so per-socket lookup via + // SSL_get_SSL_CTX works regardless of which ctx the SNI cb selected + // (openssl.c:2473-2476; stamped even when the add is a duplicate). + if !ssl_ctx.is_null() { + crate::tls::context::ctx_set_sni_user(ssl_ctx, user); + } + ld.sni + .as_mut() + .expect("just inserted") + .add(hostname, ssl_ctx, user) + } + + pub fn remove_server_name(&mut self, hostname: &core::ffi::CStr) { + let ls: *mut Self = self; + if let Some(sni) = crate::group::listener_data(ls).sni.as_mut() { + sni.remove(hostname); + } + } + + /// Protocol v2 accept hook (`Listener::on_create`, docs/design.md): runs + /// once per accepted socket BEFORE its on_open dispatch — attach the + /// owner via [`AnySocket::attach_owner`] inside. Replaces any prior hook; + /// closing the listener from inside the hook drops it. Static fn + raw + /// context word (allocation-free accept path); `ctx` must stay valid for + /// the listener's lifetime. + pub fn on_create(&mut self, hook: fn(*mut c_void, AnySocket), ctx: *mut c_void) { + let ls: *mut Self = self; + crate::group::listener_data(ls).on_create = Some((hook, ctx)); + } + + /// Missing-SNI dynamic resolver registration (docs/cabi.md §4.3). + pub fn on_server_name( + &mut self, + cb: extern "C" fn( + *mut ListenSocket, + *const core::ffi::c_char, + *mut c_int, + *mut c_void, + ) -> *mut c_void, + ) { + let ls: *mut Self = self; + let ld = crate::group::listener_data(ls); + ld.on_server_name = Some(ffi::server_name_cb_from_erased(cb)); + // The dynamic resolver may need to suspend the handshake (async + // SNICallback); only the early select-certificate callback supports + // retry, so register it on the default ctx (openssl.c:2515-2526). + if !ld.ssl_ctx.is_null() { + crate::unsafe_core::ffi::register_select_cert_cb(ld.ssl_ctx); + } + } +} + +// ────────────────────────────────────────────────────────────────────────── +// ExtSlot +// ────────────────────────────────────────────────────────────────────────── + +/// `#[repr(transparent)]` owner-word newtype for `Handler::Ext`. Choosing +/// `type Ext = ExtSlot` asserts the non-re-entrancy contract on the owner; +/// zero-init is `None`. +#[repr(transparent)] +pub struct ExtSlot(Option>); + +impl ExtSlot { + /// Recover `&mut T`, or `None` for the created-but-not-yet-stamped window + /// during connect/accept. + #[inline(always)] + pub fn owner_mut(&mut self) -> Option<&mut T> { + uext::owner_mut(self.0) + } + + /// Snapshot the raw pointer word without forming a borrow (pre-close reads). + #[inline(always)] + pub fn get(&self) -> Option> { + self.0 + } +} diff --git a/src/usockets/kind.rs b/src/usockets/kind.rs new file mode 100644 index 000000000000..f0d8977da115 --- /dev/null +++ b/src/usockets/kind.rs @@ -0,0 +1,104 @@ +//! Closed-world socket dispatch tag. Discriminants FROZEN — identical to +//! `src/uws_sys/SocketKind.rs` (docs/cabi.md §3.8). Adoption families per +//! docs/design.md §Strategy 3. + +/// Stamped on the socket at creation; dispatch switches on it. +#[repr(u8)] +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub enum SocketKind { + /// Reserved zero value — dispatch on it is crash-by-design. + Invalid = 0, + /// Dispatch reads `group->vtable->on_*` (uWS C++ per-App vtable, tests). + Dynamic = 1, + BunSocketTcp = 2, + BunSocketTls = 3, + /// ABI-reserved (frozen discriminant): nothing stamps this anymore — + /// accepted sockets are born `BunSocket*` and listener headers stay + /// `Invalid`. Kept so `from_u8` stays total over the frozen 0..=22 range. + BunListenerTcp = 4, + /// ABI-reserved; see [`SocketKind::BunListenerTcp`]. + BunListenerTls = 5, + HttpClient = 6, + HttpClientTls = 7, + WsClientUpgrade = 8, + WsClientUpgradeTls = 9, + WsClient = 10, + WsClientTls = 11, + Postgres = 12, + PostgresTls = 13, + Mysql = 14, + MysqlTls = 15, + Valkey = 16, + ValkeyTls = 17, + SpawnIpc = 18, + UwsHttp = 19, + UwsHttpTls = 20, + UwsWs = 21, + UwsWsTls = 22, + /// `bun test --parallel` coordinator↔worker channel. Rust-only kind, + /// appended after the frozen cabi range — never crosses the C boundary + /// (`cabi::kind_from_c` still tops out at `UwsWsTls`). + TestChannel = 23, +} + +impl SocketKind { + /// Checked conversion from a raw `u8` (an invalid discriminant in a + /// `#[repr(u8)]` enum is immediate UB, so this stays an exhaustive match). + #[inline] + pub fn from_u8(v: u8) -> Self { + match v { + 0 => SocketKind::Invalid, + 1 => SocketKind::Dynamic, + 2 => SocketKind::BunSocketTcp, + 3 => SocketKind::BunSocketTls, + 4 => SocketKind::BunListenerTcp, + 5 => SocketKind::BunListenerTls, + 6 => SocketKind::HttpClient, + 7 => SocketKind::HttpClientTls, + 8 => SocketKind::WsClientUpgrade, + 9 => SocketKind::WsClientUpgradeTls, + 10 => SocketKind::WsClient, + 11 => SocketKind::WsClientTls, + 12 => SocketKind::Postgres, + 13 => SocketKind::PostgresTls, + 14 => SocketKind::Mysql, + 15 => SocketKind::MysqlTls, + 16 => SocketKind::Valkey, + 17 => SocketKind::ValkeyTls, + 18 => SocketKind::SpawnIpc, + 19 => SocketKind::UwsHttp, + 20 => SocketKind::UwsHttpTls, + 21 => SocketKind::UwsWs, + 22 => SocketKind::UwsWsTls, + 23 => SocketKind::TestChannel, + _ => unreachable!("invalid SocketKind discriminant {v}"), + } + } + + #[inline] + pub const fn is_tls(self) -> bool { + matches!( + self, + SocketKind::BunSocketTls + | SocketKind::BunListenerTls + | SocketKind::HttpClientTls + | SocketKind::WsClientUpgradeTls + | SocketKind::WsClientTls + | SocketKind::PostgresTls + | SocketKind::MysqlTls + | SocketKind::ValkeyTls + | SocketKind::UwsHttpTls + | SocketKind::UwsWsTls + ) + } + + /// Kinds whose handlers live in C++ (dispatch goes through the group + /// vtable and `group->ext` is the templated `HttpContext*`). + #[inline] + pub const fn is_uws(self) -> bool { + matches!( + self, + SocketKind::UwsHttp | SocketKind::UwsHttpTls | SocketKind::UwsWs | SocketKind::UwsWsTls + ) + } +} diff --git a/src/usockets/lib.rs b/src/usockets/lib.rs new file mode 100644 index 000000000000..cb7c7edb9c91 --- /dev/null +++ b/src/usockets/lib.rs @@ -0,0 +1,117 @@ +//! `bun_usockets` — native Rust implementation of the uSockets core. +//! +//! Architecture: docs/design.md. Behavioral rules: docs/semantics.md + +//! docs/tls.md. C boundary: docs/cabi.md. +//! +//! Unsafe policy (docs/design.md §Strategy 5): `unsafe` is confined to `unsafe_core/` +//! (slab, ext downcast, syscall/FFI edges, trampolines) plus the `cabi` +//! extern "C" export module. Everything else compiles under `deny(unsafe_code)`; +//! the handful of `unsafe fn` API items the surface requires carry +//! item-level allows. +#![deny(unsafe_code)] +#![allow(non_camel_case_types)] + +pub mod backend; +pub mod connecting; +pub mod dispatch; +pub mod error; +pub use error::{Error, Result}; +pub mod fault; +pub mod group; +pub mod handle; +pub mod kind; +#[path = "loop_/mod.rs"] +pub mod loop_; +mod neterr; +pub mod protocol; +pub mod socket; +pub mod tls; +pub mod udp; +pub mod write; + +// The ONLY modules allowed to contain `unsafe` (docs/design.md §Strategy 5). +#[allow(unsafe_code)] +pub mod unsafe_core; + +// extern "C" surface for surviving C/C++ (uWS, quic.c, NodeTLS, JSHS, webview). +// `#[no_mangle]` is an unsafe attribute in edition 2024, hence the allow; the +// feature gate (default-on) lets unit tests build without the symbol exports. +#[cfg(feature = "cabi")] +#[allow(unsafe_code)] +pub mod cabi; + +// ───────────────────────── crate-root FFI primitives ───────────────────────── + +/// `LIBUS_SOCKET_DESCRIPTOR` — `int` on POSIX, `SOCKET` (`uintptr`) on Windows. +#[cfg(not(windows))] +pub type LIBUS_SOCKET_DESCRIPTOR = core::ffi::c_int; +#[cfg(windows)] +pub type LIBUS_SOCKET_DESCRIPTOR = usize; + +/// `LIBUS_SOCKET_ERROR`. +#[cfg(not(windows))] +pub const LIBUS_SOCKET_ERROR: LIBUS_SOCKET_DESCRIPTOR = -1; +#[cfg(windows)] +pub const LIBUS_SOCKET_ERROR: LIBUS_SOCKET_DESCRIPTOR = usize::MAX; // INVALID_SOCKET + +/// Ext regions (loop ext, socket ext) are aligned to this (docs/cabi.md §8). +pub const LIBUS_EXT_ALIGNMENT: usize = 16; +/// Shared per-loop receive buffer length (docs/cabi.md §8). +pub const LIBUS_RECV_BUFFER_LENGTH: usize = 524288; +/// Over-read guard on both ends of `recv_buf` for SIMD unmasking. +pub const LIBUS_RECV_BUFFER_PADDING: usize = 32; +/// Short-timeout wheel granularity, seconds. +pub const LIBUS_TIMEOUT_GRANULARITY: u32 = 4; + +/// `enum us_socket_options_t` — listen / connect option flags. +pub const LIBUS_LISTEN_DEFAULT: core::ffi::c_int = 0; +pub const LIBUS_LISTEN_EXCLUSIVE_PORT: core::ffi::c_int = 1; +pub const LIBUS_SOCKET_ALLOW_HALF_OPEN: core::ffi::c_int = 2; +pub const LIBUS_LISTEN_REUSE_PORT: core::ffi::c_int = 4; +pub const LIBUS_SOCKET_IPV6_ONLY: core::ffi::c_int = 8; +pub const LIBUS_LISTEN_REUSE_ADDR: core::ffi::c_int = 16; +pub const LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE: core::ffi::c_int = 32; +pub const LIBUS_LISTEN_DEFER_ACCEPT: core::ffi::c_int = 64; + +/// `bun.timespec` — `tick_with_timeout` takes `Option<&Timespec>`. +pub use bun_core::Timespec; + +// ───────────────────────────── re-exports ──────────────────────────────────── + +pub use connecting::ConnectingSocket; +pub use dispatch as vtable; +pub use dispatch::Handler; +pub use dispatch::{ + KindEntry, KindTable, SOCKET_KIND_COUNT, TlsSideChannelHooks, validate_kind_table, +}; +pub use group::{ConnectResult, SocketGroup, VTable}; +#[cfg(windows)] +pub use handle::WindowsNamedPipe; +pub use handle::{ + AnySocket, CloseCode, ConnectError, ConnectingRef, ExtSlot, InternalSocket, ListenSocket, + NewSocketHandler, SocketHandler, SocketRef, SocketTCP, SocketTLS, SocketTcp, SocketTls, + UpgradedDuplex, +}; +pub use kind::SocketKind; +#[cfg(not(windows))] +pub use loop_::PosixLoop; +#[cfg(windows)] +pub use loop_::WindowsLoop; +pub use loop_::on_thread_exit; +pub use loop_::wakeup::{us_loop_run, us_wakeup_loop}; +pub use loop_::{InternalLoopData, Loop, LoopHandler}; +pub use loop_::{PollEvents, PollProtocol, PollRef, PollSource}; +pub use protocol::{ + CloseCode2, ConnectFailure, OwnerRef, Protocol, VerifyError, kind_entry, owner_ref_of, + this_ptr_of, +}; +pub use socket::{SocketHeader, us_socket_t}; +pub use tls::SSL; +pub use tls::context::{ + BunSocketContextOptions, SslCtx, create_bun_socket_error_t, us_bun_verify_error_t, +}; +pub use write::UsIoVec; + +/// Legacy aliases preserved from `bun_uws`. +pub type CloseKind = CloseCode; +pub type Socket = us_socket_t; diff --git a/src/usockets/loop_/mod.rs b/src/usockets/loop_/mod.rs new file mode 100644 index 000000000000..dab07f8ffb37 --- /dev/null +++ b/src/usockets/loop_/mod.rs @@ -0,0 +1,577 @@ +//! The event loop — native struct (no longer a C mirror). Field set and +//! method surface preserved from the replaced crates; tick semantics per +//! docs/semantics.md §1. Cross-thread/re-entrancy contract: `wakeup`/`defer`/ +//! the tick family/`run` take `*mut Loop`, never `&mut` (ticks re-enter Rust +//! callbacks that re-fetch the same loop — a nested tick through a `&mut` +//! receiver would alias the outer frame's exclusive borrow, C17/R1.12). + +pub mod poll_registry; +pub mod tick; +pub mod timeouts; +pub mod wakeup; + +pub use poll_registry::{PollEvents, PollProtocol, PollRef, PollSource}; + +use core::ffi::{c_char, c_int, c_void}; + +use crate::Timespec; +#[cfg(not(windows))] +use crate::backend::EventType; +use crate::connecting::ConnectingSocket; +use crate::group::SocketGroup; +use crate::socket::us_socket_t; +use crate::udp; +use crate::unsafe_core::deref; +use crate::unsafe_core::ffi; +#[cfg(not(windows))] +use crate::unsafe_core::poll_access; +use crate::unsafe_core::slab::ChunkedSlab; + +bun_core::declare_scope!(Loop, visible); + +/// Layout/semantics placeholder for the cross-thread defer mutex. Locked via +/// `bun_threading` (`Bun__lock`-compatible word): futex u32 on Linux/FreeBSD, +/// os_unfair_lock u32 on macOS, SRWLOCK (pointer) on Windows. Size is +/// ABI-checked against `Bun__lock__size` at loop creation (R1.4). +#[cfg(windows)] +pub(crate) type LoopDataMutex = *mut c_void; +#[cfg(not(windows))] +pub(crate) type LoopDataMutex = u32; + +/// Opaque wakeup primitive. POSIX: a Box'd `backend::CallbackPoll` +/// (eventfd / EVFILT_MACHPORT / EVFILT_USER — loop_/wakeup.rs). Windows: an +/// unreffed uv_async blob (`ffi::uv::AsyncBlob`). +#[repr(C)] +pub struct WakeupAsync { + _opaque: [u8; 0], +} + +/// `us_internal_loop_data_t` — now the canonical definition (the C mirror in +/// `src/uws_sys/InternalLoopData.rs` is deleted with the C core; quic.c gets +/// a checked C header or accessors per docs/cabi.md §9.2.5). +#[repr(C)] +pub struct InternalLoopData { + #[cfg(windows)] + pub sweep_timer: *mut c_void, + #[cfg(not(windows))] + pub sweep_next_tick_ns: i64, + pub sweep_timer_count: i32, + pub wakeup_async: *mut WakeupAsync, + pub head: *mut SocketGroup, + pub quic_head: *mut c_void, + pub quic_next_tick_us: i64, + #[cfg(windows)] + pub quic_timer: *mut c_void, + pub iterator: *mut SocketGroup, + pub recv_buf: *mut u8, + pub send_buf: *mut u8, + /// Lazily-created `tls::state::LoopTlsShared` (C `loop_ssl_data`): + /// loop-shared ciphertext batch + single spill slot + fatal-reason + /// scratch + plaintext read scratch. Freed by `free_loop_raw`. + pub ssl_data: *mut c_void, + pub pre_cb: Option, + pub post_cb: Option, + pub closed_udp_head: *mut udp::Socket, + pub closed_head: *mut us_socket_t, + pub low_prio_head: *mut us_socket_t, + pub low_prio_budget: i32, + pub dns_ready_head: *mut ConnectingSocket, + pub closed_connecting_head: *mut ConnectingSocket, + pub mutex: LoopDataMutex, + pub parent_ptr: *mut c_void, + /// 1 = `jsc::EventLoop`, 2 = `MiniEventLoop`. + pub parent_tag: c_char, + pub iteration_nr: u64, + /// Erased `Option<&'static jsc::VM>` — this tier cannot name jsc types. + pub jsc_vm: *const c_void, + pub tick_depth: c_int, +} + +impl InternalLoopData { + pub fn should_enable_date_header_timer(&self) -> bool { + self.sweep_timer_count > 0 + } + + #[inline] + pub fn set_parent_raw(&mut self, tag: c_char, ptr: *mut c_void) { + self.parent_tag = tag; + self.parent_ptr = ptr; + } + + #[inline] + pub fn get_parent_raw(&self) -> (c_char, *mut c_void) { + if self.parent_ptr.is_null() { + panic!("Parent loop not set - pointer is null"); + } + if self.parent_tag == 0 { + panic!("Parent loop not set - tag is zero"); + } + (self.parent_tag, self.parent_ptr) + } +} + +/// Loop handler trait with optional `pre`/`post` hooks. +pub trait LoopHandler { + const WAKEUP: unsafe extern "C" fn(*mut Loop); + const PRE: Option = None; + const POST: Option = None; +} + +/// Forces `ready_polls` to the next 16-byte boundary (LIBUS_EXT_ALIGNMENT). +#[cfg(not(windows))] +#[repr(C, align(16))] +struct ReadyPollsAlign { + _unused: [u8; 0], +} + +/// `us_loop_t` (POSIX). The C-visible PREFIX (through `ready_polls`) keeps its layout so +/// quic.c can keep reading through its checked header; the slabs appended +/// after it are crate-private (ext still starts at `loop + 1`, i.e. after +/// them — computed only by `us_loop_ext`). +#[cfg(not(windows))] +#[repr(C, align(16))] +pub struct PosixLoop { + pub internal_loop_data: InternalLoopData, + + /// Number of non-fallthrough polls in the loop. + pub num_polls: i32, + + /// Number of ready polls this iteration. + pub(crate) num_ready_polls: i32, + + /// Current index in the list of ready polls. + pub(crate) current_ready_poll: i32, + + /// The epoll/kqueue fd. + pub fd: i32, + + /// Number of polls owned by Bun. + pub active: u32, + + /// Incremented atomically by wakeup(), swapped to 0 before epoll/kqueue. + /// Non-zero → the tick returns immediately (GC-safepoint skip). C16. + pub pending_wakeups: u32, + + _ready_polls_align: ReadyPollsAlign, + + /// Kernel ready-event buffer (crate-internal; the old ready-poll back-channel + /// exposure is gone, but the C-visible prefix layout is preserved). + pub(crate) ready_polls: [EventType; 1024], + + /// Per-loop socket slab (docs/design.md §Strategy 1) — slot addresses are stable + /// and generation-bumped; released only by the tick postlude drain. + pub(crate) sockets: ChunkedSlab, + /// Per-loop connecting-socket slab (same rules; R6.11 deferred free). + pub(crate) connectings: ChunkedSlab, + /// Per-loop registered-poll slab (non-socket registrations). + pub(crate) polls: ChunkedSlab, +} + +/// Windows: uv_loop-backed loop. Prefix mirrors the libuv `us_loop_t`; the +/// slab tail is crate-private (see `PosixLoop`). Per-socket uv_poll handles +/// live on `SocketHeader.uv_p`, not the loop. +#[cfg(windows)] +#[repr(C, align(16))] +pub struct WindowsLoop { + pub internal_loop_data: InternalLoopData, + pub uv_loop: *mut c_void, + pub is_default: c_int, + pub pre: *mut c_void, + pub check: *mut c_void, + pub(crate) sockets: ChunkedSlab, + pub(crate) connectings: ChunkedSlab, + /// Registered-poll slab. Registration is vestigial on Windows + /// (uv-driven readiness stays outside the registry for now). + pub(crate) polls: ChunkedSlab, +} + +#[cfg(windows)] +pub type Loop = WindowsLoop; +#[cfg(not(windows))] +pub type Loop = PosixLoop; + +// ── slab access (the loop OWNS all socket storage — docs/design.md §Strategy 1) ────── + +/// Allocate a socket slot with `ext_capacity` inline ext bytes (size-class +/// pick; 0 for Rust kinds). The returned address is stable until the +/// loop is freed; the slot itself recycles with a generation bump at the +/// drain. Raw field projection only — waker threads fetch_add +/// `pending_wakeups` concurrently, so no `&mut Loop` may span the call +/// (R10.1, C17). +pub(crate) fn alloc_socket( + loop_: *mut Loop, + value: us_socket_t, + ext_capacity: usize, +) -> *mut us_socket_t { + ffi::slab_alloc_socket(loop_, value, ext_capacity) +} + +/// Return a socket slot to the slab (generation bump). Callers: the closed +/// drain (tick.rs) and failed-registration unwinds. +pub(crate) fn free_socket(loop_: *mut Loop, s: *mut us_socket_t) { + ffi::slab_free_socket(loop_, s); +} + +pub(crate) fn alloc_connecting(loop_: *mut Loop, value: ConnectingSocket) -> *mut ConnectingSocket { + ffi::slab_alloc_connecting(loop_, value) +} + +/// Tick-postlude release of a `closed_connecting_head` entry (R1.15/R6.11). +pub(crate) fn free_connecting(loop_: *mut Loop, c: *mut ConnectingSocket) { + ffi::slab_free_connecting(loop_, c); +} + +/// `us_loop_close_all_groups` (R3.30): walk `loop.data.head`; close every +/// group with live sockets / connecting sockets / low-prio parkees. Listen +/// sockets are deliberately NOT closed (their owner holds a raw pointer — +/// closing here would UAF). Returns whether anything was closed (rare_data +/// retry loop, C16). +fn close_all_groups_impl(loop_: *mut Loop) -> bool { + let mut closed_any = false; + // Groups already dispatched this call, compared by address only (never + // deref'd — an entry may have been freed by a close callback). A dedup + // hit means a callback repopulated the group or a §1.4 deferral kept it + // busy: leave it for the caller's retry round rather than spinning. + let mut dispatched: Vec<*mut SocketGroup> = Vec::new(); + 'restart: loop { + let mut g = ffi::ld_group_head(loop_); + while !g.is_null() { + let (busy, next) = deref::with_group(g, |gr| { + ( + !gr.head_sockets.is_null() + || !gr.head_connecting_sockets.is_null() + || gr.low_prio_count > 0, + gr.next, + ) + }); + if busy && !dispatched.contains(&g) { + dispatched.push(g); + crate::group::close_all_ex(g, false); + closed_any = true; + // The dispatch may have unlinked or freed ANY group — + // including the cached `next` — so never touch it; restart + // from the live head (the list is short, O(G²) is fine). + continue 'restart; + } + g = next; + } + break; + } + closed_any +} + +#[cfg(not(windows))] +impl PosixLoop { + // ── acquisition / lifecycle ───────────────────────────────────────────── + + /// Thread-local lazy default loop (C++ `uWS::Loop::get` — installs the + /// uWS wakeup/pre/post callbacks and the LoopData ext). + pub fn get() -> *mut Loop { + ffi::default_loop() + } + + /// Explicit creation (spawnSync's isolated loop). No loop ext. + pub fn create() -> *mut Loop { + let p = ffi::create_loop_static(Some(H::WAKEUP), H::PRE, H::POST, 0); + assert!(!p.is_null(), "us_create_loop returned null"); + p + } + + /// Frees the loop and its buffers. + /// + /// # Safety + /// `this` must have been returned by `get`/`create` and not yet freed. + // Item-level allow — the public surface keeps this `unsafe fn`. + #[allow(unsafe_code)] + pub unsafe fn destroy(this: *mut PosixLoop) { + // SAFETY: caller contract — a live loop from get/create, freed once. + unsafe { ffi::free_loop_raw(this) } + } + + // ── ticking ───────────────────────────────────────────────────────────── + + /// `us_loop_run_bun_tick(null)` — park until an event or wakeup. Parks + /// only when `num_polls > 0`; returns immediately when + /// `pending_wakeups != 0` (C16). Takes `*mut`: a poll callback may + /// re-enter the tick (R1.12) while this frame is live (C17). + pub fn tick(this: *mut PosixLoop) { + tick::run_bun_tick(this, None); + } + + /// Bun tick with a zero timespec (no idle park). + pub fn tick_without_idle(this: *mut PosixLoop) { + tick::run_bun_tick(this, Some(&Timespec::EPOCH)); + } + + pub fn tick_with_timeout(this: *mut PosixLoop, timespec: Option<&Timespec>) { + tick::run_bun_tick(this, timespec); + } + + /// Classic `us_loop_run`: blocks until no non-fallthrough polls remain. + pub fn run(this: *mut PosixLoop) { + tick::run(this); + } + + // ── wakeup / deferral ─────────────────────────────────────────────────── + + /// Run `defer_callback(user_data)` once on the loop thread next iteration; + /// cross-thread-safe (C++ deferMutex — see loop_/wakeup.rs). + pub fn next_tick( + &mut self, + user_data: *mut c_void, + defer_callback: unsafe extern "C" fn(*mut c_void), + ) { + wakeup::defer(self, user_data, defer_callback); + } + + // ── poll / keep-alive accounting ──────────────────────────────────────── + // Raw-place twins only — no `&mut self` accounting methods exist: any + // `&mut Loop` on a published loop spans `pending_wakeups`, which foreign + // threads `fetch_add` concurrently (R10.6, C17). Wakeups likewise go + // through the raw [`wakeup::us_wakeup_loop`], never a method. + + pub fn inc_raw(this: *mut Self) { + bun_core::scoped_log!(Loop, "inc_raw -> {}", poll_access::num_polls(this) + 1); + poll_access::num_polls_add(this, 1); + } + + pub fn dec_raw(this: *mut Self) { + bun_core::scoped_log!(Loop, "dec_raw -> {}", poll_access::num_polls(this) - 1); + poll_access::num_polls_add(this, -1); + } + + pub fn ref_raw(this: *mut Self) { + bun_core::scoped_log!(Loop, "ref_raw -> {}", poll_access::num_polls(this) + 1); + poll_access::loop_ref_raw(this); + } + + pub fn unref_raw(this: *mut Self) { + bun_core::scoped_log!(Loop, "unref_raw -> {}", poll_access::num_polls(this) - 1); + poll_access::loop_unref_raw(this); + } + + /// Raise `num_polls` to at least `min` — same raw-place rule as + /// [`Self::inc_raw`] (HTTP daemon keep-alive floor). + pub fn raise_num_polls_to(this: *mut Self, min: i32) { + poll_access::num_polls_raise(this, min); + } + + pub fn is_active(&self) -> bool { + self.active > 0 + } + + /// `add_active`/`sub_active` twins — same raw-place rule as + /// [`Self::inc_raw`]; both saturate. + pub fn add_active_raw(this: *mut Self, value: u32) { + bun_core::scoped_log!(Loop, "add_active_raw + {}", value); + poll_access::loop_active_add(this, value); + } + + pub fn sub_active_raw(this: *mut Self, value: u32) { + bun_core::scoped_log!(Loop, "sub_active_raw - {}", value); + poll_access::loop_active_sub(this, value); + } + + /// Bulk `ref_`: applies `count` queued concurrent refs at once — same + /// raw-place rule as [`Self::inc_raw`]. + pub fn ref_count_raw(this: *mut Self, count: i32) { + bun_core::scoped_log!(Loop, "ref x {}", count); + poll_access::loop_ref_count_raw(this, count); + } + + pub fn unref_count_raw(this: *mut Self, count: i32) { + bun_core::scoped_log!(Loop, "unref x {}", count); + poll_access::loop_unref_count_raw(this, count); + } + + // ── introspection ─────────────────────────────────────────────────────── + + pub fn iteration_number(&self) -> u64 { + self.internal_loop_data.iteration_nr + } + + pub fn should_enable_date_header_timer(&self) -> bool { + self.internal_loop_data.should_enable_date_header_timer() + } + + // ── uWS / quic bridges ────────────────────────────────────────────────── + + /// `uws_res_clear_corked_socket` — force-drain both cork slots. Takes + /// `*mut`: the flush dispatches consumer write callbacks that may + /// re-derive loop borrows (C17), same as the tick family. + pub fn uncork(this: *mut PosixLoop) { + ffi::clear_corked_socket(this); + } + + /// `uws_loop_date_header_timer_update`. Takes `*mut` — same raw-place + /// rule as the accounting twins (foreign wakers touch `pending_wakeups`). + pub fn update_date(this: *mut Self) { + ffi::date_header_timer_update(this); + } + + /// Packetize HTTP/3 stream writes since the last process_conns. + /// Early-returns when `quic_head` is null. Takes `*mut`: the flush can + /// dispatch consumer stream callbacks that re-derive loop borrows (C17). + pub fn drain_quic_if_necessary(this: *mut PosixLoop) { + if ffi::ld_quic_head(this).is_null() { + return; + } + ffi::quic_flush_if_pending(this); + } + + // ── teardown ──────────────────────────────────────────────────────────── + + /// Free everything queued on `closed_head`/`closed_connecting_head`. + /// Normally the tick postlude does this; at process/Worker teardown the + /// loop has stopped, so shutdown drains explicitly (C6, C16). + pub fn drain_closed_sockets(this: *mut Self) { + tick::drain_closed_sockets(this); + } + + /// `close_all` on every group linked to this loop — the FULL linked list, + /// reporting whether any group was closed (rare_data retry loop, C16). + /// Takes `*mut`: on_close dispatches into consumer JS which may re-derive + /// loop borrows (Bun.connect in a close handler — C17, group.rs re-entry). + pub fn close_all_groups(this: *mut PosixLoop) -> bool { + close_all_groups_impl(this) + } +} + +#[cfg(windows)] +impl WindowsLoop { + // Same consumer surface as `PosixLoop`, routed through libuv (poll + // accounting proxies into `uv_loop.active_handles`). + + pub fn get() -> *mut Loop { + ffi::default_loop_with_native(bun_libuv_sys::Loop::get().cast::()) + } + + pub fn create() -> *mut Loop { + let p = ffi::create_loop_static(Some(H::WAKEUP), H::PRE, H::POST, 0); + assert!(!p.is_null(), "us_create_loop returned null"); + p + } + + /// # Safety + /// `this` must have been returned by `get`/`create` and not yet freed. + #[allow(unsafe_code)] + pub unsafe fn destroy(this: *mut WindowsLoop) { + // SAFETY: caller contract — a live loop from get/create, freed once. + unsafe { ffi::free_loop_raw(this) } + } + + /// `us_loop_run` semantics (libuv.c:214-219): uv_run ONCE — parks until + /// an event or the uv sweep/QUIC timer fires. Takes `*mut`: uv callbacks + /// may re-enter the tick (C17/R1.12). + pub fn tick(this: *mut WindowsLoop) { + tick::run(this); + } + + /// One `uv_run(UV_RUN_NOWAIT)` pump (`us_loop_pump`) — never parks. + pub fn tick_without_idle(this: *mut WindowsLoop) { + tick::pump(this); + } + + /// The uv timers supply the deadline; uv_run ONCE parks until one fires. + pub fn tick_with_timeout(this: *mut WindowsLoop, _timespec: Option<&Timespec>) { + tick::run(this); + } + + pub fn run(this: *mut WindowsLoop) { + tick::run(this); + } + + pub fn next_tick( + &mut self, + user_data: *mut c_void, + defer_callback: unsafe extern "C" fn(*mut c_void), + ) { + wakeup::defer(self, user_data, defer_callback); + } + + // Poll/keep-alive accounting proxies (uv active handles keep the loop + // alive on Windows). Raw-pointer twins only — parity with the POSIX raw + // twins so cross-platform callers never form `&mut Loop`. + + pub fn inc_raw(this: *mut Self) { + crate::backend::libuv::inc_active(this); + } + + pub fn dec_raw(this: *mut Self) { + crate::backend::libuv::dec_active(this); + } + + pub fn ref_raw(this: *mut Self) { + crate::backend::libuv::inc_active(this); + } + + pub fn unref_raw(this: *mut Self) { + crate::backend::libuv::dec_active(this); + } + + pub fn is_active(&self) -> bool { + let this: *const WindowsLoop = self; + crate::backend::libuv::is_active(this.cast_mut()) + } + + pub fn add_active_raw(this: *mut Self, value: u32) { + crate::backend::libuv::add_active(this, value); + } + + pub fn sub_active_raw(this: *mut Self, value: u32) { + crate::backend::libuv::sub_active(this, value); + } + + pub fn unref_count_raw(this: *mut Self, count: i32) { + crate::backend::libuv::unref_count(this, count); + } + + pub fn iteration_number(&self) -> u64 { + self.internal_loop_data.iteration_nr + } + + pub fn should_enable_date_header_timer(&self) -> bool { + self.internal_loop_data.should_enable_date_header_timer() + } + + /// See `PosixLoop::uncork` — `*mut` because the flush can re-enter (C17). + pub fn uncork(this: *mut WindowsLoop) { + ffi::clear_corked_socket(this); + } + + /// See `PosixLoop::update_date` — `*mut`, raw-place rule. + pub fn update_date(this: *mut Self) { + ffi::date_header_timer_update(this); + } + + /// See `PosixLoop::drain_quic_if_necessary` — `*mut`, re-entrant (C17). + pub fn drain_quic_if_necessary(this: *mut WindowsLoop) { + if ffi::ld_quic_head(this).is_null() { + return; + } + ffi::quic_flush_if_pending(this); + } + + pub fn drain_closed_sockets(this: *mut Self) { + tick::drain_closed_sockets(this); + } + + /// See `PosixLoop::close_all_groups` — `*mut`, on_close re-enters (C17). + pub fn close_all_groups(this: *mut WindowsLoop) -> bool { + close_all_groups_impl(this) + } + + /// `uv_loop.active_handles` — debug-diagnostic keep-alive counter + /// (FilePoll activate/deactivate scoped logging). + pub fn active_count(&self) -> u32 { + let this: *const WindowsLoop = self; + crate::backend::libuv::active_count(this.cast_mut()) + } +} + +/// C++ `bun_clear_loop_at_thread_exit` → `uWS::Loop::clearLoopAtThreadExit`: +/// FREES this thread's lazily-created uWS loop and its 512 KiB recv buffer, +/// then clears the TLS pointer. Workers must call this on exit or leak both. +pub fn on_thread_exit() { + ffi::clear_loop_at_thread_exit(); +} diff --git a/src/usockets/loop_/poll_registry.rs b/src/usockets/loop_/poll_registry.rs new file mode 100644 index 000000000000..241daae7ebc4 --- /dev/null +++ b/src/usockets/loop_/poll_registry.rs @@ -0,0 +1,686 @@ +//! First-class non-socket poll registrations (docs/design.md §Non-socket poll registrations). +//! Consumers register a [`PollSource`] with a refcounted owner; readiness +//! dispatches through the Protocol-v2 guard (a strong owner ref is held +//! across the handler, so an owner dropping to zero refs mid-callback stays +//! alive until dispatch returns). Slots live in the loop's `polls` slab with +//! the same generation scheme as sockets: a stale [`PollRef`] is a no-op, +//! never a dangling deref. Keep-alive is integrated with `num_polls`/`active` +//! (`Loop::ref_`/`unref`) — consumers never poke loop fields. +//! +//! `src/io/`'s FilePoll moved onto this registry; the +//! `Bun__internal_dispatch_ready_poll` extern, the `ready_polls`/ +//! `current_ready_poll` back-channel, and the tagged-pointer udata +//! convention are gone. + +use core::ffi::c_void; +use core::ptr::NonNull; + +use crate::backend::{PollState, PollType}; +use crate::loop_::Loop; +use crate::protocol::OwnerRef; +use crate::unsafe_core::{ffi, poll_access, slab, trampolines}; + +/// What a registration watches. `Fd` is cross-platform; the darwin variants +/// map to kqueue filters (EVFILT_PROC/NOTE_EXIT, EVFILT_MACHPORT, +/// EVFILT_MEMORYSTATUS) and only exist on macOS. +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub enum PollSource { + /// Level-triggered fd readiness. At least one direction must be set. + Fd { + fd: crate::LIBUS_SOCKET_DESCRIPTOR, + readable: bool, + writable: bool, + }, + /// Exceptional-condition readiness (`EPOLLPRI` — Linux PSI trigger fds); + /// delivered to the handler as `readable`. + #[cfg(any(target_os = "linux", target_os = "android"))] + Pri { fd: crate::LIBUS_SOCKET_DESCRIPTOR }, + /// Process-exit watch (`EVFILT_PROC`/`NOTE_EXIT` on `pid`). + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + Proc { pid: i32 }, + /// Mach port receive-readiness (`EVFILT_MACHPORT`; the handler performs + /// its own receive). + #[cfg(target_os = "macos")] + Machport { port: u32 }, + /// System memory-pressure transitions (`EVFILT_MEMORYSTATUS`, + /// WARN|CRITICAL, EV_CLEAR); the level arrives in [`PollEvents::fflags`]. + #[cfg(target_os = "macos")] + Memorystatus, +} + +/// Armed-source discriminant stored in the slot. Fd interest deliberately +/// lives ONLY in the slot's `PollState` polling bits (single source of truth +/// — `PollRef::change` updates them); this enum carries what disarm needs. +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub(crate) enum ArmedSource { + Fd, + #[cfg(any(target_os = "linux", target_os = "android"))] + Pri, + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + Proc { + pid: i32, + }, + #[cfg(target_os = "macos")] + Machport { + port: u32, + }, + #[cfg(target_os = "macos")] + Memorystatus, +} + +/// Readiness payload. `fflags`/`data` are the raw kqueue filter payload +/// (memory-pressure level, NOTE_EXIT status); 0 on epoll/libuv. +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct PollEvents { + pub readable: bool, + pub writable: bool, + pub error: bool, + pub eof: bool, + pub fflags: u32, + pub data: i64, +} + +/// Safe registered-poll handler set (the non-socket sibling of +/// [`crate::protocol::Protocol`]). The handler may synchronously call any +/// [`PollRef`] method, including `unregister` (C17). +pub trait PollProtocol: Sized + 'static { + /// Loop-local (!Send) interior-mutable owner. `register` transfers one + /// strong ref to the slot; the trampoline additionally brackets every + /// dispatch with its own ref, so the owner's LAST release always happens + /// outside a running handler. + type Owner: bun_ptr::RefCounted + 'static; + + fn on_event(owner: &Self::Owner, poll: PollRef, events: PollEvents); + + /// Loop-teardown notice, fired once per still-registered owner BEFORE the + /// transferred ref is released and the polls slab is unmapped: any + /// consumer-side `PollRef` for this slot must never be used again. + fn on_loop_teardown(_owner: &Self::Owner) {} +} + +/// Type-erased owner ops for a registered poll (monomorphized once per +/// protocol by `trampolines::poll_owner_ops`). +pub(crate) struct PollOwnerOps { + /// SAFETY (caller): `word` points to a live registered owner whose slot + /// still holds the transferred strong ref. + pub(crate) dispatch: unsafe fn(*mut c_void, PollRef, PollEvents), + /// SAFETY (caller): releases the one outstanding transferred strong ref. + pub(crate) deref: unsafe fn(*mut c_void), + /// SAFETY (caller): loop teardown only; `word` as in `deref`, ref still + /// outstanding (invalidation runs before the release). + pub(crate) teardown: unsafe fn(*mut c_void), +} + +/// Slab-resident registration. `PollState` is the FIRST field (repr(C)) so +/// the kernel udata pointer doubles as the slot pointer, exactly like +/// sockets (poll kind byte = `PollType::Registered`). +#[repr(C)] +pub struct RegisteredPoll { + pub(crate) state: PollState, + source: ArmedSource, + loop_: *mut Loop, + /// One strong owner ref, transferred at `register`. INVARIANT: always + /// taken out (nulled) BEFORE the slot is freed — `unregister`, the + /// register-failure unwind, and loop teardown all release it outside + /// every slab borrow (an owner destructor may re-enter the registry; + /// deliberately no `Drop` impl, so a missed release leaks, never UB). + owner: *mut c_void, + ops: &'static PollOwnerOps, + keep_alive: bool, +} + +const _: () = assert!(core::mem::offset_of!(RegisteredPoll, state) == 0); + +/// Loop-teardown extraction: take the slot's owner word (nulling it) so the +/// ref can be released AFTER the slab borrow ends (ffi::free_loop_raw). +pub(crate) fn take_owner_for_teardown( + p: NonNull, +) -> (&'static PollOwnerOps, *mut c_void) { + poll_access::with_registered(p.as_ptr(), |q| { + ( + q.ops, + core::mem::replace(&mut q.owner, core::ptr::null_mut()), + ) + }) +} + +/// Generation-checked Copy handle to a registration. Every method validates +/// against the slab slot; stale == silent no-op (same rule as `SocketRef`). +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct PollRef { + ptr: NonNull, + generation: u64, +} + +impl PollRef { + pub(crate) fn from_live(ptr: NonNull) -> PollRef { + PollRef { + ptr, + generation: slab::generation_of(ptr), + } + } + + fn resolve(self) -> Option> { + (slab::generation_of(self.ptr) == self.generation).then_some(self.ptr) + } + + pub fn is_alive(self) -> bool { + self.resolve().is_some() + } + + /// Toggle loop keep-alive (`Loop::ref_`/`unref`). Idempotent per state. + pub fn set_keep_alive(self, keep_alive: bool) { + let Some(p) = self.resolve() else { return }; + let (loop_, prev) = poll_access::with_registered(p.as_ptr(), |q| { + let prev = q.keep_alive; + q.keep_alive = keep_alive; + (q.loop_, prev) + }); + if prev == keep_alive { + return; + } + if keep_alive { + Loop::ref_raw(loop_); + } else { + Loop::unref_raw(loop_); + } + } + + /// Update an `Fd` source's interest set. `Ok` no-op for stale handles, + /// non-Fd sources, and the empty interest set; a kernel failure (e.g. + /// ENOENT after the fd was closed while armed) surfaces as `Err(errno)`. + pub fn change(self, readable: bool, writable: bool) -> Result<(), i32> { + let Some(p) = self.resolve() else { + return Ok(()); + }; + let loop_ = poll_access::with_registered(p.as_ptr(), |q| q.loop_); + Self::change_via(p, loop_, readable, writable) + } + + fn change_via( + p: NonNull, + loop_: *mut Loop, + readable: bool, + writable: bool, + ) -> Result<(), i32> { + if !readable && !writable { + return Ok(()); + } + let is_fd = + poll_access::with_registered(p.as_ptr(), |q| matches!(q.source, ArmedSource::Fd)); + if !is_fd { + return Ok(()); + } + #[cfg(not(windows))] + { + let rc = crate::backend::registry_change( + p.as_ptr().cast::(), + loop_, + crate::backend::fd_interest(readable, writable), + ); + if rc != 0 { + return Err(poll_access::last_errno()); + } + } + #[cfg(windows)] + let _ = loop_; + Ok(()) + } + + /// Disarm the kernel registration, drop keep-alive, free the slot + /// (generation bump — every outstanding `PollRef` goes stale), then + /// release the transferred owner ref. Safe to call from inside the + /// owner's own `on_event` (the dispatch guard keeps the owner alive). + pub fn unregister(self) { + let Some(p) = self.resolve() else { return }; + let loop_ = poll_access::with_registered(p.as_ptr(), |q| q.loop_); + Self::unregister_via(p, loop_); + } + + fn unregister_via(p: NonNull, loop_: *mut Loop) { + let (armed, keep_alive, word, ops) = poll_access::with_registered(p.as_ptr(), |q| { + ( + q.source, + q.keep_alive, + core::mem::replace(&mut q.owner, core::ptr::null_mut()), + q.ops, + ) + }); + // Disarm discipline: kernel disarm (incl. pending ready-list nulling) + // strictly precedes the slot free. + #[cfg(not(windows))] + crate::backend::registry_disarm(p.as_ptr().cast::(), loop_, armed); + #[cfg(windows)] + let _ = armed; + if keep_alive { + Loop::unref_raw(loop_); + } + ffi::slab_free_poll(loop_, p.as_ptr()); + // Owner release LAST, outside every slab/loop borrow — the owner's + // destructor may run here and re-enter the registry. + trampolines::release_poll_owner(ops, word); + } +} + +/// Register `source` with `owner` (ONE strong ref transferred; released +/// exactly once — at `unregister`, or at loop teardown). `keep_alive` counts +/// the poll in `num_polls`/`active`; `false` = fallthrough (like the wakeup +/// async). On kernel-registration failure the ref is released and the errno +/// returned. Windows: the slot and keep-alive accounting exist but no kernel +/// registration happens (uv-driven readiness stays outside for now). +/// +/// A source already registered on `loop_` must not be registered again: the +/// backends diverge (epoll fails with EEXIST; kqueue's EV_ADD silently +/// re-points the knote's udata, orphaning the earlier slot). +/// +/// pub(crate): the safe public entry is [`Loop::register_poll`] — a safe pub +/// fn must not deref a caller-supplied raw pointer. +pub(crate) fn register( + loop_: *mut Loop, + source: PollSource, + owner: OwnerRef, + keep_alive: bool, +) -> Result { + let (armed, fd) = match source { + PollSource::Fd { + fd, + readable, + writable, + } => { + if !readable && !writable { + owner.deref(); + return Err(libc::EINVAL); + } + (ArmedSource::Fd, fd) + } + #[cfg(any(target_os = "linux", target_os = "android"))] + PollSource::Pri { fd } => (ArmedSource::Pri, fd), + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + PollSource::Proc { pid } => (ArmedSource::Proc { pid }, 0), + #[cfg(target_os = "macos")] + PollSource::Machport { port } => (ArmedSource::Machport { port }, 0), + #[cfg(target_os = "macos")] + PollSource::Memorystatus => (ArmedSource::Memorystatus, 0), + }; + + // PollState packs the fd in 27 signed bits; a wider fd would silently + // alias a low-numbered descriptor in every later kernel op. Fail loudly. + #[cfg(not(windows))] + if PollState::init(fd, PollType::Registered).fd() != fd { + owner.deref(); + return Err(libc::EMFILE); + } + + let p = ffi::slab_alloc_poll( + loop_, + RegisteredPoll { + state: PollState::init(fd, PollType::Registered), + source: armed, + loop_, + owner: owner.into_raw().cast::(), + ops: trampolines::poll_owner_ops::

(), + keep_alive, + }, + ); + + #[cfg(not(windows))] + { + let rc = crate::backend::registry_arm(p.cast::(), loop_, source); + if rc != 0 { + let err = poll_access::last_errno(); + // Purge any partially-armed filter (kqueue arms ≤2 separate + // submissions) — kernel-held udata must never outlive the slot + // (disarm-before-free). NOT on epoll: its single EPOLL_CTL_ADD is atomic, and a + // DEL here would disarm a sibling registration on EEXIST. + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + crate::backend::registry_disarm(p.cast::(), loop_, armed); + // Take the owner out BEFORE the slab free so its release (and a + // possibly re-entrant destructor) runs outside the slab borrow. + let (word, ops) = poll_access::with_registered(p, |q| { + ( + core::mem::replace(&mut q.owner, core::ptr::null_mut()), + q.ops, + ) + }); + ffi::slab_free_poll(loop_, p); + trampolines::release_poll_owner(ops, word); + return Err(err); + } + } + + if keep_alive { + Loop::ref_raw(loop_); + } + Ok(PollRef::from_live( + NonNull::new(p).expect("slab returned null poll slot"), + )) +} + +impl Loop { + /// Registration entry: see [`register`] for the ownership and duplicate- + /// source contract. Raw-place twin shape (like `Loop::inc_raw`): `this` + /// is the live loop pointer and the caller runs on the loop thread — a + /// `&mut Loop` receiver would span `pending_wakeups`, which foreign + /// threads `fetch_add` concurrently (R10.6, C17). + pub fn register_poll( + this: *mut Loop, + source: PollSource, + owner: OwnerRef, + keep_alive: bool, + ) -> Result { + register::

(this, source, owner, keep_alive) + } +} + +/// Backend dispatch entry (kind byte == `PollType::Registered`). Generation +/// parity guards stale kernel udata (vacant/decommitted slots drop the +/// event); the owner guard is taken by the trampoline. +pub(crate) fn dispatch_ready(p: *mut PollState, events: PollEvents) { + let Some(nn) = NonNull::new(p.cast::()) else { + return; + }; + if slab::generation_of(nn) & 1 == 0 { + return; + } + let r = PollRef::from_live(nn); + let (word, ops) = poll_access::with_registered(nn.as_ptr(), |q| (q.owner, q.ops)); + if word.is_null() { + return; + } + trampolines::dispatch_poll_owner(ops, word, r, events); +} + +#[cfg(all(test, not(miri), any(target_os = "linux", target_os = "android")))] +mod tests { + use core::cell::{Cell, RefCell}; + use std::rc::Rc; + + use super::*; + use crate::backend::{Events, KIND_REGISTERED}; + use crate::unsafe_core::io; + use crate::unsafe_core::test_support::{create_test_loop, free_test_loop}; + + #[derive(bun_ptr::RefCounted)] + struct TestOwner { + ref_count: bun_ptr::RefCount, + events: RefCell>, + poll: Cell>, + dropped: Rc>, + reenter_in_drop: bool, + } + + impl Drop for TestOwner { + fn drop(&mut self) { + self.dropped.set(true); + if self.reenter_in_drop { + if let Some(r) = self.poll.get() { + // Teardown regression: a destructor running during loop + // free must see a stale handle and no-op — never touch a + // mid-drop slab. + assert!(!r.is_alive()); + r.unregister(); + } + } + } + } + + struct FdProto; + impl PollProtocol for FdProto { + type Owner = TestOwner; + fn on_event(owner: &TestOwner, poll: PollRef, events: PollEvents) { + owner.events.borrow_mut().push(events); + owner.poll.set(Some(poll)); + } + } + + fn new_owner(dropped: &Rc>, reenter_in_drop: bool) -> OwnerRef { + OwnerRef::new(TestOwner { + ref_count: bun_ptr::RefCount::init(), + events: RefCell::new(Vec::new()), + poll: Cell::new(None), + dropped: Rc::clone(dropped), + reenter_in_drop, + }) + } + + fn fd_source(fd: i32, readable: bool, writable: bool) -> PollSource { + PollSource::Fd { + fd, + readable, + writable, + } + } + + /// Drain + deliver pending epoll events exactly the way + /// `backend::dispatch_untagged` routes KIND_REGISTERED udata (the full + /// socket dispatch graph cannot link in a crate-local test binary), + /// asserting every kernel round-trip produced a registered slot pointer. + fn dispatch_pending(loop_: *mut Loop) -> i32 { + let n = poll_access::epoll_wait_ready(loop_, 0); + for i in 0..n.max(0) { + let entry = poll_access::ready_poll_at(loop_, i); + let p = entry.u64 as usize as *mut PollState; + let st = poll_access::read_poll(p); + assert_eq!(st.kind_bits(), KIND_REGISTERED, "udata is our slab slot"); + let masked = Events(entry.events) & st.events(); + dispatch_ready( + p, + PollEvents { + readable: masked.contains(Events::READABLE), + writable: masked.contains(Events::WRITABLE), + error: entry.events & libc::EPOLLERR as u32 != 0, + eof: entry.events & libc::EPOLLHUP as u32 != 0, + fflags: 0, + data: 0, + }, + ); + } + n + } + + #[test] + fn fd_register_dispatch_change_unregister_round_trip() { + let loop_ = create_test_loop(); + let efd = poll_access::eventfd::create(); + assert!(efd >= 0); + let dropped = Rc::new(Cell::new(false)); + let owner = new_owner(&dropped, false); + let probe = owner.dupe_ref(); + let r = + register::(loop_, fd_source(efd, true, false), owner, true).expect("register"); + assert!(r.is_alive()); + assert_eq!( + poll_access::num_polls(loop_), + 1, + "keep_alive counts the poll" + ); + + poll_access::eventfd::send(efd); + assert_eq!(dispatch_pending(loop_), 1); + { + let ev = probe.data().events.borrow(); + assert_eq!(ev.len(), 1); + assert!(ev[0].readable && !ev[0].writable && !ev[0].error && !ev[0].eof); + } + assert_eq!( + probe.data().poll.get(), + Some(r), + "handler got a live handle" + ); + + // Interest change to writable-only: the eventfd counter is nonzero + // (readable at the fd level), but only WRITABLE may be delivered. + r.change(false, true).expect("interest change"); + assert!(dispatch_pending(loop_) >= 1); + { + let ev = probe.data().events.borrow(); + assert!(ev.len() >= 2); + assert!(ev[1..].iter().all(|e| e.writable && !e.readable)); + } + + r.unregister(); + assert!(!r.is_alive()); + assert_eq!(poll_access::num_polls(loop_), 0, "keep-alive dropped"); + assert!(!dropped.get(), "probe ref still holds the owner"); + r.unregister(); // stale handle: silent no-op + assert_eq!(r.change(true, true), Ok(())); // stale handle: silent no-op + poll_access::eventfd::send(efd); + assert_eq!(dispatch_pending(loop_), 0, "disarmed source must be silent"); + + probe.deref(); + assert!(dropped.get(), "slot ref was released at unregister"); + free_test_loop(loop_); + io::close(efd, false); + } + + #[test] + fn loop_teardown_releases_outstanding_owner_outside_slab() { + let loop_ = create_test_loop(); + let efd = poll_access::eventfd::create(); + let dropped = Rc::new(Cell::new(false)); + let owner = new_owner(&dropped, true); + let probe = owner.dupe_ref(); + let r = + register::(loop_, fd_source(efd, true, false), owner, true).expect("register"); + probe.data().poll.set(Some(r)); + probe.deref(); // the slot now holds the ONLY ref + assert!(!dropped.get()); + // Freeing the loop with the registration outstanding runs the owner + // destructor during teardown; its Drop re-enters PollRef methods. + free_test_loop(loop_); + assert!(dropped.get(), "teardown released the transferred ref"); + io::close(efd, false); + } + + #[test] + fn register_failure_paths_release_the_owner() { + let loop_ = create_test_loop(); + + // Empty interest set: EINVAL before any slot or kernel state exists. + let dropped = Rc::new(Cell::new(false)); + let owner = new_owner(&dropped, false); + assert_eq!( + register::(loop_, fd_source(0, false, false), owner, true).unwrap_err(), + libc::EINVAL + ); + assert!(dropped.get()); + + // Kernel arm failure: errno surfaced, slot unwound, owner released, + // keep-alive untouched. + let dropped = Rc::new(Cell::new(false)); + let owner = new_owner(&dropped, false); + assert_eq!( + register::(loop_, fd_source(-1, true, false), owner, true).unwrap_err(), + libc::EBADF + ); + assert!(dropped.get()); + assert_eq!(poll_access::num_polls(loop_), 0); + + // Duplicate source: loud EEXIST on epoll (see `register` docs); the + // first registration stays live. + let efd = poll_access::eventfd::create(); + let d1 = Rc::new(Cell::new(false)); + let o1 = new_owner(&d1, false); + let probe1 = o1.dupe_ref(); + let r1 = register::(loop_, fd_source(efd, true, false), o1, false) + .expect("first register"); + let d2 = Rc::new(Cell::new(false)); + assert_eq!( + register::( + loop_, + fd_source(efd, true, false), + new_owner(&d2, false), + false + ) + .unwrap_err(), + libc::EEXIST + ); + assert!(d2.get(), "losing owner released"); + assert!(!d1.get() && r1.is_alive(), "winner untouched"); + // The loser's unwind must NOT have disarmed the winner's kernel + // registration (epoll's failed ADD is atomic — no purge DEL). + poll_access::eventfd::send(efd); + assert_eq!(dispatch_pending(loop_), 1); + assert_eq!(probe1.data().events.borrow().len(), 1); + probe1.deref(); + r1.unregister(); + assert!(d1.get()); + free_test_loop(loop_); + io::close(efd, false); + } + + #[test] + fn change_surfaces_kernel_errno() { + let loop_ = create_test_loop(); + let efd = poll_access::eventfd::create(); + let dropped = Rc::new(Cell::new(false)); + let r = register::( + loop_, + fd_source(efd, true, false), + new_owner(&dropped, false), + false, + ) + .expect("register"); + // Closing the fd auto-removes it from epoll; the next interest + // update must surface the kernel failure, not report success. + io::close(efd, false); + assert_eq!(r.change(true, true), Err(libc::EBADF)); + // A failed change must not cache the requested bits: the identical + // retry re-issues the kernel op instead of short-circuiting to Ok. + assert_eq!(r.change(true, true), Err(libc::EBADF)); + r.unregister(); + assert!(dropped.get()); + free_test_loop(loop_); + } + + #[test] + fn pri_source_registers_and_ignores_interest_changes() { + let loop_ = create_test_loop(); + let efd = poll_access::eventfd::create(); + let dropped = Rc::new(Cell::new(false)); + let owner = new_owner(&dropped, false); + let r = register::(loop_, PollSource::Pri { fd: efd }, owner, true) + .expect("register Pri"); + assert!(r.is_alive()); + assert_eq!(poll_access::num_polls(loop_), 1); + + // Pri watches EPOLLPRI only: ordinary readability must not dispatch, + // and `change` must be a no-op for a non-Fd source (a real change + // would arm EPOLLIN and make the eventfd dispatch here). + assert_eq!(r.change(true, true), Ok(())); // non-Fd source: silent no-op + poll_access::eventfd::send(efd); + assert_eq!(dispatch_pending(loop_), 0, "no EPOLLIN interest armed"); + + r.unregister(); + assert!(!r.is_alive()); + assert_eq!(poll_access::num_polls(loop_), 0); + assert!(dropped.get(), "owner released at unregister"); + free_test_loop(loop_); + io::close(efd, false); + } + + #[test] + fn keep_alive_toggles_num_polls() { + let loop_ = create_test_loop(); + let efd = poll_access::eventfd::create(); + let dropped = Rc::new(Cell::new(false)); + let r = register::( + loop_, + fd_source(efd, true, false), + new_owner(&dropped, false), + false, + ) + .expect("register"); + assert_eq!(poll_access::num_polls(loop_), 0, "fallthrough registration"); + r.set_keep_alive(true); + assert_eq!(poll_access::num_polls(loop_), 1); + r.set_keep_alive(true); // idempotent per state + assert_eq!(poll_access::num_polls(loop_), 1); + r.set_keep_alive(false); + assert_eq!(poll_access::num_polls(loop_), 0); + r.unregister(); + assert!(dropped.get()); + free_test_loop(loop_); + io::close(efd, false); + } +} diff --git a/src/usockets/loop_/tick.rs b/src/usockets/loop_/tick.rs new file mode 100644 index 000000000000..e760cd2fcbb4 --- /dev/null +++ b/src/usockets/loop_/tick.rs @@ -0,0 +1,292 @@ +//! Tick pipeline: pre → wakeups → poll → dispatch → drain → sweep → post. +//! Implements docs/semantics.md §1 (LOOP TICK): iteration_nr++, DNS-ready +//! drain, low-prio budget (5/tick, R1.22), `pre_cb`, quic pre/post hooks, +//! QUIC→sweep timeout folding (R1.10/R1.16), the will_idle GC-safepoint gate +//! (C16), and the closed drain in the outermost postlude only (`tick_depth` +//! guard — R1.14/R1.15, C6). + +#[cfg(not(windows))] +use crate::backend; +use crate::backend::Events; +use crate::loop_::Loop; +use crate::unsafe_core::deref::{with_group, with_socket}; +use crate::unsafe_core::ffi; + +#[cfg(not(windows))] +use crate::loop_::{timeouts, wakeup}; +#[cfg(not(windows))] +use crate::unsafe_core::poll_access; +#[cfg(not(windows))] +use bun_core::Timespec; + +/// `MAX_LOW_PRIO_SOCKETS_PER_LOOP_ITERATION` (loop.c:295) — spread TLS +/// handshake CPU over iterations, prioritizing open connections (C8). +const MAX_LOW_PRIO_SOCKETS_PER_LOOP_ITERATION: i32 = 5; + +#[cfg(not(windows))] +fn timeout_ns(timeout: Option) -> i64 { + // An expired (negative) timespec must poll with a zero timeout — the C + // passed it raw and epoll_pwait2/kevent64 returned EINVAL immediately; + // a negative i64 here would read as "no timeout" and park forever. + timeout.map_or(-1, |t| { + t.sec + .saturating_mul(1_000_000_000) + .saturating_add(t.nsec) + .max(0) + }) +} + +/// Kernel poll into `loop.ready_polls`. `immediate` = kqueue +/// KEVENT_FLAG_IMMEDIATE (R1.10 step 8); epoll's zero timespec is already a +/// kernel fast path, so the flag has no epoll analog. +#[cfg(not(windows))] +fn poll_wait(loop_: *mut Loop, timeout: Option, immediate: bool) { + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let _ = immediate; + poll_access::epoll_wait_ready(loop_, timeout_ns(timeout)); + } + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + poll_access::kevent_wait_ready(loop_, timeout_ns(timeout), immediate); + } +} + +/// `us_loop_run_bun_tick` (R1.10) — one bounded iteration. `timeout == None` +/// parks; a zero timespec returns without idling; otherwise parks at most +/// `timeout`. Effective deadline = min(caller, quic_next_tick_us, sweep), +/// folded in that order (R1.11). +#[cfg(not(windows))] +pub(crate) fn run_bun_tick(loop_: *mut Loop, timeout: Option<&Timespec>) { + // Step 1: bail before tick_depth++ when nothing is polled. + if poll_access::num_polls(loop_) == 0 { + return; + } + ffi::ld_tick_depth_add(loop_, 1); + loop_pre(loop_); + + let mut eff: Option = timeout.copied(); + + // Step 3 — QUIC fold: loop_pre ran lsquic process_conns and stored the + // soonest earliest_adv_tick; NULL-timeout callers (HTTP thread) need it + // folded here so QUIC retransmit/idle timers fire without other I/O. + let (quic_head, quic_us) = (ffi::ld_quic_head(loop_), ffi::ld_quic_next_tick_us(loop_)); + if !quic_head.is_null() && quic_us >= 0 { + let fold = match &eff { + None => true, + Some(t) => { + t.sec + .saturating_mul(1_000_000) + .saturating_add(t.nsec / 1_000) + > quic_us + } + }; + if fold { + eff = Some(Timespec { + sec: quic_us / 1_000_000, + nsec: (quic_us % 1_000_000) * 1000, + }); + } + } + + // Step 4 — sweep fold (R1.16): min(timeout, sweep delta), ties going to + // the caller's timeout. + let sweep_ns = timeouts::next_sweep_deadline_ns(loop_); + if sweep_ns >= 0 { + let keep_caller = matches!(&eff, Some(t) if { + let sweep_sec = sweep_ns / 1_000_000_000; + let sweep_nsec = sweep_ns % 1_000_000_000; + t.sec < sweep_sec || (t.sec == sweep_sec && t.nsec <= sweep_nsec) + }); + if !keep_caller { + eff = Some(Timespec::from_ns(sweep_ns)); + } + } + + // Step 5 — ACQUIRE-swap paired with the RELEASE fetch_add in + // us_wakeup_loop (R10.1). Step 6/7 — the GC safepoint MUST be skipped + // whenever a cross-thread wakeup is pending or the poll will not block. + let had_wakeups = wakeup::take_pending_wakeups(loop_); + let will_idle = had_wakeups == 0 && eff.map_or(true, |t| t.nsec != 0 || t.sec != 0); + if will_idle { + let vm = ffi::ld_jsc_vm(loop_); + if !vm.is_null() { + ffi::jsc_on_before_wait(vm); + } + } + + poll_wait(loop_, eff, !will_idle); + backend::dispatch_ready_polls(loop_); + backend::drain_ready_polls(loop_); + timeouts::sweep_if_due(loop_); + loop_post(loop_); + ffi::ld_tick_depth_add(loop_, -1); +} + +/// Classic `us_loop_run` (R1.8): iterate until no non-fallthrough polls +/// remain; the blocking poll is clamped only by the sweep deadline. +#[cfg(not(windows))] +pub(crate) fn run(loop_: *mut Loop) { + while poll_access::num_polls(loop_) != 0 { + ffi::ld_tick_depth_add(loop_, 1); + loop_pre(loop_); + let sweep_ns = timeouts::next_sweep_deadline_ns(loop_); + let timeout = (sweep_ns >= 0).then(|| Timespec::from_ns(sweep_ns)); + poll_wait(loop_, timeout, false); + backend::dispatch_ready_polls(loop_); + backend::drain_ready_polls(loop_); + timeouts::sweep_if_due(loop_); + loop_post(loop_); + ffi::ld_tick_depth_add(loop_, -1); + } +} + +/// Windows `us_loop_run` (libuv.c:214-219): update time, uv_run ONCE — +/// pre/post flow through the uv_prepare/uv_check hooks. +#[cfg(windows)] +pub(crate) fn run(loop_: *mut Loop) { + crate::backend::libuv::run(loop_); +} + +/// `us_loop_pump` (Windows / libuv NOWAIT). +#[cfg(windows)] +pub(crate) fn pump(loop_: *mut Loop) { + crate::backend::libuv::pump(loop_); +} + +/// Loop prelude (R1.13) — order frozen (docs/cabi.md §4.2): +/// iteration_nr++, DNS results, low-prio handling, `pre_cb(loop)`, quic +/// process when `quic_head != null` (flushes JS-task stream writes before +/// the poll blocks). +pub(crate) fn loop_pre(loop_: *mut Loop) { + ffi::ld_iteration_nr_bump(loop_); + crate::connecting::drain_dns_ready(loop_); + drain_low_prio(loop_); + // C-parity loops always install pre_cb/post_cb (uWS::Loop); None is only + // reachable for bare-created loops — skipping is a safe superset of the + // C's unconditional deref (loop.c:396-423). + if let Some(pre) = ffi::ld_pre_cb(loop_) { + ffi::invoke_loop_cb(pre, loop_); + } + if !ffi::ld_quic_head(loop_).is_null() { + ffi::quic_loop_process(loop_); + } +} + +/// Loop postlude (R1.14) — order frozen: DNS results (again — results that +/// landed during dispatch), quic process, free closed sockets ONLY when +/// `tick_depth <= 1` (a nested tick must not free memory the outer dispatch +/// may still hold — loop.c:409-421), then `post_cb`. +pub(crate) fn loop_post(loop_: *mut Loop) { + crate::connecting::drain_dns_ready(loop_); + if !ffi::ld_quic_head(loop_).is_null() { + ffi::quic_loop_process(loop_); + } + if ffi::ld_tick_depth(loop_) <= 1 { + drain_closed_sockets(loop_); + } + if let Some(post) = ffi::ld_post_cb(loop_) { + ffi::invoke_loop_cb(post, loop_); + } +} + +/// `us_internal_free_closed_sockets` (R1.15): release, in order, every +/// socket on `closed_head` (zero prev/next, free the detached ext area, +/// `us_poll_free` parity `num_polls--`, slab slot back with a generation +/// bump — the ONLY socket death path, docs/design.md §Strategy 4 / C6), every UDP +/// socket on `closed_udp_head`, every connecting socket on +/// `closed_connecting_head`. No user callbacks run here. +pub(crate) fn drain_closed_sockets(loop_: *mut Loop) { + let mut s = ffi::ld_take_closed_head(loop_); + while !s.is_null() { + let next = with_socket(s, |h| { + let n = h.next; + h.prev = core::ptr::null_mut(); + h.next = core::ptr::null_mut(); + n + }); + crate::group::free_socket_ext(s); + #[cfg(not(windows))] + poll_access::num_polls_add(loop_, -1); + crate::loop_::free_socket(loop_, s); + s = next; + } + + crate::udp::free_closed_udp_sockets(loop_); + + let mut c = ffi::ld_take_closed_connecting_head(loop_); + while !c.is_null() { + // Field-granular read (ffi.rs conn discipline) — never form + // `&mut ConnectingSocket` over the whole struct on the loop thread. + let next = ffi::conn_next(c); + crate::loop_::free_connecting(loop_, c); + c = next; + } +} + +#[cfg(all(test, not(windows)))] +mod tests { + use super::*; + + #[test] + fn timeout_ns_none_parks() { + assert_eq!(timeout_ns(None), -1); + } + + #[test] + fn timeout_ns_zero_and_positive() { + assert_eq!(timeout_ns(Some(Timespec::EPOCH)), 0); + assert_eq!( + timeout_ns(Some(Timespec { sec: 1, nsec: 5 })), + 1_000_000_005 + ); + } + + #[test] + fn timeout_ns_expired_timespec_is_immediate() { + // Timespec::duration past the deadline yields sec=-1/nsec=999_999_999 + // (= -1ns); it must map to 0 (immediate), never <0 (park forever). + let expired = Timespec { + sec: -1, + nsec: 999_999_999, + }; + assert_eq!(timeout_ns(Some(expired)), 0); + assert_eq!(timeout_ns(Some(Timespec { sec: -5, nsec: 0 })), 0); + } +} + +/// `us_internal_handle_low_priority_sockets` (R1.22): pop LIFO from +/// `low_prio_head` while budget remains (closed entries consume budget too), +/// relink into the group, re-enable readable, mark state 2 (served — the +/// readable handler resets it to 0, R1.23). +pub(crate) fn drain_low_prio(loop_: *mut Loop) { + ffi::ld_set_low_prio_budget(loop_, MAX_LOW_PRIO_SOCKETS_PER_LOOP_ITERATION); + loop { + let (s, budget) = (ffi::ld_low_prio_head(loop_), ffi::ld_low_prio_budget(loop_)); + if s.is_null() || budget <= 0 { + break; + } + // Unlink the head (C zeroes only `next`; `prev` stays stale — port). + let next = with_socket(s, |h| { + let n = h.next; + h.next = core::ptr::null_mut(); + n + }); + if !next.is_null() { + with_socket(next, |h| h.prev = core::ptr::null_mut()); + } + ffi::ld_set_low_prio_head(loop_, next); + let group = with_socket(s, |h| h.group); + with_group(group, |g| g.low_prio_count -= 1); + + if with_socket(s, |h| h.is_closed()) { + with_socket(s, |h| h.low_prio_state = 2); + } else { + crate::group::link_socket(group, s); + let ev = with_socket(s, |h| h.p.events()); + crate::socket::poll_change(s, ev | Events::READABLE); + with_socket(s, |h| h.low_prio_state = 2); + } + ffi::ld_set_low_prio_budget(loop_, budget - 1); + } +} diff --git a/src/usockets/loop_/timeouts.rs b/src/usockets/loop_/timeouts.rs new file mode 100644 index 000000000000..c46ee2b1d2ad --- /dev/null +++ b/src/usockets/loop_/timeouts.rs @@ -0,0 +1,167 @@ +//! Timeout wheels: 4-second short sweep + minute long sweep over the group +//! lists, folded into the poll deadline (no timerfd); sweep enable is +//! refcounted (`sweep_timer_count`). Implements docs/semantics.md §5 +//! (contract C9). + +#[cfg(not(windows))] +use bun_core::{Timespec, TimespecMockMode}; + +#[cfg(not(windows))] +use crate::LIBUS_TIMEOUT_GRANULARITY; +use crate::dispatch; +use crate::group::SocketGroup; +use crate::loop_::Loop; +use crate::unsafe_core::deref::{with_group, with_socket}; +use crate::unsafe_core::ffi; + +/// `LIBUS_TIMEOUT_GRANULARITY_NS` (loop.c:73). Poll-deadline sweep scheduling +/// is POSIX-only — libuv drives the sweep from a repeating uv timer. +#[cfg(not(windows))] +const SWEEP_INTERVAL_NS: i64 = LIBUS_TIMEOUT_GRANULARITY as i64 * 1_000_000_000; + +/// Raw CLOCK_MONOTONIC ns (loop.c `us_internal_monotonic_ns`; never mocked — +/// the C sweep clock ignored fake timers). +#[cfg(not(windows))] +fn monotonic_ns() -> i64 { + let ts = Timespec::now(TimespecMockMode::ForceRealTime); + ts.sec.wrapping_mul(1_000_000_000).wrapping_add(ts.nsec) +} + +/// `us_internal_sweep_timeout_ns` (R1.17): -1 when no sweep is armed, else +/// the RELATIVE ns until the next sweep, clamped to >= 0 (poll-fold input for +/// R1.16's min(timeout, sweep delta)). +#[cfg(not(windows))] +pub(crate) fn next_sweep_deadline_ns(loop_: *mut Loop) -> i64 { + let next = ffi::ld_sweep_next_tick_ns(loop_); + if next < 0 { + return -1; + } + (next - monotonic_ns()).max(0) +} + +/// `us_internal_sweep_if_due` (R5.8), called after dispatch in both run +/// paths. Re-arms BEFORE sweeping: a timeout handler may unlink the last +/// socket and disarm. +#[cfg(not(windows))] +pub(crate) fn sweep_if_due(loop_: *mut Loop) { + let next = ffi::ld_sweep_next_tick_ns(loop_); + if next < 0 { + return; + } + let now = monotonic_ns(); + if now < next { + return; + } + ffi::ld_set_sweep_next_tick_ns(loop_, now + SWEEP_INTERVAL_NS); + timer_sweep(loop_); +} + +/// `us_internal_timer_sweep` (R5.9, loop.c:227-290). MUST NOT run +/// recursively. One walk per group fires BOTH wheels: short first, long +/// second, on the same dispatch; 255 = disarmed; firing one-shots the byte +/// (R5.10 — the handler must re-arm). Survives handler-driven unlink of the +/// cursor socket (R3.14) and deinit of the current group (R3.12). +pub(crate) fn timer_sweep(loop_: *mut Loop) { + let mut group = ffi::ld_group_head(loop_); + ffi::ld_set_iterator(loop_, group); + while !group.is_null() { + // Bump this group's clocks (R5.4): one long tick = 15 sweeps = 60 s. + let (short_ticks, long_ticks, mut s) = with_group(group, |g| { + g.global_tick = g.global_tick.wrapping_add(1); + g.timestamp = (g.global_tick % 240) as u8; + g.long_timestamp = ((g.global_tick / 15) % 240) as u8; + (g.timestamp, g.long_timestamp, g.head_sockets) + }); + // False once loop_data.iterator was advanced past `group` by + // unlink_group (R3.12) — `group` may then be freed storage. + let mut group_alive = true; + 'sockets: while !s.is_null() { + // Tight scan: seek until a matching timeout byte or list end. + loop { + let (timeout, long_timeout, next) = + with_socket(s, |h| (h.timeout, h.long_timeout, h.next)); + if short_ticks == timeout || long_ticks == long_timeout { + break; + } + s = next; + if s.is_null() { + break 'sockets; + } + } + with_group(group, |g| g.iterator = s); + if with_socket(s, |h| { + if short_ticks == h.timeout { + h.timeout = 255; + true + } else { + false + } + }) { + dispatch::dispatch_timeout(s); + } + if ffi::ld_iterator(loop_) != group { + group_alive = false; + break 'sockets; + } + if with_group(group, |g| g.iterator) == s + && with_socket(s, |h| { + if long_ticks == h.long_timeout { + h.long_timeout = 255; + true + } else { + false + } + }) + { + dispatch::dispatch_long_timeout(s); + } + if ffi::ld_iterator(loop_) != group { + group_alive = false; + break 'sockets; + } + // Handler-unmodified chain steps by one; otherwise resume from + // the cursor unlink_socket advanced (R3.10/R3.14). + let cursor = with_group(group, |g| g.iterator); + s = if s == cursor { + with_socket(s, |h| h.next) + } else { + cursor + }; + } + if group_alive { + let next = with_group(group, |g| { + g.iterator = core::ptr::null_mut(); + g.next + }); + ffi::ld_set_iterator(loop_, next); + } + group = ffi::ld_iterator(loop_); + } +} + +/// `us_internal_enable_sweep_timer` (R5.5): EVERY link of a socket or +/// connecting socket bumps the refcount; 0→1 arms the sweep and enables the +/// Date-header timer. Listen sockets do NOT participate (R5.6). +pub(crate) fn sweep_enable(loop_: *mut Loop, _group: *mut SocketGroup) { + let count = ffi::ld_sweep_timer_count(loop_) + 1; + ffi::ld_set_sweep_timer_count(loop_, count); + if count == 1 { + #[cfg(not(windows))] + ffi::ld_set_sweep_next_tick_ns(loop_, monotonic_ns() + SWEEP_INTERVAL_NS); + #[cfg(windows)] + ffi::arm_libuv_sweep_timer(loop_); + ffi::ensure_date_header_timer_is_enabled(loop_); + } +} + +/// `us_internal_disable_sweep_timer` (R5.5): every unlink drops the refcount; +/// →0 disarms the POSIX deadline. On libuv the timer keeps firing forever +/// after the first enable (preserved OQ-16 quirk) — decrement only. +pub(crate) fn sweep_disable(loop_: *mut Loop, _group: *mut SocketGroup) { + let count = ffi::ld_sweep_timer_count(loop_) - 1; + ffi::ld_set_sweep_timer_count(loop_, count); + #[cfg(not(windows))] + if count == 0 { + ffi::ld_set_sweep_next_tick_ns(loop_, -1); + } +} diff --git a/src/usockets/loop_/wakeup.rs b/src/usockets/loop_/wakeup.rs new file mode 100644 index 000000000000..cede06756310 --- /dev/null +++ b/src/usockets/loop_/wakeup.rs @@ -0,0 +1,210 @@ +//! Cross-thread wakeup. Implements docs/semantics.md §10 (WAKEUP / DEFER): +//! `pending_wakeups` atomic increment/swap semantics and the wakeup-async +//! CALLBACK poll (eventfd / EVFILT_MACHPORT / EVFILT_USER / uv_async), the +//! only documented cross-thread entry points. Deferral stays in the surviving +//! C++ (`uws_loop_defer` → uWS deferQueues drained by wakeup_cb — R10.5: the +//! Rust core MUST NOT invent its own queue). + +use core::ffi::c_void; + +#[cfg(not(windows))] +use crate::backend::{CallbackPoll, Events, PollState, PollType}; +use crate::loop_::Loop; +#[cfg(not(windows))] +use crate::loop_::WakeupAsync; +use crate::unsafe_core::ffi; +#[cfg(not(windows))] +use crate::unsafe_core::poll_access; + +/// The ONLY thread-safe wakeup entry point. Takes a raw `*mut Loop` because +/// the loop thread may be parked inside [`us_loop_run`] concurrently — +/// forming `&mut Loop` here would alias (cross-thread `*mut Loop` contract). +/// Callers own the liveness contract: the loop must not be freed while a +/// wake can race (worker teardown unpublishes the pointer under its lock +/// before `on_thread_exit`) — document it at every call site. +/// R10.1: RELEASE-bump `pending_wakeups` FIRST, then signal the async; the +/// counter is an optimization layered on top of the async, not a replacement. +pub fn us_wakeup_loop(loop_: *mut Loop) { + #[cfg(not(windows))] + { + poll_access::pending_wakeups_add_release(loop_); + async_send(ffi::read_wakeup_async(loop_)); + } + #[cfg(windows)] + { + // libuv arm: just uv_async_send — no pending_wakeups field consumed. + crate::backend::libuv::wakeup_async_send(ffi::read_wakeup_async(loop_)); + } +} + +/// Raw run entry point for waker threads holding only a `*mut Loop`. +pub fn us_loop_run(loop_: *mut Loop) { + crate::loop_::tick::run(loop_) +} + +/// `uws_loop_defer`: run `cb(ctx)` once on the loop thread next iteration. +/// Cross-thread-safe — queueing lives in the surviving C++ LoopData +/// (deferMutex + double-buffered deferQueues, drained by the C++ wakeup_cb). +pub(crate) fn defer(loop_: *mut Loop, ctx: *mut c_void, cb: unsafe extern "C" fn(*mut c_void)) { + ffi::loop_defer(loop_, ctx, cb); +} + +/// ACQUIRE-swap `pending_wakeups` to 0 before blocking (R1.10 step 5); a +/// non-zero return forces `will_idle = false` — the GC safepoint is skipped +/// and the poll must not park (R10.2, C16). +#[cfg(not(windows))] +pub(crate) fn take_pending_wakeups(loop_: *mut Loop) -> u32 { + poll_access::pending_wakeups_swap_acquire(loop_) +} + +// ── wakeup async lifecycle (R10.4; POSIX arms — libuv arm lives in +// backend/libuv.rs). Called only from ffi::create_loop_raw/free_loop_raw. ── + +/// `us_internal_create_async(fallthrough=1)` + `us_internal_async_set(cb)` +/// fused (the C calls them back-to-back in loop_data_init). fallthrough: +/// no `num_polls` increment — the async never keeps the loop alive (R10.3). +#[cfg(not(windows))] +pub(crate) fn create_async( + loop_: *mut Loop, + cb: Option, +) -> *mut WakeupAsync { + let cb = cb.map(poll_access::erase_loop_cb); + + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let efd = poll_access::eventfd::create(); + if efd == -1 { + // eventfd only fails on EMFILE/ENFILE; the loop is unusable + // without wakeup_async — crash loudly (epoll_kqueue.c:613-618). + panic!("eventfd() failed during loop init (out of file descriptors?)"); + } + let mut state = PollState::init(efd, PollType::Callback); + state.set_polling(Events::READABLE); + let p = poll_access::alloc_callback_poll(CallbackPoll { + state, + loop_, + cb, + // Edge-triggered eventfd: dispatch never reads it. + leave_poll_ready: true, + cb_expects_the_loop: true, + }); + let epfd = poll_access::loop_fd(loop_); + let udata = p as usize as u64; + // us_poll_start(READABLE) then the EPOLLIN|EPOLLET upgrade — the C's + // two-step registration (epoll_kqueue.c:641-655). + poll_access::epoll_ctl(epfd, libc::EPOLL_CTL_ADD, efd, libc::EPOLLIN as u32, udata); + poll_access::epoll_ctl( + epfd, + libc::EPOLL_CTL_MOD, + efd, + (libc::EPOLLIN | libc::EPOLLET) as u32, + udata, + ); + p.cast::() + } + + #[cfg(target_os = "macos")] + { + let port = poll_access::mach::port_create_qlimit1(); + // The C returned NULL here and NULL-deref'd in async_set; fail at + // the same point in time, but loudly. + assert!(port != 0, "mach_port_allocate failed during loop init"); + let buf = poll_access::mach::alloc_buf(); + let mut state = PollState::init(0, PollType::Callback); + state.set_polling(Events::READABLE); + let p = poll_access::alloc_callback_poll(CallbackPoll { + state, + loop_, + cb, + leave_poll_ready: false, + cb_expects_the_loop: true, + port, + machport_buf: buf, + }); + let rc = + poll_access::mach::kev_add(poll_access::loop_fd(loop_), port, buf, p as usize as u64); + // The C aborts on registration failure (epoll_kqueue.c:755-757). + assert!( + rc != -1, + "EVFILT_MACHPORT registration failed during loop init" + ); + p.cast::() + } + + #[cfg(target_os = "freebsd")] + { + let mut state = PollState::init(0, PollType::Callback); + state.set_polling(Events::READABLE); + let p = poll_access::alloc_callback_poll(CallbackPoll { + state, + loop_, + cb, + leave_poll_ready: false, + cb_expects_the_loop: true, + }); + let ident = p as usize as u64; + let rc = poll_access::evuser::add(poll_access::loop_fd(loop_), ident, ident); + // The C aborts on registration failure (epoll_kqueue.c:846-848). + assert!(rc != -1, "EVFILT_USER registration failed during loop init"); + p.cast::() + } +} + +/// `us_internal_async_wakeup` — callable from ANY thread; reads only fields +/// that are immutable after creation. +#[cfg(not(windows))] +fn async_send(a: *mut WakeupAsync) { + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let fd = poll_access::read_poll(a.cast::()).fd(); + poll_access::eventfd::send(fd); + } + #[cfg(target_os = "macos")] + { + let cp = poll_access::read_callback_poll(a.cast::()); + poll_access::mach::send(cp.port); + } + #[cfg(target_os = "freebsd")] + { + let cp = poll_access::read_callback_poll(a.cast::()); + poll_access::evuser::trigger( + poll_access::loop_fd(cp.loop_), + a as usize as u64, + a as usize as u64, + ); + } +} + +/// `us_internal_async_close` (loop teardown only). Preserves the C quirk: +/// created with fallthrough (no `num_polls++`), but freed through +/// `us_poll_free`, which decrements — a net −1 at teardown. +#[cfg(not(windows))] +pub(crate) fn close_async(loop_: *mut Loop, a: *mut WakeupAsync) { + if a.is_null() { + return; + } + #[cfg(any(target_os = "linux", target_os = "android"))] + { + // us_poll_stop: EPOLL_CTL_DEL + scrub of pending ready entries. + crate::backend::poll_stop(a.cast::(), loop_); + let fd = poll_access::read_poll(a.cast::()).fd(); + crate::unsafe_core::io::close(fd, false); + } + #[cfg(target_os = "macos")] + { + let cp = poll_access::read_callback_poll(a.cast::()); + poll_access::mach::kev_delete(poll_access::loop_fd(loop_), cp.port, a as usize as u64); + poll_access::mach::port_dealloc(cp.port); + poll_access::mach::free_buf(cp.machport_buf); + } + #[cfg(target_os = "freebsd")] + { + poll_access::evuser::delete( + poll_access::loop_fd(loop_), + a as usize as u64, + a as usize as u64, + ); + } + poll_access::num_polls_add(loop_, -1); + poll_access::free_callback_poll(a.cast::()); +} diff --git a/src/usockets/neterr.rs b/src/usockets/neterr.rs new file mode 100644 index 000000000000..3a3e94c97b02 --- /dev/null +++ b/src/usockets/neterr.rs @@ -0,0 +1,40 @@ +//! Network-errno predicates shared by the write path (write.rs), the read +//! path (socket.rs), and UDP (udp.rs). Predicates take the io layer's +//! `-errno` return convention. + +use core::ffi::c_int; + +#[cfg(windows)] +use bun_windows_sys::ws2_32::WinsockError; + +/// R4.7: POSIX checks EWOULDBLOCK ONLY (the `|| EAGAIN` is commented out +/// upstream; equal on all currently-supported POSIX targets). +#[cfg(not(windows))] +#[inline] +pub(crate) fn is_would_block(neg_errno: isize) -> bool { + neg_errno == -(libc::EWOULDBLOCK as isize) +} +#[cfg(windows)] +#[inline] +pub(crate) fn is_would_block(neg_errno: isize) -> bool { + neg_errno == -(WinsockError::WSAEWOULDBLOCK.0 as isize) +} + +/// R4.2: transient kernel resource exhaustion on a healthy connection — +/// NOT fatal (commit-fc865b39 behavior). +#[cfg(not(windows))] +#[inline] +pub(crate) fn is_transient_send_error(neg_errno: isize) -> bool { + neg_errno == -(libc::ENOBUFS as isize) || neg_errno == -(libc::ENOMEM as isize) +} +#[cfg(windows)] +#[inline] +pub(crate) fn is_transient_send_error(neg_errno: isize) -> bool { + neg_errno == -(WinsockError::WSAENOBUFS.0 as isize) +} + +/// Thread-local errno as last set by the failing syscall (WSAGetLastError on +/// Windows — std maps it into `last_os_error`). +pub(crate) fn last_errno() -> c_int { + std::io::Error::last_os_error().raw_os_error().unwrap_or(0) +} diff --git a/src/usockets/protocol.rs b/src/usockets/protocol.rs new file mode 100644 index 000000000000..9244fa1fa5cb --- /dev/null +++ b/src/usockets/protocol.rs @@ -0,0 +1,134 @@ +//! Protocol v2 — the safe consumer socket interface (docs/design.md, +//! Consumer protocol). Owners are `bun_ptr::RefCounted` objects; the dispatch trampoline +//! holds a strong ref across every handler call, so an owner dropping to zero +//! refs mid-callback stays alive until dispatch returns. The v1 raw +//! [`crate::dispatch::Handler`] stays for Dynamic/UwsHttp*/UwsWs* kinds. + +use core::any::TypeId; + +use crate::dispatch::{self, OwnerOps}; +use crate::handle::{AnySocket, CloseCode}; +use crate::kind::SocketKind; +use crate::tls::context::us_bun_verify_error_t; +use crate::unsafe_core::trampolines; + +/// Safe owner-borrow bridges (bodies audited in unsafe_core): mint an +/// [`OwnerRef`] / legacy `ThisPtr` from a live `&Owner`. +pub use crate::unsafe_core::trampolines::{owner_ref_of, this_ptr_of}; + +/// The safe strong owner ref consumers attach at connect/from_fd/adopt. +/// `bun_ptr::RefPtr` has NO `Drop` — passing one to an attach method +/// TRANSFERS the ref to core; core releases it exactly once at the socket's +/// terminal (on_close / on_connect_error / silent SEMI_SOCKET close). +pub type OwnerRef = bun_ptr::RefPtr; + +pub type VerifyError = us_bun_verify_error_t; + +/// Payload of [`Protocol::on_connect_error`]; covers both direct-connect +/// failures (errno namespace) and connecting-socket failures (errno or +/// getaddrinfo rc — the same value the v1 `on_connecting_error` received). +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub struct ConnectFailure { + pub errno: i32, +} + +/// Decoded close selector for [`Protocol::on_close`] (contract C3: the raw +/// wire value is 0..2 = [`CloseCode`], anything else = a real errno). +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub enum CloseCode2 { + Normal, + Failure, + FastShutdown, + /// Peer/transport error close; the errno arrives alongside. + Error, +} + +impl CloseCode2 { + /// `(code, errno)` from the raw C close code; errno is 0 unless `Error`. + pub(crate) fn decode(code: core::ffi::c_int) -> (CloseCode2, i32) { + match code { + c if c == CloseCode::normal as i32 => (CloseCode2::Normal, 0), + c if c == CloseCode::failure as i32 => (CloseCode2::Failure, 0), + c if c == CloseCode::fast_shutdown as i32 => (CloseCode2::FastShutdown, 0), + errno => (CloseCode2::Error, errno), + } + } +} + +/// Protocol v2 handler set. Handlers receive `&Owner` (owners are +/// interior-mutable) and a generation-checked [`AnySocket`] handle; every +/// safe socket method (incl. close/adopt/connect) may be called +/// synchronously from inside a handler (C17). Defaults are no-ops. +pub trait Protocol: Sized + 'static { + /// Loop-local (!Send) interior-mutable owner. The attach APIs transfer + /// one strong ref to core; the trampoline additionally brackets every + /// handler call with its own ref, so the owner's LAST release always + /// happens outside a running handler. + type Owner: bun_ptr::RefCounted + 'static; + + const KIND: SocketKind; + /// SSL sibling of [`Self::KIND`] for family pairs (e.g. Valkey/ValkeyTls). + const KIND_TLS: Option = None; + + fn on_open(owner: &Self::Owner, s: AnySocket, is_client: bool, ip: &[u8]) { + let _ = (owner, s, is_client, ip); + } + fn on_data(owner: &Self::Owner, s: AnySocket, data: &mut [u8]) { + let _ = (owner, s, data); + } + fn on_writable(owner: &Self::Owner, s: AnySocket) { + let _ = (owner, s); + } + fn on_close(owner: &Self::Owner, s: AnySocket, code: CloseCode2, errno: i32) { + let _ = (owner, s, code, errno); + } + fn on_end(owner: &Self::Owner, s: AnySocket) { + let _ = (owner, s); + } + fn on_timeout(owner: &Self::Owner, s: AnySocket) { + let _ = (owner, s); + } + fn on_long_timeout(owner: &Self::Owner, s: AnySocket) { + let _ = (owner, s); + } + /// Terminal for a failed connect (direct AND connecting-socket paths; + /// exactly one of on_open/on_connect_error fires per connect, C2). No + /// socket handle: like v1, the handler closes via its owner-held handle. + fn on_connect_error(owner: &Self::Owner, err: ConnectFailure) { + let _ = (owner, err); + } + fn on_handshake(owner: &Self::Owner, s: AnySocket, ok: bool, err: VerifyError) { + let _ = (owner, s, ok, err); + } + /// SCM_RIGHTS-received descriptor. OWNERSHIP transfers to the handler: + /// close it (or wrap it in an owning type) — an ignored callback leaks + /// the fd. (Spec signature is OwnedFd; plain `Fd` kept for FFI parity.) + fn on_fd(owner: &Self::Owner, s: AnySocket, fd: bun_core::Fd) { + let _ = (owner, s, fd); + } +} + +/// Const-build the kind-table row for `P` at `kind` (the runtime dispatch +/// module places one per Rust-handled `SocketKind` in `BUN_UWS_KIND_TABLE`). +/// Const-eval traps when `kind` is not `P::KIND` / `P::KIND_TLS`, so a row +/// placed at the wrong index is a compile error. +pub const fn kind_entry(kind: SocketKind) -> dispatch::KindEntry { + let matches_kind = kind as usize == P::KIND as usize + || match P::KIND_TLS { + Some(tls) => kind as usize == tls as usize, + None => false, + }; + assert!( + matches_kind, + "kind_entry placed at a kind P does not handle" + ); + dispatch::KindEntry { + kind, + vtable: trampolines::make2::

(), + owner_ops: OwnerOps { + deref: trampolines::owner_deref_erased::, + }, + handler_type: TypeId::of::

, + owner_type: TypeId::of::, + } +} diff --git a/src/usockets/socket.rs b/src/usockets/socket.rs new file mode 100644 index 000000000000..4bbb779c1d27 --- /dev/null +++ b/src/usockets/socket.rs @@ -0,0 +1,1283 @@ +//! Slab-slot socket header + internal open/close/read/write paths. +//! Implements docs/semantics.md §3 (SOCKET LIFECYCLE); handle-facing method +//! surface preserved from the replaced crates. TLS close/open orchestration +//! (us_internal_ssl_{on_open,close,on_end} composition over `TlsState` +//! pieces) lives here because socket.c owned those call sites. Group +//! linkage, adoption bookkeeping and ext allocation live in group.rs. + +use core::ffi::{c_int, c_void}; +use core::ptr::{self, NonNull}; + +use bun_core::Fd; + +#[cfg(not(windows))] +use crate::LIBUS_RECV_BUFFER_LENGTH; +use crate::LIBUS_SOCKET_DESCRIPTOR; +use crate::backend::{Events, PollState, PollType}; +use crate::connecting::ConnectingSocket; +use crate::dispatch; +use crate::group::SocketGroup; +use crate::handle::CloseCode; +use crate::kind::SocketKind; +use crate::loop_::Loop; +use crate::neterr::is_would_block; +use crate::tls::context::{SslCtx, us_bun_verify_error_t}; +use crate::tls::state::{HandshakeState, TlsState}; +use crate::tls::{SSL, Transport}; +use crate::unsafe_core::deref::{with_group, with_socket}; +use crate::unsafe_core::ext::{deref_mut, header_mut}; +use crate::unsafe_core::{ffi, io}; +use crate::write::UsIoVec; + +/// Packed 1-byte socket flags (bit assignments per docs/cabi.md §3.7: +/// `last_write_failed` is bit 7 — frozen while the SHIM pokes it). +#[derive(Copy, Clone, Default)] +#[repr(transparent)] +pub(crate) struct SocketFlags(pub(crate) u8); + +impl SocketFlags { + pub(crate) const IS_CLOSED: u8 = 1 << 0; + /// Raw TCP FIN-sent bit (poll type SOCKET_SHUT_DOWN in C). The TLS-aware + /// query is [`is_shut_down_full`]. + pub(crate) const IS_SHUT_DOWN: u8 = 1 << 1; + pub(crate) const IS_PAUSED: u8 = 1 << 2; + pub(crate) const ALLOW_HALF_OPEN: u8 = 1 << 3; + /// Set on all platforms; only the POSIX read path (SCM_RIGHTS recv) + /// tests it — Windows IPC rides named pipes instead. + #[cfg_attr(windows, allow(dead_code))] + pub(crate) const IS_IPC: u8 = 1 << 4; + pub(crate) const LAST_WRITE_FAILED: u8 = 1 << 7; + + #[inline] + pub(crate) fn get(self, bit: u8) -> bool { + self.0 & bit != 0 + } + #[inline] + pub(crate) fn set(&mut self, bit: u8, value: bool) { + if value { + self.0 |= bit; + } else { + self.0 &= !bit; + } + } +} + +/// The slab slot body. Never moves and is never returned to the OS while the +/// loop lives (unsafe_core/slab.rs); the slot's generation lives alongside it +/// in the slab slot and is validated by every `SocketRef` operation. +/// `p` MUST stay first: the kernel udata pointer doubles as the header +/// pointer (backend `slab_generation` / `on_socket_poll_ready` cast). +#[repr(C)] +pub struct SocketHeader { + pub(crate) p: PollState, + pub(crate) flags: SocketFlags, + pub(crate) kind: SocketKind, + /// 4-second wheel bucket; 255 = off (docs/semantics.md §5). + pub(crate) timeout: u8, + /// Minute wheel bucket; 255 = off. + pub(crate) long_timeout: u8, + /// Low-prio queue state 0/1/2 (docs/semantics.md §1, C8). + pub(crate) low_prio_state: u8, + pub(crate) fd: LIBUS_SOCKET_DESCRIPTOR, + /// libuv poll handle (Windows only; owned until poll_stop_close). + #[cfg(windows)] + pub(crate) uv_p: *mut c_void, + pub(crate) prev: *mut SocketHeader, + pub(crate) next: *mut SocketHeader, + pub(crate) group: *mut SocketGroup, + /// Owning `ConnectingSocket` while this is a happy-eyeballs attempt. + pub(crate) connect_state: *mut ConnectingSocket, + pub(crate) transport: Transport, + /// Rust kinds: one 8-byte owner word (`Option>` niche + /// layout — the word IS the storage). uWS/Dynamic kinds: pointer to the + /// slot's INLINE ext area, contiguous after this header and sized at + /// creation for the adoption family (freed with the slab slot). + /// Listener (kind == Invalid): `Box` (group.rs). + pub(crate) ext: *mut c_void, +} + +/// C-facing name; a `us_socket_t*` handed across cabi is a pointer to the +/// slab-resident header (opaque to all surviving C/C++). +pub type us_socket_t = SocketHeader; + +// ── slab allocation entries (used by group.rs / connecting.rs) ─────────────── + +/// One slab slot, stamped per R3.3 (all four creation paths funnel here: +/// accept / connect / from_fd / listen). Timeouts start disarmed; every flag +/// beyond the caller-provided ones is zero; transport is Plain. `ext_size` +/// picks the slab size class for group-vtable kinds (family-max ext bytes, +/// inline after the header); Rust kinds always use the word (class 0). +pub(crate) fn alloc( + loop_: *mut Loop, + poll_kind: PollType, + fd: LIBUS_SOCKET_DESCRIPTOR, + group: *mut SocketGroup, + kind: SocketKind, + flags: SocketFlags, + ext_size: c_int, +) -> *mut us_socket_t { + let ext_capacity = if dispatch::uses_group_vtable(kind) { + ext_size.max(0) as usize + } else { + 0 + }; + let s = crate::loop_::alloc_socket( + loop_, + SocketHeader { + p: PollState::init(fd, poll_kind), + flags, + kind, + timeout: 255, + long_timeout: 255, + low_prio_state: 0, + fd, + #[cfg(windows)] + uv_p: ptr::null_mut(), + prev: ptr::null_mut(), + next: ptr::null_mut(), + group, + connect_state: ptr::null_mut(), + transport: Transport::Plain, + ext: ptr::null_mut(), + }, + ext_capacity, + ); + if ext_capacity > 0 { + header_mut(s).ext = crate::unsafe_core::ext::inline_ext_ptr(s); + } + s +} + +/// Return a slot whose kernel registration FAILED (never linked, never +/// polled, fd not owned) straight to the slab. +pub(crate) fn free_unstarted(loop_: *mut Loop, s: *mut us_socket_t) { + crate::loop_::free_socket(loop_, s); +} + +// ── platform errno helpers ──────────────────────────────────────────────────── + +#[cfg(not(windows))] +pub(crate) const ECONNRESET_ERRNO: c_int = libc::ECONNRESET; +/// MSVC CRT ECONNRESET: the C (loop.c:466, loop.c:797) used errno.h, not WSA codes. +#[cfg(windows)] +pub(crate) const ECONNRESET_ERRNO: c_int = 108; + +/// socket.c:705 `#ifndef EBADF #define EBADF 9` — same value on all targets. +const NEG_EBADF: i32 = -9; + +impl CloseCode { + /// Lossy int → enum for the TLS deferred-close protocol: errno codes (>2) + /// collapse to `normal` (C kept the raw code in ssl_pending_close_code). + /// Unreachable today — errno-coded closes never run inside the in_use bracket. + pub(crate) fn from_c(code: c_int) -> CloseCode { + match code { + 1 => CloseCode::failure, + 2 => CloseCode::fast_shutdown, + _ => CloseCode::normal, + } + } +} + +// ── raw-pointer helpers (fresh borrow per access cluster — C17) ────────────── + +/// Loop of a linked socket; the group may change during callbacks, the loop +/// cannot (loop.c:552-553). +pub(crate) fn socket_loop(s: *mut SocketHeader) -> *mut Loop { + let g = with_socket(s, |h| h.group); + with_group(g, |g| g.loop_) +} + +/// Raw `*mut TlsState` behind the transport box (stable address); `None` for +/// plain. The Box itself stays in place until the slab slot frees (C6). +fn tls_state(s: *mut SocketHeader) -> Option<*mut TlsState> { + match &mut header_mut(s).transport { + Transport::Tls(t) => Some(&raw mut **t), + Transport::Plain => None, + } +} + +/// `us_socket_server_name_userdata` (openssl.c:2528-2531): SNI userdata read +/// from the negotiated SSL_CTX's ex_data slot; null for plain/detached. +pub(crate) fn server_name_userdata(s: *mut us_socket_t) -> *mut c_void { + let Some(t) = tls_state(s) else { + return ptr::null_mut(); + }; + let ssl = deref_mut(t).ssl; + if ssl.is_null() { + return ptr::null_mut(); + } + let ctx = crate::unsafe_core::bssl::ssl_get_ctx(ssl); + if ctx.is_null() { + return ptr::null_mut(); + } + crate::tls::context::ctx_sni_user(ctx) +} + +/// `ssl_gone`: transport dropped / SSL detached / socket closed. +fn tls_gone(s: *mut SocketHeader) -> bool { + match tls_state(s) { + Some(t) => deref_mut(t).ssl.is_null() || header_mut(s).is_closed(), + None => true, + } +} + +/// `us_socket_is_shut_down` (R3.21): TLS asks the SSL layer, plain reads the +/// FIN-sent bit. Thin raw-pointer wrapper over [`SocketHeader::is_shutdown`]. +pub(crate) fn is_shut_down_full(s: *mut SocketHeader) -> bool { + with_socket(s, |h| h.is_shutdown()) +} + +// ── kernel poll plumbing ────────────────────────────────────────────────────── + +/// `us_poll_change` on this socket (absolute event set). +pub(crate) fn poll_change(s: *mut SocketHeader, events: Events) { + let loop_ = socket_loop(s); + poll_change_on(s, loop_, events); +} + +fn poll_change_on(s: *mut SocketHeader, loop_: *mut Loop, events: Events) { + #[cfg(not(windows))] + crate::backend::poll_change(s.cast::(), loop_, events); + #[cfg(windows)] + crate::backend::libuv::socket_poll_change(s, loop_, events); +} + +fn poll_stop_on(s: *mut SocketHeader, loop_: *mut Loop) { + #[cfg(not(windows))] + crate::backend::poll_stop(s.cast::(), loop_); + #[cfg(windows)] + crate::backend::libuv::socket_poll_stop(s, loop_); +} + +/// Deregistration for a close that is about to close the fd: kqueue skips +/// the kevent syscall (fd close removes filters) and only nulls pending +/// ready entries (R3.17.3). +fn poll_stop_for_close(s: *mut SocketHeader, loop_: *mut Loop) { + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + let ev = with_socket(s, |h| h.p.events()); + crate::backend::update_pending_ready_polls( + loop_, + s.cast::(), + ptr::null_mut(), + ev, + Events::NONE, + ); + } + #[cfg(not(any(target_os = "macos", target_os = "freebsd")))] + poll_stop_on(s, loop_); +} + +// ── death bookkeeping shared by close_raw / detach ─────────────────────────── + +/// close_raw step 2: low-prio queue splice (with group counter + emptiness +/// re-check) or plain group unlink (which also fixes the sweep iterator). +fn unlink_for_death(s: *mut SocketHeader, loop_: *mut Loop) { + let (low_prio, group) = with_socket(s, |h| (h.low_prio_state, h.group)); + if low_prio == 1 { + let (prev, next) = with_socket(s, |h| (h.prev, h.next)); + if prev.is_null() { + ffi::ld_set_low_prio_head(loop_, next); + } else { + with_socket(prev, |h| h.next = next); + } + if !next.is_null() { + with_socket(next, |h| h.prev = prev); + } + with_socket(s, |h| { + h.prev = ptr::null_mut(); + h.next = ptr::null_mut(); + h.low_prio_state = 0; + }); + with_group(group, |g| g.low_prio_count -= 1); + crate::group::group_maybe_unlink(group); + } else { + crate::group::unlink_socket(group, s); + } +} + +pub(crate) fn push_closed(s: *mut SocketHeader, loop_: *mut Loop) { + let head = ffi::ld_closed_head(loop_); + with_socket(s, |h| h.next = head); + ffi::ld_set_closed_head(loop_, s); +} + +// ── close / detach (R3.15-R3.18; contracts C1-C6, C12) ─────────────────────── + +/// `us_internal_socket_close_raw` with an enum code (self-initiated closes; +/// group.rs / TLS entry points use this form). +pub(crate) fn close_raw(s: *mut SocketHeader, code: CloseCode, reason: *mut c_void) { + close_raw_errno(s, code as c_int, reason); +} + +/// `us_internal_socket_close_raw` (socket.c:263-337), exact 10-step order. +/// `code`: 0..2 = CloseCode, >2 = real errno (contract C3). +pub(crate) fn close_raw_errno(s: *mut SocketHeader, code: c_int, reason: *mut c_void) { + close_raw_impl(s, code, reason, true); +} + +/// SEMI_SOCKET close preceding a direct-connect error dispatch (C5 +/// close-then-notify): as `close_raw(failure)`, but the owner ext ref stays +/// attached — `dispatch_connect_error` completes the terminal itself. +pub(crate) fn close_raw_keep_owner(s: *mut SocketHeader) { + close_raw_impl(s, CloseCode::failure as c_int, ptr::null_mut(), false); +} + +fn close_raw_impl(s: *mut SocketHeader, code: c_int, reason: *mut c_void, release_owner: bool) { + // Step 0 (§1.4): a JS callback inside BoringSSL destroyed this socket — + // defer to the SSL driver's epilogue, preserving the close code. + if let Some(t) = tls_state(s) { + if deref_mut(t).request_defer_close(CloseCode::from_c(code)) { + // An errno code deferred here would replay as `normal` (a peer + // error demoted to self-initiated) — see CloseCode::from_c. + debug_assert!((0..=2).contains(&code), "errno close code {code} deferred"); + return; + } + } + if with_socket(s, |h| h.is_closed()) { + return; + } + let loop_ = socket_loop(s); + unlink_for_death(s, loop_); // step 2 + poll_stop_for_close(s, loop_); // step 3 + // steps 4-5: SO_LINGER{1,0} RST for CONNECTION_RESET, then close(2). + io::close( + with_socket(s, |h| h.fd), + code == CloseCode::failure as c_int, + ); + with_socket(s, |h| h.flags.set(SocketFlags::IS_CLOSED, true)); // step 6 + // Step 7 (C1): a never-opened connect (SEMI_SOCKET) gets NO on_close — + // its owner is notified via on_connect_error instead (OQ-10 equality). + if with_socket(s, |h| h.p.kind_bits()) != PollType::SemiSocket as u8 { + // TLS §5.3: user on_close first (ALPN/cert still inspectable) — the + // SSL is freed in step 8, after the dispatch. + dispatch::dispatch_close(s, code, reason); + } else if release_owner { + // Silent SEMI_SOCKET close: no callback, but core's owner ext ref is + // still released exactly once (Protocol v2 terminal contract). + dispatch::release_owner_on_silent_terminal(s); + } + // Step 8: idempotent SSL free (no-op for plain / already detached). + if let Some(t) = tls_state(s) { + deref_mut(t).detach(); + } + push_closed(s, loop_); // step 9 — freed at the outermost tick postlude (C6) +} + +/// `us_socket_detach` (R3.18): close bookkeeping WITHOUT closing the fd, +/// without SO_LINGER and without on_close; fd ownership passes to the caller. +pub(crate) fn socket_detach(s: *mut SocketHeader) { + if with_socket(s, |h| h.is_closed()) { + return; + } + let loop_ = socket_loop(s); + unlink_for_death(s, loop_); + poll_stop_on(s, loop_); + // IS_CLOSED before the owner release (close_raw step-6 ordering): the + // release may run the owner's destructor, and a re-entrant close must + // see the socket already closed (C6 idempotence). + with_socket(s, |h| h.flags.set(SocketFlags::IS_CLOSED, true)); + // Terminal without on_close: release core's owner ext ref exactly once. + dispatch::release_owner_on_silent_terminal(s); + if let Some(t) = tls_state(s) { + deref_mut(t).detach(); + } + push_closed(s, loop_); +} + +/// R6.10 step 2: direct fd teardown of a happy-eyeballs attempt — no +/// dispatch, no linger, real poll_stop. +pub(crate) fn teardown_connecting_attempt(s: *mut SocketHeader) { + if with_socket(s, |h| h.is_closed()) { + return; + } + let loop_ = socket_loop(s); + crate::group::unlink_socket(with_socket(s, |h| h.group), s); + poll_stop_on(s, loop_); + io::close(with_socket(s, |h| h.fd), false); + push_closed(s, loop_); + with_socket(s, |h| h.flags.set(SocketFlags::IS_CLOSED, true)); +} + +/// Unit-test stand-in for a §5.2 deferred TLS close (tests can't build a +/// real handshake): `socket_close` on the target returns leaving it linked +/// and un-closed, exactly like a close_notify wait; `close_raw` ignores it. +#[cfg(test)] +pub(crate) mod test_defer_close { + use core::sync::atomic::{AtomicPtr, AtomicUsize}; + pub(crate) static TARGET: AtomicPtr = + AtomicPtr::new(core::ptr::null_mut()); + pub(crate) static ATTEMPTS: AtomicUsize = AtomicUsize::new(0); +} + +/// `us_socket_close` (R3.16): TLS routes to the graceful §5.2 close. +pub(crate) fn socket_close(s: *mut SocketHeader, code: CloseCode, reason: *mut c_void) { + #[cfg(test)] + if s == test_defer_close::TARGET.load(core::sync::atomic::Ordering::Relaxed) { + test_defer_close::ATTEMPTS.fetch_add(1, core::sync::atomic::Ordering::Relaxed); + return; + } + // Live happy-eyeballs attempt: a direct close would strand its entry in + // ConnectingSocket::attempts (stale slab pointer at the connecting + // terminal) — abort the whole connect instead; it tears down `s` too. + if !with_socket(s, |h| h.is_closed()) { + let cs = with_socket(s, |h| h.connect_state); + if !cs.is_null() && !ffi::conn_closed(cs) { + crate::connecting::close_raw(cs); + return; + } + } + if tls_state(s).is_some() && !with_socket(s, |h| h.is_closed()) { + tls_close(s, code, reason); + } else { + close_raw(s, code, reason); + } +} + +/// `us_internal_ssl_close` (docs/tls.md §5.2) composed over TlsState. +fn tls_close(s: *mut SocketHeader, code: CloseCode, reason: *mut c_void) { + let Some(t) = tls_state(s) else { + close_raw(s, code, reason); + return; + }; + // §1.4 in-use deferral (releases the spill inside). + if deref_mut(t).request_defer_close(code) { + return; + } + // node `_handle.close()`: spilled ciphertext was reported written — defer + // (at most once) until it drains. + if code == CloseCode::fast_shutdown && reason.is_null() { + if deref_mut(t).close_deferred_by_spill(s) { + return; + } + } + ffi::with_ctl(deref_mut(t).ctl, |c| c.release_pending()); + // SEMI_SOCKET (eager fast-path attach, never connected) or gone: raw + // close — on_handshake(0) after onConnectError would land in torn-down JS. + if tls_gone(s) || with_socket(s, |h| h.p.kind_bits()) == PollType::SemiSocket as u8 { + close_raw(s, code, reason); + return; + } + TlsState::handshake(t, s); // drive a final step + if tls_gone(s) { + return; + } + if deref_mut(t).handshake_state != HandshakeState::Completed { + TlsState::trigger_handshake_econnreset(t, s); + if tls_gone(s) { + return; + } + } + if code != CloseCode::normal { + // Forceful: best-effort close_notify then raw-close now (the destroy + // path unrefs immediately after; deferring would orphan the socket). + let _ = deref_mut(t).handle_shutdown(s, true); + if !with_socket(s, |h| h.is_closed()) { + close_raw(s, code, reason); + } + } else if deref_mut(t).handle_shutdown(s, false) { + if !with_socket(s, |h| h.is_closed()) { + close_raw(s, CloseCode::normal, reason); + } + } + // else: close_notify sent, fd close deferred until the peer replies — + // on_end / ZERO_RETURN re-enters with SENT_SHUTDOWN set (§5.2). +} + +/// `us_socket_close` with an errno-style code (>2) — uWS forceClose passes +/// the close reason's byte length as the code. The C ran the SSL close for +/// every code: best-effort close_notify, then raw close preserving the code. +pub(crate) fn tls_close_errno(s: *mut SocketHeader, code: c_int, reason: *mut c_void) { + let Some(t) = tls_state(s) else { + close_raw_errno(s, code, reason); + return; + }; + if deref_mut(t).request_defer_close(CloseCode::from_c(code)) { + debug_assert!(false, "errno close code {code} deferred"); + return; + } + ffi::with_ctl(deref_mut(t).ctl, |c| c.release_pending()); + if !tls_gone(s) && with_socket(s, |h| h.p.kind_bits()) != PollType::SemiSocket as u8 { + let _ = deref_mut(t).handle_shutdown(s, true); + } + if !with_socket(s, |h| h.is_closed()) { + close_raw_errno(s, code, reason); + } +} + +// ── open / shutdown ─────────────────────────────────────────────────────────── + +/// `us_socket_open` (R3.4): dispatch on_open, then kick the TLS handshake +/// immediately (some peers stall waiting for ClientHello). +pub(crate) fn socket_open(s: *mut SocketHeader, is_client: bool, ip: &[u8]) { + dispatch::dispatch_open(s, is_client, ip); + if tls_gone(s) { + return; + } + if let Some(t) = tls_state(s) { + TlsState::handshake(t, s); + } +} + +/// `us_socket_shutdown` (R3.19): TLS close_notify rules / TCP FIN. Raw entry +/// so callers need not hold a `&mut` across the dispatch it can run (C17). +pub(crate) fn socket_shutdown(s: *mut SocketHeader) { + match tls_state(s) { + Some(t) => deref_mut(t).shutdown(s, CloseCode::normal), + None => raw_shutdown(s), + } +} + +/// Resume a handshake suspended by an async SNI callback; consumes the owned +/// `ssl_ctx` ref (null = fall through to default); `error` aborts. +pub(crate) fn socket_sni_resolve(s: *mut SocketHeader, ctx: *mut SslCtx, error: bool) { + match tls_state(s) { + Some(t) => crate::tls::state::sni_resolve(t, s, ctx, error), + None => { + // Socket is no longer TLS; release the handed-in reference. + if !ctx.is_null() { + crate::tls::context::ssl_ctx_unref(ctx); + } + } + } +} + +/// `us_internal_socket_raw_shutdown` (R3.19): FIN + stop polling writable, +/// keep reading. +pub(crate) fn raw_shutdown(s: *mut SocketHeader) { + let already = with_socket(s, |h| { + h.is_closed() || h.flags.get(SocketFlags::IS_SHUT_DOWN) + }); + if already { + return; + } + with_socket(s, |h| { + h.flags.set(SocketFlags::IS_SHUT_DOWN, true); + h.p.set_kind(PollType::SocketShutDown); + }); + let ev = with_socket(s, |h| Events(h.p.events().0 & Events::READABLE.0)); + poll_change(s, ev); + io::shutdown(with_socket(s, |h| h.fd)); +} + +// ── connect promotion (R6.9 `us_internal_socket_after_open`) ───────────────── + +/// Connecting-socket promotion after a non-blocking connect completes. +/// `error` 0 = success; nonzero = SO_ERROR fetched by the dispatcher (R6.8). +pub(crate) fn on_connect(s: *mut SocketHeader, cs: *mut ConnectingSocket, error: c_int) { + // R6.9 Windows pre-step: an apparent success may have already been reset + // in the AFD race window; probe before promoting (context.c:749-765). + #[cfg(windows)] + let error = if error == 0 { + io::connect_probe(with_socket(s, |h| h.fd)) + } else { + error + }; + if error != 0 { + if cs.is_null() { + // Direct connect: dispatch closes the socket before the notify (C5). + dispatch::dispatch_connect_error(s, error); + } else { + crate::connecting::attempt_failed(cs, s); + } + return; + } + // Success: absolute R, nodelay again, promote type, disarm timeout. + poll_change(s, Events::READABLE); + io::nodelay(with_socket(s, |h| h.fd), true); + with_socket(s, |h| { + h.p.set_kind(PollType::Socket); + h.timeout = 255; + }); + if !cs.is_null() { + let ssl_ctx = crate::connecting::promote_winner(cs, s); + if !ssl_ctx.is_null() { + let tls = TlsState::attach(s, ssl_ctx, true, None); + with_socket(s, |h| h.transport = Transport::Tls(tls)); + } + crate::connecting::finish_promotion(cs); + with_socket(s, |h| h.connect_state = ptr::null_mut()); + } + socket_open(s, true, &[]); +} + +// ── established-socket event dispatch (R3.22; loop.c:544-800) ──────────────── + +/// Combined SOCKET / SOCKET_SHUT_DOWN readiness dispatch. Entry from the +/// backend's ready-poll switch; `events` are already masked to the poll's +/// believed registration (R1.18). +pub(crate) fn on_socket_poll_ready( + s: *mut SocketHeader, + error: bool, + mut eof: bool, + events: Events, +) { + let loop_ = socket_loop(s); + + // (b) WRITABLE (only when not error). + if events.contains(Events::WRITABLE) && !error { + with_socket(s, |h| { + h.flags.set(SocketFlags::LAST_WRITE_FAILED, false); + // kqueue EVFILT_WRITE is one-shot: the kernel filter is gone + // after delivery; clear POLLING_OUT, preserving POLLING_IN from + // the poll's own state (R2.13). + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + let keep = Events(h.p.events().0 & Events::READABLE.0); + h.p.set_polling(keep); + } + }); + match tls_state(s) { + Some(t) => { + if TlsState::on_writable(t, s, loop_) { + dispatch::dispatch_writable(s); + } + } + None => dispatch::dispatch_writable(s), + } + if with_socket(s, |h| h.is_closed()) { + return; + } + if !with_socket(s, |h| h.flags.get(SocketFlags::LAST_WRITE_FAILED)) || is_shut_down_full(s) + { + let ev = with_socket(s, |h| Events(h.p.events().0 & Events::READABLE.0)); + poll_change_on(s, loop_, ev); + } else { + // kqueue one-shot writable needs re-registration. + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + let ev = with_socket(s, |h| h.p.events() | Events::WRITABLE); + poll_change_on(s, loop_, ev); + } + } + } + + // (c) READABLE. + if events.contains(Events::READABLE) { + // Low-prio gate (R1.24): only TLS sockets mid-handshake are parked. + let low_prio = match tls_state(s) { + Some(t) => deref_mut(t).is_low_prio(), + None => false, + }; + if low_prio { + let state = with_socket(s, |h| h.low_prio_state); + if state == 2 { + // Was parked; process one readable dispatch now. + with_socket(s, |h| h.low_prio_state = 0); + } else if ffi::ld_low_prio_budget(loop_) > 0 { + ffi::ld_set_low_prio_budget(loop_, ffi::ld_low_prio_budget(loop_) - 1); + } else { + let ev = with_socket(s, |h| Events(h.p.events().0 & Events::WRITABLE.0)); + poll_change_on(s, loop_, ev); + // Already parked: a writable dispatch re-enabled READABLE + // without knowing about the queue; leave it where it is. + if state == 1 { + return; + } + let group = with_socket(s, |h| h.group); + // Bump BEFORE unlinking so maybe_unlink still sees the group + // as non-empty (loop.c:613-620). + with_group(group, |g| g.low_prio_count += 1); + crate::group::unlink_socket(group, s); + // LIFO push onto the loop's low-prio queue (prev/next reused). + let head = ffi::ld_low_prio_head(loop_); + with_socket(s, |h| { + h.prev = ptr::null_mut(); + h.next = head; + }); + if !head.is_null() { + with_socket(head, |h| h.prev = s); + } + ffi::ld_set_low_prio_head(loop_, s); + with_socket(s, |h| h.low_prio_state = 1); + // C `break`: the eof/error tail is skipped for this event. + return; + } + } + + let mut repeat_recv_count: usize = 0; + loop { + let fd = with_socket(s, |h| h.fd); + #[cfg(not(windows))] + let mut received_fd: Option = None; + #[cfg(windows)] + let received_fd: Option = None; + #[cfg(not(windows))] + let n: isize = if with_socket(s, |h| h.flags.get(SocketFlags::IS_IPC)) { + let (len, f) = io::recv_with_fd(fd, ffi::loop_recv_area(loop_)); + received_fd = f; + len + } else { + io::recv(fd, ffi::loop_recv_area(loop_)) + }; + #[cfg(windows)] + let n: isize = io::recv(fd, ffi::loop_recv_area(loop_)); + + if n > 0 { + // IPC: dispatch the passed fd FIRST, then the same bytes. + if let Some(passed) = received_fd { + dispatch::dispatch_fd(s, passed as c_int); + if with_socket(s, |h| h.is_closed()) { + break; + } + } + let len = n as usize; + match tls_state(s) { + Some(t) => { + let data = &ffi::loop_recv_area(loop_)[..len]; + TlsState::read(t, s, loop_, data); + } + None => { + let data = &mut ffi::loop_recv_area(loop_)[..len]; + dispatch::dispatch_data(s, data); + } + } + // Repeat-read heuristic (POSIX, loop.c:691-713). + #[cfg(not(windows))] + { + let alive = with_socket(s, |h| { + !h.is_closed() && !h.flags.get(SocketFlags::IS_PAUSED) + }); + let busy = crate::unsafe_core::poll_access::num_ready_polls(loop_); + if alive + && len >= LIBUS_RECV_BUFFER_LENGTH - 24 * 1024 + && len <= LIBUS_RECV_BUFFER_LENGTH + && (error || busy < 25) + { + repeat_recv_count += usize::from(!error); + // Starvation guard: at most 10 repeats on a busy loop. + if !(repeat_recv_count > 10 && busy > 2) { + continue; + } + } + } + // Windows AFD_POLL_ABORT race: probe recv exactly once more. + #[cfg(windows)] + { + let alive = with_socket(s, |h| { + !h.is_closed() && !h.flags.get(SocketFlags::IS_PAUSED) + }); + let first = repeat_recv_count == 0; + repeat_recv_count += 1; + if alive && first { + continue; + } + } + break; + } else if n == 0 { + eof = true; // handle EOF in the same place below + break; + } else if !is_would_block(n) { + // Peer-initiated TCP error (RST etc.): straight raw-close — + // routing through the TLS-graceful path would fire + // on_handshake for a passive close (loop.c:736-748). + close_raw_errno(s, (-n) as c_int, ptr::null_mut()); + return; + } else { + break; + } + } + } + + // (d) EOF (loop.c:755-784). + if eof { + if with_socket(s, |h| h.is_closed()) { + return; // no on_end after close + } + if is_shut_down_full(s) { + // We sent FIN first; got FIN back. + close_raw(s, CloseCode::normal, ptr::null_mut()); + return; + } + if with_socket(s, |h| h.flags.get(SocketFlags::ALLOW_HALF_OPEN)) { + // ABSOLUTE event set: stop readable, force-keep writable so a + // same-tick queued write still flushes (loop.c:765-775). + poll_change_on(s, loop_, Events::WRITABLE); + tls_aware_on_end(s); + } else { + tls_aware_on_end(s); + if !with_socket(s, |h| h.is_closed()) { + close_raw(s, CloseCode::normal, ptr::null_mut()); + } + return; + } + } + + // (e) ERROR (loop.c:786-799): fetch the real errno; 0..2 would collide + // with the CloseCode enum JS filters as self-initiated. + if error && !with_socket(s, |h| h.is_closed()) { + let so_error = io::so_error(with_socket(s, |h| h.fd)); + let code = if so_error > 2 { + so_error + } else { + ECONNRESET_ERRNO + }; + close_raw_errno(s, code, ptr::null_mut()); + } +} + +/// eof routing: TLS = `us_internal_ssl_on_end` (§5.3 — the peer's write side +/// is gone, no close_notify reply is coming: send ours best-effort and +/// raw-close CLEAN); plain = consumer on_end. +fn tls_aware_on_end(s: *mut SocketHeader) { + if tls_state(s).is_some() { + tls_close(s, CloseCode::normal, ptr::null_mut()); + if !with_socket(s, |h| h.is_closed()) { + close_raw(s, CloseCode::normal, ptr::null_mut()); + } + } else { + dispatch::dispatch_end(s); + } +} + +// ── handle-facing methods ───────────────────────────────────────────────────── + +impl SocketHeader { + // ── lifecycle ─────────────────────────────────────────────────────────── + + /// `us_socket_pause` (R3.23): keep only writable armed. + pub fn pause(&mut self) { + if self.flags.get(SocketFlags::IS_PAUSED) || self.is_closed() { + return; + } + let s: *mut Self = self; + poll_change(s, Events::WRITABLE); + header_mut(s).flags.set(SocketFlags::IS_PAUSED, true); + } + + /// `us_socket_resume` (R3.23). NOTE: unconditionally arms W even with no + /// write pending; the next writable dispatch disarms it (R3.22b). + pub fn resume(&mut self) { + if !self.flags.get(SocketFlags::IS_PAUSED) { + return; + } + self.flags.set(SocketFlags::IS_PAUSED, false); + if self.is_closed() { + return; + } + let s: *mut Self = self; + if is_shut_down_full(s) { + poll_change(s, Events::READABLE); + } else { + poll_change(s, Events::READABLE | Events::WRITABLE); + } + } + + /// Close with semantics per `CloseCode` (contracts C1-C6, C12). + pub fn close(&mut self, code: CloseCode) { + let s: *mut Self = self; + socket_close(s, code, ptr::null_mut()); + } + + /// Write-side shutdown (TLS close_notify rules / TCP FIN). + pub fn shutdown(&mut self) { + socket_shutdown(self); + } + + /// shutdown(2) SHUT_RD — idempotent, no state change (R3.20). + pub fn shutdown_read(&mut self) { + io::shutdown_read(self.fd); + } + + /// `us_socket_detach`: releases everything except the fd, which the + /// caller now owns (never dispatches on_close). + pub fn detach_fd(&mut self) -> Fd { + let fd = self.get_fd(); + let s: *mut Self = self; + socket_detach(s); + fd + } + + // ── state ─────────────────────────────────────────────────────────────── + + pub fn is_closed(&self) -> bool { + self.flags.get(SocketFlags::IS_CLOSED) + } + + /// `us_socket_is_shut_down` (R3.21, socket.c:602): TLS-aware — for TLS + /// sockets ssl==NULL, a fatal SSL error or SSL SENT_SHUTDOWN also count + /// (openssl.c:2021-2026). Raw-bit query: [`Self::is_shut_down_raw`]. + pub fn is_shutdown(&self) -> bool { + if self.flags.get(SocketFlags::IS_SHUT_DOWN) { + return true; + } + match &self.transport { + Transport::Tls(t) => { + t.ssl.is_null() + || ffi::with_ctl(t.ctl, |c| c.fatal) + || ffi::ssl_get_shutdown(t.ssl).0 + } + Transport::Plain => false, + } + } + + /// Raw TCP FIN-sent bit only (C `POLL_TYPE_SOCKET_SHUT_DOWN` probe); the + /// raw write gates (R4.4/R4.5) must use this, NOT the TLS-aware query. + pub(crate) fn is_shut_down_raw(&self) -> bool { + self.flags.get(SocketFlags::IS_SHUT_DOWN) + } + + pub fn is_tls(&self) -> bool { + matches!(self.transport, Transport::Tls(_)) + } + + /// `poll type != SEMI_SOCKET` (R3.21). + pub fn is_established(&self) -> bool { + self.p.kind_bits() != PollType::SemiSocket as u8 + } + + /// SO_ERROR; falls back to errno if getsockopt itself fails (R3.22e). + pub fn get_error(&self) -> i32 { + io::so_error(self.fd) + } + + pub fn get_verify_error(&self) -> us_bun_verify_error_t { + match &self.transport { + Transport::Tls(t) => t.verify_error(), + Transport::Plain => us_bun_verify_error_t::default(), + } + } + + // ── io (delegates to write.rs — docs/semantics.md §4 / C7) ───────────────── + + /// Write that also reports a fatal non-EWOULDBLOCK send error (node:net). + pub fn write_check_error(&mut self, data: &[u8]) -> (i32, bool) { + crate::write::write_check_error(self, data) + } + + pub fn write(&mut self, data: &[u8]) -> i32 { + crate::write::write(self, data) + } + + /// Write + SCM_RIGHTS fd pass (SpawnIpc). C14. + #[cfg(not(windows))] + pub fn write_fd(&mut self, data: &[u8], file_descriptor: Fd) -> i32 { + crate::write::write_fd(self, data, file_descriptor) + } + + #[cfg(windows)] + pub fn write_fd(&mut self, _data: &[u8], _file_descriptor: Fd) -> i32 { + unreachable!("us_socket_t::write_fd is not implemented on Windows") + } + + /// Two-buffer write (frame header + payload, no copy). + pub fn write2(&mut self, first: &[u8], second: &[u8]) -> i32 { + crate::write::write2(self, first, second) + } + + /// Vectored raw write; plain-TCP only (bypasses TLS framing). + pub fn raw_writev(&mut self, iov: &[UsIoVec]) -> i32 { + crate::write::raw_writev(self, iov) + } + + /// Bypass TLS — raw bytes to the fd even if `is_tls()`. + pub fn raw_write(&mut self, data: &[u8]) -> i32 { + crate::write::raw_write(self, data) + } + + pub fn flush(&mut self) { + crate::write::flush(self); + } + + pub fn send_file_needs_more(&mut self) { + crate::write::sendfile_needs_more(self); + } + + // ── options ───────────────────────────────────────────────────────────── + + /// Seconds wheel (R5.2): 0 clears; else ceil(seconds/4) ticks from the + /// group's short clock, mod 240 (longer values alias). + pub fn set_timeout(&mut self, seconds: u32) { + if seconds == 0 { + self.timeout = 255; + return; + } + let ts = with_group(self.group, |g| g.timestamp); + self.timeout = ((u32::from(ts).wrapping_add(seconds.wrapping_add(3) >> 2)) % 240) as u8; + } + + /// Minute wheel (R5.3). + pub fn set_long_timeout(&mut self, minutes: u32) { + if minutes == 0 { + self.long_timeout = 255; + return; + } + let ts = with_group(self.group, |g| g.long_timestamp); + // wrapping: C parity for minutes near u32::MAX (matches set_timeout). + self.long_timeout = ((u32::from(ts).wrapping_add(minutes)) % 240) as u8; + } + + /// Gated on the TLS-aware shutdown state (socket.c:697-701). + pub fn set_nodelay(&mut self, enabled: bool) { + if !self.is_shutdown() { + io::nodelay(self.fd, enabled); + } + } + + /// 0 success; positive errno; -1 for enabled with delay 0 (verbatim C). + /// No-op 0 on shut-down sockets (socket.c:729-734). + pub fn set_keepalive(&mut self, enabled: bool, delay: u32) -> i32 { + if self.is_shutdown() { + return 0; + } + io::keepalive(self.fd, enabled, delay) + } + + /// IP TOS / traffic class; negative errno on failure. -EBADF when closed + /// (socket.c:708-722) — the fd number may already be recycled. + pub fn set_tos(&mut self, tos: i32) -> i32 { + if self.is_closed() { + return NEG_EBADF; + } + io::set_tos(self.fd, tos) + } + + pub fn get_tos(&self) -> i32 { + if self.is_closed() { + return NEG_EBADF; + } + io::get_tos(self.fd) + } + + // ── identity ──────────────────────────────────────────────────────────── + + /// getsockname port; -1 on failure (R3.25, nothing cached). + pub fn local_port(&self) -> i32 { + io::local_addr(self.fd).map_or(-1, |a| a.port()) + } + + pub fn remote_port(&self) -> i32 { + io::remote_addr(self.fd).map_or(-1, |a| a.port()) + } + + /// Returned slice is a view into `buf` (raw 4/16 address bytes). + /// Verbatim C quirk (R3.25): syscall failure or a too-small buffer yield + /// an EMPTY slice, never an error — the Err arm exists for surface parity. + pub fn local_address<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], crate::Error> { + Ok(copy_addr(io::local_addr(self.fd), buf)) + } + + /// Returned slice is a view into `buf`. + pub fn remote_address<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], crate::Error> { + Ok(copy_addr(io::remote_addr(self.fd), buf)) + } + + /// One getpeername for both ip and port (Bun.serve().requestIP path); + /// empty slice + port -1 on failure/unix socket. + pub(crate) fn remote_ip_port<'a>(&self, buf: &'a mut [u8]) -> (&'a [u8], i32) { + let addr = io::remote_addr(self.fd); + let port = addr.as_ref().map_or(-1, |a| a.port()); + (copy_addr(addr, buf), port) + } + + /// One getsockname for both ip and port. + pub(crate) fn local_ip_port<'a>(&self, buf: &'a mut [u8]) -> (&'a [u8], i32) { + let addr = io::local_addr(self.fd); + let port = addr.as_ref().map_or(-1, |a| a.port()); + (copy_addr(addr, buf), port) + } + + pub fn get_fd(&self) -> Fd { + #[cfg(windows)] + { + Fd::from_system(self.fd as *mut c_void) + } + #[cfg(not(windows))] + { + Fd::from_native(self.fd) + } + } + + /// node `_handle` shape: `SSL*` for TLS, fd-as-pointer for TCP. A + /// detached SSL (post-close) falls through to the fd (socket.c:456-461). + pub fn get_native_handle(&self) -> Option<*mut c_void> { + let p: *mut c_void = match &self.transport { + Transport::Tls(t) if !t.ssl.is_null() => t.ssl.cast(), + _ => self.fd as usize as *mut c_void, + }; + if p.is_null() { None } else { Some(p) } + } + + /// `SSL*` if TLS else `None`. + pub fn ssl(&mut self) -> Option<&mut SSL> { + match &self.transport { + Transport::Tls(t) if !t.ssl.is_null() => Some(deref_mut(t.ssl)), + _ => None, + } + } + + pub fn kind(&self) -> SocketKind { + self.kind + } + + /// Re-stamp the dispatch tag in place (Listener.onCreate → BunSocket). + pub fn set_kind(&mut self, kind: SocketKind) { + self.kind = kind; + } + + /// Typed ext access. Storage rule mirrors `unsafe_core::ext::downcast`: + /// group-vtable kinds (uWS/Dynamic) use the ext-area pointer, static Rust + /// kinds the 8-byte ext word itself. + pub fn ext(&mut self) -> &mut T { + debug_assert!( + dispatch::uses_group_vtable(self.kind) + || (core::mem::size_of::() <= core::mem::size_of::<*mut c_void>() + && core::mem::align_of::() <= core::mem::align_of::<*mut c_void>()), + "Rust-kind ext type does not fit the 8-byte ext word" + ); + deref_mut(self.ext_ptr().cast::()) + } + + /// Same storage predicate as `ext::downcast_raw` + /// (`dispatch::uses_group_vtable`) — Dynamic sockets carry an ext area. + pub fn ext_ptr(&mut self) -> *mut u8 { + crate::unsafe_core::ext::ext_ptr_raw(self) + } + + pub fn group(&mut self) -> &mut SocketGroup { + deref_mut(self.group) + } + + pub fn raw_group(&self) -> *mut SocketGroup { + self.group + } + + // ── adoption / TLS attach ─────────────────────────────────────────────── + + /// Move this socket to a new group/kind. In-place (docs/design.md §Strategy 3): + /// `Some` is always `self`; `None` = refused (closed/shut-down, R3.5). + /// Ext capacity was fixed at creation — never realloc'd; `new_ext` is + /// release-checked against the slot's inline capacity (adoption-family max). + pub fn adopt( + &mut self, + g: &mut SocketGroup, + k: SocketKind, + old_ext: i32, + new_ext: i32, + ) -> Option> { + let s: *mut Self = self; + let _ = old_ext; + assert_adopt_ext_fits(s, k, new_ext); + debug_assert!( + dispatch::uses_group_vtable(self.kind) == dispatch::uses_group_vtable(k), + "adoption across ext families (capacity fixed at creation)" + ); + // Fail closed where `group::adopt_socket` would silently refuse + // (R3.5 precondition): a `Some` return with the old kind's vtable + // still stamped would be a type-confusion hazard (C10). + if self.is_closed() || is_shut_down_full(s) { + return None; + } + // R3.5 step 2 (OQ-7): C restamps a live connect_state's group/kind on + // every adopt; unreachable here — after_open nulls connect_state + // before any dispatch that could adopt. + debug_assert!( + self.connect_state.is_null(), + "adopt with live connect_state" + ); + crate::group::adopt_socket(s, g, k); + NonNull::new(s) + } + + /// `adopt` + attach a fresh `SSL*` from `ssl_ctx`. Does NOT kick the + /// handshake — caller repoints ext then calls `start_tls_handshake` + /// (C10, docs/tls.md §6.1). Refuses closed sockets, and already-TLS + /// ones: replacing the transport would SSL_free a `TlsState` whose + /// `&mut` frames may still be on the stack (§1.4 deferral bypass). + pub fn adopt_tls( + &mut self, + g: &mut SocketGroup, + k: SocketKind, + ssl_ctx: &mut SslCtx, + sni: Option<&core::ffi::CStr>, + is_client: bool, + old_ext: i32, + new_ext: i32, + ) -> Option> { + if self.is_closed() || self.is_tls() { + return None; + } + let _ = old_ext; + let s: *mut Self = self; + assert_adopt_ext_fits(s, k, new_ext); + crate::group::adopt_tls_socket(s, g, k, ptr::from_mut(ssl_ctx), sni, is_client); + // §6.1: adopt → attach → resume (readable was likely disabled by the + // pre-upgrade pause). + header_mut(s).resume(); + NonNull::new(s) + } + + /// Tee inbound ciphertext to the ssl_raw_tap dispatch before SSL_read. + pub fn set_ssl_raw_tap(&mut self, enabled: bool) { + if let Transport::Tls(t) = &mut self.transport { + t.raw_tap = enabled; + } + } + + /// Resume a handshake suspended by an async SNI callback; consumes the + /// owned `ssl_ctx` ref (null = fall through to default); `error` aborts. + pub fn sni_resolve(&mut self, ctx: *mut SslCtx, error: bool) { + socket_sni_resolve(self, ctx, error); + } +} + +/// Family-max enforcement: inline ext capacity is fixed at creation, so +/// an adopt declaring more ext bytes than the slot carries would overwrite +/// the ADJACENT slab slot — fail loudly instead of corrupting cross-socket. +fn assert_adopt_ext_fits(s: *mut us_socket_t, k: SocketKind, new_ext: i32) { + if !dispatch::uses_group_vtable(k) || new_ext <= 0 { + return; + } + let nn = NonNull::new(s).expect("null socket in adopt"); + let cap = crate::unsafe_core::slab::inline_ext_capacity_of(nn); + // Capacity-0 slots keep the pre-inline area-pointer word (see + // ext::downcast_raw) — no inline bound exists to enforce. + assert!( + cap == 0 || new_ext as u32 <= cap, + "us_socket_adopt ext size ({new_ext}) exceeds the slot's inline capacity ({cap}); \ +the creation site must register the adoption family's max ext size" + ); +} + +/// Send ClientHello; split from `adopt_tls` so ext can be repointed first. +/// No-op on a closed (or non-TLS) socket, like C us_socket_start_tls_handshake. +/// Raw entry: the handshake dispatches consumer callbacks (C17). +pub(crate) fn socket_start_tls_handshake(s: *mut SocketHeader) { + if header_mut(s).is_closed() { + return; + } + if let Some(t) = tls_state(s) { + TlsState::handshake(t, s); + } +} + +/// Feed already-read bytes through the TLS decrypt path (chunked at i32; +/// stops if the socket closes mid-feed). Raw entry: dispatches decrypted +/// on_data / on_handshake (C17). +pub(crate) fn socket_tls_feed(s: *mut SocketHeader, data: &[u8]) { + let loop_ = socket_loop(s); + for chunk in data.chunks(i32::MAX as usize) { + let Some(t) = tls_state(s) else { return }; + if header_mut(s).is_closed() { + return; + } + TlsState::read(t, s, loop_, chunk); + } +} + +/// Copy raw 4/16 address bytes into the caller buffer; empty on failure or +/// too-small buffer (verbatim `us_socket_local_address` semantics). +fn copy_addr<'a>(addr: Option, buf: &'a mut [u8]) -> &'a [u8] { + match addr { + Some(a) => { + let ip = a.ip(); + if buf.len() < ip.len() || ip.is_empty() { + &buf[..0] + } else { + buf[..ip.len()].copy_from_slice(ip); + &buf[..ip.len()] + } + } + None => &buf[..0], + } +} diff --git a/src/usockets/tls/context.rs b/src/usockets/tls/context.rs new file mode 100644 index 000000000000..e090dc6a3c89 --- /dev/null +++ b/src/usockets/tls/context.rs @@ -0,0 +1,635 @@ +//! SSL_CTX construction from options, verify errors, default CA store, +//! pending session/keylog queues, raw tap, tls_feed plumbing, adopt_tls. +//! Implements docs/tls.md §7 (Context/options) + Appendix A.1-A.4. +//! `BunSocketContextOptions` layout FROZEN (memcpy-shared with +//! `uWS::SocketContextOptions` — docs/cabi.md §3.7). + +use core::ffi::{CStr, c_char, c_int, c_long, c_void}; +use core::ptr; + +use crate::tls::SSL; +use crate::unsafe_core::bssl; + +pub use crate::unsafe_core::bssl::{Pkcs12Pem, parse_pkcs12}; +// Consumed by state.rs / sni.rs. +#[allow(unused_imports)] +pub(crate) use crate::unsafe_core::bssl::{ + RenegState, SniSuspension, reneg_policy, reneg_state_ptr, set_reneg_policy, sni_is_waiting, + sni_set, sni_take, +}; + +/// BoringSSL `SSL_CTX`, from the pre-generated bssl-sys bindings (see +/// src/bssl/bindings/README.md and docs/tls.md PART 2). Kept under the frozen +/// `SslCtx` name; all access goes through `unsafe_core::bssl`. +pub type SslCtx = bun_bssl::SSL_CTX; + +/// Parked-payload caps: a serialized SSL_SESSION (i2d) and one keylog line. +/// Oversize entries are dropped at the parking site (openssl.c:233-236). +pub const US_SSL_PENDING_SESSION_MAX: usize = 65536; +pub const US_SSL_PENDING_KEYLOG_LINE_MAX: usize = 4096; +/// `US_SSL_FATAL_ERROR_REASON_MAX` (openssl.c:66-69). +pub const US_SSL_FATAL_ERROR_REASON_MAX: usize = 256; + +/// `enum create_bun_socket_error_t` (0..4) — out-param of ctx construction. +#[repr(C)] +#[derive(Clone, Copy, Eq, PartialEq, Debug)] +pub enum create_bun_socket_error_t { + none = 0, + load_ca_file, + invalid_ca_file, + invalid_ca, + invalid_ciphers, +} + +impl create_bun_socket_error_t { + pub fn message(self) -> Option<&'static [u8]> { + match self { + Self::none => None, + Self::load_ca_file => Some(b"Failed to load CA file"), + Self::invalid_ca_file => Some(b"Invalid CA file"), + Self::invalid_ca => Some(b"Invalid CA"), + Self::invalid_ciphers => Some(b"Invalid ciphers"), + } + } +} + +/// `struct us_bun_verify_error_t` — TLS handshake verification result, BY +/// VALUE across the ABI. Only `code` is static; `reason` may point into the +/// parked `FatalReason` (docs/tls.md §3.4) — copy it before the callback returns. +#[repr(C)] +#[derive(Clone, Copy)] +pub struct us_bun_verify_error_t { + pub error_no: core::ffi::c_int, + pub code: *const c_char, + pub reason: *const c_char, +} + +impl Default for us_bun_verify_error_t { + fn default() -> Self { + Self { + error_no: 0, + code: ptr::null(), + reason: ptr::null(), + } + } +} + +impl us_bun_verify_error_t { + /// Borrow `code` as a `CStr`, or `None` if null. + #[inline] + pub fn code(&self) -> Option<&core::ffi::CStr> { + bssl::cstr_opt(self.code) + } + + /// Borrow `reason` as a `CStr`, or `None` if null. + #[inline] + pub fn reason(&self) -> Option<&core::ffi::CStr> { + bssl::cstr_opt(self.reason) + } + + /// `code` as bytes (no NUL), or `b""` if null. + #[inline] + pub fn code_bytes(&self) -> &[u8] { + self.code().map_or(b"", core::ffi::CStr::to_bytes) + } + + /// `reason` as bytes (no NUL), or `b""` if null. + #[inline] + pub fn reason_bytes(&self) -> &[u8] { + self.reason().map_or(b"", core::ffi::CStr::to_bytes) + } + + /// `us_ssl_socket_verify_error_from_ssl` (openssl.c:1432-1440): default + /// UNABLE_TO_GET_ISSUER_CERT when no peer cert, with the PSK / TLS1.3- + /// resumption exemptions; `error == 0` ⇒ code/reason null. + pub fn from_ssl(ssl: *const SSL) -> Self { + let err = bssl::verify_peer_certificate(ssl, bssl::X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT); + if err == bssl::X509_V_OK { + return Self::default(); + } + Self { + error_no: err as c_int, + code: x509_error_code(err).as_ptr(), + reason: bssl::verify_error_string(err), + } + } + + /// Close-before-established variant (openssl.c:1517-1520). + pub fn econnreset() -> Self { + Self { + error_no: -46, + code: c"ECONNRESET".as_ptr(), + reason: + c"Client network socket disconnected before secure TLS connection was established" + .as_ptr(), + } + } + + /// Parked fatal-reason variant (openssl.c:1489-1491). `reason` borrows + /// the caller's stack copy of the parked reason; the caller dispatches + /// before releasing it (§3.4). + pub fn eproto(reason: *const c_char) -> Self { + Self { + error_no: -71, + code: c"EPROTO".as_ptr(), + reason, + } + } +} + +/// `us_X509_error_code` (openssl.c:1376-1411): symbolic name for an +/// X509_V_ERR (values from vendor x509.h), else "UNSPECIFIED". +pub fn x509_error_code(err: c_long) -> &'static CStr { + match err { + 2 => c"UNABLE_TO_GET_ISSUER_CERT", + 3 => c"UNABLE_TO_GET_CRL", + 4 => c"UNABLE_TO_DECRYPT_CERT_SIGNATURE", + 5 => c"UNABLE_TO_DECRYPT_CRL_SIGNATURE", + 6 => c"UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY", + 7 => c"CERT_SIGNATURE_FAILURE", + 8 => c"CRL_SIGNATURE_FAILURE", + 9 => c"CERT_NOT_YET_VALID", + 10 => c"CERT_HAS_EXPIRED", + 11 => c"CRL_NOT_YET_VALID", + 12 => c"CRL_HAS_EXPIRED", + 13 => c"ERROR_IN_CERT_NOT_BEFORE_FIELD", + 14 => c"ERROR_IN_CERT_NOT_AFTER_FIELD", + 15 => c"ERROR_IN_CRL_LAST_UPDATE_FIELD", + 16 => c"ERROR_IN_CRL_NEXT_UPDATE_FIELD", + 17 => c"OUT_OF_MEM", + 18 => c"DEPTH_ZERO_SELF_SIGNED_CERT", + 19 => c"SELF_SIGNED_CERT_IN_CHAIN", + 20 => c"UNABLE_TO_GET_ISSUER_CERT_LOCALLY", + 21 => c"UNABLE_TO_VERIFY_LEAF_SIGNATURE", + 22 => c"CERT_CHAIN_TOO_LONG", + 23 => c"CERT_REVOKED", + 24 => c"INVALID_CA", + 25 => c"PATH_LENGTH_EXCEEDED", + 26 => c"INVALID_PURPOSE", + 27 => c"CERT_UNTRUSTED", + 28 => c"CERT_REJECTED", + 62 => c"HOSTNAME_MISMATCH", + _ => c"UNSPECIFIED", + } +} + +/// `us_bun_socket_context_options_t` — 20 fields, layout FROZEN (passed BY +/// VALUE to ctx builders; memcpy'd onto `uWS::SocketContextOptions`). +/// sessionTimeout/ticketKeys stay unplumbed (C parity — docs/tls.md §Resolved design notes). +#[repr(C)] +#[derive(Clone, Copy)] +pub struct BunSocketContextOptions { + pub key_file_name: *const c_char, + pub cert_file_name: *const c_char, + pub passphrase: *const c_char, + pub dh_params_file_name: *const c_char, + pub ca_file_name: *const c_char, + pub ssl_ciphers: *const c_char, + pub ssl_prefer_low_memory_usage: i32, + pub key: *const *const c_char, + pub key_count: u32, + pub cert: *const *const c_char, + pub cert_count: u32, + pub ca: *const *const c_char, + pub ca_count: u32, + pub secure_options: u32, + pub ssl_min_version: i32, + pub ssl_max_version: i32, + pub reject_unauthorized: i32, + pub request_cert: i32, + pub client_renegotiation_limit: u32, + pub client_renegotiation_window: u32, +} + +impl Default for BunSocketContextOptions { + fn default() -> Self { + Self { + key_file_name: ptr::null(), + cert_file_name: ptr::null(), + passphrase: ptr::null(), + dh_params_file_name: ptr::null(), + ca_file_name: ptr::null(), + ssl_ciphers: ptr::null(), + ssl_prefer_low_memory_usage: 0, + key: ptr::null(), + key_count: 0, + cert: ptr::null(), + cert_count: 0, + ca: ptr::null(), + ca_count: 0, + secure_options: 0, + ssl_min_version: 0, + ssl_max_version: 0, + reject_unauthorized: 0, + request_cert: 0, + client_renegotiation_limit: 3, + client_renegotiation_window: 600, + } + } +} + +impl BunSocketContextOptions { + /// Build a BoringSSL `SSL_CTX*`. Caller owns one ref (release with + /// `SSL_CTX_free`); the passphrase is freed inside once key load + /// completes. Mode-neutral: client verify override is applied per-SSL at + /// attach (docs/tls.md §7). + // Options pass BY VALUE across the frozen ABI (docs/cabi.md §3.7). + #[allow(clippy::large_types_passed_by_value)] + pub fn create_ssl_context(self, err: &mut create_bun_socket_error_t) -> Option<*mut SslCtx> { + let ctx = ssl_ctx_from_options(self, err); + if ctx.is_null() { None } else { Some(ctx) } + } + + /// Content-addressed SHA-256 over all fields (file-backed fields fed + /// path + mtime/size) — the SSLContextCache key (docs/tls.md A.2). + pub fn digest(&self) -> [u8; 32] { + let mut h = bssl::Sha256::init(); + + // Presence byte so null ≠ ""; terminator so {a:"xy"} ≠ {a:"x",b:"y"}. + let feed_z = |h: &mut bssl::Sha256, s: *const c_char| { + h.update(&[(!s.is_null()) as u8]); + if let Some(c) = bssl::cstr_opt(s) { + h.update(c.to_bytes()); + } + h.update(&[0]); + }; + + let feed_arr = |h: &mut bssl::Sha256, arr: *const *const c_char, n: u32| { + h.update(&[(!arr.is_null()) as u8]); + h.update(&n.to_ne_bytes()); + for &s in bssl::ptr_array(arr, n as usize) { + h.update(&[(!s.is_null()) as u8]); + if let Some(c) = bssl::cstr_opt(s) { + h.update(c.to_bytes()); + } + h.update(&[0]); + } + h.update(&[0]); + }; + + // File-backed fields also feed [mtime_sec, mtime_nsec, size] so an + // in-place cert rotation invalidates. Stat failure feeds zeros AND + // ctx construction fails on the same path — the entry never caches. + let feed_path = |h: &mut bssl::Sha256, s: *const c_char| { + h.update(&[(!s.is_null()) as u8]); + if let Some(path) = bssl::cstr_opt(s) { + h.update(path.to_bytes()); + let mut meta: [i64; 3] = [0; 3]; + if !path.to_bytes().is_empty() { + if let Some(m) = bssl::stat_for_digest(path) { + meta = m; + } + } + for v in meta { + h.update(&v.to_ne_bytes()); + } + } + h.update(&[0]); + }; + + feed_path(&mut h, self.key_file_name); + feed_path(&mut h, self.cert_file_name); + feed_z(&mut h, self.passphrase); + feed_path(&mut h, self.dh_params_file_name); + feed_path(&mut h, self.ca_file_name); + feed_z(&mut h, self.ssl_ciphers); + h.update(&self.ssl_prefer_low_memory_usage.to_ne_bytes()); + feed_arr(&mut h, self.key, self.key_count); + feed_arr(&mut h, self.cert, self.cert_count); + feed_arr(&mut h, self.ca, self.ca_count); + h.update(&self.secure_options.to_ne_bytes()); + h.update(&self.ssl_min_version.to_ne_bytes()); + h.update(&self.ssl_max_version.to_ne_bytes()); + h.update(&self.reject_unauthorized.to_ne_bytes()); + h.update(&self.request_cert.to_ne_bytes()); + h.update(&self.client_renegotiation_limit.to_ne_bytes()); + h.update(&self.client_renegotiation_window.to_ne_bytes()); + h.finish() + } + + /// Best-effort byte count of cert/key/CA material (memoryCost feed). + pub fn approx_cert_bytes(&self) -> usize { + let sum = |arr: *const *const c_char, count: u32| -> usize { + bssl::ptr_array(arr, count as usize) + .iter() + .filter_map(|&s| bssl::cstr_opt(s)) + .map(|c| c.to_bytes().len()) + .sum() + }; + sum(self.key, self.key_count) + + sum(self.cert, self.cert_count) + + sum(self.ca, self.ca_count) + } +} + +// ── ctx-level API (native successors of the us_ssl_* externs) ──────────────── + +/// `us_ssl_ctx_from_options` — `build_raw` + the packed reneg policy ex_data +/// (openssl.c:1234-1257); caller owns one ref. +#[allow(clippy::large_types_passed_by_value)] +pub fn ssl_ctx_from_options( + options: BunSocketContextOptions, + err: &mut create_bun_socket_error_t, +) -> *mut SslCtx { + let ctx = ssl_ctx_build_raw(options, err); + if ctx.is_null() { + return ctx; + } + if options.client_renegotiation_limit != 0 || options.client_renegotiation_window != 0 { + bssl::set_reneg_policy( + ctx, + options.client_renegotiation_limit, + options.client_renegotiation_window, + ); + } + ctx +} + +/// `us_ssl_ctx_build_raw` (openssl.c:893-1088) — also exported for quic.c +/// (lsquic sets ALPN/transport params itself). Application order is +/// normative (docs/tls.md §7.1). Failures beyond the four `err` codes +/// return null with the reason left on the OpenSSL error queue. +#[allow(clippy::large_types_passed_by_value)] +pub fn ssl_ctx_build_raw( + options: BunSocketContextOptions, + err: &mut create_bun_socket_error_t, +) -> *mut SslCtx { + bssl::err_clear_error(); + + let ctx = bssl::ssl_ctx_new_base(); + if ctx.is_null() { + return ptr::null_mut(); + } + // `ssl_ctx_build_fail`: drop passphrase + free (ex_data live-count slot + // is already registered, so the free_func balances the counter). + fn fail(ctx: *mut SslCtx) -> *mut SslCtx { + bssl::ctx_drop_passphrase(ctx); + bssl::ssl_ctx_free(ctx); + ptr::null_mut() + } + + // Default floor TLS1.2 when no minimum requested; max only when nonzero. + bssl::ctx_set_min_proto_version( + ctx, + if options.ssl_min_version != 0 { + options.ssl_min_version as u16 + } else { + bssl::TLS1_2_VERSION + }, + ); + if options.ssl_max_version != 0 { + bssl::ctx_set_max_proto_version(ctx, options.ssl_max_version as u16); + } + + if options.ssl_prefer_low_memory_usage != 0 { + bssl::ctx_set_release_buffers_mode(ctx); + } + + if let Some(pass) = bssl::cstr_opt(options.passphrase) { + bssl::ctx_set_passphrase(ctx, pass); + } + + // Multiple identities (RSA + EC pairs) load PAIR-WISE: certs-then-keys + // would fail KEY_TYPE_MISMATCH on mixed configurations (openssl.c:926-936). + let certs = bssl::ptr_array(options.cert, options.cert_count as usize); + let keys = bssl::ptr_array(options.key, options.key_count as usize); + let interleave_identities = options.cert_file_name.is_null() + && options.key_file_name.is_null() + && !options.cert.is_null() + && !options.key.is_null() + && options.cert_count == options.key_count + && options.cert_count > 1; + let load_cert = |c: *const c_char| { + bssl::cstr_opt(c).is_some_and(|c| bssl::ctx_use_certificate_chain_content(ctx, c)) + }; + let load_key = |k: *const c_char| { + bssl::cstr_opt(k).is_some_and(|k| bssl::ctx_use_privatekey_content(ctx, k, true)) + }; + if interleave_identities { + for (&c, &k) in certs.iter().zip(keys) { + if !load_cert(c) || !load_key(k) { + return fail(ctx); + } + } + } else { + if let Some(file) = bssl::cstr_opt(options.cert_file_name) { + if !bssl::ctx_use_certificate_chain_file(ctx, file) { + return fail(ctx); + } + } else if !certs.is_empty() { + for &c in certs { + if !load_cert(c) { + return fail(ctx); + } + } + } + if let Some(file) = bssl::cstr_opt(options.key_file_name) { + if !bssl::ctx_use_privatekey_file(ctx, file) { + return fail(ctx); + } + } else if !keys.is_empty() { + for &k in keys { + if !load_key(k) { + return fail(ctx); + } + } + } + } + // The passwd_cb was only consulted by the key loads above; drop the + // secret now so plain SSL_CTX_free is sufficient everywhere downstream. + bssl::ctx_drop_passphrase(ctx); + + let verify_mode = if options.reject_unauthorized != 0 { + bssl::SSL_VERIFY_PEER | bssl::SSL_VERIFY_FAIL_IF_NO_PEER_CERT + } else { + bssl::SSL_VERIFY_PEER + }; + if let Some(ca_file) = bssl::cstr_opt(options.ca_file_name) { + // Explicit CA REPLACES default trust (Node semantics): load into the + // fresh empty store from SSL_CTX_new. + if !bssl::ctx_load_client_ca_file(ctx, ca_file) { + *err = create_bun_socket_error_t::load_ca_file; + return fail(ctx); + } + mark_ctx_user_ca(ctx); + if !bssl::ctx_load_verify_locations(ctx, ca_file) { + *err = create_bun_socket_error_t::invalid_ca_file; + return fail(ctx); + } + bssl::ctx_set_verify(ctx, verify_mode); + } else if !options.ca.is_null() && options.ca_count > 0 { + mark_ctx_user_ca(ctx); + // User CAs only, into the CTX's own initially-empty store — otherwise + // an mTLS server with `ca: [internalCA]` would also accept any client + // cert chaining to a public root. + let cert_store = bssl::ctx_get_cert_store(ctx); + for &ca in bssl::ptr_array(options.ca, options.ca_count as usize) { + let ok = bssl::cstr_opt(ca) + .is_some_and(|ca| bssl::add_ca_cert_to_store(ctx, ca, cert_store)); + if !ok { + *err = create_bun_socket_error_t::invalid_ca; + return fail(ctx); + } + bssl::err_clear_error(); + bssl::ctx_set_verify(ctx, verify_mode); + } + } else if options.request_cert != 0 { + // Process-shared bundled-roots store (refcounted; ownership of the + // returned up-ref transfers to the CTX). + bssl::ctx_set_cert_store(ctx, bssl::shared_default_ca_store()); + bssl::ctx_set_verify(ctx, verify_mode); + } + + if let Some(dh_file) = bssl::cstr_opt(options.dh_params_file_name) { + if !bssl::ctx_set_dh_params_from_file(ctx, dh_file) { + return fail(ctx); + } + if !bssl::ctx_set_cipher_list(ctx, bssl::default_ciphers()) { + return fail(ctx); + } + } + + if let Some(ciphers) = bssl::cstr_opt(options.ssl_ciphers) { + if !bssl::ctx_set_cipher_list(ctx, ciphers) { + // Peek, don't consume: the Rust caller decomposes the queued + // reason (NO_CIPHER_MATCH, INVALID_COMMAND) into the JS error. + if !bssl::cipher_failure_tolerated(ciphers) { + *err = create_bun_socket_error_t::invalid_ciphers; + return fail(ctx); + } + bssl::err_clear_error(); + } + } + + if options.secure_options != 0 { + bssl::ctx_set_secure_options(ctx, options.secure_options); + } + + bssl::ctx_install_session_callbacks(ctx); + ctx +} + +pub fn ssl_ctx_up_ref(ctx: *mut SslCtx) { + bssl::ssl_ctx_up_ref(ctx); +} + +pub fn ssl_ctx_unref(ctx: *mut SslCtx) { + bssl::ssl_ctx_free(ctx); +} + +/// Process-global live-ctx counter (leak canary in tests). Decremented by the +/// ex_data free_func so it tracks true refcount-zero destruction. +pub fn ssl_ctx_live_count() -> c_long { + bssl::ssl_ctx_live_count() as c_long +} + +/// Append PEM certs to `ctx`'s trust store; 0 when nothing could be added. +/// Clone-on-write (openssl.c:1093-1132): a shared-default or still-empty +/// store is replaced with a fresh FULL default store first, so addCACert +/// EXTENDS default trust (Node's SecureContext::AddCACert). +pub fn ssl_ctx_add_ca_cert(ctx: *mut SslCtx, pem: &core::ffi::CStr) -> i32 { + if ctx.is_null() { + return 0; + } + let mut store = bssl::ctx_get_cert_store(ctx); + let shared = bssl::shared_default_ca_store(); + let store_is_shared = !store.is_null() && core::ptr::eq(store, shared); + // shared_default_ca_store up-refs per return; release the comparison ref. + bssl::x509_store_free(shared); + let store_is_empty = !store.is_null() && !store_is_shared && bssl::x509_store_is_empty(store); + if store_is_shared || store_is_empty { + let own = bssl::default_ca_store(); + if own.is_null() { + return 0; + } + bssl::ctx_set_cert_store(ctx, own); + store = own; + } + if store.is_null() { + return 0; + } + mark_ctx_user_ca(ctx); + bssl::add_ca_cert_to_store(ctx, pem, store) as i32 +} + +/// Bun's default trust store (root_certs.cpp stays C++ — docs/cabi.md §1.7). +/// Fresh full store (bundled + NODE_EXTRA_CA_CERTS + system CAs when +/// enabled); caller owns the returned ref. +pub fn default_ca_store() -> *mut core::ffi::c_void { + bssl::default_ca_store().cast::() +} + +/// Process-shared immutable default store — UP-REF'D PER RETURN, caller must +/// release (used by the per-SSL client attach override and `request_cert`). +pub fn shared_default_ca_store() -> *mut core::ffi::c_void { + bssl::shared_default_ca_store().cast::() +} + +/// `us_get_default_ciphers`. +pub fn default_ciphers() -> &'static core::ffi::CStr { + bssl::default_ciphers() +} + +// ── CTX/SSL markers + backrefs (ex_data policy, openssl.c:140-185) ────────── + +/// Mark the CTX's verification store as holding user-provided CAs: the +/// per-socket client attach must NOT replace such a store with the shared +/// default roots (openssl.c:161-164). +pub(crate) fn mark_ctx_user_ca(ctx: *mut SslCtx) { + bssl::ctx_set_ex_data( + ctx, + bssl::ex_indices().ctx_user_ca, + ptr::without_provenance_mut(1), + ); +} + +/// Per-domain SNI userdata stashed on the selected CTX so per-socket lookup +/// works via `SSL_get_SSL_CTX` regardless of which ctx SNI picked. +pub(crate) fn ctx_set_sni_user(ctx: *mut SslCtx, user: *mut c_void) { + bssl::ctx_set_ex_data(ctx, bssl::ex_indices().sni_user, user); +} + +pub(crate) fn ctx_sni_user(ctx: *const SslCtx) -> *mut c_void { + bssl::ctx_get_ex_data(ctx, bssl::ex_indices().sni_user) +} + +/// Accepting-listener backref, stored per-SSL (never as CTX servername arg — +/// the shared CTX can outlive a listener; documented UAF, openssl.c:147-150). +/// Listener teardown MUST wipe this on every accepted socket, including ones +/// parked on the low-prio queue (docs/tls.md §2.6). +pub(crate) fn set_listener_backref(ssl: *mut SSL, listener: *mut c_void) { + bssl::ssl_set_ex_data(ssl, bssl::ex_indices().listener, listener); +} + +pub(crate) fn listener_backref(ssl: *const SSL) -> *mut c_void { + bssl::ssl_get_ex_data(ssl, bssl::ex_indices().listener) +} + +pub(crate) fn clear_listener_backref(ssl: *mut SSL) { + bssl::ssl_set_ex_data(ssl, bssl::ex_indices().listener, ptr::null_mut()); +} + +// ── Pending session/keylog park-then-flush queues (openssl.c:226-439) ─────── +// Both callbacks fire from INSIDE SSL_read/SSL_do_handshake; they only +// serialize + park (caps above, wire-order preserved). Flushes happen after +// the SSL stack unwinds (C11) — state.rs dispatches the drained entries at its +// flush points, before delivering data. + +/// `us_ssl_enable_pending_events` — non-us_socket owners (SSLWrapper for +/// TLS-over-duplex / named pipes) opt into the parked queues and drain with +/// the pop functions below after their reads unwind. +pub fn enable_pending_events(ssl: *mut SSL) { + bssl::enable_pending_events(ssl); +} + +/// `us_ssl_pop_pending_session`: oldest parked entry into `out`; returns the +/// byte length, 0 when empty. Entries pop in parking order. +pub fn pop_pending_session(ssl: *mut SSL, out: &mut [u8]) -> usize { + bssl::pop_pending_session(ssl, out) +} + +/// `us_ssl_pop_pending_keylog`: line already carries the trailing `\n` Node +/// appends before emitting 'keylog'. +pub fn pop_pending_keylog(ssl: *mut SSL, out: &mut [u8]) -> usize { + bssl::pop_pending_keylog(ssl, out) +} diff --git a/src/usockets/tls/mod.rs b/src/usockets/tls/mod.rs new file mode 100644 index 000000000000..8432bb7b491f --- /dev/null +++ b/src/usockets/tls/mod.rs @@ -0,0 +1,20 @@ +//! Per-socket TLS transport selector. Implements docs/tls.md §1 +//! (data flow / BIO plumbing / re-entrancy). + +pub mod context; +pub mod sni; +pub mod state; + +pub use state::{SslWindowGuard, TlsState}; + +/// BoringSSL `SSL`, from the pre-generated bssl-sys bindings (see +/// src/bssl/bindings/README.md and docs/tls.md PART 2). +pub use bun_bssl::SSL; + +/// Lives on the `SocketHeader`. Spill + fatal-reason storage is LOOP-SHARED +/// (docs/design.md §TLS buffer ownership), owned via generation-checked `SocketRef` — the +/// slab's stable slot addresses are what delete relocation. +pub enum Transport { + Plain, + Tls(Box), +} diff --git a/src/usockets/tls/sni.rs b/src/usockets/tls/sni.rs new file mode 100644 index 000000000000..c948bd45a03d --- /dev/null +++ b/src/usockets/tls/sni.rs @@ -0,0 +1,215 @@ +//! Server-name (SNI) map with wildcard matching — replaces sni_tree.cpp with +//! verbatim matching semantics incl. case behavior (docs/tls.md A.5). Also +//! the dynamic on_server_name callback and the sni_resolve suspend/resume +//! path (docs/cabi.md §4.3). + +use core::ffi::{CStr, c_char, c_int, c_void}; +use std::collections::BTreeMap; + +use crate::handle::ListenSocket; +use crate::socket::us_socket_t; +use crate::tls::context::{SslCtx, ssl_ctx_unref, ssl_ctx_up_ref}; + +/// sni_tree.cpp MAX_LABELS: find/remove reject hostnames with >10 labels; +/// add has no limit (A.5, ported verbatim). +const MAX_LABELS: usize = 10; + +/// One registered server name: `ctx` holds an up_ref'd reference released on +/// Drop (== sni_node_destructor); `user` is opaque (uWS: HttpRouter*). +struct Entry { + ctx: *mut SslCtx, + user: *mut c_void, +} + +impl Drop for Entry { + fn drop(&mut self) { + if !self.ctx.is_null() { + ssl_ctx_unref(self.ctx); + } + } +} + +/// Label-trie node (sni_node). `entry` presence == C's non-null `user`. +#[derive(Default)] +struct Node { + entry: Option, + children: BTreeMap, Node>, +} + +/// Per-listen-socket server-name tree. Each node holds an up_ref'd `SslCtx` +/// (released on remove/close) + an opaque `user` pointer (uWS: HttpRouter*). +pub(crate) struct SniMap { + root: Node, +} + +/// Dynamic missing-SNI resolver: returns the ctx to use for THIS handshake +/// only (not cached/owned), or null → default. `*abort_handshake`: 1 = abort, +/// 2 = suspend (async; resumed via `sni_resolve`). +pub(crate) type OnServerName = unsafe extern "C" fn( + *mut ListenSocket, + *const c_char, + *mut c_int, + *mut us_socket_t, +) -> *mut SslCtx; + +/// Split labels exactly like sni_tree.cpp's string_view loop: tokens up to +/// each `.`; a trailing dot yields NO empty final label; `..` yields one. +struct Labels<'a> { + rest: &'a [u8], +} + +impl<'a> Iterator for Labels<'a> { + type Item = &'a [u8]; + + fn next(&mut self) -> Option<&'a [u8]> { + if self.rest.is_empty() { + return None; + } + let label = match self.rest.iter().position(|&b| b == b'.') { + Some(i) => &self.rest[..i], + None => self.rest, + }; + self.rest = &self.rest[(label.len() + 1).min(self.rest.len())..]; + Some(label) + } +} + +fn split_labels(hostname: &[u8]) -> Labels<'_> { + Labels { rest: hostname } +} + +/// `None` when the hostname exceeds MAX_LABELS (find/remove reject it). +/// Stack buffer, no allocation: runs in the per-handshake SNI callback +/// (parity with sni_tree.cpp's `string_view labels[10]`). +fn collect_labels<'a>(hostname: &'a [u8], buf: &mut [&'a [u8]; MAX_LABELS]) -> Option { + let mut n = 0; + for label in split_labels(hostname) { + if n == MAX_LABELS { + return None; + } + buf[n] = label; + n += 1; + } + Some(n) +} + +/// getUser: exact label first; if that subtree yields nothing, fall back to +/// the `*` child. Full-depth match required; byte-wise case-sensitive. +fn get<'a>(node: &'a Node, labels: &[&[u8]]) -> Option<&'a Entry> { + let Some((first, rest)) = labels.split_first() else { + return node.entry.as_ref(); + }; + if let Some(child) = node.children.get(*first) { + if let Some(entry) = get(child, rest) { + return Some(entry); + } + } + get(node.children.get(&b"*"[..])?, rest) +} + +/// removeUser: exact match only (`*` is the literal char); culls empty +/// entry-less nodes on the way back up, whether or not anything was removed. +fn remove_rec(node: &mut Node, labels: &[&[u8]]) -> Option { + let Some((first, rest)) = labels.split_first() else { + return node.entry.take(); + }; + let child = node.children.get_mut(*first)?; + let removed = remove_rec(child, rest); + if child.children.is_empty() && child.entry.is_none() { + node.children.remove(*first); + } + removed +} + +impl SniMap { + pub(crate) fn new() -> SniMap { + SniMap { + root: Node::default(), + } + } + + /// `ssl_ctx` is up_ref'd into the node; wildcard patterns supported. + /// `false` = duplicate pattern (never overwrites; no ref taken — App.h + /// rolls back). Interior nodes created before the check stay, like C. + pub(crate) fn add(&mut self, pattern: &CStr, ssl_ctx: *mut SslCtx, user: *mut c_void) -> bool { + let mut node = &mut self.root; + for label in split_labels(pattern.to_bytes()) { + node = node.children.entry(Box::from(label)).or_default(); + } + if node.entry.is_some() { + return false; + } + if !ssl_ctx.is_null() { + ssl_ctx_up_ref(ssl_ctx); + } + node.entry = Some(Entry { ctx: ssl_ctx, user }); + true + } + + /// Releases the entry's ctx ref. + pub(crate) fn remove(&mut self, pattern: &CStr) { + let mut buf: [&[u8]; MAX_LABELS] = [b""; MAX_LABELS]; + let Some(n) = collect_labels(pattern.to_bytes(), &mut buf) else { + return; + }; + drop(remove_rec(&mut self.root, &buf[..n])); + } + + fn lookup(&self, hostname: &CStr) -> Option<&Entry> { + let mut buf: [&[u8]; MAX_LABELS] = [b""; MAX_LABELS]; + let n = collect_labels(hostname.to_bytes(), &mut buf)?; + get(&self.root, &buf[..n]) + } + + /// Exact-pattern lookup; returns an OWNED reference (caller unrefs) — + /// docs/cabi.md §1.6. + pub(crate) fn find_ctx(&self, pattern: &CStr) -> *mut SslCtx { + match self.lookup(pattern) { + Some(entry) if !entry.ctx.is_null() => { + ssl_ctx_up_ref(entry.ctx); + entry.ctx + } + _ => core::ptr::null_mut(), + } + } + + /// Wildcard-aware resolution for a negotiated servername (mid-handshake). + /// The returned ctx is BORROWED from the tree (dispatch does + /// SSL_set_SSL_CTX, which takes its own ref) — do not unref. + pub(crate) fn resolve(&self, hostname: &CStr) -> Option<(*mut SslCtx, *mut c_void)> { + self.lookup(hostname).map(|entry| (entry.ctx, entry.user)) + } +} + +/// Raw ClientHello server_name extension parse (`us_client_hello_servername`, +/// openssl.c:2284-2310, ported verbatim). `ext` is the extension payload; +/// writes the NUL-terminated host_name into `out` and returns its length, or +/// 0 if absent/malformed/too long (cap = out.len(), 256 incl. NUL in C). +pub(crate) fn client_hello_servername(ext: &[u8], out: &mut [u8]) -> usize { + if ext.len() < 5 { + return 0; + } + let list_len = ((ext[0] as usize) << 8) | ext[1] as usize; + if list_len + 2 != ext.len() { + return 0; + } + let mut p = &ext[2..]; + while p.len() >= 3 { + let entry_type = p[0]; + let name_len = ((p[1] as usize) << 8) | p[2] as usize; + if name_len + 3 > p.len() { + return 0; + } + // TLSEXT_NAMETYPE_host_name + if entry_type == 0 { + if name_len == 0 || name_len >= out.len() { + return 0; + } + out[..name_len].copy_from_slice(&p[3..3 + name_len]); + out[name_len] = 0; + return name_len; + } + p = &p[3 + name_len..]; + } + 0 +} diff --git a/src/usockets/tls/state.rs b/src/usockets/tls/state.rs new file mode 100644 index 000000000000..63316d01ae56 --- /dev/null +++ b/src/usockets/tls/state.rs @@ -0,0 +1,1297 @@ +//! Per-socket TLS engine: SSL* + a per-socket custom BIO pair; the growable +//! ciphertext buffers (batch + the single spill slot) and the fatal-reason +//! scratch are loop-shared, O(1) per loop (docs/design.md §TLS buffer ownership), owned by a +//! generation-checked `SocketRef` (stale ⇒ dropped, never dangles). +//! Handshake / read / write / shutdown machines per docs/tls.md §2-§5. +//! Batch thresholds ported verbatim: 16 KiB records, 128 KiB flush. + +use core::ptr::NonNull; + +use crate::dispatch::{ + dispatch_data, dispatch_handshake, dispatch_keylog, dispatch_session, dispatch_ssl_raw_tap, + dispatch_writable, +}; +use crate::handle::{CloseCode, SocketRef}; +use crate::kind::SocketKind; +use crate::loop_::Loop; +use crate::socket::{SocketFlags, SocketHeader}; +use crate::tls::SSL; +use crate::tls::context::{SslCtx, us_bun_verify_error_t}; +use crate::unsafe_core::bssl; +use crate::unsafe_core::deref; +use crate::unsafe_core::ext::deref_mut; +use crate::unsafe_core::ffi::{self, SslErr}; +use crate::{LIBUS_RECV_BUFFER_LENGTH, LIBUS_RECV_BUFFER_PADDING}; + +/// One TLS record of plaintext per SSL_write call (docs/tls.md §4). +const TLS_RECORD_CHUNK: usize = 16384; +/// Flush the batched ciphertext to the wire every this many bytes. +const TLS_BATCH_FLUSH: usize = 131072; +/// `ERR_error_string_n` scratch. +use crate::tls::context::US_SSL_FATAL_ERROR_REASON_MAX as TLS_FATAL_REASON_MAX; +/// C7: the C surface took `int` lengths; clamp so the return can never wrap. +const MAX_WRITE_LEN: usize = i32::MAX as usize; + +/// Handshake progression (docs/tls.md §2). `on_handshake(success, +/// verify_error)` is ALWAYS delivered — verify decisions belong to the +/// consumer (contract C11). +#[derive(Copy, Clone, Eq, PartialEq, Debug)] +pub(crate) enum HandshakeState { + Pending, + Completed, + RenegotiationPending, +} + +/// BIO-shared control block, boxed separately from `TlsState` so the BIO +/// callbacks (unsafe_core::ffi) and re-entrant close paths can reach it +/// without aliasing a live `&mut TlsState`. All access outside the BIO +/// callbacks goes through `ffi::with_ctl` (scoped, never held across a call +/// into BoringSSL or a dispatch). +pub(crate) struct BioCtl { + /// Slab-resident owner; never moves while the loop lives. + pub(crate) s: *mut SocketHeader, + /// Loop-shared engine buffers; outlives every socket on the loop. + pub(crate) shared: *mut LoopTlsShared, + /// Borrowed ciphertext window (read BIO input). Valid only while the + /// caller's buffer is; `read_len` is the REMAINING byte count. + pub(crate) read_ptr: *const u8, + pub(crate) read_len: usize, + pub(crate) read_off: usize, + /// `ssl_in_use` bracket around SSL_read/SSL_do_handshake (§1.4). + pub(crate) in_use: bool, + /// A callback destroyed the socket mid-SSL-call; BIO write swallows + /// output and the driver's epilogue performs the deferred close. + pub(crate) pending_detach: bool, + pub(crate) pending_close_code: i32, + /// `ssl_fatal_error` bit; set by BIO alloc failure and SSL/SYSCALL errors. + pub(crate) fatal: bool, +} + +/// Saved read-window snapshot for the §1.4 save/restore protocol around JS +/// dispatched from inside `SSL_read` (always via the `WindowGuard` RAII). +#[derive(Copy, Clone)] +struct WindowSave { + ptr: *const u8, + len: usize, + off: usize, +} + +impl BioCtl { + fn new(s: *mut SocketHeader, shared: *mut LoopTlsShared) -> BioCtl { + BioCtl { + s, + shared, + read_ptr: core::ptr::null(), + read_len: 0, + read_off: 0, + in_use: false, + pending_detach: false, + pending_close_code: 0, + fatal: false, + } + } + + /// Generation-stamped identity of the owning socket (spill/fatal-reason + /// ownership key). `s` is live for the whole BioCtl lifetime (C6). + fn me(&self) -> SocketRef { + SocketRef::from_live(NonNull::new(self.s).expect("BioCtl.s is live")) + } + + pub(crate) fn set_window(&mut self, data: &[u8]) { + self.read_ptr = data.as_ptr(); + self.read_len = data.len(); + self.read_off = 0; + } + + pub(crate) fn clear_window(&mut self) { + self.read_ptr = core::ptr::null(); + self.read_len = 0; + self.read_off = 0; + } + + fn save_window(&self) -> WindowSave { + WindowSave { + ptr: self.read_ptr, + len: self.read_len, + off: self.read_off, + } + } + + fn restore_window(&mut self, w: WindowSave) { + self.read_ptr = w.ptr; + self.read_len = w.len; + self.read_off = w.off; + } + + pub(crate) fn window_remaining(&self) -> usize { + self.read_len + } + + /// This socket's spilled-ciphertext byte count (0 when the loop slot is + /// free, stale, or owned by another socket). + fn spill_len(&mut self) -> usize { + let me = self.me(); + ffi::with_shared(self.shared, |sh| sh.spill_remaining(me)) + } + + /// Drain this socket's spill to the wire in order. True = fully drained, + /// empty, or not ours (C `ssl_drain_spill`, openssl.c:602-617). + pub(crate) fn flush_pending(&mut self) -> bool { + let (s, me) = (self.s, self.me()); + ffi::with_shared(self.shared, |sh| sh.drain_spill(s, me)) + } + + /// Teardown: one last drain attempt, then drop whatever remains of this + /// socket's spill (C `ssl_release_spill`, openssl.c:620-634). + pub(crate) fn release_pending(&mut self) { + let (s, me) = (self.s, self.me()); + ffi::with_shared(self.shared, |sh| sh.release_spill(s, me)); + } + + /// Batching is allowed only while no socket's spill occupies the loop + /// slot (§4.4); a stale owner is dropped here, never dangles. + fn spill_slot_free(&mut self) -> bool { + let me = self.me(); + ffi::with_shared(self.shared, |sh| { + let _ = sh.spill_remaining(me); + sh.spill_owner.is_none() + }) + } + + fn set_batching(&mut self, batching: bool) { + ffi::with_shared(self.shared, |sh| sh.batching = batching); + } + + fn batch_len(&self) -> usize { + ffi::with_shared(self.shared, |sh| sh.batch.len()) + } + + /// Flush the loop batch buffer; a partial write parks the remainder as + /// this socket's spill. True = wire took everything. + fn flush_batch(&mut self) -> bool { + let (s, me) = (self.s, self.me()); + match ffi::with_shared(self.shared, |sh| sh.flush_batch(s, me)) { + FlushOutcome::Drained => true, + FlushOutcome::Blocked => false, + FlushOutcome::Oom => { + // Records already sequenced; the connection cannot stay + // coherent (§1.3.2). + self.fatal = true; + false + } + } + } + + fn park_fatal_reason(&mut self, reason: &[u8; TLS_FATAL_REASON_MAX]) { + let me = self.me(); + ffi::with_shared(self.shared, |sh| { + sh.fatal_reason = *reason; + sh.fatal_reason_owner = Some(me); + }); + } + + /// Claim this socket's parked reason (owner check mandatory — §3.4); a + /// stale owner's reason is dropped. + fn take_fatal_reason(&mut self) -> Option<[u8; TLS_FATAL_REASON_MAX]> { + let me = self.me(); + ffi::with_shared(self.shared, |sh| match sh.fatal_reason_owner { + Some(o) if o == me => { + sh.fatal_reason_owner = None; + Some(sh.fatal_reason) + } + Some(o) if o.resolve().is_none() => { + sh.fatal_reason_owner = None; + None + } + _ => None, + }) + } +} + +/// RAII §1.4 save/restore: restores the saved read window on drop, so a JS +/// dispatch that re-enters TLS on this socket (`write` zeroes the window) +/// cannot leave the outer SSL_read loop with a clobbered window. +struct WindowGuard { + ctl: *mut BioCtl, + saved: WindowSave, +} + +impl WindowGuard { + fn save(ctl: *mut BioCtl) -> WindowGuard { + WindowGuard { + ctl, + saved: ffi::with_ctl(ctl, |c| c.save_window()), + } + } +} + +impl Drop for WindowGuard { + fn drop(&mut self) { + ffi::with_ctl(self.ctl, |c| c.restore_window(self.saved)); + } +} + +/// Consumer-facing §1.4 save/restore keyed by the SSL handle: brackets user +/// JS run from inside SSL_do_handshake/SSL_read (ALPN/SNI callbacks) so a +/// same-socket re-entrant write cannot clobber the ciphertext read window. +pub struct SslWindowGuard { + _saved: Option, +} + +impl SslWindowGuard { + pub fn save(ssl: *mut SSL) -> SslWindowGuard { + let ctl = if ssl.is_null() { + core::ptr::null_mut() + } else { + ffi::ssl_wbio_ctl(ssl) + }; + SslWindowGuard { + _saved: (!ctl.is_null()).then(|| WindowGuard::save(ctl)), + } + } +} + +enum FlushOutcome { + Drained, + Blocked, + Oom, +} + +/// Loop-shared TLS engine state (C `loop_ssl_data`, docs/tls.md §1.2): +/// the ciphertext batch buffer, the SINGLE spill slot, the parked +/// fatal-reason scratch and the plaintext read scratch — O(1) memory per +/// loop (docs/design.md §TLS buffer ownership). Owned by the loop via `ssl_data`. +pub(crate) struct LoopTlsShared { + /// Plaintext read scratch slot; `Option::take` semantics via LoopScratch. + pub(crate) scratch: *mut core::ffi::c_void, + /// True only inside `TlsState::write`'s record loop (docs/tls.md §4). + pub(crate) batching: bool, + /// Sealed records batched this write call; already counted written. + pub(crate) batch: Vec, + spill: Vec, + spill_off: usize, + /// Generation-checked spill owner: stale ⇒ dropped, never dangles. + spill_owner: Option, + fatal_reason: [u8; TLS_FATAL_REASON_MAX], + fatal_reason_owner: Option, +} + +impl LoopTlsShared { + pub(crate) fn new() -> LoopTlsShared { + LoopTlsShared { + scratch: core::ptr::null_mut(), + batching: false, + batch: Vec::new(), + spill: Vec::new(), + spill_off: 0, + spill_owner: None, + fatal_reason: [0; TLS_FATAL_REASON_MAX], + fatal_reason_owner: None, + } + } + + /// True iff the slot holds `me`'s spill; drops a stale owner's spill. + fn spill_is(&mut self, me: SocketRef) -> bool { + match self.spill_owner { + None => false, + Some(o) if o == me => true, + Some(o) => { + if o.resolve().is_none() { + self.clear_spill(); + } + false + } + } + } + + fn clear_spill(&mut self) { + self.spill = Vec::new(); + self.spill_off = 0; + self.spill_owner = None; + } + + fn spill_remaining(&mut self, me: SocketRef) -> usize { + if self.spill_is(me) { + self.spill.len() - self.spill_off + } else { + 0 + } + } + + fn drain_spill(&mut self, s: *mut SocketHeader, me: SocketRef) -> bool { + if !self.spill_is(me) { + return true; + } + while self.spill_off < self.spill.len() { + let n = crate::write::raw_write(s, &self.spill[self.spill_off..]); + if n <= 0 { + return false; + } + self.spill_off += n as usize; + } + self.clear_spill(); + true + } + + fn release_spill(&mut self, s: *mut SocketHeader, me: SocketRef) { + if self.spill_is(me) { + let _ = self.drain_spill(s, me); + self.clear_spill(); + } + } + + /// One raw write of the whole batch; a partial write parks the remainder + /// as `me`'s spill (C `ssl_flush_write_batch`, openssl.c:575-598). The + /// batch keeps its capacity — loop-level O(1). + fn flush_batch(&mut self, s: *mut SocketHeader, me: SocketRef) -> FlushOutcome { + let mut off = 0usize; + while off < self.batch.len() { + let n = crate::write::raw_write(s, &self.batch[off..]); + if n <= 0 { + break; + } + off += n as usize; + } + if off < self.batch.len() { + let rest = &self.batch[off..]; + let mut spill = Vec::new(); + if spill.try_reserve(rest.len()).is_err() { + self.batch.clear(); + return FlushOutcome::Oom; + } + spill.extend_from_slice(rest); + self.spill = spill; + self.spill_off = 0; + self.spill_owner = Some(me); + self.batch.clear(); + return FlushOutcome::Blocked; + } + self.batch.clear(); + FlushOutcome::Drained + } +} + +impl Drop for LoopTlsShared { + fn drop(&mut self) { + if !self.scratch.is_null() { + ffi::scratch_free(self.scratch); + self.scratch = core::ptr::null_mut(); + } + } +} + +/// Per-socket TLS state, boxed off the `SocketHeader` transport slot. +/// Lifetime contract (mirrors C6): the owning `Transport::Tls(Box)` must stay +/// in place until the tick postlude even after detach — `detach` nulls `ssl` +/// and callers re-check `gone` instead of freeing mid-callback. +pub struct TlsState { + /// Live BoringSSL handle; nulled by `detach`, freed exactly once. + pub(crate) ssl: *mut SSL, + /// BIO control block; owned (freed in Drop), shared with the BIO hooks. + pub(crate) ctl: *mut BioCtl, + pub(crate) handshake_state: HandshakeState, + /// True once on_handshake has been dispatched (JSHS distinguishes + /// "finished" from "callback fired"); reset when renegotiation begins. + pub(crate) handshake_callback_fired: bool, + /// Tee inbound ciphertext to dispatch_ssl_raw_tap before SSL_read. + pub(crate) raw_tap: bool, + /// SSL_write starved for handshake input; next read re-fires writable. + write_wants_read: bool, + /// SSL_read starved for wire capacity; next writable re-enters the read. + read_wants_write: bool, + shutdown_after_spill: bool, + close_after_spill: bool, +} + +impl Drop for TlsState { + fn drop(&mut self) { + if !self.ssl.is_null() { + ffi::ssl_free(self.ssl); + self.ssl = core::ptr::null_mut(); + } + if !self.ctl.is_null() { + ffi::ctl_free(self.ctl); + self.ctl = core::ptr::null_mut(); + } + } +} + +/// Session/keylog parking opt-in marker (bssl `is_socket` ex_data — the CTX +/// new-session/keylog callbacks only park for marked SSLs; §2.1/§2.7). +fn mark_socket(ssl: *mut SSL) { + bssl::ssl_set_ex_data( + ssl, + bssl::ex_indices().is_socket, + 1usize as *mut core::ffi::c_void, + ); +} + +/// Fresh short-lived `TlsState` borrow per access cluster (C17): must end +/// before any dispatch, close, or SSL call that can re-enter this socket. +fn t<'a>(this: *mut TlsState) -> &'a mut TlsState { + deref_mut(this) +} + +/// `us_socket_sni_resolve` (docs/tls.md §2.6, openssl.c:2186-2219): resume +/// a handshake suspended by an async SNI callback. Consumes the owned `ctx` +/// ref; no-op when the socket died or the handshake is not suspended. +pub(crate) fn sni_resolve( + this: *mut TlsState, + s: *mut SocketHeader, + ctx: *mut SslCtx, + error: bool, +) { + let ssl = t(this).ssl; + if ssl.is_null() || deref::with_socket(s, |h| h.is_closed()) || !bssl::sni_is_waiting(ssl) { + // Late/duplicate resolution: release the handed-in reference. + if !ctx.is_null() { + crate::tls::context::ssl_ctx_unref(ctx); + } + return; + } + if error { + if !ctx.is_null() { + crate::tls::context::ssl_ctx_unref(ctx); + } + bssl::sni_set(ssl, bssl::SniSuspension::Error); + // Alert-free drop (Node SNICallback-error behavior): mark the deferred + // detach BEFORE re-driving so the BIO swallows the handshake_failure + // alert and the driver epilogue closes the socket. + ffi::with_ctl(t(this).ctl, |c| { + c.pending_detach = true; + c.pending_close_code = 0; + }); + } else { + // Stash the owned ref (null = static tree / default ctx); the + // select-cert re-fire consumes it. + bssl::sni_set(ssl, bssl::SniSuspension::Resolved(ctx)); + } + TlsState::handshake(this, s); +} + +impl TlsState { + /// Attach a fresh SSL to a connected socket (server accept / adopt_tls / + /// start_tls). Does not kick the handshake (C10). + pub(crate) fn attach( + s: *mut SocketHeader, + ssl_ctx: *mut super::context::SslCtx, + is_client: bool, + sni: Option<&core::ffi::CStr>, + ) -> Box { + let shared = ffi::tls_shared_ptr(crate::socket::socket_loop(s)); + let ctl = Box::into_raw(Box::new(BioCtl::new(s, shared))); + let ssl = ffi::ssl_new_attached(ssl_ctx, ctl); + + let state = Box::new(TlsState { + ssl, + ctl, + handshake_state: HandshakeState::Pending, + handshake_callback_fired: false, + raw_tap: false, + write_wants_read: false, + read_wants_write: false, + shutdown_after_spill: false, + close_after_spill: false, + }); + + if ssl.is_null() { + // SSL_new failed (OOM): behave like an immediately-fatal socket. + ffi::with_ctl(ctl, |c| c.fatal = true); + return state; + } + + if is_client { + ffi::ssl_set_connect_state(ssl); + // Bounded renegotiation (Node CLIENT_RENEG_LIMIT — issues #6197/#5363). + ffi::ssl_set_reneg_mode(ssl, true); + if let Some(name) = sni { + ffi::ssl_set_tlsext_host_name(ssl, name); + } + // Verification is per-SSL, never per-CTX: a SecureContext is + // mode-neutral (docs/tls.md §2.1). + if bssl::ctx_get_verify_mode(ssl_ctx) == bssl::SSL_VERIFY_NONE { + ffi::ssl_set_verify_permissive(ssl); + let user_ca = + !bssl::ctx_get_ex_data(ssl_ctx, bssl::ex_indices().ctx_user_ca).is_null(); + if !user_ca { + let store = bssl::shared_default_ca_store(); + if !store.is_null() { + // shared store returns an owned ref; set0 consumes it. + ffi::ssl_set0_verify_cert_store(ssl, store); + } + } + } + } else { + ffi::ssl_set_accept_state(ssl); + // Server renegotiation is a DoS vector: never. + ffi::ssl_set_reneg_mode(ssl, false); + } + + // node:tls sockets park sessions/keylog; accepted sockets get their + // kind stamped later — read() re-checks lazily (§2.1). + if deref::with_socket(s, |h| h.kind()) == SocketKind::BunSocketTls { + mark_socket(ssl); + } + state + } + + // ── state predicates ──────────────────────────────────────────────────── + + /// `ssl_gone`: a re-entrant close ran inside a dispatch. + fn gone(&self, s: *mut SocketHeader) -> bool { + self.ssl.is_null() || deref::with_socket(s, |h| h.is_closed()) + } + + /// `us_internal_ssl_is_shut_down`: FIN sent ∨ no ssl ∨ SENT_SHUTDOWN ∨ fatal. + /// Probes only the raw FIN bit (C POLL_TYPE_SOCKET_SHUT_DOWN) — routing + /// through the TLS-aware header query would re-borrow this `TlsState`. + pub(crate) fn is_shut_down(&self, s: *mut SocketHeader) -> bool { + if self.ssl.is_null() || ffi::with_ctl(self.ctl, |c| c.fatal) { + return true; + } + if deref::with_socket(s, |h| h.is_shut_down_raw()) { + return true; + } + ffi::ssl_get_shutdown(self.ssl).0 + } + + /// Mid-handshake sockets are throttled by the loop (docs/tls.md §3.5). + pub(crate) fn is_low_prio(&self) -> bool { + !self.ssl.is_null() && ffi::ssl_in_init(self.ssl) + } + + /// Close arrived from inside SSL_read/SSL_do_handshake (§1.4): release + /// the spill now and defer the close to the driver's epilogue. Returns + /// true when deferred (caller must NOT proceed with teardown). + pub(crate) fn request_defer_close(&mut self, code: CloseCode) -> bool { + ffi::with_ctl(self.ctl, |c| { + if !c.in_use { + return false; + } + c.release_pending(); + c.pending_detach = true; + c.pending_close_code = code as i32; + true + }) + } + + /// FAST_SHUTDOWN close with spilled ciphertext still pending: defer the + /// close (at most once) until the spill drains (docs/tls.md §5.2). + pub(crate) fn close_deferred_by_spill(&mut self, s: *mut SocketHeader) -> bool { + if self.close_after_spill + || ffi::with_ctl(self.ctl, |c| c.fatal) + || deref::with_socket(s, |h| h.is_closed()) + { + return false; + } + if ffi::with_ctl(self.ctl, |c| c.flush_pending()) { + return false; + } + self.close_after_spill = true; + true + } + + /// Free the SSL after on_close (error/RST teardowns come here without a + /// TLS close). Honors the in-use deferral; keeps `self` allocated (C6). + pub(crate) fn detach(&mut self) { + let deferred = ffi::with_ctl(self.ctl, |c| { + c.release_pending(); + if c.in_use { + c.pending_detach = true; + true + } else { + false + } + }); + if deferred { + return; + } + if !self.ssl.is_null() { + ffi::ssl_free(self.ssl); + self.ssl = core::ptr::null_mut(); + } + // C parity: handshake_callback_has_fired reads `s->ssl && ...` — it + // reports 0 once the SSL is gone (openssl.c:2033-2035). + self.handshake_callback_fired = false; + // An unclaimed parked reason dies with its owner (§3.4). + ffi::with_ctl(self.ctl, |c| { + let _ = c.take_fatal_reason(); + }); + } + + // ── on_handshake firing (exactly once per handshake; §2.3) ────────────── + + fn park_fatal_reason(&mut self) { + // Only park while the handshake is unfinished: the handshake-failure + // dispatch is the sole consumer (§3.4). + if self.handshake_state != HandshakeState::Completed { + let e = bssl::err_peek_last_error(); + if e != 0 { + let mut buf = [0u8; TLS_FATAL_REASON_MAX]; + bssl::err_error_string(e, &mut buf[..]); + ffi::with_ctl(self.ctl, |c| c.park_fatal_reason(&buf)); + } + } + bssl::err_clear_error(); + ffi::with_ctl(self.ctl, |c| c.fatal = true); + } + + fn verify_error_for(&self, s: *mut SocketHeader) -> us_bun_verify_error_t { + if self.ssl.is_null() || deref::with_socket(s, |h| h.is_closed()) || self.is_shut_down(s) { + return us_bun_verify_error_t::default(); + } + self.verify_error() + } + + fn trigger_handshake(this: *mut TlsState, s: *mut SocketHeader, success: bool) { + t(this).handshake_state = HandshakeState::Completed; + t(this).handshake_callback_fired = true; + if !success { + // Copied to the stack and un-parked BEFORE any JS runs (§3.4). + if let Some(reason) = ffi::with_ctl(t(this).ctl, |c| c.take_fatal_reason()) { + // Fatal protocol error recorded just before this failure: + // report it instead of the X509 verdict (Node tlsClientError). + let err = us_bun_verify_error_t::eproto(reason.as_ptr().cast()); + dispatch_handshake(s, false, err); + return; + } + } + let err = t(this).verify_error_for(s); + dispatch_handshake(s, success, err); + } + + /// Firing site 4: close on a socket whose handshake never completed + /// (docs/tls.md §2.4). Called by the socket close path. + pub(crate) fn trigger_handshake_econnreset(this: *mut TlsState, s: *mut SocketHeader) { + t(this).handshake_state = HandshakeState::Completed; + t(this).handshake_callback_fired = true; + if let Some(reason) = ffi::with_ctl(t(this).ctl, |c| c.take_fatal_reason()) { + let err = us_bun_verify_error_t::eproto(reason.as_ptr().cast()); + dispatch_handshake(s, false, err); + return; + } + dispatch_handshake(s, false, us_bun_verify_error_t::econnreset()); + } + + // ── handshake driver (§2.2) ───────────────────────────────────────────── + + /// Drive SSL_do_handshake; delivers on_handshake exactly once. JS may run + /// inside (ALPN/SNI callbacks, each bracketed by the §1.4 window + /// save/restore guard). No `&mut TlsState` is held across the + /// dispatches (C17). + pub(crate) fn handshake(this: *mut TlsState, s: *mut SocketHeader) { + // Per-thread error queue may hold another socket's leftovers. + bssl::err_clear_error(); + if t(this).ssl.is_null() || t(this).handshake_state != HandshakeState::Pending { + return; + } + let ssl = t(this).ssl; + // SSL_read may have finished the handshake before we got here; + // RECEIVED_SHUTDOWN after completed init is a clean close, not a + // handshake failure. + if ffi::ssl_is_init_finished(ssl) { + Self::trigger_handshake(this, s, true); + return; + } + let (_, received) = ffi::ssl_get_shutdown(ssl); + if deref::with_socket(s, |h| h.is_closed()) || t(this).is_shut_down(s) || received { + Self::trigger_handshake(this, s, false); + return; + } + + let ctl = t(this).ctl; + // C parity: every ssl_update_handshake entry zeroes the read window + // (ssl_set_loop_data) so stale ciphertext can never replay here. + ffi::with_ctl(ctl, |c| c.clear_window()); + let was_in_use = ffi::with_ctl(ctl, |c| { + let w = c.in_use; + c.in_use = true; + w + }); + let result = ffi::ssl_do_handshake(ssl); + let deferred = ffi::with_ctl(ctl, |c| { + c.in_use = was_in_use; + if !was_in_use && c.pending_detach { + c.pending_detach = false; + Some(c.pending_close_code) + } else { + None + } + }); + if let Some(code) = deferred { + // A callback destroyed this socket inside the handshake; perform + // the deferred close and do not touch the SSL again. + ffi::socket_close(s, CloseCode::from_c(code)); + return; + } + + if ffi::ssl_get_shutdown(ssl).1 { + ffi::socket_close(s, CloseCode::normal); + return; + } + + if result <= 0 { + match ffi::ssl_get_error(ssl, result) { + SslErr::PendingCertificate => { + // Async SNI suspension (SniSuspension::Waiting parked in + // SSL ex_data by the select-cert callback): stay PENDING, + // no poll re-arm; sni_resolve re-drives (§2.6). + } + SslErr::WantRead | SslErr::WantWrite => { + t(this).write_wants_read = true; + deref::with_socket(s, |h| h.flags.set(SocketFlags::LAST_WRITE_FAILED, true)); + } + other => { + if matches!(other, SslErr::Ssl | SslErr::Syscall) { + t(this).park_fatal_reason(); + } + Self::trigger_handshake(this, s, false); + } + } + return; + } + + Self::trigger_handshake(this, s, true); + if t(this).gone(s) { + return; + } + // Next readable re-delivers a writable to flush pre-handshake data. + t(this).write_wants_read = true; + } + + fn renegotiate(this: *mut TlsState, s: *mut SocketHeader) -> bool { + // Client-only policy (default 3 per 600 s = Node CLIENT_RENEG_LIMIT/ + // WINDOW), read from the CURRENT ctx like C; limit 0 disables, + // window 0 never resets the counter. Counter lives in SSL ex_data. + t(this).handshake_state = HandshakeState::RenegotiationPending; + t(this).handshake_callback_fired = false; + let ssl = t(this).ssl; + let (limit, window) = bssl::reneg_policy(bssl::ssl_get_ctx(ssl)); + let now_ms = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map_or(0, |d| d.as_secs()) + .saturating_mul(1000); + let over_limit = { + let st = deref_mut(bssl::reneg_state_ptr(ssl)); + // Wall clock can step backwards (NTP); only reset when time moved forward. + if st.count == 0 + || (window != 0 + && now_ms >= st.window_start_ms + && now_ms - st.window_start_ms >= u64::from(window) * 1000) + { + st.window_start_ms = now_ms; + st.count = 0; + } + if st.count >= limit { + true + } else { + st.count += 1; + false + } + }; + if over_limit || !ffi::ssl_renegotiate(ssl) { + Self::trigger_handshake(this, s, false); + return false; + } + true + } + + // ── read path (§3) ────────────────────────────────────────────────────── + + fn close_from_read(this: *mut TlsState, s: *mut SocketHeader) { + ffi::with_ctl(t(this).ctl, |c| c.clear_window()); + ffi::socket_close(s, CloseCode::normal); + } + + /// Decrypt ciphertext arriving from the kernel (or `tls_feed`) and + /// dispatch plaintext on_data via the loop scratch buffer. No + /// `&mut TlsState` is held across the dispatches (C17). + pub(crate) fn read( + this: *mut TlsState, + s: *mut SocketHeader, + loop_: *mut Loop, + ciphertext: &[u8], + ) { + bssl::err_clear_error(); + // Lazy session/keylog marker: an accepted node:tls socket's kind is + // stamped after attach (§2.1). + if !t(this).ssl.is_null() + && deref::with_socket(s, |h| h.kind()) == SocketKind::BunSocketTls + && !bssl::is_socket_marked(t(this).ssl) + { + mark_socket(t(this).ssl); + } + // upgradeTLS [raw, _] half observes ciphertext before SSL_read; skip + // the empty flush call from on_writable (§6.1). + if t(this).raw_tap && !ciphertext.is_empty() { + dispatch_ssl_raw_tap(s, ciphertext); + if t(this).gone(s) { + return; + } + } + + ffi::with_ctl(t(this).ctl, |c| c.set_window(ciphertext)); + + if deref::with_socket(s, |h| h.is_closed()) { + ffi::with_ctl(t(this).ctl, |c| c.clear_window()); + return; + } + // A half-closed socket still reads (peer data may precede its + // close_notify); only bail when reading is genuinely impossible. + if t(this).ssl.is_null() || ffi::with_ctl(t(this).ctl, |c| c.fatal) { + Self::close_from_read(this, s); + return; + } + // Do NOT run the handshake driver before SSL_read: SSL_read drives it + // and firing on_handshake first lets JS clobber piggybacked data (§2.2). + + let mut scratch = LoopScratch::take(loop_); + let out = scratch.slice(); + const PAD: usize = LIBUS_RECV_BUFFER_PADDING; + const LEN: usize = LIBUS_RECV_BUFFER_LENGTH; + let mut read: usize = 0; + + loop { + let ctl = t(this).ctl; + let was_in_use = ffi::with_ctl(ctl, |c| { + let w = c.in_use; + c.in_use = true; + w + }); + let just = ffi::ssl_read(t(this).ssl, &mut out[PAD + read..PAD + LEN]); + let deferred = ffi::with_ctl(ctl, |c| { + c.in_use = was_in_use; + if !was_in_use && c.pending_detach { + c.pending_detach = false; + Some(c.pending_close_code) + } else { + None + } + }); + if let Some(code) = deferred { + ffi::with_ctl(ctl, |c| c.clear_window()); + ffi::socket_close(s, CloseCode::from_c(code)); + return; + } + + if just <= 0 { + let mut err = ffi::ssl_get_error(t(this).ssl, just); + if let SslErr::WantRenegotiate = err { + if Self::renegotiate(this, s) { + continue; + } + if t(this).gone(s) { + return; + } + err = SslErr::Ssl; + } + match err { + SslErr::ZeroReturn => { + // Peer close_notify. A ticket that rode ahead of it + // was parked; deliver in wire order, then data, close. + Self::flush_pending_events(this, s); + if t(this).gone(s) { + return; + } + if read > 0 { + dispatch_data(s, &mut out[PAD..PAD + read]); + if t(this).gone(s) { + return; + } + } + Self::close_from_read(this, s); + return; + } + SslErr::WantRead | SslErr::WantWrite | SslErr::PendingCertificate => { + if matches!(err, SslErr::WantWrite) { + t(this).read_wants_write = true; + } + // Leftover ciphertext with SSL_read wanting more is + // broken TLS framing. + if ffi::with_ctl(t(this).ctl, |c| c.window_remaining()) > 0 { + Self::close_from_read(this, s); + return; + } + // Firing site 3: peer's Finished arrived alone — fire + // now, not from the writable tail-call (low-prio queue + // reorders events under fan-out; §2.3.3). + if t(this).handshake_state == HandshakeState::Pending + && ffi::ssl_is_init_finished(t(this).ssl) + { + Self::trigger_handshake(this, s, true); + if t(this).gone(s) { + return; + } + } + if read == 0 { + break; + } + // Parked sessions/keylog precede the data (wire order; + // the data dispatch may close the socket and drop a + // deferred flush). Window is empty here. + Self::flush_pending_events(this, s); + if t(this).gone(s) { + return; + } + dispatch_data(s, &mut out[PAD..PAD + read]); + if t(this).gone(s) { + return; + } + break; + } + _ => { + if matches!(err, SslErr::Ssl | SslErr::Syscall) { + t(this).park_fatal_reason(); + } + Self::close_from_read(this, s); + return; + } + } + } else { + if t(this).handshake_state != HandshakeState::Completed { + // Firing site 2: handshake completed with app data in the + // same flight — fire BEFORE delivering data (ALPN/re-tag), + // window restored on guard drop around the JS (§1.4). + let _window = WindowGuard::save(t(this).ctl); + Self::trigger_handshake(this, s, true); + if t(this).gone(s) { + return; + } + } + read += just as usize; + if read == LEN { + { + let _window = WindowGuard::save(t(this).ctl); + Self::flush_pending_events(this, s); + if t(this).gone(s) { + return; + } + dispatch_data(s, &mut out[PAD..PAD + read]); + if t(this).gone(s) { + return; + } + } + read = 0; + } + } + } + + // A prior SSL_write starved for handshake input can proceed now; the + // !read_wants_write guard prevents recursion (§3.7). + if t(this).gone(s) { + return; + } + if t(this).write_wants_read && !t(this).read_wants_write { + t(this).write_wants_read = false; + if Self::on_writable(this, s, loop_) { + dispatch_writable(s); + } + if t(this).gone(s) { + return; + } + } + Self::flush_pending_events(this, s); + } + + // ── write path (§4) ───────────────────────────────────────────────────── + + /// Encrypt + flush; returns plaintext bytes accepted (0 = would-block, + /// caller buffers). Honesty invariant: reported bytes are on the wire or + /// in the loop's bounded spill slot owned by this socket — never + /// unboundedly parked (§4). + pub(crate) fn write(this: *mut TlsState, s: *mut SocketHeader, data: &[u8]) -> i32 { + // C7: int-bounded surface — the unreported tail reads as a short + // write and the caller arms backpressure. + let data = &data[..data.len().min(MAX_WRITE_LEN)]; + if data.is_empty() + || t(this).ssl.is_null() + || deref::with_socket(s, |h| h.is_closed()) + || t(this).is_shut_down(s) + { + return 0; + } + // SEMI_SOCKET (eager pre-on_open attach, fast-path connect): SNI/ALPN + // aren't set yet; writing would serialize a bad ClientHello (§4.1). + if !deref::with_socket(s, |h| h.is_established()) { + return 0; + } + let ctl = t(this).ctl; + // This socket's earlier sealed records must reach the wire first: SSL + // already counts them written; nothing new may be sealed while they + // pend (§4.2). + if !ffi::with_ctl(ctl, |c| c.flush_pending()) { + return 0; + } + // Batching only while the loop spill slot is free (§4.4); behind + // another socket's spill this write goes through per-record. + let batching = ffi::with_ctl(ctl, |c| c.spill_slot_free()); + + ffi::with_ctl(ctl, |c| { + c.clear_window(); + c.set_batching(batching); + }); + + let mut total: usize = 0; + let mut last: i32 = 1; + while total < data.len() { + let chunk = (data.len() - total).min(TLS_RECORD_CHUNK); + last = ffi::ssl_write(t(this).ssl, &data[total..total + chunk]); + if last <= 0 { + break; + } + total += last as usize; + if ffi::with_ctl(ctl, |c| c.fatal) { + break; + } + if batching && ffi::with_ctl(ctl, |c| c.batch_len()) >= TLS_BATCH_FLUSH { + // Wire blocked (spill created): stop consuming plaintext. + if !ffi::with_ctl(ctl, |c| c.flush_batch()) { + break; + } + if ffi::with_ctl(ctl, |c| c.fatal) { + break; + } + } + } + let fatal = ffi::with_ctl(ctl, |c| { + c.set_batching(false); + let _ = c.flush_batch(); + c.fatal + }); + if fatal { + return 0; + } + if total > 0 { + // Cannot wrap: `data` was clamped to i32::MAX above. + return total as i32; + } + if last <= 0 { + match ffi::ssl_get_error(t(this).ssl, last) { + SslErr::WantRead => t(this).write_wants_read = true, + // A pre-secureConnect write is where handshake-config + // failures surface; park so the handshake dispatch reports it. + SslErr::Ssl | SslErr::Syscall => t(this).park_fatal_reason(), + _ => {} + } + } + 0 + } + + // ── writable event (§4.1) ─────────────────────────────────────────────── + + /// Drain spill → deferred shutdown/close → handshake → blocked-decrypt + /// flush. Returns true when the user on_writable should be dispatched + /// (handshake completed, not shut down, and the socket survived). + pub(crate) fn on_writable(this: *mut TlsState, s: *mut SocketHeader, loop_: *mut Loop) -> bool { + if !ffi::with_ctl(t(this).ctl, |c| c.flush_pending()) { + return false; + } + if t(this).shutdown_after_spill { + t(this).shutdown_after_spill = false; + t(this).shutdown_graceful(s); + if t(this).gone(s) { + return false; + } + } + if t(this).close_after_spill { + t(this).close_after_spill = false; + ffi::socket_close(s, CloseCode::fast_shutdown); + return false; + } + Self::handshake(this, s); + if t(this).gone(s) { + return false; + } + if t(this).read_wants_write { + t(this).read_wants_write = false; + // Let a blocked decrypt flush (empty feed; raw tap skips len==0). + Self::read(this, s, loop_, &[]); + if t(this).gone(s) { + return false; + } + } + // Graceful FIN / SENT_SHUTDOWN / fatal suppresses the user writable + // (openssl.c:1806 is_shut_down gate). + if t(this).is_shut_down(s) { + return false; + } + t(this).handshake_state == HandshakeState::Completed + && !deref::with_socket(s, |h| h.is_closed()) + } + + // ── shutdown & close (§5) ─────────────────────────────────────────────── + + /// `us_socket_shutdown` TLS arm (docs/tls.md §5, C12): always the + /// graceful path — forceful closes route through `handle_shutdown` directly. + pub(crate) fn shutdown(&mut self, s: *mut SocketHeader, code: CloseCode) { + debug_assert!(matches!(code, CloseCode::normal)); + self.shutdown_graceful(s); + } + + /// Graceful half-close (§5.1). BoringSSL has no TLS half-close: send + /// close_notify only when the peer's already arrived; otherwise TCP FIN + /// via `raw_shutdown` (preceded by the zero-length SSL_write TLS1.3 + /// ticket flush) and keep reading. + fn shutdown_graceful(&mut self, s: *mut SocketHeader) { + if deref::with_socket(s, |h| h.is_closed()) || self.is_shut_down(s) { + return; + } + if ffi::with_ctl(self.ctl, |c| c.spill_len() > 0) { + // Spilled ciphertext is already counted written; a FIN now would + // cut it off. Finish from the writable event. + if !ffi::with_ctl(self.ctl, |c| c.flush_pending()) { + self.shutdown_after_spill = true; + return; + } + } + let (_, received) = ffi::ssl_get_shutdown(self.ssl); + if !ffi::ssl_in_init(self.ssl) && !received { + ffi::with_ctl(self.ctl, |c| c.clear_window()); + // Flush deferred TLS1.3 NewSessionTickets through the BIO before + // the FIN (a server ending without writing never delivers them). + ffi::ssl_write_zero(self.ssl); + crate::socket::raw_shutdown(s); + return; + } + + ffi::with_ctl(self.ctl, |c| c.clear_window()); + let ret = ffi::ssl_shutdown(self.ssl); + if ffi::ssl_in_init(self.ssl) || ffi::ssl_get_quiet_shutdown(self.ssl) { + crate::socket::raw_shutdown(s); + return; + } + if ret < 0 { + if matches!( + ffi::ssl_get_error(self.ssl, ret), + SslErr::Ssl | SslErr::Syscall + ) { + bssl::err_clear_error(); + ffi::with_ctl(self.ctl, |c| c.fatal = true); + } + crate::socket::raw_shutdown(s); + } + } + + /// §5.2 close helper. True = shutdown complete (or impossible) and the + /// TCP socket may close now; false = close_notify sent, wait for peer's. + pub(crate) fn handle_shutdown(&mut self, s: *mut SocketHeader, force_fast: bool) -> bool { + if self.ssl.is_null() + || self.is_shut_down(s) + || ffi::with_ctl(self.ctl, |c| c.fatal) + || !ffi::ssl_is_init_finished(self.ssl) + { + return true; + } + let (sent, received) = ffi::ssl_get_shutdown(self.ssl); + if sent && received { + return true; + } + ffi::with_ctl(self.ctl, |c| c.clear_window()); + let mut ret = ffi::ssl_shutdown(self.ssl); + if ret == 0 && force_fast { + ret = ffi::ssl_shutdown(self.ssl); + } + if ret < 0 { + match ffi::ssl_get_error(self.ssl, ret) { + SslErr::Ssl | SslErr::Syscall => { + bssl::err_clear_error(); + ffi::with_ctl(self.ctl, |c| c.fatal = true); + true + } + // Alert never left the BIO; SENT_SHUTDOWN is already set so + // no retry path exists — close now (documented LSan leak + // otherwise; §5.2). + SslErr::WantRead | SslErr::WantWrite => true, + _ => { + ffi::with_ctl(self.ctl, |c| c.fatal = true); + true + } + } + } else { + ret == 1 + } + } + + // ── verify / sessions / keylog ────────────────────────────────────────── + + pub(crate) fn verify_error(&self) -> us_bun_verify_error_t { + if self.ssl.is_null() { + return us_bun_verify_error_t::default(); + } + us_bun_verify_error_t::from_ssl(self.ssl.cast_const()) + } + + /// Session/keylog events are parked by the CTX callbacks while the SSL + /// stack runs (bssl ex_data queues) and delivered ONLY after it unwinds + /// (C11). Sessions first, then keylog — wire order. + pub(crate) fn flush_pending_events(this: *mut TlsState, s: *mut SocketHeader) { + if t(this).gone(s) { + return; + } + for item in bssl::drain_pending_sessions(t(this).ssl) { + if t(this).gone(s) { + return; + } + dispatch_session(s, &item); + } + if t(this).gone(s) { + return; + } + for item in bssl::drain_pending_keylog(t(this).ssl) { + if t(this).gone(s) { + return; + } + dispatch_keylog(s, &item); + } + } +} + +// ── loop plaintext scratch ──────────────────────────────────────────────────── + +/// RAII take/restore of the loop-shared plaintext scratch +/// (`LoopTlsShared.scratch`): `take()` on entry, restore on drop; a +/// re-entrant nesting sees an empty slot and allocates fresh. +pub(crate) struct LoopScratch { + loop_: *mut Loop, + buf: Option<*mut core::ffi::c_void>, +} + +impl LoopScratch { + pub(crate) fn take(loop_: *mut Loop) -> LoopScratch { + let mut buf = ffi::with_tls_shared(loop_, |sh| { + core::mem::replace(&mut sh.scratch, core::ptr::null_mut()) + }); + if buf.is_null() { + buf = ffi::scratch_alloc(); + } + LoopScratch { + loop_, + buf: Some(buf), + } + } + + /// Full scratch: PADDING + 512 KiB plaintext area + PADDING. + pub(crate) fn slice(&mut self) -> &mut [u8] { + ffi::scratch_slice(self.buf.expect("scratch taken")) + } +} + +impl Drop for LoopScratch { + fn drop(&mut self) { + if let Some(buf) = self.buf.take() { + // Refill the loop slot if empty; a nested take already put an + // equivalent buffer back, so free ours instead. + let leftover = ffi::with_tls_shared(self.loop_, |sh| { + if sh.scratch.is_null() { + sh.scratch = buf; + None + } else { + Some(buf) + } + }); + if let Some(extra) = leftover { + ffi::scratch_free(extra); + } + } + } +} diff --git a/src/usockets/udp.rs b/src/usockets/udp.rs new file mode 100644 index 000000000000..22605e570cdd --- /dev/null +++ b/src/usockets/udp.rs @@ -0,0 +1,498 @@ +//! UDP sockets + per-loop packet buffer. Contract per C15 (docs/design.md): +//! sync on_close, `closed_udp_head` lifetime, one-shot drain, +//! Linux MSG_ERRQUEUE vs non-Linux close-on-error, batch recv loop close +//! recheck. Rules R9.1–R9.9 (docs/semantics.md §9). + +use core::ffi::{c_char, c_int, c_uint, c_ushort, c_void}; +use core::ptr; + +#[cfg(not(windows))] +use libc::sockaddr_storage; + +/// Winsock `SOCKADDR_STORAGE` (ws2def.h): 128 bytes, 8-aligned; the libc +/// crate ships no windows sockaddr types. +#[cfg(windows)] +#[repr(C, align(8))] +#[derive(Copy, Clone)] +#[allow(non_camel_case_types)] +pub struct sockaddr_storage { + pub ss_family: c_ushort, + __pad: [u8; 126], +} + +#[cfg(not(windows))] +use crate::LIBUS_RECV_BUFFER_LENGTH; +use crate::backend::Events; +use crate::loop_::Loop; +use crate::neterr::{is_would_block, last_errno}; +use crate::unsafe_core::{ffi, io}; +use crate::{LIBUS_SOCKET_DESCRIPTOR, LIBUS_SOCKET_ERROR}; + +/// `LIBUS_SEND_BUFFER_LENGTH` — the loop's shared UDP send scratch (metadata +/// only; payload bytes are never copied). The loop allocator must match. +pub(crate) const LIBUS_SEND_BUFFER_LENGTH: usize = 16384; + +/// `LIBUS_UDP_MAX_SIZE` — per-datagram slot in the shared recv buffer. +/// Windows reads one datagram per recvfrom and never slices the buffer. +#[cfg(not(windows))] +pub(crate) const LIBUS_UDP_MAX_SIZE: usize = 64 * 1024; + +/// Batch size: 8 on POSIX (512 KiB / 64 KiB); Windows is 1 (plain recvfrom). +#[cfg(not(windows))] +pub(crate) const LIBUS_UDP_RECV_COUNT: usize = LIBUS_RECV_BUFFER_LENGTH / LIBUS_UDP_MAX_SIZE; + +/// Per-packet ancillary-data capacity (bsd.h `control[..][256]`). +#[cfg(not(windows))] +pub(crate) const UDP_CONTROL_LEN: usize = 256; + +/// POSIX `struct mmsghdr` (macOS: the `recvmsg_x`/`sendmsg_x` extended shape). +#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))] +pub(crate) use libc::mmsghdr as Mmsghdr; +#[cfg(target_os = "macos")] +#[repr(C)] +pub(crate) struct Mmsghdr { + pub(crate) msg_hdr: libc::msghdr, + pub(crate) msg_len: usize, +} + +/// `us_udp_socket_t`. Heap-stable address (self-linked into `closed_udp_head`, +/// used as the poll's tagged udata word — hence the 16-byte alignment). +/// quic.c's poll-first cast survives via cabi accessors (docs/cabi.md §3.6). +#[repr(C, align(16))] +pub struct Socket { + pub(crate) fd: LIBUS_SOCKET_DESCRIPTOR, + pub(crate) loop_: *mut Loop, + pub(crate) user: *mut c_void, + pub(crate) closed: bool, + /// Declared-but-never-written parity bit (R9.9: the C core never sets it). + pub(crate) connected: bool, + /// Bound port cached once at creation (R9.2); `bound_port` never syscalls. + pub(crate) port: c_int, + /// Believed kernel registration (R2.6 equivalent for the UDP poll). + pub(crate) poll_events: u32, + pub(crate) next_closed: *mut Socket, + /// Windows: owning uv_poll wrapper (io.rs udp arm), null until first arm + /// and after stop; freed by its uv_close callback (deferred, R2.4). + #[cfg(windows)] + pub(crate) uv_p: *mut c_void, + pub(crate) data_cb: Option, + pub(crate) drain_cb: Option, + pub(crate) close_cb: Option, + pub(crate) recv_error_cb: Option, +} + +/// Immutable-after-create snapshot so dispatch never holds a borrow of the +/// socket across a consumer callback (C17). +#[derive(Copy, Clone)] +pub(crate) struct Meta { + pub(crate) fd: LIBUS_SOCKET_DESCRIPTOR, + pub(crate) loop_: *mut Loop, + pub(crate) data_cb: Option, + pub(crate) drain_cb: Option, + /// Only dispatched on Linux/Android (recvmmsg partial-error surface); + /// other platforms treat recv errors as fatal and never read it. + #[cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))] + pub(crate) recv_error_cb: Option, +} + +/// Map the io layer's `0 / -errno` convention back to the raw setsockopt rc +/// contract consumers key on (`-1` + errno set). +fn raw_rc(rc: i32) -> c_int { + if rc == 0 { + 0 + } else { + io::set_errno(-rc); + -1 + } +} + +impl Socket { + /// Create + bind + start readable polling. `data_cb(socket, buf, + /// npackets)`: `buf` is the per-loop shared recv batch, valid only during + /// the callback. `recv_error_cb` fires for non-EAGAIN recvmmsg errors — + /// the socket is NOT closed automatically. Null + `*err` on bind failure. + pub fn create( + loop_: *mut Loop, + data_cb: extern "C" fn(*mut Socket, *mut PacketBuffer, c_int), + drain_cb: extern "C" fn(*mut Socket), + close_cb: extern "C" fn(*mut Socket), + recv_error_cb: extern "C" fn(*mut Socket, c_int), + host: *const c_char, + port: c_ushort, + options: c_int, + err: Option<&mut c_int>, + user_data: *mut c_void, + ) -> *mut Socket { + let mut err = err; + let mut bind_err: c_int = 0; + let fd = io::udp_bind_fd(host, port, options, &mut bind_err); + if fd == LIBUS_SOCKET_ERROR { + if let Some(e) = err.as_deref_mut() { + *e = bind_err; + } + return ptr::null_mut(); + } + + let this = bun_core::heap::into_raw(Box::new(Socket { + fd, + loop_, + user: user_data, + closed: false, + connected: false, + port: io::udp_local_port(fd), + poll_events: 0, + next_closed: ptr::null_mut(), + #[cfg(windows)] + uv_p: ptr::null_mut(), + data_cb: Some(data_cb), + drain_cb: Some(drain_cb), + close_cb: Some(close_cb), + recv_error_cb: Some(recv_error_cb), + })); + + // us_create_poll(fallthrough = 0); libuv counts active handles itself. + #[cfg(not(windows))] + crate::unsafe_core::poll_access::num_polls_add(loop_, 1); + + if io::udp_poll_start(loop_, this, Events::READABLE.0 | Events::WRITABLE.0) != 0 { + let saved = last_errno(); + io::close(fd, false); + #[cfg(not(windows))] + crate::unsafe_core::poll_access::num_polls_add(loop_, -1); + io::udp_destroy(this); + if let Some(e) = err.as_deref_mut() { + *e = saved; + } + io::set_errno(saved); + return ptr::null_mut(); + } + + if let Some(e) = err.as_deref_mut() { + *e = 0; + } + this + } + + /// sendmmsg-style batch; parallel slices must share length. Returns + /// packets sent (may be short), negative on hard error. Batching + /// arithmetic ported verbatim including OQ-1: `num` is post-decremented, + /// so both the loop bound and the re-arm test compare against the + /// *remaining* count (final-batch partial sends never arm WRITABLE). + pub fn send( + &mut self, + payloads: &[*const u8], + lengths: &[usize], + addresses: &[*const c_void], + ) -> c_int { + debug_assert!(payloads.len() == lengths.len() && payloads.len() == addresses.len()); + let mut num = c_int::try_from(payloads.len()).expect("int cast"); + if num == 0 { + return 0; + } + let fd = self.fd; + let loop_ = self.loop_; + // Derived after the last direct `self` access: `this` stays valid + // through the raw-pointer poll re-arms below (provenance). + let this: *mut Socket = self; + + let mut off = 0usize; + let mut total_sent: c_int = 0; + while total_sent < num { + let send_buf = ffi::ld_send_buf(loop_); + let (count, sent) = io::udp_send_batch( + fd, + send_buf, + LIBUS_SEND_BUFFER_LENGTH, + &payloads[off..], + &lengths[off..], + &addresses[off..], + ); + off += usize::try_from(count).expect("int cast"); + num -= count; + if sent < 0 { + return sent; + } + total_sent += sent; + if sent < num { + // Partial send: re-arm WRITABLE so on_drain fires later (R9.7). + io::udp_poll_change(loop_, this, Events::READABLE.0 | Events::WRITABLE.0); + } + } + total_sent + } + + pub fn user(&mut self) -> *mut c_void { + self.user + } + + /// Bound port in host byte order (cached at create — R9.2). + pub fn bound_port(&mut self) -> c_int { + self.port + } + + pub fn bound_ip(&mut self, buf: *mut u8, length: &mut i32) { + io::udp_addr_ip(self.fd, false, buf, length); + } + + pub fn remote_ip(&mut self, buf: *mut u8, length: &mut i32) { + io::udp_addr_ip(self.fd, true, buf, length); + } + + /// Stops the poll, closes the fd, fires close_cb synchronously, defers + /// the free to the tick postlude via `closed_udp_head` (R9.3, C15). Safe + /// while iterating and re-entrant from any callback. + pub fn close(&mut self) { + // Idempotent: a second close would self-link closed_udp_head (cycle + // in the postlude drain) and double-free the Box. + if self.closed { + return; + } + let loop_ = self.loop_; + let fd = self.fd; + let cb = self.close_cb; + self.closed = true; + self.next_closed = ffi::ld_closed_udp_head(loop_); + // Derived after the last direct `self` access so it stays valid + // through the callback; on_close re-derives the socket from `this` + // (C15: user data readable during and after the callback). + let this: *mut Socket = self; + io::udp_poll_stop(loop_, this); + io::close(fd, false); + ffi::ld_set_closed_udp_head(loop_, this); + if let Some(cb) = cb { + cb(this); + } + } + + /// getaddrinfo + connect to the first address that succeeds. 0 on + /// success, the gai error as-is on DNS failure, -1 + errno otherwise (R9.9). + pub fn connect(&mut self, hostname: *const c_char, port: c_uint) -> c_int { + io::udp_connect_fd(self.fd, hostname, port) + } + + /// connect(AF_UNSPEC); EAFNOSUPPORT counts as success (R9.9). + pub fn disconnect(&mut self) -> c_int { + io::udp_disconnect_fd(self.fd) + } + + pub fn set_broadcast(&mut self, enabled: bool) -> c_int { + raw_rc(io::broadcast(self.fd, enabled)) + } + + pub fn set_unicast_ttl(&mut self, ttl: i32) -> c_int { + raw_rc(io::ttl_unicast(self.fd, ttl)) + } + + pub fn set_multicast_ttl(&mut self, ttl: i32) -> c_int { + raw_rc(io::ttl_multicast(self.fd, ttl)) + } + + pub fn set_multicast_loopback(&mut self, enabled: bool) -> c_int { + raw_rc(io::multicast_loopback(self.fd, enabled)) + } + + pub fn set_multicast_interface(&mut self, iface: &sockaddr_storage) -> c_int { + raw_rc(io::multicast_interface(self.fd, iface)) + } + + pub fn set_membership( + &mut self, + address: &sockaddr_storage, + iface: Option<&sockaddr_storage>, + drop: bool, + ) -> c_int { + raw_rc(io::set_membership(self.fd, address, iface, drop)) + } + + pub fn set_source_specific_membership( + &mut self, + source: &sockaddr_storage, + group: &sockaddr_storage, + iface: Option<&sockaddr_storage>, + drop: bool, + ) -> c_int { + raw_rc(io::set_source_specific_membership( + self.fd, source, group, iface, drop, + )) + } +} + +// ── ready-poll dispatch (R9.4 — the POLL_TYPE_UDP arm of loop dispatch) ───── + +/// Called by the loop's ready-poll dispatcher for a UDP-tagged udata word. +/// `error` = EPOLLERR / kqueue EV_ERROR / libuv error event. +pub(crate) fn dispatch_ready_poll(s: *mut Socket, error: bool, readable: bool, writable: bool) { + if io::udp_is_closed(s) { + return; + } + let m = io::udp_meta(s); + + // kqueue EVFILT_WRITE is one-shot: a delivered writable event consumed the + // kernel filter, so drop the believed W bit (loop.c:556-563 equivalent). + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + if writable { + io::udp_clear_writable_believed(s); + } + + #[cfg(any(target_os = "linux", target_os = "android"))] + let mut recv_error_surfaced = false; + #[cfg(any(target_os = "linux", target_os = "android"))] + let mut recv_would_block_only = false; + #[cfg(not(any(target_os = "linux", target_os = "android")))] + let mut error = error; + + // Linux IP_RECVERR: EPOLLERR is level-triggered until the error queue is + // drained via recvmsg(MSG_ERRQUEUE); the socket stays open (R9.4.2). + #[cfg(any(target_os = "linux", target_os = "android"))] + if error { + while !io::udp_is_closed(s) { + let Some(ee) = io::udp_recv_errqueue(m.fd) else { + break; + }; + recv_error_surfaced = true; + if let Some(cb) = m.recv_error_cb { + cb(s, if ee != 0 { ee } else { libc::ECONNREFUSED }); + } + } + } + + if readable && !io::udp_is_closed(s) { + let mut recvbuf = io::udp_recvbuf_zeroed(); + loop { + let recv_buf = ffi::ld_recv_buf(m.loop_); + let npackets = io::udp_recvmmsg(m.fd, &mut recvbuf, recv_buf); + if npackets > 0 { + if let Some(cb) = m.data_cb { + cb(s, &mut recvbuf, npackets); + } + } else { + if npackets == -1 { + let errno = last_errno(); + if !is_would_block(-(errno as isize)) { + #[cfg(any(target_os = "linux", target_os = "android"))] + { + recv_error_surfaced = true; + if let Some(cb) = m.recv_error_cb { + cb(s, errno); + } + } + #[cfg(not(any(target_os = "linux", target_os = "android")))] + { + // non-Linux: fatal — fall through to close below. + error = true; + } + } else { + #[cfg(any(target_os = "linux", target_os = "android"))] + { + recv_would_block_only = true; + } + } + } + // 0 packets: batch not divisible by LIBUS_UDP_RECV_COUNT, done. + break; + } + // A callback in this batch may have closed the socket (C15). + if io::udp_is_closed(s) { + break; + } + } + } + + if writable && !io::udp_is_closed(s) { + // Clear WRITABLE before on_drain so a callback that re-arms it keeps + // the re-arm (one-shot drain); not gated on !error — a queued ICMP + // error must not leave level-triggered EPOLLOUT+EPOLLERR spinning. + let believed = io::udp_poll_events(s); + io::udp_poll_change(m.loop_, s, believed & Events::READABLE.0); + if let Some(cb) = m.drain_cb { + cb(s); + } + if io::udp_is_closed(s) { + return; + } + } + + // Residual unexplained EPOLLERR closes on Linux; any error closes elsewhere. + #[cfg(any(target_os = "linux", target_os = "android"))] + if error && !recv_error_surfaced && !recv_would_block_only && !io::udp_is_closed(s) { + io::udp_close_raw(s); + } + #[cfg(not(any(target_os = "linux", target_os = "android")))] + if error && !io::udp_is_closed(s) { + io::udp_close_raw(s); + } +} + +/// Tick-postlude sweep of `closed_udp_head` (`us_internal_free_closed_sockets` +/// UDP half): memory stays readable until here (C6/C15). +pub(crate) fn free_closed_udp_sockets(loop_: *mut Loop) { + let mut s = ffi::ld_take_closed_udp_head(loop_); + while !s.is_null() { + let next = io::udp_next_closed(s); + // us_poll_free parity: each UDP socket owned one non-fallthrough poll. + #[cfg(not(windows))] + crate::unsafe_core::poll_access::num_polls_add(loop_, -1); + io::udp_destroy(s); + s = next; + } +} + +// ── packet buffer ───────────────────────────────────────────────────────────── + +/// `us_udp_packet_buffer_t` / `struct udp_recvbuf` — the receive batch wired +/// over the loop's shared 512 KiB recv_buf. Loaned to `data_cb` only; payload +/// and peer pointers die when the callback returns. Lives on the dispatch +/// stack; `msg_hdr` points at this struct's own `addr`/`control` slots, so it +/// must never move between setup and consumption (udp_recvmmsg does both). +#[cfg(not(windows))] +#[repr(C)] +pub struct PacketBuffer { + pub(crate) msgvec: [Mmsghdr; LIBUS_UDP_RECV_COUNT], + pub(crate) iov: [libc::iovec; LIBUS_UDP_RECV_COUNT], + pub(crate) addr: [sockaddr_storage; LIBUS_UDP_RECV_COUNT], + pub(crate) control: [[u8; UDP_CONTROL_LEN]; LIBUS_UDP_RECV_COUNT], +} + +/// Windows: one packet per recvfrom (`LIBUS_UDP_RECV_COUNT == 1`). +#[cfg(windows)] +#[repr(C)] +pub struct PacketBuffer { + pub(crate) buf: *mut u8, + pub(crate) buflen: usize, + pub(crate) recvlen: usize, + pub(crate) addr: sockaddr_storage, +} + +impl PacketBuffer { + pub fn get_peer(&mut self, index: i32) -> &mut sockaddr_storage { + #[cfg(not(windows))] + { + &mut self.addr[usize::try_from(index).expect("int cast")] + } + #[cfg(windows)] + { + let _ = index; + &mut self.addr + } + } + + /// Length clamped to LIBUS_UDP_MAX_SIZE so a truncated datagram never + /// reports more bytes than were copied (Darwin recvmsg_x quirk). + pub fn get_payload(&mut self, index: i32) -> &mut [u8] { + io::udp_packet_payload(self, index) + } + + pub fn get_truncated(&mut self, index: i32) -> bool { + #[cfg(not(windows))] + { + let i = usize::try_from(index).expect("int cast"); + self.msgvec[i].msg_hdr.msg_flags & libc::MSG_TRUNC != 0 + } + #[cfg(windows)] + { + // WSARecvFrom signals truncation via WSAEMSGSIZE; not surfaced. + let _ = index; + false + } + } +} diff --git a/src/usockets/unsafe_core/bssl.rs b/src/usockets/unsafe_core/bssl.rs new file mode 100644 index 000000000000..7a551ff6e196 --- /dev/null +++ b/src/usockets/unsafe_core/bssl.rs @@ -0,0 +1,1337 @@ +//! BoringSSL FFI edge for `tls/{context,state,sni}.rs`. Hand-declared externs +//! (same linkage model as `bun_boringssl_sys`: no build.rs, symbols resolve +//! against Bun's linked BoringSSL objects + root_certs.cpp). A follow-up may swap the +//! extern block for the pre-generated bssl-sys bindings behind these helpers. + +use core::cell::UnsafeCell; +use core::ffi::{CStr, c_char, c_int, c_long, c_uint, c_void}; +use core::ptr; +use core::sync::atomic::{AtomicI64, Ordering}; +use std::sync::Once; + +use crate::tls::SSL; +use crate::tls::context::SslCtx; + +// ── Opaque foreign types ───────────────────────────────────────────────────── + +macro_rules! opaque { + ($($name:ident),+ $(,)?) => { + $(#[repr(C)] pub struct $name { _opaque: [u8; 0] })+ + }; +} +opaque!( + BIO, + X509, + X509_STORE, + X509_STORE_CTX, + EVP_PKEY, + DH, + SSL_SESSION, + SSL_CIPHER, + PKCS12, + CRYPTO_EX_DATA, + OPENSSL_STACK, + SSL_METHOD, + BIO_METHOD, +); + +/// `struct sha256_state_st` — public stable layout (vendor sha2.h:95-100). +#[repr(C)] +pub struct SHA256_CTX { + h: [u32; 8], + nl: u32, + nh: u32, + data: [u8; 64], + num: c_uint, + md_len: c_uint, +} + +pub type PemPasswordCb = unsafe extern "C" fn(*mut c_char, c_int, c_int, *mut c_void) -> c_int; +pub type CryptoExFree = + unsafe extern "C" fn(*mut c_void, *mut c_void, *mut CRYPTO_EX_DATA, c_int, c_long, *mut c_void); +type VerifyCb = unsafe extern "C" fn(c_int, *mut X509_STORE_CTX) -> c_int; +type NewSessionCb = unsafe extern "C" fn(*mut SSL, *mut SSL_SESSION) -> c_int; +type KeylogCb = unsafe extern "C" fn(*const SSL, *const c_char); + +// ── Constants (values verified against vendor/boringssl/include) ───────────── + +pub const SSL_VERIFY_NONE: c_int = 0; +pub const SSL_VERIFY_PEER: c_int = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; +pub const SSL_FILETYPE_PEM: c_int = 1; +pub const SSL_FILETYPE_ASN1: c_int = 2; +pub const TLS1_2_VERSION: u16 = 0x0303; +pub const TLS1_3_VERSION: u16 = 0x0304; +const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: u32 = 0x2; +/// 0 in BoringSSL (release-buffers is always-on); kept for verbatim porting. +const SSL_MODE_RELEASE_BUFFERS: u32 = 0; +/// CLIENT | SERVER | NO_INTERNAL(0x300) | NO_AUTO_CLEAR(0x80). +const SSL_SESS_CACHE_MODE: c_int = 0x1 | 0x2 | 0x300 | 0x80; +const ERR_LIB_PEM: c_int = 9; +const PEM_R_NO_START_LINE: c_int = 110; +const SSL_R_NO_CIPHER_MATCH: c_int = 177; +const NID_AUTH_PSK: c_int = 956; +pub const X509_V_OK: c_long = 0; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: c_long = 2; + +// ── Extern surface ─────────────────────────────────────────────────────────── + +unsafe extern "C" { + fn TLS_method() -> *const SSL_METHOD; + fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SslCtx; + fn SSL_CTX_free(ctx: *mut SslCtx); + fn SSL_CTX_up_ref(ctx: *mut SslCtx) -> c_int; + fn SSL_CTX_set_read_ahead(ctx: *mut SslCtx, yes: c_int) -> c_int; + fn SSL_CTX_set_mode(ctx: *mut SslCtx, mode: u32) -> u32; + fn SSL_CTX_set_min_proto_version(ctx: *mut SslCtx, version: u16) -> c_int; + fn SSL_CTX_set_max_proto_version(ctx: *mut SslCtx, version: u16) -> c_int; + fn SSL_CTX_set_options(ctx: *mut SslCtx, options: u32) -> u32; + fn SSL_CTX_set_default_passwd_cb(ctx: *mut SslCtx, cb: Option); + fn SSL_CTX_set_default_passwd_cb_userdata(ctx: *mut SslCtx, data: *mut c_void); + fn SSL_CTX_get_default_passwd_cb(ctx: *const SslCtx) -> Option; + fn SSL_CTX_get_default_passwd_cb_userdata(ctx: *const SslCtx) -> *mut c_void; + fn SSL_CTX_use_certificate_chain_file(ctx: *mut SslCtx, file: *const c_char) -> c_int; + fn SSL_CTX_use_PrivateKey_file(ctx: *mut SslCtx, file: *const c_char, ty: c_int) -> c_int; + fn SSL_CTX_use_certificate(ctx: *mut SslCtx, x: *mut X509) -> c_int; + fn SSL_CTX_use_PrivateKey(ctx: *mut SslCtx, pkey: *mut EVP_PKEY) -> c_int; + fn SSL_CTX_clear_chain_certs(ctx: *mut SslCtx) -> c_int; + fn SSL_CTX_add0_chain_cert(ctx: *mut SslCtx, x: *mut X509) -> c_int; + fn SSL_CTX_add_client_CA(ctx: *mut SslCtx, x: *mut X509) -> c_int; + fn SSL_CTX_set_client_CA_list(ctx: *mut SslCtx, list: *mut OPENSSL_STACK); + fn SSL_load_client_CA_file(file: *const c_char) -> *mut OPENSSL_STACK; + fn SSL_CTX_load_verify_locations( + ctx: *mut SslCtx, + ca_file: *const c_char, + ca_dir: *const c_char, + ) -> c_int; + fn SSL_CTX_set_verify(ctx: *mut SslCtx, mode: c_int, cb: Option); + fn SSL_CTX_get_verify_mode(ctx: *const SslCtx) -> c_int; + fn SSL_CTX_get_cert_store(ctx: *const SslCtx) -> *mut X509_STORE; + fn SSL_CTX_set_cert_store(ctx: *mut SslCtx, store: *mut X509_STORE); + fn SSL_CTX_set_cipher_list(ctx: *mut SslCtx, s: *const c_char) -> c_int; + fn SSL_CTX_set_tmp_dh(ctx: *mut SslCtx, dh: *const DH) -> c_int; + fn SSL_CTX_set_session_cache_mode(ctx: *mut SslCtx, mode: c_int) -> c_int; + fn SSL_CTX_sess_set_new_cb(ctx: *mut SslCtx, cb: Option); + fn SSL_CTX_set_keylog_callback(ctx: *mut SslCtx, cb: Option); + fn SSL_CTX_get_ex_new_index( + argl: c_long, + argp: *mut c_void, + unused: *mut c_void, + dup_unused: *mut c_void, + free_func: Option, + ) -> c_int; + fn SSL_CTX_set_ex_data(ctx: *mut SslCtx, idx: c_int, data: *mut c_void) -> c_int; + fn SSL_CTX_get_ex_data(ctx: *const SslCtx, idx: c_int) -> *mut c_void; + fn SSL_get_ex_new_index( + argl: c_long, + argp: *mut c_void, + unused: *mut c_void, + dup_unused: *mut c_void, + free_func: Option, + ) -> c_int; + fn SSL_set_ex_data(ssl: *mut SSL, idx: c_int, data: *mut c_void) -> c_int; + fn SSL_get_ex_data(ssl: *const SSL, idx: c_int) -> *mut c_void; + fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SslCtx; + fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; + fn SSL_get_verify_result(ssl: *const SSL) -> c_long; + fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; + fn SSL_CIPHER_get_auth_nid(cipher: *const SSL_CIPHER) -> c_int; + fn SSL_get_session(ssl: *const SSL) -> *mut SSL_SESSION; + fn SSL_SESSION_get_protocol_version(session: *const SSL_SESSION) -> u16; + fn SSL_session_reused(ssl: *const SSL) -> c_int; + fn i2d_SSL_SESSION(session: *const SSL_SESSION, pp: *mut *mut u8) -> c_int; + fn X509_verify_cert_error_string(err: c_long) -> *const c_char; + fn X509_free(x: *mut X509); + fn X509_STORE_add_cert(store: *mut X509_STORE, x: *mut X509) -> c_int; + fn X509_STORE_free(store: *mut X509_STORE); + fn X509_STORE_get0_objects(store: *mut X509_STORE) -> *const OPENSSL_STACK; + fn OPENSSL_sk_num(sk: *const OPENSSL_STACK) -> usize; + fn OPENSSL_sk_value(sk: *const OPENSSL_STACK, i: usize) -> *mut c_void; + fn OPENSSL_sk_free(sk: *mut OPENSSL_STACK); + fn BIO_new_mem_buf(buf: *const c_void, len: c_int) -> *mut BIO; + fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; + fn BIO_s_mem() -> *const BIO_METHOD; + fn BIO_free(bio: *mut BIO) -> c_int; + fn BIO_get_mem_data(bio: *mut BIO, contents: *mut *mut c_char) -> c_long; + fn PEM_read_bio_X509( + bio: *mut BIO, + out: *mut *mut X509, + cb: Option, + u: *mut c_void, + ) -> *mut X509; + fn PEM_read_bio_X509_AUX( + bio: *mut BIO, + out: *mut *mut X509, + cb: Option, + u: *mut c_void, + ) -> *mut X509; + fn PEM_read_bio_PrivateKey( + bio: *mut BIO, + out: *mut *mut EVP_PKEY, + cb: Option, + u: *mut c_void, + ) -> *mut EVP_PKEY; + fn PEM_read_DHparams( + file: *mut libc::FILE, + out: *mut *mut DH, + cb: Option, + u: *mut c_void, + ) -> *mut DH; + fn PEM_write_bio_PrivateKey( + bio: *mut BIO, + pkey: *const EVP_PKEY, + enc: *const c_void, + kstr: *const u8, + klen: c_int, + cb: Option, + u: *mut c_void, + ) -> c_int; + fn PEM_write_bio_X509(bio: *mut BIO, x: *mut X509) -> c_int; + fn d2i_PrivateKey_bio(bio: *mut BIO, out: *mut *mut EVP_PKEY) -> *mut EVP_PKEY; + fn d2i_PKCS12_bio(bio: *mut BIO, out: *mut *mut PKCS12) -> *mut PKCS12; + fn PKCS12_parse( + p12: *mut PKCS12, + password: *const c_char, + out_pkey: *mut *mut EVP_PKEY, + out_cert: *mut *mut X509, + out_ca_certs: *mut *mut OPENSSL_STACK, + ) -> c_int; + fn PKCS12_free(p12: *mut PKCS12); + fn EVP_PKEY_free(pkey: *mut EVP_PKEY); + fn DH_free(dh: *mut DH); + fn ERR_clear_error(); + fn ERR_peek_error() -> u32; + fn ERR_peek_last_error() -> u32; + fn ERR_error_string_n(packed_error: u32, buf: *mut c_char, len: usize) -> *mut c_char; + fn SHA256_Init(ctx: *mut SHA256_CTX) -> c_int; + fn SHA256_Update(ctx: *mut SHA256_CTX, data: *const c_void, len: usize) -> c_int; + fn SHA256_Final(out: *mut u8, ctx: *mut SHA256_CTX) -> c_int; + // root_certs.cpp (surviving C++ — docs/tls.md A.6). + fn us_get_default_ca_store() -> *mut X509_STORE; + fn us_get_shared_default_ca_store() -> *mut X509_STORE; + fn us_get_default_ciphers() -> *const c_char; + // SSLContextCache.rs tombstone hook (docs/tls.md A.2). + fn bun_ssl_ctx_cache_on_free( + parent: *mut c_void, + ptr: *mut c_void, + ad: *mut CRYPTO_EX_DATA, + index: c_int, + argl: c_long, + argp: *mut c_void, + ); +} + +// ── Pointer/CStr utilities ─────────────────────────────────────────────────── + +/// Contract: `p` is null or a NUL-terminated string valid for `'a`. +#[inline] +pub fn cstr_opt<'a>(p: *const c_char) -> Option<&'a CStr> { + if p.is_null() { + return None; + } + // SAFETY: caller contract — non-null p is NUL-terminated and lives for 'a. + Some(unsafe { CStr::from_ptr(p) }) +} + +/// Contract: `arr` is null or points at `n` readable `*const c_char` slots. +#[inline] +pub fn ptr_array<'a>(arr: *const *const c_char, n: usize) -> &'a [*const c_char] { + if arr.is_null() || n == 0 { + return &[]; + } + // SAFETY: caller contract — arr points at n readable pointer slots. + unsafe { core::slice::from_raw_parts(arr, n) } +} + +/// libc-heap copy of `s` (freed with `libc_free`) — the strdup'd passphrase. +pub fn strdup_raw(s: &CStr) -> *mut c_void { + let n = s.to_bytes_with_nul().len(); + // SAFETY: allocation of n bytes; copy of exactly n bytes on success. + unsafe { + let p = libc::malloc(n); + if !p.is_null() { + ptr::copy_nonoverlapping(s.as_ptr().cast::(), p.cast::(), n); + } + p + } +} + +pub fn libc_free(p: *mut c_void) { + // SAFETY: p is null or a live libc allocation owned by the caller. + unsafe { libc::free(p) } +} + +// ── Error-queue helpers ────────────────────────────────────────────────────── + +pub fn err_clear_error() { + // SAFETY: no preconditions (per-thread queue). + unsafe { ERR_clear_error() } +} + +pub fn err_peek_error() -> u32 { + // SAFETY: no preconditions. + unsafe { ERR_peek_error() } +} + +pub fn err_peek_last_error() -> u32 { + // SAFETY: no preconditions. + unsafe { ERR_peek_last_error() } +} + +/// `ERR_GET_LIB` (static-inline in BoringSSL — reimplemented, err.h:52). +#[inline] +pub fn err_get_lib(packed: u32) -> c_int { + ((packed >> 24) & 0xff) as c_int +} + +/// `ERR_GET_REASON` (static-inline in BoringSSL — reimplemented, err.h:59). +#[inline] +pub fn err_get_reason(packed: u32) -> c_int { + (packed & 0xfff) as c_int +} + +/// `ERR_error_string_n(err, buf, buf.len())`; output is NUL-terminated. +pub fn err_error_string(packed: u32, buf: &mut [u8]) { + if buf.is_empty() { + return; + } + // SAFETY: buf is writable for buf.len() bytes. + unsafe { ERR_error_string_n(packed, buf.as_mut_ptr().cast::(), buf.len()) }; +} + +// ── SHA-256 (digest cache key) ─────────────────────────────────────────────── + +pub struct Sha256(SHA256_CTX); + +impl Sha256 { + pub fn init() -> Self { + // SAFETY: SHA256_Init writes the full ctx; never reads uninit bytes. + unsafe { + let mut ctx = core::mem::MaybeUninit::::uninit(); + SHA256_Init(ctx.as_mut_ptr()); + Self(ctx.assume_init()) + } + } + + pub fn update(&mut self, data: &[u8]) { + // SAFETY: ctx initialized in init(); data is a readable slice. + unsafe { SHA256_Update(&raw mut self.0, data.as_ptr().cast::(), data.len()) }; + } + + pub fn finish(&mut self) -> [u8; 32] { + let mut out = [0u8; 32]; + // SAFETY: ctx initialized; out has 32 writable bytes. + unsafe { SHA256_Final(out.as_mut_ptr(), &raw mut self.0) }; + out + } +} + +// ── stat for the digest cache key (docs/tls.md A.2) ──────────────────── + +/// `[mtime_sec, mtime_nsec, size]`; `None` on stat failure (digest feeds +/// zeros — ctx construction then fails on the same path, entry never caches). +#[cfg(unix)] +pub fn stat_for_digest(path: &CStr) -> Option<[i64; 3]> { + let mut st = core::mem::MaybeUninit::::uninit(); + // SAFETY: valid NUL-terminated path; stat(2) fills the out buffer. + if unsafe { libc::stat(path.as_ptr(), st.as_mut_ptr()) } != 0 { + return None; + } + // SAFETY: stat returned 0, so the buffer is fully initialized. + let st = unsafe { st.assume_init() }; + Some([ + st.st_mtime as i64, + st.st_mtime_nsec as i64, + st.st_size as i64, + ]) +} + +#[cfg(windows)] +pub fn stat_for_digest(path: &CStr) -> Option<[i64; 3]> { + // Follow symlinks like libuv's uv_fs_stat (no FILE_FLAG_OPEN_REPARSE_POINT) + // so in-place cert rotation behind a link invalidates the digest. + #[repr(C)] + struct FILETIME { + lo: u32, + hi: u32, + } + #[repr(C)] + struct BY_HANDLE_FILE_INFORMATION { + attrs: u32, + creation: FILETIME, + access: FILETIME, + write: FILETIME, + volume_serial: u32, + size_high: u32, + size_low: u32, + links: u32, + index_high: u32, + index_low: u32, + } + unsafe extern "system" { + fn CreateFileW( + name: *const u16, + access: u32, + share: u32, + security: *mut c_void, + disposition: u32, + flags: u32, + template: *mut c_void, + ) -> *mut c_void; + fn GetFileInformationByHandle( + h: *mut c_void, + info: *mut BY_HANDLE_FILE_INFORMATION, + ) -> c_int; + fn CloseHandle(h: *mut c_void) -> c_int; + } + const FILE_SHARE_ALL: u32 = 0x1 | 0x2 | 0x4; + const OPEN_EXISTING: u32 = 3; + const FILE_FLAG_BACKUP_SEMANTICS: u32 = 0x0200_0000; + + let bytes = path.to_bytes(); + let mut wbuf = vec![0u16; bytes.len() + 1]; + let n = bun_core::strings::convert_utf8_to_utf16_in_buffer(&mut wbuf, bytes).len(); + for u in &mut wbuf[..n] { + if *u == u16::from(b'/') { + *u = u16::from(b'\\'); + } + } + wbuf[n] = 0; + // SAFETY: wbuf is NUL-terminated at [n]; access=0 is metadata-query-only. + let h = unsafe { + CreateFileW( + wbuf.as_ptr(), + 0, + FILE_SHARE_ALL, + ptr::null_mut(), + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + ptr::null_mut(), + ) + }; + if h.addr() == usize::MAX { + return None; + } + let mut info = core::mem::MaybeUninit::::uninit(); + // SAFETY: h is a valid open handle; the call fills the out buffer. + let ok = unsafe { GetFileInformationByHandle(h, info.as_mut_ptr()) }; + // SAFETY: h is a valid open handle from CreateFileW above. + unsafe { CloseHandle(h) }; + if ok == 0 { + return None; + } + // SAFETY: GetFileInformationByHandle succeeded — buffer initialized. + let info = unsafe { info.assume_init() }; + let ticks = (u64::from(info.write.hi) << 32) | u64::from(info.write.lo); + let size = (u64::from(info.size_high) << 32) | u64::from(info.size_low); + Some([ + (ticks / 10_000_000) as i64, + (ticks % 10_000_000) as i64 * 100, + size as i64, + ]) +} + +// ── ex_data registry (openssl.c:140-395) ───────────────────────────────────── + +pub struct ExIndices { + /// SSL_CTX: packed reneg policy; free_func decrements the live counter. + pub ctx: c_int, + /// SSL_CTX: per-domain SNI userdata (uWS HttpRouter*). + pub sni_user: c_int, + /// SSL_CTX: SSLContextCache tombstone back-pointer. + pub ctx_cache: c_int, + /// SSL_CTX: marker — verification store holds user-provided CAs. + pub ctx_user_ca: c_int, + /// SSL: per-connection reneg counter (lazy Box). + pub reneg_state: c_int, + /// SSL: async-SNI suspension state (Box). + pub sni_pending: c_int, + /// SSL: accepting listener backref (never the shared CTX — UAF). + pub listener: c_int, + /// SSL: parked session/keylog opt-in marker. + pub is_socket: c_int, + /// SSL: parked serialized sessions (Box). + pub pending_session: c_int, + /// SSL: parked keylog lines (Box). + pub pending_keylog: c_int, +} + +/// pthread_once-shaped storage (the deleted openssl.c's `us_ex_idx_once` + +/// plain int statics): written exactly once inside `EX_ONCE`, read only +/// after `call_once` returns — the `Once` provides the happens-before. +struct ExCell(UnsafeCell); +// SAFETY: single write inside `Once::call_once`; all reads are ordered after +// it by `call_once`'s synchronization. +unsafe impl Sync for ExCell {} + +static EX_ONCE: Once = Once::new(); +static EX_INDICES: ExCell = ExCell(UnsafeCell::new(ExIndices { + ctx: -1, + sni_user: -1, + ctx_cache: -1, + ctx_user_ca: -1, + reneg_state: -1, + sni_pending: -1, + listener: -1, + is_socket: -1, + pending_session: -1, + pending_keylog: -1, +})); +static SSL_CTX_LIVE: AtomicI64 = AtomicI64::new(0); + +unsafe extern "C" fn ctx_ex_free( + _parent: *mut c_void, + _ptr: *mut c_void, + _ad: *mut CRYPTO_EX_DATA, + _index: c_int, + _argl: c_long, + _argp: *mut c_void, +) { + SSL_CTX_LIVE.fetch_sub(1, Ordering::SeqCst); +} + +unsafe extern "C" fn reneg_state_free( + _parent: *mut c_void, + ptr: *mut c_void, + _ad: *mut CRYPTO_EX_DATA, + _index: c_int, + _argl: c_long, + _argp: *mut c_void, +) { + if !ptr.is_null() { + // SAFETY: slot only ever holds a heap RenegState from reneg_state_ptr. + unsafe { bun_core::heap::destroy(ptr.cast::()) }; + } +} + +unsafe extern "C" fn sni_pending_free( + _parent: *mut c_void, + ptr: *mut c_void, + _ad: *mut CRYPTO_EX_DATA, + _index: c_int, + _argl: c_long, + _argp: *mut c_void, +) { + if !ptr.is_null() { + // SAFETY: slot only ever holds a heap SniSuspension from sni_set. + let boxed = unsafe { bun_core::heap::take(ptr.cast::()) }; + if let SniSuspension::Resolved(ctx) = *boxed { + ssl_ctx_free(ctx); + } + } +} + +unsafe extern "C" fn pending_list_free( + _parent: *mut c_void, + ptr: *mut c_void, + _ad: *mut CRYPTO_EX_DATA, + _index: c_int, + _argl: c_long, + _argp: *mut c_void, +) { + if !ptr.is_null() { + // SAFETY: slot only ever holds a heap PendingList from pending_push. + unsafe { bun_core::heap::destroy(ptr.cast::()) }; + } +} + +/// One-time registration at first SSL_CTX/SSL touch (`Once` = the C's +/// pthread_once rule: SSL_CTX creation runs from both the JS and HTTP-client +/// threads). +pub fn ex_indices() -> &'static ExIndices { + EX_ONCE.call_once(|| { + let null = ptr::null_mut(); + // SAFETY: registration-only FFI; free_funcs match each slot's + // payload. Sole write to the cell — no reader exists until + // `call_once` returns. + unsafe { + *EX_INDICES.0.get() = ExIndices { + ctx: SSL_CTX_get_ex_new_index(0, null, null, null, Some(ctx_ex_free)), + sni_user: SSL_CTX_get_ex_new_index(0, null, null, null, None), + ctx_cache: SSL_CTX_get_ex_new_index( + 0, + null, + null, + null, + Some(bun_ssl_ctx_cache_on_free), + ), + ctx_user_ca: SSL_CTX_get_ex_new_index(0, null, null, null, None), + reneg_state: SSL_get_ex_new_index(0, null, null, null, Some(reneg_state_free)), + sni_pending: SSL_get_ex_new_index(0, null, null, null, Some(sni_pending_free)), + listener: SSL_get_ex_new_index(0, null, null, null, None), + is_socket: SSL_get_ex_new_index(0, null, null, null, None), + pending_session: SSL_get_ex_new_index(0, null, null, null, Some(pending_list_free)), + pending_keylog: SSL_get_ex_new_index(0, null, null, null, Some(pending_list_free)), + }; + } + }); + // SAFETY: `call_once` returned, so the single write above happened-before + // this read and no write can ever run again. + unsafe { &*EX_INDICES.0.get() } +} + +pub fn ssl_ctx_live_count() -> i64 { + SSL_CTX_LIVE.load(Ordering::SeqCst) +} + +/// Contract for all raw-pointer helpers below: pointers are live objects (or +/// null where the wrapped C API is null-tolerant). +pub fn ssl_set_ex_data(ssl: *mut SSL, idx: c_int, data: *mut c_void) { + // SAFETY: live SSL per contract. + unsafe { SSL_set_ex_data(ssl, idx, data) }; +} + +pub fn ssl_get_ex_data(ssl: *const SSL, idx: c_int) -> *mut c_void { + // SAFETY: live SSL per contract. + unsafe { SSL_get_ex_data(ssl, idx) } +} + +/// Current CTX (SNI may have swapped it mid-handshake); BORROWED — never unref. +pub fn ssl_get_ctx(ssl: *const SSL) -> *mut SslCtx { + // SAFETY: live SSL per contract. + unsafe { SSL_get_SSL_CTX(ssl) } +} + +pub fn ctx_set_ex_data(ctx: *mut SslCtx, idx: c_int, data: *mut c_void) { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_set_ex_data(ctx, idx, data) }; +} + +pub fn ctx_get_ex_data(ctx: *const SslCtx, idx: c_int) -> *mut c_void { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_get_ex_data(ctx, idx) } +} + +// ── Reneg policy/state (openssl.c:187-189, 446-461) ───────────────────────── + +pub struct RenegState { + pub window_start_ms: u64, + pub count: u32, +} + +/// Per-connection counter, alloc'd lazily on first renegotiation attempt. +pub fn reneg_state_ptr(ssl: *mut SSL) -> *mut RenegState { + let idx = ex_indices().reneg_state; + let existing = ssl_get_ex_data(ssl, idx); + if !existing.is_null() { + return existing.cast::(); + } + let fresh = bun_core::heap::into_raw(Box::new(RenegState { + window_start_ms: 0, + count: 0, + })); + ssl_set_ex_data(ssl, idx, fresh.cast::()); + fresh +} + +fn reneg_pack(limit: u32, window: u32) -> *mut c_void { + ptr::without_provenance_mut(((limit as usize) << 32) | window as usize) +} + +pub fn set_reneg_policy(ctx: *mut SslCtx, limit: u32, window: u32) { + ctx_set_ex_data(ctx, ex_indices().ctx, reneg_pack(limit, window)); +} + +/// `(limit, window)`; defaults 3/600 (Node CLIENT_RENEG_LIMIT/WINDOW). +pub fn reneg_policy(ctx: *const SslCtx) -> (u32, u32) { + let packed = ctx_get_ex_data(ctx, ex_indices().ctx).addr(); + if packed == 0 { + (3, 600) + } else { + ((packed >> 32) as u32, packed as u32) + } +} + +// ── Async-SNI suspension (openssl.c:191-208) ───────────────────────────────── + +pub enum SniSuspension { + /// State 1: waiting for the JS resolution. + Waiting, + /// State 2: resolved; carries ONE owned ctx ref (null = static-tree fallback). + Resolved(*mut SslCtx), + /// State 3: resolver errored — drop the connection without a TLS alert. + Error, +} + +pub fn sni_set(ssl: *mut SSL, state: SniSuspension) { + let idx = ex_indices().sni_pending; + sni_clear(ssl); + ssl_set_ex_data( + ssl, + idx, + bun_core::heap::into_raw(Box::new(state)).cast::(), + ); +} + +/// Take (and clear) the suspension state; the caller owns any carried ctx ref. +pub fn sni_take(ssl: *mut SSL) -> Option { + let idx = ex_indices().sni_pending; + let p = ssl_get_ex_data(ssl, idx); + if p.is_null() { + return None; + } + ssl_set_ex_data(ssl, idx, ptr::null_mut()); + // SAFETY: slot only ever holds a heap SniSuspension from sni_set. + Some(*unsafe { bun_core::heap::take(p.cast::()) }) +} + +pub fn sni_is_waiting(ssl: *const SSL) -> bool { + let p = ssl_get_ex_data(ssl.cast_mut(), ex_indices().sni_pending); + // SAFETY: slot only ever holds Box from sni_set. + !p.is_null() + && matches!( + unsafe { &*p.cast::() }, + SniSuspension::Waiting + ) +} + +fn sni_clear(ssl: *mut SSL) { + if let Some(SniSuspension::Resolved(ctx)) = sni_take(ssl) { + ssl_ctx_free(ctx); + } +} + +// ── Pending session/keylog park-then-flush queues (openssl.c:226-439) ─────── + +struct PendingList(Vec>); + +fn pending_push(ssl: *mut SSL, idx: c_int, entry: Box<[u8]>) { + let p = ssl_get_ex_data(ssl, idx); + if p.is_null() { + let list = bun_core::heap::into_raw(Box::new(PendingList(vec![entry]))); + ssl_set_ex_data(ssl, idx, list.cast::()); + } else { + // SAFETY: slot only ever holds Box from this fn. + unsafe { &mut *p.cast::() }.0.push(entry); + } +} + +fn pending_take(ssl: *mut SSL, idx: c_int) -> Vec> { + let p = ssl_get_ex_data(ssl, idx); + if p.is_null() { + return Vec::new(); + } + ssl_set_ex_data(ssl, idx, ptr::null_mut()); + // SAFETY: slot only ever holds a heap PendingList from pending_push. + unsafe { bun_core::heap::take(p.cast::()) }.0 +} + +fn pending_pop(ssl: *mut SSL, idx: c_int, out: &mut [u8]) -> usize { + let p = ssl_get_ex_data(ssl, idx); + if p.is_null() { + return 0; + } + // SAFETY: slot only ever holds Box from pending_push. + let list = unsafe { &mut *p.cast::() }; + if list.0.is_empty() { + return 0; + } + let entry = list.0.remove(0); + if entry.len() > out.len() { + // Parking sites cap entries; callers pass buffers at least that + // large, so this is unreachable — drop rather than overflow. + return 0; + } + out[..entry.len()].copy_from_slice(&entry); + entry.len() +} + +/// Drain ALL parked sessions in arrival order (state.rs dispatches at its flush +/// points — before data, before ZERO_RETURN close, buffer cycle, loop end). +pub fn drain_pending_sessions(ssl: *mut SSL) -> Vec> { + pending_take(ssl, ex_indices().pending_session) +} + +pub fn drain_pending_keylog(ssl: *mut SSL) -> Vec> { + pending_take(ssl, ex_indices().pending_keylog) +} + +/// SSLWrapper drain (`us_ssl_pop_pending_session` parity): oldest entry into +/// `out`, returns byte length, 0 when empty. +pub fn pop_pending_session(ssl: *mut SSL, out: &mut [u8]) -> usize { + pending_pop(ssl, ex_indices().pending_session, out) +} + +pub fn pop_pending_keylog(ssl: *mut SSL, out: &mut [u8]) -> usize { + pending_pop(ssl, ex_indices().pending_keylog, out) +} + +/// `us_ssl_enable_pending_events` — opt a non-us_socket SSL (SSLWrapper) into +/// the parked queues. +pub fn enable_pending_events(ssl: *mut SSL) { + ssl_set_ex_data(ssl, ex_indices().is_socket, ptr::without_provenance_mut(1)); +} + +pub fn is_socket_marked(ssl: *const SSL) -> bool { + !ssl_get_ex_data(ssl.cast_mut(), ex_indices().is_socket).is_null() +} + +/// New-session callback: fires from inside SSL_read/SSL_do_handshake — only +/// serialize + park (running JS here is a UAF). Returns 0: caller keeps +/// ownership of `session` (we stored a serialized copy). +unsafe extern "C" fn new_session_cb(ssl: *mut SSL, session: *mut SSL_SESSION) -> c_int { + if !is_socket_marked(ssl) { + return 0; + } + // SAFETY: i2d double-call pattern; session is live for the callback. + let len = unsafe { i2d_SSL_SESSION(session, ptr::null_mut()) }; + if len <= 0 || len as usize > crate::tls::context::US_SSL_PENDING_SESSION_MAX { + return 0; + } + let mut buf = vec![0u8; len as usize].into_boxed_slice(); + let mut p = buf.as_mut_ptr(); + // SAFETY: buf has exactly `len` writable bytes as sized above. + let written = unsafe { i2d_SSL_SESSION(session, &raw mut p) }; + if written <= 0 { + return 0; + } + debug_assert_eq!(written, len); + pending_push(ssl, ex_indices().pending_session, buf); + 0 +} + +/// Keylog callback: parks `line + '\n'` (Node appends the newline before +/// emitting 'keylog'). +unsafe extern "C" fn keylog_cb(ssl: *const SSL, line: *const c_char) { + if !is_socket_marked(ssl) { + return; + } + let Some(line) = cstr_opt(line) else { return }; + let bytes = line.to_bytes(); + if bytes.is_empty() || bytes.len() > crate::tls::context::US_SSL_PENDING_KEYLOG_LINE_MAX { + return; + } + let mut entry = Vec::with_capacity(bytes.len() + 1); + entry.extend_from_slice(bytes); + entry.push(b'\n'); + pending_push( + ssl.cast_mut(), + ex_indices().pending_keylog, + entry.into_boxed_slice(), + ); +} + +// ── Verify plumbing (openssl.c:865-870, 1413-1440) ────────────────────────── + +/// Always continue: the verdict is carried in verify_error and the +/// fail-closed decision is made by the consumer (docs/tls.md §2.4). +unsafe extern "C" fn verify_cb(_preverify_ok: c_int, _ctx: *mut X509_STORE_CTX) -> c_int { + 1 +} + +/// `us_internal_verify_peer_certificate`: default `def` when no peer cert, +/// with the PSK-cipher / TLS1.3-resumption exemptions returning X509_V_OK. +pub fn verify_peer_certificate(ssl: *const SSL, def: c_long) -> c_long { + if ssl.is_null() { + return def; + } + // SAFETY: live SSL per contract; peer cert ref released immediately. + unsafe { + let peer_cert = SSL_get_peer_certificate(ssl); + if !peer_cert.is_null() { + X509_free(peer_cert); + return SSL_get_verify_result(ssl); + } + let cipher = SSL_get_current_cipher(ssl); + let sess = SSL_get_session(ssl); + if (!cipher.is_null() && SSL_CIPHER_get_auth_nid(cipher) == NID_AUTH_PSK) + || (!sess.is_null() + && SSL_SESSION_get_protocol_version(sess) == TLS1_3_VERSION + && SSL_session_reused(ssl) != 0) + { + return X509_V_OK; + } + } + def +} + +/// `X509_verify_cert_error_string` — static table string, never freed. +pub fn verify_error_string(err: c_long) -> *const c_char { + // SAFETY: pure lookup into a static table. + unsafe { X509_verify_cert_error_string(err) } +} + +// ── SSL_CTX lifecycle + option application ────────────────────────────────── + +pub fn ssl_ctx_up_ref(ctx: *mut SslCtx) { + if !ctx.is_null() { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_up_ref(ctx) }; + } +} + +pub fn ssl_ctx_free(ctx: *mut SslCtx) { + if !ctx.is_null() { + // SAFETY: releases one owned ref per contract. + unsafe { SSL_CTX_free(ctx) }; + } +} + +/// `SSL_CTX_new(TLS_method())` + live counter + required modes +/// (read_ahead(1) + ACCEPT_MOVING_WRITE_BUFFER — load-bearing for the BIO +/// design, docs/tls.md §8.2). Returns null on allocation failure. +pub fn ssl_ctx_new_base() -> *mut SslCtx { + // SAFETY: creation-only FFI. + unsafe { + let ctx = SSL_CTX_new(TLS_method()); + if ctx.is_null() { + return ctx; + } + SSL_CTX_LIVE.fetch_add(1, Ordering::SeqCst); + // Register the live-count free_func slot first so every exit balances. + SSL_CTX_set_ex_data(ctx, ex_indices().ctx, ptr::null_mut()); + SSL_CTX_set_read_ahead(ctx, 1); + SSL_CTX_set_mode(ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); + ctx + } +} + +pub fn ctx_set_min_proto_version(ctx: *mut SslCtx, version: u16) { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_set_min_proto_version(ctx, version) }; +} + +pub fn ctx_set_max_proto_version(ctx: *mut SslCtx, version: u16) { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_set_max_proto_version(ctx, version) }; +} + +pub fn ctx_set_release_buffers_mode(ctx: *mut SslCtx) { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS) }; +} + +pub fn ctx_set_secure_options(ctx: *mut SslCtx, options: u32) { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_set_options(ctx, options) }; +} + +pub fn ctx_get_verify_mode(ctx: *const SslCtx) -> c_int { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_get_verify_mode(ctx) } +} + +pub fn ctx_set_verify(ctx: *mut SslCtx, mode: c_int) { + // SAFETY: live SSL_CTX; verify_cb is 'static. + unsafe { SSL_CTX_set_verify(ctx, mode, Some(verify_cb)) }; +} + +/// `int passphrase_cb(char*, int, int, void*)` — copies the strdup'd +/// passphrase; fails when longer than the buffer (openssl.c:473-479). +unsafe extern "C" fn passphrase_cb( + buf: *mut c_char, + size: c_int, + _rwflag: c_int, + u: *mut c_void, +) -> c_int { + let Some(pass) = cstr_opt(u.cast_const().cast::()) else { + return -1; + }; + let bytes = pass.to_bytes(); + if size < 0 || bytes.len() > size as usize { + return -1; + } + // SAFETY: buf has `size` writable bytes; bytes.len() <= size. + unsafe { ptr::copy_nonoverlapping(bytes.as_ptr(), buf.cast::(), bytes.len()) }; + bytes.len() as c_int +} + +/// strdup the passphrase into the CTX passwd_cb userdata slot; dropped via +/// [`ctx_drop_passphrase`] as soon as key loading completes (or build fails). +pub fn ctx_set_passphrase(ctx: *mut SslCtx, passphrase: &CStr) { + let copy = strdup_raw(passphrase); + // SAFETY: live SSL_CTX; copy is owned by the slot until dropped. + unsafe { + SSL_CTX_set_default_passwd_cb_userdata(ctx, copy); + SSL_CTX_set_default_passwd_cb(ctx, Some(passphrase_cb)); + } +} + +pub fn ctx_drop_passphrase(ctx: *mut SslCtx) { + // SAFETY: live SSL_CTX; slot holds our strdup or null. + unsafe { + let password = SSL_CTX_get_default_passwd_cb_userdata(ctx); + if !password.is_null() { + libc::free(password); + SSL_CTX_set_default_passwd_cb_userdata(ctx, ptr::null_mut()); + } + } +} + +pub fn ctx_use_certificate_chain_file(ctx: *mut SslCtx, file: &CStr) -> bool { + // SAFETY: live SSL_CTX; NUL-terminated path. + unsafe { SSL_CTX_use_certificate_chain_file(ctx, file.as_ptr()) == 1 } +} + +pub fn ctx_use_privatekey_file(ctx: *mut SslCtx, file: &CStr) -> bool { + // SAFETY: live SSL_CTX; NUL-terminated path. + unsafe { SSL_CTX_use_PrivateKey_file(ctx, file.as_ptr(), SSL_FILETYPE_PEM) == 1 } +} + +/// `us_ssl_ctx_use_certificate_chain` (openssl.c:812-863): PEM_read_bio_ +/// X509_AUX leaf + add0 chain certs; trailing NO_START_LINE tolerated. +pub fn ctx_use_certificate_chain_content(ctx: *mut SslCtx, content: &CStr) -> bool { + err_clear_error(); + let bytes = content.to_bytes(); + if bytes.len() > c_int::MAX as usize { + return false; + } + // SAFETY: mem BIO borrows `content` for the duration of this call only; + // X509_free/BIO_free are null-tolerant. + unsafe { + let bio = BIO_new_mem_buf(content.as_ptr().cast::(), bytes.len() as c_int); + if bio.is_null() { + return false; + } + let cb = SSL_CTX_get_default_passwd_cb(ctx); + let u = SSL_CTX_get_default_passwd_cb_userdata(ctx); + let x = PEM_read_bio_X509_AUX(bio, ptr::null_mut(), cb, u); + let mut ret = false; + if !x.is_null() { + ret = SSL_CTX_use_certificate(ctx, x) == 1; + if err_peek_error() != 0 { + ret = false; + } + if ret { + SSL_CTX_clear_chain_certs(ctx); + loop { + let ca = PEM_read_bio_X509(bio, ptr::null_mut(), cb, u); + if ca.is_null() { + break; + } + if SSL_CTX_add0_chain_cert(ctx, ca) != 1 { + X509_free(ca); + ret = false; + break; + } + } + if ret { + let err = err_peek_last_error(); + if err_get_lib(err) == ERR_LIB_PEM && err_get_reason(err) == PEM_R_NO_START_LINE + { + err_clear_error(); + } else { + ret = false; + } + } + } + } + X509_free(x); + BIO_free(bio); + ret + } +} + +/// `us_ssl_ctx_use_privatekey_content` (openssl.c:734-766), PEM or DER. +pub fn ctx_use_privatekey_content(ctx: *mut SslCtx, content: &CStr, pem: bool) -> bool { + let bytes = content.to_bytes(); + if bytes.len() > c_int::MAX as usize { + return false; + } + // SAFETY: mem BIO borrows `content` for the duration of this call only. + unsafe { + let bio = BIO_new_mem_buf(content.as_ptr().cast::(), bytes.len() as c_int); + if bio.is_null() { + return false; + } + let pkey = if pem { + let cb = SSL_CTX_get_default_passwd_cb(ctx); + let u = SSL_CTX_get_default_passwd_cb_userdata(ctx); + PEM_read_bio_PrivateKey(bio, ptr::null_mut(), cb, u) + } else { + d2i_PrivateKey_bio(bio, ptr::null_mut()) + }; + let mut ret = false; + if !pkey.is_null() { + ret = SSL_CTX_use_PrivateKey(ctx, pkey) == 1; + EVP_PKEY_free(pkey); + } + BIO_free(bio); + ret + } +} + +/// `add_ca_cert_to_ctx_store` (openssl.c:768-810): adds each PEM cert to the +/// store AND client-CA list; a PEM doc with zero certs but a `-----BEGIN ` +/// block is tolerated Node-style; non-PEM is an error. +pub fn add_ca_cert_to_store(ctx: *mut SslCtx, content: &CStr, store: *mut X509_STORE) -> bool { + err_clear_error(); + let bytes = content.to_bytes(); + if bytes.len() > c_int::MAX as usize { + return false; + } + let mut count = 0usize; + // SAFETY: mem BIO borrows `content` for the duration of this call only. + unsafe { + let bio = BIO_new_mem_buf(content.as_ptr().cast::(), bytes.len() as c_int); + if bio.is_null() { + return false; + } + let cb = SSL_CTX_get_default_passwd_cb(ctx); + let u = SSL_CTX_get_default_passwd_cb_userdata(ctx); + loop { + let x = PEM_read_bio_X509(bio, ptr::null_mut(), cb, u); + if x.is_null() { + break; + } + X509_STORE_add_cert(store, x); + if SSL_CTX_add_client_CA(ctx, x) != 1 { + X509_free(x); + BIO_free(bio); + return false; + } + count += 1; + X509_free(x); + } + BIO_free(bio); + } + if count == 0 { + let pem_err = err_peek_last_error(); + let tolerated = pem_err == 0 + || (err_get_lib(pem_err) == ERR_LIB_PEM + && err_get_reason(pem_err) == PEM_R_NO_START_LINE); + if tolerated && contains_begin_block(bytes) { + err_clear_error(); + return true; + } + return false; + } + err_clear_error(); + true +} + +fn contains_begin_block(content: &[u8]) -> bool { + const NEEDLE: &[u8] = b"-----BEGIN "; + content.windows(NEEDLE.len()).any(|w| w == NEEDLE) +} + +/// ca_file_name branch (openssl.c:984-997): `SSL_load_client_CA_file` + +/// `SSL_CTX_set_client_CA_list`; false = LOAD_CA_FILE. +pub fn ctx_load_client_ca_file(ctx: *mut SslCtx, file: &CStr) -> bool { + // SAFETY: live SSL_CTX; NUL-terminated path; list ownership transfers. + unsafe { + let list = SSL_load_client_CA_file(file.as_ptr()); + if list.is_null() { + return false; + } + SSL_CTX_set_client_CA_list(ctx, list); + true + } +} + +pub fn ctx_load_verify_locations(ctx: *mut SslCtx, file: &CStr) -> bool { + // SAFETY: live SSL_CTX; NUL-terminated path. + unsafe { SSL_CTX_load_verify_locations(ctx, file.as_ptr(), ptr::null()) == 1 } +} + +pub fn ctx_get_cert_store(ctx: *const SslCtx) -> *mut X509_STORE { + // SAFETY: live SSL_CTX per contract. + unsafe { SSL_CTX_get_cert_store(ctx) } +} + +/// Ownership of `store` transfers to the CTX. +pub fn ctx_set_cert_store(ctx: *mut SslCtx, store: *mut X509_STORE) { + // SAFETY: live SSL_CTX; store ownership transfers. + unsafe { SSL_CTX_set_cert_store(ctx, store) }; +} + +pub fn x509_store_free(store: *mut X509_STORE) { + // SAFETY: releases one owned ref (null-tolerant). + unsafe { X509_STORE_free(store) }; +} + +pub fn x509_store_is_empty(store: *mut X509_STORE) -> bool { + // SAFETY: live store; get0 returns a borrowed stack. + unsafe { + let objs = X509_STORE_get0_objects(store); + objs.is_null() || OPENSSL_sk_num(objs) == 0 + } +} + +/// dh_params_file_name (openssl.c:1033-1052): fopen + PEM_read_DHparams + +/// SSL_CTX_set_tmp_dh; any failure = build failure with no error tag. +pub fn ctx_set_dh_params_from_file(ctx: *mut SslCtx, path: &CStr) -> bool { + // SAFETY: NUL-terminated path; FILE closed before return; DH freed after + // set_tmp_dh (which copies). + unsafe { + let file = libc::fopen(path.as_ptr(), c"r".as_ptr()); + if file.is_null() { + return false; + } + let dh = PEM_read_DHparams(file, ptr::null_mut(), None, ptr::null_mut()); + libc::fclose(file); + if dh.is_null() { + return false; + } + let ok = SSL_CTX_set_tmp_dh(ctx, dh) == 1; + DH_free(dh); + ok + } +} + +pub fn ctx_set_cipher_list(ctx: *mut SslCtx, ciphers: &CStr) -> bool { + // SAFETY: live SSL_CTX; NUL-terminated list. + unsafe { SSL_CTX_set_cipher_list(ctx, ciphers.as_ptr()) == 1 } +} + +/// Empty-string + NO_CIPHER_MATCH is the one tolerated cipher failure; the +/// error is PEEKED not consumed so the caller can decompose the reason. +pub fn cipher_failure_tolerated(ciphers: &CStr) -> bool { + ciphers.to_bytes().is_empty() && err_get_reason(err_peek_error()) == SSL_R_NO_CIPHER_MATCH +} + +/// Session-cache mode + new-session cb + keylog cb (openssl.c:1077-1086). +pub fn ctx_install_session_callbacks(ctx: *mut SslCtx) { + // SAFETY: live SSL_CTX; callbacks are 'static. + unsafe { + SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_MODE); + SSL_CTX_sess_set_new_cb(ctx, Some(new_session_cb)); + SSL_CTX_set_keylog_callback(ctx, Some(keylog_cb)); + } +} + +// ── Root certs (surviving C++ providers) ───────────────────────────────────── + +/// Fresh full default store (bundled + NODE_EXTRA_CA_CERTS + system CAs when +/// enabled); caller owns the returned ref. +pub fn default_ca_store() -> *mut X509_STORE { + // SAFETY: root_certs.cpp API, no preconditions. + unsafe { us_get_default_ca_store() } +} + +/// Process-shared immutable store; UP-REF'D PER RETURN — caller must free. +pub fn shared_default_ca_store() -> *mut X509_STORE { + // SAFETY: root_certs.cpp API, no preconditions. + unsafe { us_get_shared_default_ca_store() } +} + +/// `DEFAULT_CIPHER_LIST` — static string from root_certs.cpp. +pub fn default_ciphers() -> &'static CStr { + // SAFETY: returns a pointer to a static string literal. + unsafe { CStr::from_ptr(us_get_default_ciphers()) } +} + +// ── PKCS#12 (openssl.c:1140-1232) ──────────────────────────────────────────── + +pub struct Pkcs12Pem { + pub key: Vec, + pub cert: Vec, + pub ca: Option>, +} + +fn pem_from_bio(bio: *mut BIO) -> Option> { + // SAFETY: bio is a live mem BIO; BIO_get_mem_data borrows its buffer. + unsafe { + let mut mem: *mut c_char = ptr::null_mut(); + let n = BIO_get_mem_data(bio, &raw mut mem); + if n <= 0 || mem.is_null() { + return None; + } + Some(core::slice::from_raw_parts(mem.cast::(), n as usize).to_vec()) + } +} + +/// `us_ssl_parse_pkcs12`: PKCS#12 blob (+pass) → PEM key/cert/ca. Error tags: +/// "parse" (not PKCS#12 / len > INT_MAX), "mac" (bad pass), "key", "cert". +pub fn parse_pkcs12(data: &[u8], pass: Option<&CStr>) -> Result { + if data.len() > c_int::MAX as usize { + // BIO_new_mem_buf takes an int; a negative len silently misparses. + return Err("parse"); + } + // SAFETY: mem BIOs borrow `data` only within this call; every OpenSSL + // object created below is freed on all paths before return. + unsafe { + let bio = BIO_new_mem_buf(data.as_ptr().cast::(), data.len() as c_int); + if bio.is_null() { + return Err("parse"); + } + let p12 = d2i_PKCS12_bio(bio, ptr::null_mut()); + BIO_free(bio); + if p12.is_null() { + err_clear_error(); + return Err("parse"); + } + let mut pkey: *mut EVP_PKEY = ptr::null_mut(); + let mut cert: *mut X509 = ptr::null_mut(); + let mut extra: *mut OPENSSL_STACK = ptr::null_mut(); + let pass_ptr = pass.map_or(c"".as_ptr(), CStr::as_ptr); + let parsed = PKCS12_parse(p12, pass_ptr, &raw mut pkey, &raw mut cert, &raw mut extra) == 1; + + let cleanup = |tag: &'static str| -> &'static str { + if !pkey.is_null() { + EVP_PKEY_free(pkey); + } + if !cert.is_null() { + X509_free(cert); + } + if !extra.is_null() { + for i in 0..OPENSSL_sk_num(extra) { + X509_free(OPENSSL_sk_value(extra, i).cast::()); + } + OPENSSL_sk_free(extra); + } + PKCS12_free(p12); + err_clear_error(); + tag + }; + + if !parsed { + return Err(cleanup("mac")); + } + if pkey.is_null() { + return Err(cleanup("key")); + } + if cert.is_null() { + return Err(cleanup("cert")); + } + + let kb = BIO_new(BIO_s_mem()); + let cb = BIO_new(BIO_s_mem()); + let mut out: Result = Err("parse"); + if !kb.is_null() + && !cb.is_null() + && PEM_write_bio_PrivateKey( + kb, + pkey, + ptr::null(), + ptr::null(), + 0, + None, + ptr::null_mut(), + ) == 1 + && PEM_write_bio_X509(cb, cert) == 1 + { + if let (Some(key), Some(cert_pem)) = (pem_from_bio(kb), pem_from_bio(cb)) { + let mut ca = None; + if !extra.is_null() && OPENSSL_sk_num(extra) > 0 { + let ab = BIO_new(BIO_s_mem()); + if !ab.is_null() { + for i in 0..OPENSSL_sk_num(extra) { + PEM_write_bio_X509(ab, OPENSSL_sk_value(extra, i).cast::()); + } + ca = pem_from_bio(ab); + BIO_free(ab); + } + } + out = Ok(Pkcs12Pem { + key, + cert: cert_pem, + ca, + }); + } + } + if !kb.is_null() { + BIO_free(kb); + } + if !cb.is_null() { + BIO_free(cb); + } + match out { + Ok(pem) => { + let _ = cleanup(""); + Ok(pem) + } + Err(tag) => Err(cleanup(tag)), + } + } +} diff --git a/src/usockets/unsafe_core/deref.rs b/src/usockets/unsafe_core/deref.rs new file mode 100644 index 000000000000..a851e780e380 --- /dev/null +++ b/src/usockets/unsafe_core/deref.rs @@ -0,0 +1,23 @@ +//! Closure-scoped reborrows of loop-owned raw pointers for `deny(unsafe_code)` +//! modules. Scoping guarantees no borrow spans a dispatch that can re-enter +//! consumer code (C17); slab/loop storage never frees while the loop lives. + +use crate::group::SocketGroup; +use crate::socket::us_socket_t; + +/// Contract: `group` is a live loop-linked group on the loop thread; `f` does +/// not re-borrow it (no dispatch inside `f`). +#[inline] +pub(crate) fn with_group(group: *mut SocketGroup, f: impl FnOnce(&mut SocketGroup) -> R) -> R { + // SAFETY: per fn contract; the exclusive borrow ends when `f` returns. + unsafe { f(&mut *group) } +} + +/// Contract: `s` is a live slab-resident header on the loop thread; `f` does +/// not re-borrow it (no dispatch inside `f`). +#[inline] +pub(crate) fn with_socket(s: *mut us_socket_t, f: impl FnOnce(&mut us_socket_t) -> R) -> R { + // SAFETY: per fn contract; slab slots never move or free while the loop + // lives (docs/design.md §Strategy 1); the exclusive borrow ends when `f` returns. + unsafe { f(&mut *s) } +} diff --git a/src/usockets/unsafe_core/ext.rs b/src/usockets/unsafe_core/ext.rs new file mode 100644 index 000000000000..a4e31651fda7 --- /dev/null +++ b/src/usockets/unsafe_core/ext.rs @@ -0,0 +1,215 @@ +//! Kind-tag-checked ext downcast — the single funnel (`downcast_raw`, plus +//! the reference-forming `downcast` wrapper) for typed `us_socket_t::ext()` +//! / handler trampoline access (docs/design.md §Crate layout). Storage class is +//! decided by `dispatch::uses_group_vtable`: +//! group-vtable kinds (uWS/Dynamic) use the slab slot's INLINE ext area, +//! contiguous after the header and sized by the family-max ext size at +//! creation; static-kind Rust sockets store ext IN the 8-byte word. + +use core::marker::PhantomData; +use core::ptr::NonNull; + +use crate::socket::SocketHeader; +use crate::unsafe_core::slab; + +/// Per-use ext access token handed to `Handler` callbacks. Holds only a raw +/// pointer derived from the header's raw chain — every deref is a reborrow +/// scoped to a single `with` call, so C17-legal synchronous re-entry +/// (close/write/adopt from inside a callback, which reborrows the header via +/// `header_mut` and re-downcasts ext in nested dispatch) never overlaps a +/// live `&mut` to the same storage. +pub struct ExtMut<'a, T> { + ptr: NonNull, + _frame: PhantomData<&'a mut T>, +} + +impl ExtMut<'_, T> { + pub(crate) fn new(ptr: NonNull) -> Self { + Self { + ptr, + _frame: PhantomData, + } + } + + /// Run `f` on the ext under a borrow scoped to `f` alone. Invariant: `f` + /// must not re-enter dispatch on the same socket — re-entrant calls + /// (close/adopt/write) are legal only outside `with` (C17). + pub fn with(&mut self, f: impl FnOnce(&mut T) -> R) -> R { + // SAFETY: `ptr` is live ext storage for the whole callback frame + // (deferred free, C6); exclusive during `f` per the invariant above. + f(unsafe { self.ptr.as_mut() }) + } + + /// Raw storage pointer, for identity checks / unsafe_core-side plumbing. + pub fn as_ptr(&self) -> NonNull { + self.ptr + } +} + +/// Compute the typed ext storage pointer. Kind-checked, mirroring +/// `socket::alloc`'s storage rule: group-vtable kinds (uWS/Dynamic) use the +/// slot's inline ext area (fixed header+1 projection, LIBUS_EXT_ALIGNMENT- +/// aligned); static-kind Rust sockets use the header word itself (so `T` +/// must fit a pointer word — the vtable generator const-asserts this per +/// handler). Forms NO reference: callers reborrow per use (`ExtMut::with`) +/// so re-entrant dispatch never aliases a live `&mut`. +/// +/// # Safety +/// `s` must be a live slab-resident header whose ext storage was sized for +/// `T` at creation (only debug size/align asserts back this up). +pub(crate) unsafe fn downcast_raw(s: *mut SocketHeader) -> NonNull { + // SAFETY: caller guarantees `s` is a live slab-resident header. + let kind = unsafe { (*s).kind }; + debug_assert!( + !matches!(kind, crate::kind::SocketKind::Invalid), + "ext read on kind=invalid socket" + ); + let storage: *mut T = if crate::dispatch::uses_group_vtable(kind) { + debug_assert!( + core::mem::align_of::() <= crate::LIBUS_EXT_ALIGNMENT, + "inline ext area type over-aligned" + ); + // SAFETY: `s` is a live slab slot (caller contract). + let nn = unsafe { NonNull::new_unchecked(s) }; + debug_assert!( + core::mem::size_of::() <= slab::inline_ext_capacity_of(nn) as usize, + "typed ext read exceeds the slot's inline ext capacity" + ); + match slab::inline_ext_of(nn) { + Some(area) => area.as_ptr().cast::(), + // Capacity-0 slot (e.g. a group-vtable connect attempt whose ext + // word was copied from the connecting socket): the word is the + // area pointer, matching the pre-inline storage rule. + None => { + // SAFETY: caller guarantees `s` is live; plain field read. + let area = unsafe { (*s).ext }; + debug_assert!( + !area.is_null(), + "typed ext read on a group-vtable socket created with socket_ext_size 0" + ); + area.cast::() + } + } + } else { + debug_assert!( + core::mem::size_of::() <= core::mem::size_of::<*mut core::ffi::c_void>() + && core::mem::align_of::() <= core::mem::align_of::<*mut core::ffi::c_void>(), + "Rust-kind ext type does not fit the 8-byte ext word" + ); + // SAFETY: caller guarantees `s` is a live header; this is a raw place + // projection to the ext word, no reference is formed. + unsafe { &raw mut (*s).ext }.cast::() + }; + // SAFETY: the word branch is a field address of a non-null header; the + // area branch is the creation-time allocation (debug-asserted non-null). + unsafe { NonNull::new_unchecked(storage) } +} + +/// Reference-forming wrapper over [`downcast_raw`] — the funnel for +/// `us_socket_t::ext()`-style typed access outside the trampolines. +/// +/// # Safety +/// [`downcast_raw`]'s contract, plus: the returned borrow must not outlive +/// the current callback frame nor overlap another `&mut` to the same ext. +pub unsafe fn downcast<'a, T>(s: *mut SocketHeader) -> &'a mut T { + // SAFETY: forwarded caller contract; exclusivity per the doc above. + unsafe { downcast_raw::(s).as_mut() } +} + +/// Deref an owner-word snapshot; `None` (created-but-not-yet-stamped window) +/// is a no-op. Funnel for `handle::ExtSlot::owner_mut` — the invariant that +/// the stamped owner is live and unaliased is ExtSlot's non-re-entrancy +/// contract. +pub(crate) fn owner_mut<'a, T>(slot: Option>) -> Option<&'a mut T> { + // SAFETY: the consumer stamped a live owner into the slot and ExtSlot's + // contract forbids an overlapping `&mut T` while the borrow lives. + slot.map(|mut p| unsafe { p.as_mut() }) +} + +/// Reborrow a live slab-resident header (slab memory never unmapped while +/// the loop lives, docs/design.md §Strategy 2); the borrow ends before any re-entrant +/// `&mut` to the same slot (C17). The reborrow covers the `ext` word — sound +/// because trampolines never hold an ext borrow across a handler call: every +/// ext deref is a per-use `ExtMut::with` scope over `downcast_raw`'s pointer. +pub(crate) fn header_mut<'a>(s: *mut SocketHeader) -> &'a mut SocketHeader { + debug_assert!(!s.is_null()); + // SAFETY: per the invariant above — slab slots are never freed mid-tick. + unsafe { &mut *s } +} + +/// Reborrow non-header crate-reachable storage (embedded `SocketGroup`, +/// `Loop`, connecting slab slot, leaked listener box) for the current call +/// frame. Invariant: `p` is non-null and live, and the borrow ends before any +/// re-entrant call that derives another `&mut` to the same object (C17). +pub(crate) fn deref_mut<'a, T>(p: *mut T) -> &'a mut T { + debug_assert!(!p.is_null()); + // SAFETY: per the invariant above — same contract as `header_mut`. + unsafe { &mut *p } +} + +/// Inline ext pointer for a freshly allocated group-vtable socket slot, or +/// null when the slot's class carries no ext bytes. `socket::alloc` stamps +/// this into the header's `ext` word (docs/design.md §Strategy 3, inline form). +pub(crate) fn inline_ext_ptr(s: *mut SocketHeader) -> *mut core::ffi::c_void { + debug_assert!(!s.is_null()); + // SAFETY: `s` is a live slab slot (only called on just-allocated slots). + let nn = unsafe { NonNull::new_unchecked(s) }; + slab::inline_ext_of(nn).map_or(core::ptr::null_mut(), |p| p.as_ptr().cast()) +} + +/// Reclaim + drop a `Box` previously leaked via `Box::into_raw` / +/// `bun_core::heap::into_raw`. Invariant: dropped exactly once, unborrowed. +pub(crate) fn drop_box(p: *mut T) { + debug_assert!(!p.is_null()); + // SAFETY: per the invariant above; same allocator (Box). + drop(unsafe { Box::from_raw(p) }); +} + +/// `(ptr, len)` → `&[u8]`; null/0 → empty (trampoline input lowering). +/// +/// # Safety +/// When non-null, `ptr` must be valid for `len` bytes for the duration of +/// the borrow. +pub(crate) unsafe fn c_slice<'a>(ptr: *mut u8, len: usize) -> &'a [u8] { + if ptr.is_null() || len == 0 { + return &[]; + } + // SAFETY: caller guarantees `ptr[0..len]` is readable. + unsafe { core::slice::from_raw_parts(ptr, len) } +} + +/// Mutable variant of [`c_slice`] (recv_buf views handed to Protocol v2 +/// `on_data`, writable for in-place unmasking). +/// +/// # Safety +/// When non-null, `ptr` must be valid for `len` bytes of exclusive access for +/// the duration of the borrow. +pub(crate) unsafe fn c_slice_mut<'a>(ptr: *mut u8, len: usize) -> &'a mut [u8] { + if ptr.is_null() || len == 0 { + return &mut []; + } + // SAFETY: caller guarantees `ptr[0..len]` is exclusively writable. + unsafe { core::slice::from_raw_parts_mut(ptr, len) } +} + +/// Raw ext storage pointer (same rule as [`downcast_raw`] / `SocketHeader:: +/// ext_ptr`): group-vtable kinds get the slot's inline ext area (fixed +/// header+1 projection; capacity-0 slots fall back to the ext word's value), +/// static Rust kinds project the 8-byte ext word itself. Forms NO `&mut +/// SocketHeader`, so the pointer survives later header reborrows (C17 — +/// consumers hold it across dispatch). +pub(crate) fn ext_ptr_raw(s: *mut SocketHeader) -> *mut u8 { + debug_assert!(!s.is_null()); + // SAFETY: live slab-resident header (slab mappings never unmapped while + // the loop lives); raw place projections only, no reference formed. + unsafe { + if crate::dispatch::uses_group_vtable((*s).kind) { + match slab::inline_ext_of(NonNull::new_unchecked(s)) { + Some(area) => area.as_ptr(), + None => (*s).ext.cast(), + } + } else { + (&raw mut (*s).ext).cast() + } + } +} diff --git a/src/usockets/unsafe_core/ffi.rs b/src/usockets/unsafe_core/ffi.rs new file mode 100644 index 000000000000..774ccf0df972 --- /dev/null +++ b/src/usockets/unsafe_core/ffi.rs @@ -0,0 +1,2387 @@ +//! FFI boundary helpers: bssl-sys / libuv / lsquic edges, plus the reverse +//! hooks the deleted C used to import (docs/cabi.md §2 — Bun__lock/unlock +//! on the loop mutex, Bun__addrinfo_* DNS bridge, quic pre/post hooks). +//! Everything crossing OUT of the crate lives here or in cabi.rs. + +use core::ffi::c_void; + +use crate::loop_::Loop; + +#[allow(improper_ctypes)] +unsafe extern "C" { + /// `bun_threading::Mutex` exports (src/threading/Mutex.rs:399-412); the + /// pointee is the `LoopDataMutex` word embedded in `InternalLoopData`. + fn Bun__lock(ptr: *mut c_void); + fn Bun__unlock(ptr: *mut c_void); + static Bun__lock__size: usize; +} + +/// Lock the loop's defer mutex (`Bun__lock`-compatible word). Callable from +/// ANY thread (R10.6 — dns_ready is the only mutex-guarded loop state). +pub(crate) fn lock_loop_mutex(loop_: *mut Loop) { + // SAFETY: raw field projection to the mutex word (zero-init == unlocked; + // the loop is calloc'd); `Bun__lock` is the canonical accessor (R1.4). + unsafe { Bun__lock((&raw mut (*loop_).internal_loop_data.mutex).cast()) } +} + +pub(crate) fn unlock_loop_mutex(loop_: *mut Loop) { + // SAFETY: this thread holds the lock taken via `lock_loop_mutex`. + unsafe { Bun__unlock((&raw mut (*loop_).internal_loop_data.mutex).cast()) } +} + +/// R1.4 ABI check: the embedded mutex word must be exactly what `Bun__lock` +/// expects (mirrors the C ASSERT_ENABLED panic, loop.c:138-142). +pub(crate) fn assert_mutex_abi() { + if cfg!(debug_assertions) { + // SAFETY: plain read of an extern static usize. + let expected = unsafe { Bun__lock__size }; + assert!( + core::mem::size_of::() == expected, + "The size of the mutex must match the size of the lock" + ); + } +} + +#[allow(improper_ctypes)] +unsafe extern "C" { + /// quic.c (survives; this crate is its platform layer — docs/cabi.md §6). + fn us_quic_loop_process(loop_: *mut Loop); +} + +/// quic.c hook: `us_quic_loop_process(loop)` when `quic_head != null`, from +/// both loop pre and post (docs/cabi.md §2.2/§6). +pub(crate) fn quic_loop_process(loop_: *mut Loop) { + // SAFETY: loop-thread call; quic.c walks only its own quic_head state. + unsafe { us_quic_loop_process(loop_) } +} + +/// Sweep refcount 0→1 hook (docs/semantics.md R12.9/R5.5): keeps Bun.serve's +/// Date-header timer running while sockets exist. +pub(crate) fn ensure_date_header_timer_is_enabled(loop_: *mut Loop) { + #[allow(improper_ctypes)] + unsafe extern "C" { + fn Bun__internal_ensureDateHeaderTimerIsEnabled(loop_: *mut Loop); + } + // SAFETY: symbol defined in bun_runtime (timer/DateHeaderTimer.rs); the + // loop is live for the duration of the call. + unsafe { Bun__internal_ensureDateHeaderTimerIsEnabled(loop_) } +} + +/// libuv sweep-timer arm on refcount 0→1 (R5.5 libuv arm): repeating 4000 ms +/// `us_timer_set(sweep_timer, timer_sweep cb)`. Re-arms after the first enable +/// early-return per the preserved OQ-16 quirk (timer never actually stops). +#[cfg(windows)] +pub(crate) fn arm_libuv_sweep_timer(loop_: *mut Loop) { + let sweep_timer = ld_sweep_timer(loop_).cast::(); + crate::backend::libuv::Timer::set( + sweep_timer, + Some(crate::backend::libuv::sweep_timer_cb), + 4000, + 4000, + ); +} + +// ── cabi delegation seams ──────────────────────────────────────────────────── +// Only caller: cabi.rs. Contracts mirror the deleted C (docs/cabi.md §1). + +use core::ffi::{c_char, c_int}; + +use crate::handle::ListenSocket; +use crate::socket::us_socket_t; +use crate::tls::context::SslCtx; + +// ── loop allocation block ─────────────────────────────────────────────── +// Layout: [16-byte prefix holding the total block size][Loop][ext bytes]. +// The prefix keeps `us_loop_ext(loop) == loop + 1` (cabi contract) while +// letting `free_loop_block` rebuild the dealloc Layout without a size arg. + +const LOOP_BLOCK_PREFIX: usize = crate::LIBUS_EXT_ALIGNMENT; + +fn loop_block_layout(total: usize) -> core::alloc::Layout { + core::alloc::Layout::from_size_align(total, crate::LIBUS_EXT_ALIGNMENT).expect("loop layout") +} + +/// Zeroed `Loop` + trailing ext allocation. All-zero is valid for every field +/// except the slabs, which the caller `ptr::write`s before use. +fn alloc_loop_block(ext_size: usize) -> *mut Loop { + let total = LOOP_BLOCK_PREFIX + core::mem::size_of::() + ext_size; + // SAFETY: non-zero layout; prefix write stays inside the allocation. + unsafe { + let base = std::alloc::alloc_zeroed(loop_block_layout(total)); + if base.is_null() { + bun_core::out_of_memory(); + } + base.cast::().write(total); + base.add(LOOP_BLOCK_PREFIX).cast::() + } +} + +fn free_loop_block(loop_: *mut Loop) { + // SAFETY: `loop_` came from `alloc_loop_block`; the prefix holds the + // exact size the block was allocated with. + unsafe { + let base = loop_.cast::().sub(LOOP_BLOCK_PREFIX); + let total = base.cast::().read(); + std::alloc::dealloc(base, loop_block_layout(total)); + } +} + +/// malloc-parity byte buffer for `recv_buf`/`send_buf` (16-aligned for the +/// SIMD unmask over-read contract). +fn alloc_loop_buf(len: usize) -> *mut u8 { + // SAFETY: non-zero fixed-size layout. + unsafe { + let p = std::alloc::alloc( + core::alloc::Layout::from_size_align(len, crate::LIBUS_EXT_ALIGNMENT).expect("buf"), + ); + if p.is_null() { + // R1.4: a NULL recv_buf would make every read fail with EFAULT + // for the life of the process (loop.c:131-133). + bun_core::out_of_memory(); + } + p + } +} + +fn free_loop_buf(p: *mut u8, len: usize) { + if p.is_null() { + return; + } + // SAFETY: allocated by `alloc_loop_buf` with the same layout. + unsafe { + std::alloc::dealloc( + p, + core::alloc::Layout::from_size_align(len, crate::LIBUS_EXT_ALIGNMENT).expect("buf"), + ); + } +} + +const RECV_BUF_BYTES: usize = + crate::LIBUS_RECV_BUFFER_LENGTH + 2 * crate::LIBUS_RECV_BUFFER_PADDING; + +/// `us_create_loop` (epoll_kqueue.c:157): zero-alloc `size_of::() + +/// ext_size` at LIBUS_EXT_ALIGNMENT, create the backend poller (`Loop.fd`), +/// init loop data (recv/send bufs, wakeup poll carrying `wakeup_cb`, mutex, +/// pre/post cbs). `hint` = existing native loop (libuv) or null. +/// +/// # Safety +/// Callbacks must be valid for the loop's lifetime. +pub(crate) unsafe fn create_loop_raw( + hint: *mut c_void, + wakeup_cb: Option, + pre_cb: Option, + post_cb: Option, + ext_size: usize, +) -> *mut Loop { + let loop_ = alloc_loop_block(ext_size); + // SAFETY: fresh zeroed block — the slab Vecs must be written (all-zero + // Vec is invalid); every other field's zero state is its init value. + unsafe { + core::ptr::write( + &raw mut (*loop_).sockets, + crate::unsafe_core::slab::ChunkedSlab::new(), + ); + core::ptr::write( + &raw mut (*loop_).connectings, + crate::unsafe_core::slab::ChunkedSlab::new(), + ); + core::ptr::write( + &raw mut (*loop_).polls, + crate::unsafe_core::slab::ChunkedSlab::new(), + ); + } + + #[cfg(not(windows))] + { + let _ = hint; + #[cfg(any(target_os = "linux", target_os = "android"))] + let fd = { + let fd = crate::unsafe_core::poll_access::epoll_create_cloexec(); + crate::unsafe_core::poll_access::probe_epoll_pwait2(); + fd + }; + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + let fd = crate::unsafe_core::poll_access::kqueue_create(); + // SAFETY: exclusive access — the loop is not yet published. + unsafe { + (*loop_).fd = fd; + (*loop_).internal_loop_data.sweep_next_tick_ns = -1; + } + } + + #[cfg(windows)] + { + if crate::backend::libuv::loop_init(loop_, hint) != 0 { + free_loop_block(loop_); + return core::ptr::null_mut(); + } + // SAFETY: exclusive access — the loop is not yet published. + unsafe { + // R1.4 libuv arm: sweep timer created up front (fallthrough). + (*loop_).internal_loop_data.sweep_timer = timer_create(loop_, true, 0).cast::(); + } + } + + // SAFETY: exclusive access; buffers are owned by the loop until + // free_loop_raw. + unsafe { + let ld = &raw mut (*loop_).internal_loop_data; + (*ld).recv_buf = alloc_loop_buf(RECV_BUF_BYTES); + (*ld).send_buf = alloc_loop_buf(crate::udp::LIBUS_SEND_BUFFER_LENGTH); + (*ld).pre_cb = pre_cb; + (*ld).post_cb = post_cb; + } + assert_mutex_abi(); + + // Wakeup async last — its registration targets the live poller fd. + #[cfg(not(windows))] + let wakeup_async = crate::loop_::wakeup::create_async(loop_, wakeup_cb); + #[cfg(windows)] + let wakeup_async = crate::backend::libuv::create_wakeup_async( + loop_, + wakeup_cb.expect("us_create_loop requires a wakeup_cb"), + ); + // SAFETY: exclusive access — still unpublished. + unsafe { + (*loop_).internal_loop_data.wakeup_async = wakeup_async; + } + loop_ +} + +/// Safe creation front-door for `'static` fn-item callbacks (`LoopHandler` +/// consts) — the only lifetime obligation `create_loop_raw` carries. +pub(crate) fn create_loop_static( + wakeup_cb: Option, + pre_cb: Option, + post_cb: Option, + ext_size: usize, +) -> *mut Loop { + // SAFETY: fn items are 'static; no other precondition exists. + unsafe { create_loop_raw(core::ptr::null_mut(), wakeup_cb, pre_cb, post_cb, ext_size) } +} + +/// `us_loop_free` (loop.c:155): close `quic_timer` if armed (libuv), free +/// loop-data buffers + wakeup poll, free the loop+ext block from +/// [`create_loop_raw`]. C++ ran `LoopData::~LoopData()` on the ext already. +/// +/// # Safety +/// `loop_` must come from [`create_loop_raw`] and not be freed twice. +pub(crate) unsafe fn free_loop_raw(loop_: *mut Loop) { + // libuv head (libuv.c:191-199): stop + close the prepare/check hooks + // before loop-data teardown. + #[cfg(windows)] + crate::backend::libuv::loop_close_hooks(loop_); + + // us_internal_loop_data_free (loop.c:145-158). + // SAFETY: loop-thread teardown; nothing else references the loop. + unsafe { + let ld = &raw mut (*loop_).internal_loop_data; + let ssl_data = core::ptr::replace(&raw mut (*ld).ssl_data, core::ptr::null_mut()); + if !ssl_data.is_null() { + // LoopTlsShared::drop frees the parked plaintext scratch. + drop(Box::from_raw( + ssl_data.cast::(), + )); + } + free_loop_buf((*ld).recv_buf, RECV_BUF_BYTES); + free_loop_buf((*ld).send_buf, crate::udp::LIBUS_SEND_BUFFER_LENGTH); + #[cfg(windows)] + { + let sweep = (*ld).sweep_timer.cast::(); + if !sweep.is_null() { + timer_close(sweep, false); + } + let quic = (*ld).quic_timer.cast::(); + if !quic.is_null() { + timer_close(quic, false); + } + crate::backend::libuv::wakeup_async_close((*ld).wakeup_async); + } + #[cfg(not(windows))] + crate::loop_::wakeup::close_async(loop_, (*ld).wakeup_async); + (*ld).wakeup_async = core::ptr::null_mut(); + } + + #[cfg(not(windows))] + // SAFETY: the poller fd is owned by the loop and closed exactly once. + unsafe { + libc::close((*loop_).fd); + } + // Owned uv loops get one NOWAIT drain (fires the pending close + // callbacks queued above) then deletion; hint loops survive. + #[cfg(windows)] + crate::backend::libuv::loop_teardown(loop_); + + // Poll-registry two-phase teardown: take every registered poll's owner word + // and free its slot while the slab is intact; release the refs only + // after the slab borrow ends — an owner destructor may re-enter PollRef + // methods (all stale no-ops now) or even `register` anew (the arm fails + // on the closed fd and self-unwinds), so loop until the slab quiesces. + loop { + let mut live: Vec> = + Vec::new(); + // SAFETY: loop-thread teardown; the borrow covers only the `polls` + // field place and ends before any owner ref is released. + unsafe { (*loop_).polls.for_each_occupied(|p| live.push(p)) }; + if live.is_empty() { + break; + } + let mut owners = Vec::with_capacity(live.len()); + for p in live { + owners.push(crate::loop_::poll_registry::take_owner_for_teardown(p)); + // SAFETY: `p` is an occupied slot of THIS loop's poll slab; its + // owner word was just taken, so the value drop releases nothing. + unsafe { (*loop_).polls.free(p) }; + } + for (ops, word) in owners { + super::trampolines::teardown_poll_owner(ops, word); + } + } + + // Drop the slabs in place (releases every remaining slot value + chunk). + // SAFETY: fields were ptr::written at creation; dropped exactly once. + // The polls slab is quiesced (loop above), so no owner code can run + // under `ChunkedSlab::drop`'s exclusive borrow. + unsafe { + core::ptr::drop_in_place(&raw mut (*loop_).sockets); + core::ptr::drop_in_place(&raw mut (*loop_).connectings); + core::ptr::drop_in_place(&raw mut (*loop_).polls); + } + free_loop_block(loop_); +} + +// ── slab access (only callers: loop_/mod.rs alloc_*/free_*) ───────────────── + +/// Allocate a socket slot straight off the raw slab place — never forms +/// `&mut Loop`, so the span excludes `pending_wakeups`, which other threads +/// `fetch_add` concurrently (R10.1, C17). `ext_capacity` picks the size +/// class carrying that many inline ext bytes after the header (docs/design.md §Ext storage). +pub(crate) fn slab_alloc_socket( + loop_: *mut Loop, + value: us_socket_t, + ext_capacity: usize, +) -> *mut us_socket_t { + // SAFETY: loop-thread call on a live loop; the autoref borrow covers only + // the `sockets` field place. + unsafe { + (*loop_) + .sockets + .alloc_with_ext(value, ext_capacity) + .0 + .as_ptr() + } +} + +/// Connecting-slab twin of [`slab_alloc_socket`] (same aliasing rationale). +pub(crate) fn slab_alloc_connecting( + loop_: *mut Loop, + value: crate::connecting::ConnectingSocket, +) -> *mut crate::connecting::ConnectingSocket { + // SAFETY: see `slab_alloc_socket`. + unsafe { (*loop_).connectings.alloc(value).0.as_ptr() } +} + +/// Return a socket slot to the loop's slab, bumping its generation (the ONLY +/// socket death path — docs/design.md §Strategy 4, C6). +pub(crate) fn slab_free_socket(loop_: *mut Loop, s: *mut us_socket_t) { + let nn = core::ptr::NonNull::new(s).expect("null socket slot"); + // SAFETY: `s` was allocated from THIS loop's socket slab and is freed + // exactly once (drain postlude / failed-registration unwind). + unsafe { (*loop_).sockets.free(nn) } +} + +/// Return a connecting slot to the loop's slab (tick postlude, R1.15). +pub(crate) fn slab_free_connecting(loop_: *mut Loop, c: *mut crate::connecting::ConnectingSocket) { + let nn = core::ptr::NonNull::new(c).expect("null connecting slot"); + // SAFETY: `c` was allocated from THIS loop's connecting slab and is + // freed exactly once (closed_connecting drain). + unsafe { (*loop_).connectings.free(nn) } +} + +/// Registered-poll twin of [`slab_alloc_socket`] (poll registry; same aliasing +/// rationale — never forms `&mut Loop`). +pub(crate) fn slab_alloc_poll( + loop_: *mut Loop, + value: crate::loop_::poll_registry::RegisteredPoll, +) -> *mut crate::loop_::poll_registry::RegisteredPoll { + // SAFETY: see `slab_alloc_socket`. + unsafe { (*loop_).polls.alloc(value).0.as_ptr() } +} + +/// Return a registered-poll slot (generation bump; kernel disarm precedes +/// this — disarm-before-free). Callers must take the owner word out FIRST — the ref +/// release runs outside the slab borrow (RegisteredPoll has no Drop). +pub(crate) fn slab_free_poll( + loop_: *mut Loop, + p: *mut crate::loop_::poll_registry::RegisteredPoll, +) { + let nn = core::ptr::NonNull::new(p).expect("null registered-poll slot"); + // SAFETY: `p` was allocated from THIS loop's poll slab and is freed + // exactly once (unregister / failed-registration unwind). + unsafe { (*loop_).polls.free(nn) } +} + +// ── loop-thread callback invocation + cross-thread wakeup reads ───────── + +/// Invoke a loop-shaped callback (`pre_cb`/`post_cb`/wakeup). May re-enter +/// the loop (C17) — callers must hold no loop borrows. +pub(crate) fn invoke_loop_cb(cb: unsafe extern "C" fn(*mut Loop), loop_: *mut Loop) { + // SAFETY: `cb` was installed at loop creation with loop-lifetime validity. + unsafe { cb(loop_) } +} + +/// Raw read of `loop.data.wakeup_async` — set once at creation, so the read +/// is safe from ANY thread (no reference formed). +pub(crate) fn read_wakeup_async(loop_: *mut Loop) -> *mut crate::loop_::WakeupAsync { + // SAFETY: immutable-after-create field; plain read through a raw place. + unsafe { *core::ptr::addr_of!((*loop_).internal_loop_data.wakeup_async) } +} + +/// GC safepoint before an idle park (R1.10 step 7; C16). POSIX-only: the +/// libuv tick has no idle-park fold, so Windows never reaches this. +#[cfg(not(windows))] +pub(crate) fn jsc_on_before_wait(jsc_vm: *const c_void) { + unsafe extern "C" { + fn Bun__JSC_onBeforeWait(vm: *const c_void); + } + // SAFETY: `jsc_vm` is the non-null VM slot the runtime stored on the loop. + unsafe { Bun__JSC_onBeforeWait(jsc_vm) } +} + +// ── InternalLoopData raw-place field access (tick path — R10.6, C17) ───────── +// `dns_ready_head` is written by resolver threads under Bun__lock and +// `wakeup_async` is raw-read by async_send, so the tick path must never form +// `&mut InternalLoopData` — field-granular raw places only (conn_* twin). +// SAFETY (all helpers below): live loop, loop-thread only, single raw field +// read/modify/write, no reference formed. + +macro_rules! ld_get { + ($($get:ident, $field:ident, $ty:ty);* $(;)?) => {$( + pub(crate) fn $get(loop_: *mut Loop) -> $ty { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of!((*loop_).internal_loop_data.$field) } + } + )*}; +} +macro_rules! ld_set { + ($($set:ident, $field:ident, $ty:ty);* $(;)?) => {$( + pub(crate) fn $set(loop_: *mut Loop, v: $ty) { + // SAFETY: see section comment above. + unsafe { + *core::ptr::addr_of_mut!((*loop_).internal_loop_data.$field) = v; + } + } + )*}; +} + +// POSIX-only readers (the poll-deadline tick in loop_/tick.rs; Windows ticks +// through libuv and never folds quic/GC deadlines itself). +#[cfg(not(windows))] +ld_get! { + ld_quic_next_tick_us, quic_next_tick_us, i64; + ld_jsc_vm, jsc_vm, *const c_void; +} + +ld_get! { + ld_tick_depth, tick_depth, core::ffi::c_int; + ld_quic_head, quic_head, *mut c_void; + ld_pre_cb, pre_cb, Option; + ld_post_cb, post_cb, Option; + ld_low_prio_head, low_prio_head, *mut us_socket_t; + ld_low_prio_budget, low_prio_budget, i32; + ld_group_head, head, *mut crate::group::SocketGroup; + ld_closed_head, closed_head, *mut us_socket_t; + ld_closed_udp_head, closed_udp_head, *mut crate::udp::Socket; + ld_iterator, iterator, *mut crate::group::SocketGroup; + ld_sweep_timer_count, sweep_timer_count, i32; + ld_send_buf, send_buf, *mut u8; + ld_recv_buf, recv_buf, *mut u8; +} +ld_set! { + ld_set_low_prio_head, low_prio_head, *mut us_socket_t; + ld_set_low_prio_budget, low_prio_budget, i32; + ld_set_group_head, head, *mut crate::group::SocketGroup; + ld_set_closed_head, closed_head, *mut us_socket_t; + ld_set_closed_udp_head, closed_udp_head, *mut crate::udp::Socket; + ld_set_iterator, iterator, *mut crate::group::SocketGroup; + ld_set_sweep_timer_count, sweep_timer_count, i32; +} + +#[cfg(not(windows))] +pub(crate) fn ld_sweep_next_tick_ns(loop_: *mut Loop) -> i64 { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of!((*loop_).internal_loop_data.sweep_next_tick_ns) } +} + +#[cfg(not(windows))] +pub(crate) fn ld_set_sweep_next_tick_ns(loop_: *mut Loop, v: i64) { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of_mut!((*loop_).internal_loop_data.sweep_next_tick_ns) = v } +} + +#[cfg(windows)] +pub(crate) fn ld_sweep_timer(loop_: *mut Loop) -> *mut c_void { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of!((*loop_).internal_loop_data.sweep_timer) } +} + +pub(crate) fn ld_tick_depth_add(loop_: *mut Loop, delta: core::ffi::c_int) { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of_mut!((*loop_).internal_loop_data.tick_depth) += delta } +} + +pub(crate) fn ld_iteration_nr_bump(loop_: *mut Loop) { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of_mut!((*loop_).internal_loop_data.iteration_nr) += 1 } +} + +/// Detach the whole closed-socket list (tick postlude drain, R1.15). +pub(crate) fn ld_take_closed_head(loop_: *mut Loop) -> *mut us_socket_t { + // SAFETY: see section comment above. + unsafe { + core::ptr::replace( + core::ptr::addr_of_mut!((*loop_).internal_loop_data.closed_head), + core::ptr::null_mut(), + ) + } +} + +/// Detach the closed-UDP list (tick postlude drain, C6/C15). +pub(crate) fn ld_take_closed_udp_head(loop_: *mut Loop) -> *mut crate::udp::Socket { + // SAFETY: see section comment above. + unsafe { + core::ptr::replace( + core::ptr::addr_of_mut!((*loop_).internal_loop_data.closed_udp_head), + core::ptr::null_mut(), + ) + } +} + +/// Detach the closed-connecting list (tick postlude drain, R6.11). +pub(crate) fn ld_take_closed_connecting_head( + loop_: *mut Loop, +) -> *mut crate::connecting::ConnectingSocket { + // SAFETY: see section comment above. + unsafe { + core::ptr::replace( + core::ptr::addr_of_mut!((*loop_).internal_loop_data.closed_connecting_head), + core::ptr::null_mut(), + ) + } +} + +// ── surviving uWS C++ / quic.c shim entry points ──────────────────────── +// These symbols live in libuwsockets.cpp / bun-uws Loop.h / quic.c, all of +// which SURVIVE the rewrite (docs/cabi.md §7). The C++ defer queues and +// pre/post handler maps stay C++-owned in the loop ext (LoopData). + +#[allow(improper_ctypes)] +unsafe extern "C" { + #[cfg(not(windows))] + fn uws_get_loop() -> *mut Loop; + #[cfg(windows)] + fn uws_get_loop_with_native(native: *mut c_void) -> *mut Loop; + fn uws_loop_defer(loop_: *mut Loop, ctx: *mut c_void, cb: unsafe extern "C" fn(*mut c_void)); + fn uws_res_clear_corked_socket(loop_: *mut Loop); + fn uws_loop_date_header_timer_update(loop_: *mut Loop); + fn us_quic_loop_flush_if_pending(loop_: *mut Loop); + fn bun_clear_loop_at_thread_exit(); +} + +/// This thread's lazily-created default loop (C++ `uWS::Loop::get`, which +/// placement-news `LoopData` in the ext and routes creation back through +/// `us_create_loop`). +#[cfg(not(windows))] +pub(crate) fn default_loop() -> *mut Loop { + // SAFETY: no arguments; thread-local lookup/create in the C++ shim. + unsafe { uws_get_loop() } +} + +/// Windows default loop bound to an existing native (libuv) loop. +#[cfg(windows)] +pub(crate) fn default_loop_with_native(native: *mut c_void) -> *mut Loop { + // SAFETY: `native` is this thread's live uv loop (or null). + unsafe { uws_get_loop_with_native(native) } +} + +/// `uws_loop_defer`: run `cb(ctx)` once on the loop thread next iteration. +/// Cross-thread-safe — the C++ deferMutex/deferQueues own the queueing and +/// `us_wakeup_loop` provides the kick (R10.5: the Rust core adds NO queue). +pub(crate) fn loop_defer( + loop_: *mut Loop, + ctx: *mut c_void, + cb: unsafe extern "C" fn(*mut c_void), +) { + // SAFETY: `cb`/`ctx` outlive the deferred call per the caller's contract. + unsafe { uws_loop_defer(loop_, ctx, cb) } +} + +/// `uws_res_clear_corked_socket` — force-drain both C++ cork slots. +pub(crate) fn clear_corked_socket(loop_: *mut Loop) { + // SAFETY: loop-thread call into the C++ LoopData in the loop ext. + unsafe { uws_res_clear_corked_socket(loop_) } +} + +/// `uws_loop_date_header_timer_update`. +pub(crate) fn date_header_timer_update(loop_: *mut Loop) { + // SAFETY: loop-thread call into the C++ LoopData in the loop ext. + unsafe { uws_loop_date_header_timer_update(loop_) } +} + +/// HTTP/3 stream-write packetization since the last process_conns; the +/// caller early-outs on `quic_head == null`. +pub(crate) fn quic_flush_if_pending(loop_: *mut Loop) { + // SAFETY: loop-thread call; quic.c walks only its own state. + unsafe { us_quic_loop_flush_if_pending(loop_) } +} + +/// Clears the C++ side's thread-local default-loop pointer (Worker exit). +pub(crate) fn clear_loop_at_thread_exit() { + // SAFETY: no arguments; thread-local clear. + unsafe { bun_clear_loop_at_thread_exit() } +} + +/// `us_poll_change` on a poll-first handle: only UDP handles qualify +/// (cabi::us_poll_fd contract; QUIC send backpressure is the surviving +/// caller — docs/cabi.md §1.2). Preserves the low-bits udata tag and is +/// callable from inside poll dispatch (no borrows formed). +/// +/// # Safety +/// `p` must be a live `udp::Socket` registered with `loop_`. +pub(crate) unsafe fn poll_change_raw(p: *mut c_void, loop_: *mut Loop, events: u32) { + super::io::udp_poll_change(loop_, p.cast::(), events) +} + +/// `us_socket_close` with the reason-pointer passthrough to on_close (C3); +/// `code` passed verbatim. Idempotent on already-closed; returns the input +/// pointer (in-place design, docs/design.md §Strategy 3). +/// +/// # Safety +/// `s` must be a live (possibly mid-dispatch) socket header. +pub(crate) unsafe fn socket_close_raw( + s: *mut us_socket_t, + code: c_int, + reason: *mut c_void, +) -> *mut us_socket_t { + // us_socket_close (R3.16): enum-coded closes route through the TLS-aware + // path. Errno-coded closes (>2, incl. uWS forceClose's reason-length + // codes) still send close_notify on TLS sockets, like the C did. + if (0..=2).contains(&code) { + crate::socket::socket_close(s, crate::handle::CloseCode::from_c(code), reason); + } else { + crate::socket::tls_close_errno(s, code, reason); + } + s +} + +/// `us_socket_server_name_userdata` (openssl.c:2528): SNI userdata stashed on +/// the socket's negotiated SSL_CTX; null for plain sockets or when none. +/// +/// # Safety +/// `s` must be a live socket header. +pub(crate) unsafe fn socket_server_name_userdata(s: *mut us_socket_t) -> *mut c_void { + crate::socket::server_name_userdata(s) +} + +/// `us_listen_socket_find_server_name_ctx`: exact-pattern SNI lookup +/// returning an OWNED SSL_CTX ref — the caller unrefs (docs/cabi.md §1.6). +/// +/// # Safety +/// `ls` live and linked; `pattern` NUL-terminated. +pub(crate) unsafe fn listen_socket_find_server_name_ctx( + ls: *mut ListenSocket, + pattern: *const c_char, +) -> *mut SslCtx { + if pattern.is_null() { + return core::ptr::null_mut(); + } + // ListenerData is freed at close (group.rs close_listen_socket) — a + // closed listener has no SNI tree, like C's `if (!ls->sni)` on a freed ls. + let h = crate::unsafe_core::ext::header_mut(ls.cast()); + if h.is_closed() || h.ext.is_null() { + return core::ptr::null_mut(); + } + match crate::group::listener_data(ls).sni.as_ref() { + // SAFETY: `pattern` NUL-terminated per this fn's contract. + Some(sni) => sni.find_ctx(unsafe { core::ffi::CStr::from_ptr(pattern) }), + None => core::ptr::null_mut(), + } +} + +/// `us_create_timer` (libuv only). `fallthrough` = does not keep loop alive. +/// +/// # Safety +/// `loop_` must be live. +#[cfg(windows)] +pub(crate) unsafe fn timer_create( + loop_: *mut Loop, + fallthrough: bool, + ext_size: usize, +) -> *mut crate::backend::libuv::Timer { + uv::timer_create(loop_, fallthrough, ext_size) +} + +/// `us_timer_set`: `ms == 0` disarms (regardless of `repeat_ms`, libuv.c:310); +/// `repeat_ms == 0` = one-shot, else repeating. +/// +/// # Safety +/// `t` from [`timer_create`]; `cb` valid until close. +#[cfg(windows)] +pub(crate) unsafe fn timer_set( + t: *mut crate::backend::libuv::Timer, + cb: Option, + ms: c_int, + repeat_ms: c_int, +) { + uv::timer_set(t, cb, ms, repeat_ms) +} + +/// `us_timer_loop`. +/// +/// # Safety +/// `t` must be live. +#[cfg(windows)] +pub(crate) unsafe fn timer_loop(t: *mut crate::backend::libuv::Timer) -> *mut Loop { + uv::timer_loop(t) +} + +/// `us_timer_close`. +/// +/// # Safety +/// `t` must be live; not used after this call. +#[cfg(windows)] +pub(crate) unsafe fn timer_close(t: *mut crate::backend::libuv::Timer, fallthrough: bool) { + // C ignores `fallthrough` and always refs before closing (libuv.c:277-283). + let _ = fallthrough; + uv::timer_close(t) +} + +/// `us_socket_ref` (libuv arm, socket.c:691): `uv_ref` on the socket's uv +/// poll handle. +/// +/// # Safety +/// `s` must be a live socket header. +#[cfg(windows)] +pub(crate) unsafe fn socket_uv_ref(s: *mut us_socket_t) { + uv::socket_poll_ref(s); +} + +/// `us_socket_unref` (libuv arm, socket.c:736): `uv_unref`. +/// +/// # Safety +/// `s` must be a live socket header. +#[cfg(windows)] +pub(crate) unsafe fn socket_uv_unref(s: *mut us_socket_t) { + uv::socket_poll_unref(s); +} + +// ── DNS bridge: Bun__addrinfo_* five-fn seam (C13, R6.5) ──────────────────── +// Consumed via link-time extern; the Rust dns side (bun_runtime::dns_jsc) +// keeps exporting these `#[no_mangle]`. Signatures mirror the Rust +// definitions at dns.rs (internal.h:140-144 on the C side). + +use core::ptr::addr_of_mut; + +use crate::connecting::{AddrinfoRequest, AddrinfoResult, ConnectingSocket}; + +#[allow(improper_ctypes)] +unsafe extern "C" { + fn Bun__addrinfo_get( + loop_: *mut Loop, + host: *const c_char, + port: u16, + out: *mut *mut AddrinfoRequest, + ) -> c_int; + fn Bun__addrinfo_set(request: *mut AddrinfoRequest, socket: *mut c_void); + fn Bun__addrinfo_cancel(request: *mut AddrinfoRequest, socket: *mut c_void) -> c_int; + fn Bun__addrinfo_freeRequest(request: *mut AddrinfoRequest, invalidate: c_int); + fn Bun__addrinfo_getRequestResult(request: *mut AddrinfoRequest) -> *mut AddrinfoResult; +} + +/// Resolve-or-cache lookup; takes one refcount on the returned request either +/// way. Returns `(request, already_resolved)` — `already_resolved` means the +/// result may be read immediately (it can still be a cached ERROR). +pub(crate) fn addrinfo_get( + loop_: *mut Loop, + host: *const c_char, + port: u16, +) -> (*mut AddrinfoRequest, bool) { + let mut req: *mut AddrinfoRequest = core::ptr::null_mut(); + // SAFETY: loop-thread call; `host` is NUL-terminated per the connect + // surface; the resolver always writes `req`. + let rc = unsafe { Bun__addrinfo_get(loop_, host, port, &mut req) }; + (req, rc == 0) +} + +/// Register `c` for completion. On an already-resolved request this defers to +/// the loop's dns_ready queue (non-wakeup enqueue) — it never re-enters (R6.5). +pub(crate) fn addrinfo_set(request: *mut AddrinfoRequest, c: *mut ConnectingSocket) { + // SAFETY: `request` holds a refcount taken by addrinfo_get; `c` is live + // and owns the pending_resolve_callback state. + unsafe { Bun__addrinfo_set(request, c.cast()) } +} + +/// Try to remove `c` from the request's notify list. `false` means the +/// callback already fired or is committed — expect it and use the `closed` +/// tombstone (linearized under the resolver's cache lock, C13). +pub(crate) fn addrinfo_cancel(request: *mut AddrinfoRequest, c: *mut ConnectingSocket) -> bool { + // SAFETY: loop-thread call on a request we still hold a refcount on. + unsafe { Bun__addrinfo_cancel(request, c.cast()) != 0 } +} + +/// Drop our refcount; `invalidate` poisons the cache entry (stale addresses / +/// negative results — R6.10 step 5). +pub(crate) fn addrinfo_free_request(request: *mut AddrinfoRequest, invalidate: bool) { + // SAFETY: balances exactly one addrinfo_get refcount; `request` is not + // used by this crate after the call. + unsafe { Bun__addrinfo_freeRequest(request, c_int::from(invalidate)) } +} + +/// `(entries_head, error)` — only legal post-notify, when the result is set; +/// the entry chain borrows the request's buffer until [`addrinfo_free_request`]. +pub(crate) fn addrinfo_result(request: *mut AddrinfoRequest) -> (*mut bun_dns::addrinfo, c_int) { + // SAFETY: caller invariant (R6.5): invoked only after the completion + // callback, when `result` is set; the view is `{ info, err }` repr(C). + unsafe { + let r = Bun__addrinfo_getRequestResult(request); + ((*r).info, (*r).err) + } +} + +/// Next entry of a resolved chain (raw field read; the chain is immutable +/// once published). +pub(crate) fn addrinfo_next(info: *mut bun_dns::addrinfo) -> *mut bun_dns::addrinfo { + // SAFETY: `info` is a live entry inside the request's result buffer. + unsafe { *core::ptr::addr_of!((*info).ai_next) } +} + +/// Read `c.loop` without forming a reference — the resolver thread's ONLY +/// legal access besides the mutex-guarded ready-list link (R6.1: the field is +/// immutable after create). +pub(crate) fn connecting_loop(c: *mut ConnectingSocket) -> *mut Loop { + // SAFETY: raw read of an immutable-after-create field; no `&` formed, so + // no aliasing with the loop thread. + unsafe { *core::ptr::addr_of!((*c).loop_) } +} + +// ── ConnectingSocket raw-place field access (pending window, C13/R6.5) ────── +// While `pending_resolve_callback` is set the resolver thread may write +// `c.next` (dns_ready_push) and raw-read `c.loop_` concurrently, so the loop +// thread must never form `&`/`&mut ConnectingSocket` over the whole struct — +// field-granular raw places are the C-parity access discipline. +// SAFETY (all helpers below): caller passes a live slab-resident connecting +// socket; each touched field is accessed only from the loop thread; single +// raw field read/write, no reference formed. + +macro_rules! conn_get { + ($($get:ident, $field:ident, $ty:ty);* $(;)?) => {$( + pub(crate) fn $get(c: *mut ConnectingSocket) -> $ty { + // SAFETY: see section comment above. + unsafe { *core::ptr::addr_of!((*c).$field) } + } + )*}; +} +macro_rules! conn_set { + ($($set:ident, $field:ident, $ty:ty);* $(;)?) => {$( + pub(crate) fn $set(c: *mut ConnectingSocket, v: $ty) { + // SAFETY: see section comment above. + unsafe { + *addr_of_mut!((*c).$field) = v; + } + } + )*}; +} + +conn_get! { + conn_closed, closed, bool; + conn_shut_down, shut_down, bool; + conn_error, error, i32; + conn_dns_error, dns_error, i32; + conn_pending, pending_resolve_callback, bool; + conn_group, group, *mut crate::group::SocketGroup; + conn_addrinfo_req, addrinfo_req, *mut AddrinfoRequest; + conn_ssl_ctx, ssl_ctx, *mut crate::tls::context::SslCtx; + conn_next_pending, next_pending, *mut ConnectingSocket; + conn_prev_pending, prev_pending, *mut ConnectingSocket; + conn_next, next, *mut ConnectingSocket; +} +conn_set! { + conn_set_closed, closed, bool; + conn_set_shut_down, shut_down, bool; + conn_set_shut_down_read, shut_down_read, bool; + conn_set_error, error, i32; + conn_set_pending, pending_resolve_callback, bool; + conn_set_group, group, *mut crate::group::SocketGroup; + conn_set_addrinfo_req, addrinfo_req, *mut AddrinfoRequest; + conn_set_ssl_ctx, ssl_ctx, *mut crate::tls::context::SslCtx; + conn_set_timeout, timeout, u8; + conn_set_long_timeout, long_timeout, u8; + conn_set_ext, ext, *mut core::ffi::c_void; + conn_set_next_pending, next_pending, *mut ConnectingSocket; + conn_set_prev_pending, prev_pending, *mut ConnectingSocket; +} + +/// Take the whole attempt array (close teardown, R6.10 step 2). +pub(crate) fn conn_take_attempts( + c: *mut ConnectingSocket, +) -> [*mut crate::socket::us_socket_t; crate::connecting::CONCURRENT_CONNECTIONS] { + // SAFETY: see section comment above. + unsafe { + core::ptr::replace( + addr_of_mut!((*c).attempts), + [core::ptr::null_mut(); crate::connecting::CONCURRENT_CONNECTIONS], + ) + } +} + +/// Place pointer of the 8-byte ext word (typed access is the caller's). +pub(crate) fn conn_ext_place(c: *mut ConnectingSocket) -> *mut *mut core::ffi::c_void { + // SAFETY: in-bounds field projection; no reference formed. + unsafe { addr_of_mut!((*c).ext) } +} + +// ── dns_ready / closed_connecting queues (R6.5, R6.11) ────────────────────── + +/// MPSC push onto `loop.data.dns_ready_head`. Callable from any thread; the +/// head AND `c.next` are guarded by the loop mutex (loop.c:324-331). Does not +/// wake the loop. +pub(crate) fn dns_ready_push(loop_: *mut Loop, c: *mut ConnectingSocket) { + lock_loop_mutex(loop_); + // SAFETY: mutex held — exclusive access to the list head and to `c.next` + // (while pending, `c` is owned by exactly one of {notify list, this + // queue}; the pusher is that owner). Raw ptr ops only: no `&mut Loop` is + // formed off-thread. + unsafe { + let head = addr_of_mut!((*loop_).internal_loop_data.dns_ready_head); + *addr_of_mut!((*c).next) = *head; + *head = c; + } + unlock_loop_mutex(loop_); +} + +/// Swap the whole dns_ready list out under the mutex (loop-pre/post drain). +pub(crate) fn dns_ready_take(loop_: *mut Loop) -> *mut ConnectingSocket { + lock_loop_mutex(loop_); + // SAFETY: mutex held; see dns_ready_push. + let head = unsafe { + let head = addr_of_mut!((*loop_).internal_loop_data.dns_ready_head); + core::ptr::replace(head, core::ptr::null_mut()) + }; + unlock_loop_mutex(loop_); + head +} + +/// Loop-thread push onto `closed_connecting_head` (deferred free — the tick +/// postlude releases the slab slot, C6/R6.11). Reuses `c.next`: a connecting +/// socket is never on this list and the dns_ready list at once. +pub(crate) fn closed_connecting_push(loop_: *mut Loop, c: *mut ConnectingSocket) { + debug_assert!(!loop_.is_null() && !c.is_null()); + // SAFETY: loop thread only; `c` was just detached, so this list is the + // sole remaining owner. + unsafe { + let head = addr_of_mut!((*loop_).internal_loop_data.closed_connecting_head); + *addr_of_mut!((*c).next) = *head; + *head = c; + } +} + +// ── libuv edge (Windows backend, docs/semantics.md §2 libuv arm) ───────────── + +/// Ownership contract: every heap block created here is freed ONLY by the +/// uv_close callback registered at close time (deferred-free protocol, R2.4). +#[cfg(windows)] +pub(crate) mod uv { + use core::ffi::{c_int, c_void}; + use core::mem; + + use bun_libuv_sys as sys; + use sys::UvHandle; + + use crate::backend::libuv::Timer; + use crate::backend::{Events, PollState}; + use crate::loop_::{Loop, WakeupAsync}; + use crate::socket::us_socket_t; + + #[inline] + fn uv_loop_of(loop_: *mut Loop) -> *mut sys::Loop { + // SAFETY: `loop_` is a live WindowsLoop; `uv_loop` is set once at + // creation and never reassigned for the loop's lifetime. + unsafe { (*loop_).uv_loop.cast::() } + } + + // ── uv_loop lifecycle ──────────────────────────────────────────────────── + + /// `us_create_loop` libuv head (libuv.c:162-175): `hint ? hint : + /// uv_loop_new()` (`is_default` = externally-owned, never deleted here), + /// then the unreffed prepare/check hooks. Fills the WindowsLoop + /// `uv_loop`/`is_default`/`pre`/`check` fields. −1 on create failure. + pub(crate) fn loop_init(loop_: *mut Loop, hint: *mut c_void) -> i32 { + let uv_loop: *mut c_void = if !hint.is_null() { + hint + } else { + // SAFETY: plain constructor call. + unsafe { sys::uv_loop_new().cast() } + }; + if uv_loop.is_null() { + return -1; + } + // SAFETY: `loop_` is the freshly allocated WindowsLoop; fields are + // set exactly once here, before any uv callback can observe them. + unsafe { + (*loop_).uv_loop = uv_loop; + (*loop_).is_default = c_int::from(!hint.is_null()); + let (pre, check) = hooks_create(loop_); + (*loop_).pre = pre; + (*loop_).check = check; + } + 0 + } + + /// `us_loop_free` head (libuv.c:191-199): close down prepare and check. + /// The caller frees loop data between this and [`loop_teardown`]. + pub(crate) fn loop_close_hooks(loop_: *mut Loop) { + // SAFETY: live loop from `loop_init`; fields nulled so a double call + // is a no-op. + unsafe { + if (*loop_).pre.is_null() { + return; + } + hooks_close((*loop_).pre, (*loop_).check); + (*loop_).pre = core::ptr::null_mut(); + (*loop_).check = core::ptr::null_mut(); + } + } + + /// `us_loop_free` tail (libuv.c:203-208): owned loops get one NOWAIT run + /// to flush close callbacks, then deletion; default (hint) loops don't. + pub(crate) fn loop_teardown(loop_: *mut Loop) { + // SAFETY: live loop; every handle this crate put on an owned uv loop + // has already been uv_close'd by the caller (C teardown order). + unsafe { + if (*loop_).is_default == 0 { + let uv_loop = uv_loop_of(loop_); + let _ = sys::uv_run(uv_loop, sys::RunMode::NoWait); + sys::uv_loop_delete(uv_loop); + } + (*loop_).uv_loop = core::ptr::null_mut(); + } + } + + /// `us_loop_run` (libuv.c:214-219): update time, run ONCE + /// (`us_loop_integrate` is a no-op, R1.6). + pub(crate) fn loop_run_once(loop_: *mut Loop) { + let uv_loop = uv_loop_of(loop_); + // SAFETY: live loop on its own thread; dispatch re-enters Rust only + // through raw-pointer entries (no `&mut Loop` held across this call). + unsafe { + sys::uv_update_time(uv_loop); + let _ = sys::uv_run(uv_loop, sys::RunMode::Once); + } + } + + /// `us_loop_pump` (libuv.c:150-152): run NOWAIT. + pub(crate) fn loop_pump(loop_: *mut Loop) { + // SAFETY: see `loop_run_once`. + unsafe { + let _ = sys::uv_run(uv_loop_of(loop_), sys::RunMode::NoWait); + } + } + + // ── active-handle proxying ─────────────── + // `uv_loop.active_handles` is the Bun-private keep-alive counter libuv + // reads in `uv__loop_alive`; saturating like the old uws_sys wrapper. + + pub(crate) fn add_active(loop_: *mut Loop, value: u32) { + // SAFETY: live loop; counter-only mutation. The uv loop is this + // thread's singleton — no other `&mut` to it is live here. + unsafe { (*uv_loop_of(loop_)).add_active(value) } + } + + pub(crate) fn sub_active(loop_: *mut Loop, value: u32) { + // SAFETY: see `add_active`. + unsafe { (*uv_loop_of(loop_)).sub_active(value) } + } + + pub(crate) fn unref_count_active(loop_: *mut Loop, count: i32) { + // SAFETY: see `add_active`. + unsafe { (*uv_loop_of(loop_)).unref_count(count) } + } + + pub(crate) fn loop_alive(loop_: *mut Loop) -> bool { + // SAFETY: live loop. + unsafe { sys::uv_loop_alive(uv_loop_of(loop_)) != 0 } + } + + pub(crate) fn active_count(loop_: *mut Loop) -> u32 { + // SAFETY: see `add_active` — counter-only read on a live loop. + unsafe { (*uv_loop_of(loop_)).active_handles } + } + + // ── prepare/check hooks (libuv.c:154-186) ──────────────────────────────── + + unsafe extern "C" fn prepare_cb(p: *mut sys::uv_prepare_t) { + // SAFETY: `data` was pointed at the owning Loop in `hooks_create`. + crate::loop_::tick::loop_pre(unsafe { (*p).data.cast::() }); + } + + /// libuv timers execute AFTER this post callback (libuv.c:36). + unsafe extern "C" fn check_cb(p: *mut sys::uv_check_t) { + // SAFETY: `data` was pointed at the owning Loop in `hooks_create`. + crate::loop_::tick::loop_post(unsafe { (*p).data.cast::() }); + } + + unsafe extern "C" fn close_free_prepare(h: *mut sys::uv_prepare_t) { + // SAFETY: `data` was re-pointed at the handle box by `hooks_close` — + // sole owner, freed exactly once (close_cb_free port). + drop(unsafe { Box::from_raw((*h).data.cast::()) }); + } + + unsafe extern "C" fn close_free_check(h: *mut sys::uv_check_t) { + // SAFETY: see `close_free_prepare`. + drop(unsafe { Box::from_raw((*h).data.cast::()) }); + } + + /// Create + start the pre (uv_prepare) / post (uv_check) hooks, both + /// unreffed, `data = loop_`. Returns (pre, check) for the WindowsLoop + /// mirror fields. Per-handle call order ports libuv.c:165-175 verbatim. + fn hooks_create(loop_: *mut Loop) -> (*mut c_void, *mut c_void) { + // SAFETY: fresh zeroed POD boxes; init/start on this thread's loop; + // ownership parks in the handles until `hooks_close`. + unsafe { + let pre: *mut sys::uv_prepare_t = Box::into_raw(Box::new(mem::zeroed())); + let _ = sys::uv_prepare_init(uv_loop_of(loop_), pre); + let _ = sys::uv_prepare_start(pre, Some(prepare_cb)); + (*pre).unref(); + (*pre).data = loop_.cast(); + + let check: *mut sys::uv_check_t = Box::into_raw(Box::new(mem::zeroed())); + let _ = sys::uv_check_init(uv_loop_of(loop_), check); + (*check).unref(); + let _ = sys::uv_check_start(check, Some(check_cb)); + (*check).data = loop_.cast(); + + (pre.cast(), check.cast()) + } + } + + /// Ref, stop, re-point data at the handle itself, uv_close with the + /// freeing callback (libuv.c:191-199). + fn hooks_close(pre: *mut c_void, check: *mut c_void) { + // SAFETY: `pre`/`check` came from `hooks_create`, not yet closed; the + // close callbacks are the sole free of each box. + unsafe { + let pre = pre.cast::(); + (*pre).ref_(); + let _ = sys::uv_prepare_stop(pre); + (*pre).data = pre.cast(); + (*pre).close(close_free_prepare); + + let check = check.cast::(); + (*check).ref_(); + let _ = sys::uv_check_stop(check); + (*check).data = check.cast(); + (*check).close(close_free_check); + } + } + + // ── uv_poll wrapping ───────────────────────────────────────────────────── + // The C `us_poll_t.uv_p` field is `SocketHeader.uv_p`: one heap uv_poll + // wrapper per armed socket, owned by the header from first arm until + // `socket_poll_stop_close` nulls the field; the pending uv_close callback + // frees the box (deferred free, R2.4 — collapsed to single-owner form: + // the C two-free dance existed only because poll memory and uv handle + // memory had separate owners, and slab slots outlive the uv handle here). + + /// `uv.data` carries the slab SocketHeader pointer (the C `uv_p->data = + /// p` wiring, libuv.c:226). + #[repr(C)] + pub(crate) struct UvPollHandle { + /// MUST stay first: `*mut UvPollHandle` doubles as the uv handle ptr. + uv: sys::uv_poll_t, + } + + unsafe extern "C" fn poll_cb(p: *mut sys::uv_poll_t, status: c_int, events: c_int) { + // SAFETY: `data` points into the slab (never returned to the OS while + // the loop lives), and libuv fires no poll_cb after uv_poll_stop — + // the dispatcher's slot-generation check drops stale slots (OQ-4). + let poll = unsafe { (*p).data.cast::() }; + // libuv.c:26-29: status<0 && !=UV_EOF → error; ==UV_EOF → eof. + let error = status < 0 && status != sys::UV_EOF; + let eof = status == sys::UV_EOF; + crate::backend::dispatch_ready_poll(poll, error, eof, Events(events as u32)); + } + + unsafe extern "C" fn poll_close_cb(h: *mut sys::uv_poll_t) { + // SAFETY: sole owner post-close; box leaked in `socket_poll_first_arm`. + drop(unsafe { Box::from_raw(h.cast::()) }); + } + + pub(crate) fn socket_poll_is_armed(s: *mut us_socket_t) -> bool { + // SAFETY: live header; raw field read. + unsafe { !(*s).uv_p.is_null() } + } + + /// `us_poll_start` kernel half (libuv.c:99-104): alloc the wrapper, + /// `uv_poll_init_socket` + always-unref (keep-alive is Bun's + /// `Async.KeepAlive`, not usockets), `data = s`, start. `false` on init + /// error — the socket stays unarmed (C ignores the rc and proceeds). + pub(crate) fn socket_poll_first_arm( + loop_: *mut Loop, + s: *mut us_socket_t, + events: Events, + ) -> bool { + // SAFETY: fresh zeroed POD box; init on this thread's loop; on init + // failure the box is reclaimed here (uv registered nothing). On + // success the box is owned by `s.uv_p` until `socket_poll_stop_close`. + unsafe { + debug_assert!( + (*s).uv_p.is_null(), + "double first-arm would leak the old uv_poll" + ); + let h: *mut UvPollHandle = Box::into_raw(Box::new(mem::zeroed())); + if sys::uv_poll_init_socket(uv_loop_of(loop_), &raw mut (*h).uv, (*s).fd) != 0 { + drop(Box::from_raw(h)); + return false; + } + (*h).uv.unref(); + (*h).uv.data = s.cast(); + (*s).uv_p = h.cast(); + let _ = sys::uv_poll_start(&raw mut (*h).uv, events.0 as c_int, Some(poll_cb)); + true + } + } + + /// `us_poll_change` kernel half (libuv.c:119): restart with the new event + /// set; rc discarded (R2.13). Caller checked `socket_poll_is_armed`. + pub(crate) fn socket_poll_rearm(s: *mut us_socket_t, events: Events) { + // SAFETY: `uv_p` is live — non-null means not yet stopped. + unsafe { + let h = (*s).uv_p.cast::(); + let _ = sys::uv_poll_start(&raw mut (*h).uv, events.0 as c_int, Some(poll_cb)); + } + } + + /// `us_poll_stop` (libuv.c:123-133): stop, null the owner field, then + /// uv_close; only `poll_close_cb` touches the wrapper afterwards. + /// No-op when never armed / already stopped. + pub(crate) fn socket_poll_stop_close(s: *mut us_socket_t) { + // SAFETY: live header; the taken wrapper (if any) is live and + // ownership moves to the pending close callback. + unsafe { + let h = (*s).uv_p.cast::(); + if h.is_null() { + return; + } + (*s).uv_p = core::ptr::null_mut(); + let _ = sys::uv_poll_stop(&raw mut (*h).uv); + (*h).uv.close(poll_close_cb); + } + } + + /// `us_socket_ref` = uv_ref on the socket's uv_poll (R3.26, libuv only). + pub(crate) fn socket_poll_ref(s: *mut us_socket_t) { + // SAFETY: live header; non-null `uv_p` is live until poll stop. + unsafe { + let h = (*s).uv_p.cast::(); + if !h.is_null() { + (*h).uv.ref_(); + } + } + } + + /// `us_socket_unref` = uv_unref (R3.26, libuv only). + pub(crate) fn socket_poll_unref(s: *mut us_socket_t) { + // SAFETY: see `socket_poll_ref`. + unsafe { + let h = (*s).uv_p.cast::(); + if !h.is_null() { + (*h).uv.unref(); + } + } + } + + // ── us_timer_t (libuv.c:252-322) ───────────────────────────────────────── + + /// `us_internal_callback_t` + embedded uv_timer_t + ext, one allocation. + /// `*mut Timer` (opaque) == `*mut TimerBlob`. Freed only by uv_close cb. + #[repr(C)] + struct TimerBlob { + loop_: *mut Loop, + cb: Option, + /// Sweep-timer one-shot guard (libuv.c:300-305; OQ-16 preserved). + has_added_timer_to_event_loop: bool, + /// Trailing ext byte count — dealloc needs the full layout back. + ext_size: usize, + uv: sys::Timer, + // ext bytes follow. + } + + const TIMER_EXT_OFFSET: usize = mem::size_of::(); + + fn timer_layout(ext_size: usize) -> core::alloc::Layout { + core::alloc::Layout::from_size_align( + TIMER_EXT_OFFSET + ext_size, + mem::align_of::(), + ) + .expect("timer layout") + } + + unsafe extern "C" fn timer_cb(t: *mut sys::Timer) { + // SAFETY: `data` points at the owning TimerBlob until close; `cb` was + // set by `timer_set` before any arm. C passes the callback struct + // pointer, which IS the us_timer_t (libuv.c:55-58). + unsafe { + let blob = (*t).data.cast::(); + if let Some(cb) = (*blob).cb { + cb(blob.cast::()); + } + } + } + + unsafe extern "C" fn timer_close_cb(t: *mut sys::Timer) { + // SAFETY: `data` was re-pointed at the blob in `timer_close`; sole + // owner post-close; layout reconstructed from the stashed ext_size. + unsafe { + let blob = (*t).data.cast::(); + let ext_size = (*blob).ext_size; + std::alloc::dealloc(blob.cast(), timer_layout(ext_size)); + } + } + + /// `us_create_timer` (libuv.c:252-270): calloc blob, init embedded + /// uv_timer, `data = blob`, unref iff fallthrough. + pub(crate) fn timer_create(loop_: *mut Loop, fallthrough: bool, ext_size: usize) -> *mut Timer { + // SAFETY: zeroed blob is valid POD; uv_timer_init on this thread's + // loop; the blob is freed only by `timer_close_cb`. + unsafe { + let blob = std::alloc::alloc_zeroed(timer_layout(ext_size)).cast::(); + if blob.is_null() { + bun_core::out_of_memory(); + } + (*blob).loop_ = loop_; + (*blob).ext_size = ext_size; + let _ = sys::uv_timer_init(uv_loop_of(loop_), &raw mut (*blob).uv); + (*blob).uv.data = blob.cast(); + if fallthrough { + (*blob).uv.unref(); + } + blob.cast() + } + } + + /// `us_timer_set` (libuv.c:291-315): sweep one-shot guard first, then + /// `uv_timer_start(ms, repeat_ms)`; `ms == 0` → stop. + pub(crate) fn timer_set( + t: *mut Timer, + cb: Option, + ms: c_int, + repeat_ms: c_int, + ) { + let blob = t.cast::(); + // SAFETY: `t` is a live timer from `timer_create`, not yet closed. + unsafe { + if (*(*blob).loop_).internal_loop_data.sweep_timer == t.cast() { + if (*blob).has_added_timer_to_event_loop { + return; + } + (*blob).has_added_timer_to_event_loop = true; + } + (*blob).cb = cb; + if ms == 0 { + let _ = sys::uv_timer_stop(&raw mut (*blob).uv); + } else { + // C converts `int` → `uint64_t` (sign-extends); port exactly. + let _ = sys::uv_timer_start( + &raw mut (*blob).uv, + Some(timer_cb), + ms as i64 as u64, + repeat_ms as i64 as u64, + ); + } + } + } + + /// `us_timer_close` (libuv.c:277-289): always ref before closing, stop, + /// then uv_close with the freeing callback. + pub(crate) fn timer_close(t: *mut Timer) { + let blob = t.cast::(); + // SAFETY: `t` is live; after this call only `timer_close_cb` may + // touch the blob. + unsafe { + (*blob).uv.ref_(); + let _ = sys::uv_timer_stop(&raw mut (*blob).uv); + (*blob).uv.data = blob.cast(); + (*blob).uv.close(timer_close_cb); + } + } + + pub(crate) fn timer_loop(t: *mut Timer) -> *mut Loop { + // SAFETY: `t` is live. + unsafe { (*t.cast::()).loop_ } + } + + // ── wakeup async (libuv.c:325-366, R10.4 libuv arm) ────────────────────── + + /// uv_async, unreffed; the callback receives the LOOP pointer (the + /// `cb_expects_the_loop` port). Freed only by its uv_close callback. + #[repr(C)] + struct AsyncBlob { + /// MUST stay first: `*mut AsyncBlob` doubles as the uv handle ptr. + uv: sys::uv_async_t, + loop_: *mut Loop, + cb: unsafe extern "C" fn(*mut Loop), + } + + unsafe extern "C" fn async_cb(a: *mut sys::uv_async_t) { + // SAFETY: `a` is the first field of a live AsyncBlob; fields were set + // before uv_async_init made the handle reachable. + unsafe { + let blob = a.cast::(); + ((*blob).cb)((*blob).loop_) + } + } + + unsafe extern "C" fn async_close_cb(a: *mut sys::uv_async_t) { + // SAFETY: sole owner post-close. + drop(unsafe { Box::from_raw(a.cast::()) }); + } + + pub(crate) fn wakeup_async_create( + loop_: *mut Loop, + cb: unsafe extern "C" fn(*mut Loop), + ) -> *mut WakeupAsync { + // SAFETY: only `uv` is zeroed and it is POD (Option callbacks / raw + // pointers); the non-nullable `cb` fn pointer is built initialized. + // Init on this thread's loop. + unsafe { + let blob: *mut AsyncBlob = Box::into_raw(Box::new(AsyncBlob { + uv: mem::zeroed(), + loop_, + cb, + })); + let _ = sys::uv_async_init(uv_loop_of(loop_), &raw mut (*blob).uv, Some(async_cb)); + (*blob).uv.unref(); + (*blob).uv.data = blob.cast(); + blob.cast() + } + } + + /// `us_wakeup_loop` on libuv: just uv_async_send — no `pending_wakeups` + /// consumption on this backend (R10.1). + pub(crate) fn wakeup_async_send(a: *mut WakeupAsync) { + // SAFETY: `a` is a live AsyncBlob; uv_async_send is thread-safe. + unsafe { + let _ = sys::uv_async_send(&raw mut (*a.cast::()).uv); + } + } + + /// `us_internal_async_close` (libuv.c:335-345): ref, then close+free. + pub(crate) fn wakeup_async_close(a: *mut WakeupAsync) { + let blob = a.cast::(); + // SAFETY: `a` is live; only `async_close_cb` touches it afterwards. + unsafe { + (*blob).uv.ref_(); + (*blob).uv.data = blob.cast(); + (*blob).uv.close(async_close_cb); + } + } +} + +// ──────────────── TLS engine edges (tls/state.rs — per-socket SSL) ─────────── +// CTX construction, the ex_data registry, verify plumbing and session/keylog +// parking live in unsafe_core/bssl.rs; this section adds only the per-socket +// engine primitives that file lacks: SSL lifecycle, the custom BIO pair, and +// the read/write/handshake/shutdown calls (docs/tls.md §1-§5). + +use core::ffi::{CStr, c_long}; +use core::sync::atomic::{AtomicI32, AtomicUsize, Ordering}; +use std::sync::Once; + +use crate::handle::CloseCode; +use crate::tls::SSL; +use crate::tls::state::{BioCtl, LoopTlsShared}; +use crate::unsafe_core::bssl::{BIO, BIO_METHOD, X509_STORE, X509_STORE_CTX}; +use crate::{LIBUS_RECV_BUFFER_LENGTH, LIBUS_RECV_BUFFER_PADDING}; + +// Values verified against vendor/boringssl/include/openssl/{ssl,bio}.h. +const BIO_CTRL_FLUSH: c_int = 11; +const SSL_SENT_SHUTDOWN: c_int = 1; +const SSL_RECEIVED_SHUTDOWN: c_int = 2; +const SSL_ERROR_NONE: c_int = 0; +const SSL_ERROR_SSL: c_int = 1; +const SSL_ERROR_WANT_READ: c_int = 2; +const SSL_ERROR_WANT_WRITE: c_int = 3; +const SSL_ERROR_SYSCALL: c_int = 5; +const SSL_ERROR_ZERO_RETURN: c_int = 6; +const SSL_ERROR_PENDING_CERTIFICATE: c_int = 12; +const SSL_ERROR_WANT_RENEGOTIATE: c_int = 19; +/// `enum ssl_renegotiate_mode_t` (ssl.h:5170-5174). +const SSL_RENEGOTIATE_NEVER: c_int = 0; +const SSL_RENEGOTIATE_EXPLICIT: c_int = 4; + +type BioCreateCb = unsafe extern "C" fn(*mut BIO) -> c_int; +type BioWriteCb = unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int; +type BioReadCb = unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int; +type BioCtrlCb = unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long; +type SslVerifyCb = unsafe extern "C" fn(c_int, *mut X509_STORE_CTX) -> c_int; + +unsafe extern "C" { + fn SSL_new(ctx: *mut SslCtx) -> *mut SSL; + fn SSL_free(ssl: *mut SSL); + fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); + fn SSL_set_connect_state(ssl: *mut SSL); + fn SSL_set_accept_state(ssl: *mut SSL); + fn SSL_set_renegotiate_mode(ssl: *mut SSL, mode: c_int); + fn SSL_set_tlsext_host_name(ssl: *mut SSL, name: *const c_char) -> c_int; + fn SSL_set_verify(ssl: *mut SSL, mode: c_int, cb: Option); + fn SSL_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) -> c_int; + fn SSL_do_handshake(ssl: *mut SSL) -> c_int; + fn SSL_read(ssl: *mut SSL, buf: *mut c_void, num: c_int) -> c_int; + fn SSL_write(ssl: *mut SSL, buf: *const c_void, num: c_int) -> c_int; + fn SSL_shutdown(ssl: *mut SSL) -> c_int; + fn SSL_renegotiate(ssl: *mut SSL) -> c_int; + fn SSL_get_error(ssl: *const SSL, ret: c_int) -> c_int; + fn SSL_get_shutdown(ssl: *const SSL) -> c_int; + fn SSL_is_init_finished(ssl: *const SSL) -> c_int; + fn SSL_in_init(ssl: *const SSL) -> c_int; + fn SSL_get_quiet_shutdown(ssl: *const SSL) -> c_int; + fn BIO_meth_new(ty: c_int, name: *const c_char) -> *mut BIO_METHOD; + fn BIO_meth_set_create(m: *mut BIO_METHOD, cb: Option) -> c_int; + fn BIO_meth_set_write(m: *mut BIO_METHOD, cb: Option) -> c_int; + fn BIO_meth_set_read(m: *mut BIO_METHOD, cb: Option) -> c_int; + fn BIO_meth_set_ctrl(m: *mut BIO_METHOD, cb: Option) -> c_int; + fn BIO_new(method: *const BIO_METHOD) -> *mut BIO; + fn BIO_free(bio: *mut BIO) -> c_int; + fn BIO_set_data(bio: *mut BIO, data: *mut c_void); + fn BIO_get_data(bio: *mut BIO) -> *mut c_void; + fn BIO_set_init(bio: *mut BIO, init: c_int); + fn BIO_clear_retry_flags(bio: *mut BIO); + fn BIO_set_retry_read(bio: *mut BIO); + fn BIO_set_retry_write(bio: *mut BIO); + fn BIO_method_type(bio: *const BIO) -> c_int; + fn BIO_get_new_index() -> c_int; +} + +/// Decomposed `SSL_get_error` result. +#[derive(Copy, Clone, Debug)] +pub(crate) enum SslErr { + None, + WantRead, + WantWrite, + WantRenegotiate, + PendingCertificate, + ZeroReturn, + Ssl, + Syscall, + Other, +} + +// ── scoped borrows ──────────────────────────────────────────────────────────── + +/// Scoped access to a live `BioCtl`. Contract: `f` must not re-enter +/// BoringSSL on the owning SSL and must not run dispatch callbacks — the BIO +/// hooks form their own `&mut BioCtl` while BoringSSL runs, and this borrow +/// must be gone by then. +pub(crate) fn with_ctl(ctl: *mut BioCtl, f: impl FnOnce(&mut BioCtl) -> R) -> R { + // SAFETY: `ctl` is the Box allocation owned by a live TlsState (freed only + // in TlsState::drop, after SSL_free); the borrow is confined to `f`. + f(unsafe { &mut *ctl }) +} + +/// The loop's lazily-created shared TLS state, stored in `ssl_data` (C +/// `us_internal_init_loop_ssl_data`); freed only by `free_loop_raw`. +pub(crate) fn tls_shared_ptr(loop_: *mut Loop) -> *mut LoopTlsShared { + // SAFETY: loop-thread access to the single owning pointer slot. + unsafe { + let slot = &raw mut (*loop_).internal_loop_data.ssl_data; + if (*slot).is_null() { + *slot = Box::into_raw(Box::new(LoopTlsShared::new())).cast(); + } + (*slot).cast() + } +} + +/// Scoped access to the loop-shared TLS state — same borrow contract as +/// [`with_ctl`] (must end before any SSL call or dispatch). +pub(crate) fn with_shared(sh: *mut LoopTlsShared, f: impl FnOnce(&mut LoopTlsShared) -> R) -> R { + // SAFETY: `sh` is the loop-owned Box from `tls_shared_ptr` (freed only in + // free_loop_raw, after every socket); the borrow is confined to `f`. + f(unsafe { &mut *sh }) +} + +pub(crate) fn with_tls_shared(loop_: *mut Loop, f: impl FnOnce(&mut LoopTlsShared) -> R) -> R { + with_shared(tls_shared_ptr(loop_), f) +} + +/// Close entry for the TLS deferred-close epilogue (docs/tls.md §1.4): the +/// caller's `&mut TlsState` must not be touched again after this returns. +pub(crate) fn socket_close(s: *mut us_socket_t, code: CloseCode) { + // SAFETY: `s` is a live slab-resident header (deref::with_socket contract). + unsafe { (*s).close(code) } +} + +/// Frees a `BioCtl` allocated via `Box::into_raw` (TlsState::drop only). +pub(crate) fn ctl_free(ctl: *mut BioCtl) { + // SAFETY: single owner (TlsState) frees exactly once, after SSL_free — + // no BIO hook can run afterwards. + drop(unsafe { Box::from_raw(ctl) }); +} + +// ── custom BIO pair (per socket; docs/tls.md §1.3) ───────────────────────── + +// One-time BIO method registration at first SSL creation (pthread_once +// shape, like the C's ex-index init): `BIO_INIT` orders the two plain-latch +// writes below before any reader. +static BIO_INIT: Once = Once::new(); +static BIO_METHOD_PTR: AtomicUsize = AtomicUsize::new(0); +static BIO_METHOD_TYPE: AtomicI32 = AtomicI32::new(0); + +fn bio_init() { + BIO_INIT.call_once(|| { + // SAFETY: one-time process init; BIO_meth_* on a fresh method object. + unsafe { + let ty = BIO_get_new_index(); + assert!(ty > 0, "BIO_get_new_index exhausted"); + let m = BIO_meth_new(ty, c"bun BIO".as_ptr()); + assert!(!m.is_null(), "BIO_meth_new failed"); + BIO_meth_set_create(m, Some(bio_create_cb)); + BIO_meth_set_write(m, Some(bio_write_cb)); + BIO_meth_set_read(m, Some(bio_read_cb)); + BIO_meth_set_ctrl(m, Some(bio_ctrl_cb)); + BIO_METHOD_TYPE.store(ty, Ordering::Relaxed); + BIO_METHOD_PTR.store(m as usize, Ordering::Relaxed); + } + }); +} + +/// Unique BIO type index: identifies OUR BIOs (data == BioCtl) vs foreign +/// ones (SSLWrapper's BIO_s_mem stores a BUF_MEM*, docs/tls.md §6.2). +fn bio_type() -> c_int { + bio_init(); + BIO_METHOD_TYPE.load(Ordering::Relaxed) +} + +fn bio_method() -> *const BIO_METHOD { + bio_init(); + BIO_METHOD_PTR.load(Ordering::Relaxed) as *const BIO_METHOD +} + +unsafe extern "C" fn bio_create_cb(bio: *mut BIO) -> c_int { + // SAFETY: fresh BIO owned by this method. + unsafe { BIO_set_init(bio, 1) }; + 1 +} + +unsafe extern "C" fn bio_ctrl_cb( + _bio: *mut BIO, + cmd: c_int, + _num: c_long, + _ptr: *mut c_void, +) -> c_long { + if cmd == BIO_CTRL_FLUSH { 1 } else { 0 } +} + +unsafe extern "C" fn bio_read_cb(bio: *mut BIO, out: *mut c_char, len: c_int) -> c_int { + // SAFETY: BIO_set_data pointed at the live BioCtl; no with_ctl borrow is + // active while BoringSSL runs (with_ctl contract). + let c = unsafe { &mut *BIO_get_data(bio).cast::() }; + // SAFETY: retry-flag ops on the live BIO. + unsafe { BIO_clear_retry_flags(bio) }; + if len <= 0 { + return 0; + } + if c.read_len == 0 { + // Empty window → SSL_ERROR_WANT_READ. + // SAFETY: live BIO. + unsafe { BIO_set_retry_read(bio) }; + return -1; + } + let n = c.read_len.min(len as usize); + // SAFETY: `read_ptr[read_off..read_off+read_len]` is the caller's live + // ciphertext window (set_window contract); `out[..len]` is BoringSSL's. + unsafe { + core::ptr::copy_nonoverlapping(c.read_ptr.add(c.read_off), out.cast::(), n); + } + c.read_off += n; + c.read_len -= n; + n as c_int +} + +unsafe extern "C" fn bio_write_cb(bio: *mut BIO, data: *const c_char, len: c_int) -> c_int { + // SAFETY: see bio_read_cb. + let c = unsafe { &mut *BIO_get_data(bio).cast::() }; + // SAFETY: retry-flag ops on the live BIO. + unsafe { BIO_clear_retry_flags(bio) }; + if len <= 0 { + return 0; + } + // A JS callback destroyed the socket mid-handshake/read: swallow and + // report written so the state machine finishes its error path without + // touching a dying fd (drops the fatal alert — §1.3.1, SNI abort §2.6). + if c.pending_detach { + return len; + } + // SAFETY: BoringSSL guarantees `data[..len]` for the duration of the call. + let bytes = unsafe { core::slice::from_raw_parts(data.cast::(), len as usize) }; + // SAFETY: `shared` is the loop-owned LoopTlsShared, live for every socket + // on the loop; distinct allocation from `c`, no with_* borrow is active. + let sh = unsafe { &mut *c.shared }; + if sh.batching { + // Append the sealed record to the loop batch. Report full length so + // BoringSSL seals the next record instead of parking a partial one; + // alloc failure → fatal, still report written (record sequence + // numbers already advanced — §1.3.2). + if sh.batch.try_reserve(bytes.len()).is_err() { + c.fatal = true; + return len; + } + sh.batch.extend_from_slice(bytes); + return len; + } + let written = crate::write::raw_write(c.s, bytes); + if written <= 0 { + // SAFETY: live BIO. + unsafe { BIO_set_retry_write(bio) }; + return -1; + } + written +} + +// ── SSL lifecycle ───────────────────────────────────────────────────────────── + +/// `SSL_new` + per-socket custom BIO pair (both refs transferred via +/// SSL_set_bio, so SSL_free frees them). Null on allocation failure. +pub(crate) fn ssl_new_attached(ctx: *mut SslCtx, ctl: *mut BioCtl) -> *mut SSL { + if ctx.is_null() { + return core::ptr::null_mut(); + } + // SAFETY: fresh SSL/BIOs; SSL_set_bio consumes both BIO refs (per-socket + // pair — no BIO_up_ref sharing, unlike the C loop-shared design). + unsafe { + let ssl = SSL_new(ctx); + if ssl.is_null() { + return core::ptr::null_mut(); + } + let rbio = BIO_new(bio_method()); + let wbio = BIO_new(bio_method()); + if rbio.is_null() || wbio.is_null() { + if !rbio.is_null() { + BIO_free(rbio); + } + if !wbio.is_null() { + BIO_free(wbio); + } + SSL_free(ssl); + return core::ptr::null_mut(); + } + BIO_set_data(rbio, ctl.cast()); + BIO_set_data(wbio, ctl.cast()); + SSL_set_bio(ssl, rbio, wbio); + ssl + } +} + +pub(crate) fn ssl_free(ssl: *mut SSL) { + // SAFETY: single owner (TlsState) frees exactly once; frees the BIO pair. + unsafe { SSL_free(ssl) } +} + +pub(crate) fn ssl_set_connect_state(ssl: *mut SSL) { + // SAFETY: live SSL (all wrappers below share this contract: `ssl` is + // TlsState's live handle, nulled before free). + unsafe { SSL_set_connect_state(ssl) } +} + +pub(crate) fn ssl_set_accept_state(ssl: *mut SSL) { + // SAFETY: live SSL. + unsafe { SSL_set_accept_state(ssl) } +} + +/// explicit=true → ssl_renegotiate_explicit (client); false → never (server). +pub(crate) fn ssl_set_reneg_mode(ssl: *mut SSL, explicit: bool) { + // SAFETY: live SSL. + unsafe { + SSL_set_renegotiate_mode( + ssl, + if explicit { + SSL_RENEGOTIATE_EXPLICIT + } else { + SSL_RENEGOTIATE_NEVER + }, + ) + } +} + +pub(crate) fn ssl_set_tlsext_host_name(ssl: *mut SSL, name: &CStr) { + // SAFETY: live SSL; NUL-terminated name copied by BoringSSL. + unsafe { + let _ = SSL_set_tlsext_host_name(ssl, name.as_ptr()); + } +} + +unsafe extern "C" fn verify_always_ok(_preverify_ok: c_int, _ctx: *mut X509_STORE_CTX) -> c_int { + // Never abort mid-handshake: the verdict travels in us_bun_verify_error_t + // and fail-closed lives in the consumer (docs/tls.md §2.4). + 1 +} + +/// Per-SSL `SSL_VERIFY_PEER` with the always-continue callback (§2.1). +pub(crate) fn ssl_set_verify_permissive(ssl: *mut SSL) { + // SAFETY: live SSL. + unsafe { + SSL_set_verify( + ssl, + crate::unsafe_core::bssl::SSL_VERIFY_PEER, + Some(verify_always_ok), + ) + } +} + +/// `SSL_set0_verify_cert_store` — consumes the caller's store ref. +pub(crate) fn ssl_set0_verify_cert_store(ssl: *mut SSL, store: *mut X509_STORE) { + // SAFETY: live SSL; set0 transfers the (up-ref'd) store ownership. + unsafe { + let _ = SSL_set0_verify_cert_store(ssl, store); + } +} + +// ── handshake / IO ──────────────────────────────────────────────────────────── + +pub(crate) fn ssl_do_handshake(ssl: *mut SSL) -> c_int { + // SAFETY: live SSL; BIO hooks run under the with_ctl contract. + unsafe { SSL_do_handshake(ssl) } +} + +pub(crate) fn ssl_read(ssl: *mut SSL, buf: &mut [u8]) -> c_int { + let len = c_int::try_from(buf.len()).unwrap_or(c_int::MAX); + // SAFETY: live SSL; `buf` valid for `len`. + unsafe { SSL_read(ssl, buf.as_mut_ptr().cast(), len) } +} + +pub(crate) fn ssl_write(ssl: *mut SSL, data: &[u8]) -> c_int { + let len = c_int::try_from(data.len()).unwrap_or(c_int::MAX); + // SAFETY: live SSL; `data` valid for `len`. + unsafe { SSL_write(ssl, data.as_ptr().cast(), len) } +} + +/// Zero-length SSL_write: seals no record but flushes deferred post-handshake +/// data (TLS1.3 NewSessionTickets) through the BIO (docs/tls.md §2.7). +pub(crate) fn ssl_write_zero(ssl: *mut SSL) { + let zero: u8 = 0; + // SAFETY: live SSL; pointer valid (unused for len 0 but non-null like C). + unsafe { + let _ = SSL_write(ssl, (&raw const zero).cast(), 0); + } +} + +pub(crate) fn ssl_shutdown(ssl: *mut SSL) -> c_int { + // SAFETY: live SSL. + unsafe { SSL_shutdown(ssl) } +} + +pub(crate) fn ssl_renegotiate(ssl: *mut SSL) -> bool { + // SAFETY: live SSL. + unsafe { SSL_renegotiate(ssl) != 0 } +} + +pub(crate) fn ssl_is_init_finished(ssl: *mut SSL) -> bool { + // SAFETY: live SSL. + unsafe { SSL_is_init_finished(ssl) != 0 } +} + +pub(crate) fn ssl_in_init(ssl: *mut SSL) -> bool { + // SAFETY: live SSL. + unsafe { SSL_in_init(ssl) != 0 } +} + +pub(crate) fn ssl_get_quiet_shutdown(ssl: *mut SSL) -> bool { + // SAFETY: live SSL. + unsafe { SSL_get_quiet_shutdown(ssl) != 0 } +} + +/// `(sent_shutdown, received_shutdown)` bits. +pub(crate) fn ssl_get_shutdown(ssl: *mut SSL) -> (bool, bool) { + if ssl.is_null() { + return (false, false); + } + // SAFETY: live SSL. + let bits = unsafe { SSL_get_shutdown(ssl) }; + ( + bits & SSL_SENT_SHUTDOWN != 0, + bits & SSL_RECEIVED_SHUTDOWN != 0, + ) +} + +/// Must be called immediately after the failing SSL_* call, before any other +/// SSL/queue operation (docs/tls.md §8.4). +pub(crate) fn ssl_get_error(ssl: *mut SSL, ret: c_int) -> SslErr { + // SAFETY: live SSL. + let e = unsafe { SSL_get_error(ssl, ret) }; + match e { + SSL_ERROR_NONE => SslErr::None, + SSL_ERROR_WANT_READ => SslErr::WantRead, + SSL_ERROR_WANT_WRITE => SslErr::WantWrite, + SSL_ERROR_WANT_RENEGOTIATE => SslErr::WantRenegotiate, + SSL_ERROR_PENDING_CERTIFICATE => SslErr::PendingCertificate, + SSL_ERROR_ZERO_RETURN => SslErr::ZeroReturn, + SSL_ERROR_SSL => SslErr::Ssl, + SSL_ERROR_SYSCALL => SslErr::Syscall, + _ => SslErr::Other, + } +} + +// ── loop plaintext scratch (loop-shared — docs/design.md) ───────────── + +const SCRATCH_BYTES: usize = LIBUS_RECV_BUFFER_LENGTH + 2 * LIBUS_RECV_BUFFER_PADDING; + +pub(crate) fn scratch_alloc() -> *mut c_void { + // US_FAULT_SSL_LOOP_BUFFER (R11.2): simulate the one-shot TLS loop-buffer + // allocation failure, surfaced as OOM like the C (openssl.c:682-696). + #[cfg(feature = "socket_fault_injection")] + if crate::fault::check(crate::fault::SSL_LOOP_BUFFER, -1, 0).is_some() { + bun_core::out_of_memory(); + } + let buf = vec![0u8; SCRATCH_BYTES].into_boxed_slice(); + Box::into_raw(buf).cast::().cast() +} + +pub(crate) fn scratch_free(buf: *mut c_void) { + // SAFETY: allocated by scratch_alloc with the constant length. + unsafe { + drop(Box::from_raw(core::ptr::slice_from_raw_parts_mut( + buf.cast::(), + SCRATCH_BYTES, + ))); + } +} + +/// Borrow the scratch bytes. Caller (LoopScratch) exclusively holds `buf` for +/// the borrow's duration; re-entrant nesting gets a distinct allocation. +pub(crate) fn scratch_slice<'a>(buf: *mut c_void) -> &'a mut [u8] { + // SAFETY: scratch_alloc'd region, exclusively held via LoopScratch. + unsafe { core::slice::from_raw_parts_mut(buf.cast::(), SCRATCH_BYTES) } +} + +// ── loop shared recv buffer view (R3.22c) ────────────────────── + +/// Fresh `&mut` view of the loop's shared 512 KiB recv area (padding offset +/// applied). Aliasing contract (C17, inherited from the C design): the slice +/// is re-derived per use and never held across a dispatch that can re-enter. +pub(crate) fn loop_recv_area<'a>(loop_: *mut Loop) -> &'a mut [u8] { + // SAFETY: recv_buf is a live LIBUS_RECV_BUFFER_LENGTH + 2*PADDING + // allocation owned by the loop; each call derives a fresh borrow from the + // raw base pointer per the contract above. + unsafe { + let base = (*loop_).internal_loop_data.recv_buf; + debug_assert!(!base.is_null()); + core::slice::from_raw_parts_mut( + base.add(crate::LIBUS_RECV_BUFFER_PADDING), + crate::LIBUS_RECV_BUFFER_LENGTH, + ) + } +} + +// ── SNI certificate selection (docs/tls.md §2.6; openssl.c:2317-2454) ────── +// Registered on listener default contexts: `sni_cb` when the first server +// name is added (us_listen_socket_add_server_name), `select_cert_cb` when a +// dynamic resolver is set (us_listen_socket_on_server_name). A same-socket +// write from the resolver's JS clears this handshake's read window, so the C +// save/restore bracket (openssl.c:2385-2389) is kept as the §1.4 RAII guard. + +use crate::unsafe_core::bssl; + +const SSL_TLSEXT_ERR_OK: c_int = 0; +const SSL_TLSEXT_ERR_NOACK: c_int = 3; + +/// NUL-terminated hostname parsed from the raw ClientHello (cap 256 incl NUL). +struct HostName([u8; 256]); + +impl HostName { + fn as_ptr(&self) -> *const c_char { + self.0.as_ptr().cast() + } + + fn as_cstr(&self) -> &CStr { + CStr::from_bytes_until_nul(&self.0).unwrap_or(c"") + } +} + +/// Raw server_name extension parse — NOT `SSL_get_servername`; only the +/// early-callback contract guarantees the raw hello (docs/tls.md §2.6.2). +fn hello_servername(hello: *const bun_bssl::SSL_CLIENT_HELLO) -> Option { + let mut data: *const u8 = core::ptr::null(); + let mut len: usize = 0; + // SAFETY: live hello for the callback's duration; outputs written on 1. + let ok = unsafe { + bun_bssl::SSL_early_callback_ctx_extension_get( + hello, + bun_bssl::TLSEXT_TYPE_server_name as u16, + &mut data, + &mut len, + ) + }; + if ok == 0 || data.is_null() { + return None; + } + // SAFETY: extension bytes readable for `len` while the hello is live. + let ext = unsafe { core::slice::from_raw_parts(data, len) }; + let mut out = [0u8; 256]; + let n = crate::tls::sni::client_hello_servername(ext, &mut out); + (n != 0).then_some(HostName(out)) +} + +/// Wildcard tree lookup + install. The tree ref is BORROWED — +/// `SSL_set_SSL_CTX` takes its own (openssl.c:2418-2424). +fn static_tree_select(ssl: *mut SSL, ls: *mut ListenSocket, host: &HostName) { + if let Some(sni) = crate::group::listener_data(ls).sni.as_ref() { + if let Some((ctx, _user)) = sni.resolve(host.as_cstr()) { + if !ctx.is_null() { + // SAFETY: live ssl mid-handshake; ctx is a live tree entry. + unsafe { bun_bssl::SSL_set_SSL_CTX(ssl, ctx) }; + } + } + } +} + +/// The `BioCtl` behind the socket's write BIO (C's +/// `BIO_get_data(SSL_get_wbio(ssl))->ssl_socket` analog); null pre-attach. +pub(crate) fn ssl_wbio_ctl(ssl: *mut SSL) -> *mut BioCtl { + // SAFETY: live ssl; only wbios carrying our unique BIO type hold a + // BioCtl in their data slot — foreign BIOs (BIO_s_mem) return null. + unsafe { + let wbio = bun_bssl::SSL_get_wbio(ssl); + if wbio.is_null() || BIO_method_type(wbio.cast()) != bio_type() { + core::ptr::null_mut() + } else { + BIO_get_data(wbio.cast()).cast() + } + } +} + +/// `us_select_cert_cb` (openssl.c:2317-2425): async-capable certificate +/// selector; suspends via `SniSuspension` in SSL ex_data, resumed by +/// `tls::state::sni_resolve` re-driving the handshake. +pub(crate) unsafe extern "C" fn select_cert_cb( + hello: *const bun_bssl::SSL_CLIENT_HELLO, +) -> bun_bssl::ssl_select_cert_result_t { + use bun_bssl::{ + ssl_select_cert_result_t_ssl_select_cert_error as CERT_ERROR, + ssl_select_cert_result_t_ssl_select_cert_retry as CERT_RETRY, + ssl_select_cert_result_t_ssl_select_cert_success as CERT_SUCCESS, + }; + // SAFETY: BoringSSL passes a live hello for the callback's duration. + let ssl = unsafe { (*hello).ssl }; + if ssl.is_null() { + return CERT_SUCCESS; + } + // Still waiting on the JS resolver (spurious re-drive): keep suspending. + if bssl::sni_is_waiting(ssl) { + return CERT_RETRY; + } + match bssl::sni_take(ssl) { + Some(bssl::SniSuspension::Resolved(ctx)) if !ctx.is_null() => { + // Owned ref from sni_resolve: SSL_set_SSL_CTX takes its own. + // SAFETY: live ssl mid-handshake; ctx carries our owned ref. + unsafe { bun_bssl::SSL_set_SSL_CTX(ssl, ctx) }; + bssl::ssl_ctx_free(ctx); + return CERT_SUCCESS; + } + Some(bssl::SniSuspension::Resolved(_)) => { + // Async cb(null, null): fall through to the static tree exactly + // like a sync resolver returning null (openssl.c:2333-2352). + let ls = crate::tls::context::listener_backref(ssl).cast::(); + if !ls.is_null() { + if let Some(host) = hello_servername(hello) { + static_tree_select(ssl, ls, &host); + } + } + return CERT_SUCCESS; + } + Some(bssl::SniSuspension::Error) => return CERT_ERROR, + Some(bssl::SniSuspension::Waiting) | None => {} + } + + // First call. Backref is wiped at listener close, so non-null == live. + let ls = crate::tls::context::listener_backref(ssl).cast::(); + if ls.is_null() { + return CERT_SUCCESS; + } + let Some(resolver) = crate::group::listener_data(ls).on_server_name else { + return CERT_SUCCESS; + }; + let Some(host) = hello_servername(hello) else { + return CERT_SUCCESS; + }; + + // Resume handle for an async SNICallback: the socket driving this hello. + let ctl = ssl_wbio_ctl(ssl); + let cb_socket: *mut us_socket_t = if ctl.is_null() { + core::ptr::null_mut() + } else { + with_ctl(ctl, |c| c.s) + }; + + // Dynamic resolver runs FIRST — a user SNICallback replaces default SNI + // handling entirely (openssl.c:2371-2389). Non-null return is OWNED. + let mut abort_handshake: c_int = 0; + // §1.4 nesting trigger 1: the resolver runs user JS from inside + // SSL_do_handshake/SSL_read — save/restore the read window around it. + let dyn_ctx = { + let _window = crate::tls::SslWindowGuard::save(ssl); + // SAFETY: resolver is the registered cb; host is NUL-terminated. + unsafe { resolver(ls, host.as_ptr(), &mut abort_handshake, cb_socket) } + }; + match abort_handshake { + 1 => { + // Drop without a TLS alert: mark deferred detach so the BIO + // swallows the handshake_failure alert (openssl.c:2391-2400). + if !ctl.is_null() { + with_ctl(ctl, |c| { + c.pending_detach = true; + c.pending_close_code = 0; + }); + } + CERT_ERROR + } + 2 => { + // Async pending: suspend until sni_resolve (openssl.c:2401-2411). + bssl::sni_set(ssl, bssl::SniSuspension::Waiting); + CERT_RETRY + } + _ if !dyn_ctx.is_null() => { + // SAFETY: live ssl; dyn_ctx is the resolver's owned ref. + unsafe { bun_bssl::SSL_set_SSL_CTX(ssl, dyn_ctx) }; + bssl::ssl_ctx_free(dyn_ctx); + CERT_SUCCESS + } + _ => { + // Re-read: the resolver's JS may have closed the listener + // (backref wiped at close; the C's deferred-freed ls->sni read + // safely saw NULL — openssl.c:2333-2352 fallthrough parity). + let ls = crate::tls::context::listener_backref(ssl).cast::(); + if !ls.is_null() { + static_tree_select(ssl, ls, &host); + } + CERT_SUCCESS + } + } +} + +/// `sni_cb` (openssl.c:2427-2454): static-tree-only servername stage; no-op +/// when a dynamic resolver exists (the early cb already selected). +pub(crate) unsafe extern "C" fn sni_cb(ssl: *mut SSL, _al: *mut c_int, _arg: *mut c_void) -> c_int { + if ssl.is_null() { + return SSL_TLSEXT_ERR_NOACK; + } + let ls = crate::tls::context::listener_backref(ssl).cast::(); + if ls.is_null() || crate::group::listener_data(ls).on_server_name.is_some() { + return SSL_TLSEXT_ERR_OK; + } + // SAFETY: live ssl inside the servername callback. + let hostname = + unsafe { bun_bssl::SSL_get_servername(ssl, bun_bssl::TLSEXT_NAMETYPE_host_name) }; + if !hostname.is_null() { + // SAFETY: BoringSSL returns a NUL-terminated servername. + let host = unsafe { CStr::from_ptr(hostname) }; + if !host.is_empty() { + if let Some(sni) = crate::group::listener_data(ls).sni.as_ref() { + if let Some((ctx, _user)) = sni.resolve(host) { + if !ctx.is_null() { + // SAFETY: live ssl; borrowed tree ctx (own ref taken). + unsafe { bun_bssl::SSL_set_SSL_CTX(ssl, ctx) }; + } + } + } + } + } + SSL_TLSEXT_ERR_OK +} + +/// Register `sni_cb` on the listener's default ctx (first add_server_name; +/// idempotent across listeners sharing the ctx — openssl.c:2462-2467). +pub(crate) fn register_servername_cb(ctx: *mut SslCtx) { + // SAFETY: live ctx; registration-only FFI. + unsafe { bun_bssl::SSL_CTX_set_tlsext_servername_callback(ctx, Some(sni_cb)) }; +} + +/// Register `select_cert_cb` on the listener's default ctx +/// (us_listen_socket_on_server_name — openssl.c:2515-2526). +pub(crate) fn register_select_cert_cb(ctx: *mut SslCtx) { + // SAFETY: live ctx; registration-only FFI. + unsafe { bun_bssl::SSL_CTX_set_select_certificate_cb(ctx, Some(select_cert_cb)) }; +} + +// ── UpgradedDuplex / WindowsNamedPipe cycle-break shims ─────── +// The real implementations live in `bun_runtime::socket` and are exported +// with #[no_mangle]; link-time dispatch avoids an upward dep (same pattern as +// the old uws_sys/lib.rs:175-348). Signatures must stay in sync with +// src/runtime/socket/{UpgradedDuplex.rs, WindowsNamedPipe.rs}. + +pub(crate) mod duplex { + use core::ffi::{c_uint, c_void}; + + use crate::handle::UpgradedDuplex; + use crate::tls::context::us_bun_verify_error_t; + + unsafe extern "C" { + fn UpgradedDuplex__ssl_error(this: *mut UpgradedDuplex) -> us_bun_verify_error_t; + fn UpgradedDuplex__is_established(this: *mut UpgradedDuplex) -> bool; + fn UpgradedDuplex__is_closed(this: *mut UpgradedDuplex) -> bool; + fn UpgradedDuplex__is_shutdown(this: *mut UpgradedDuplex) -> bool; + fn UpgradedDuplex__ssl(this: *mut UpgradedDuplex) -> *mut c_void; + fn UpgradedDuplex__set_timeout(this: *mut UpgradedDuplex, seconds: c_uint); + fn UpgradedDuplex__flush(this: *mut UpgradedDuplex); + fn UpgradedDuplex__encode_and_write( + this: *mut UpgradedDuplex, + ptr: *const u8, + len: usize, + ) -> i32; + fn UpgradedDuplex__raw_write(this: *mut UpgradedDuplex, ptr: *const u8, len: usize) -> i32; + fn UpgradedDuplex__shutdown(this: *mut UpgradedDuplex); + fn UpgradedDuplex__shutdown_read(this: *mut UpgradedDuplex); + fn UpgradedDuplex__close(this: *mut UpgradedDuplex); + } + + // SAFETY (all wrappers): `d` is the live opaque handle the runtime crate + // handed out; the callee only reads the borrowed (ptr,len) region. + pub(crate) fn ssl_error(d: *mut UpgradedDuplex) -> us_bun_verify_error_t { + unsafe { UpgradedDuplex__ssl_error(d) } + } + pub(crate) fn is_established(d: *mut UpgradedDuplex) -> bool { + unsafe { UpgradedDuplex__is_established(d) } + } + pub(crate) fn is_closed(d: *mut UpgradedDuplex) -> bool { + unsafe { UpgradedDuplex__is_closed(d) } + } + pub(crate) fn is_shutdown(d: *mut UpgradedDuplex) -> bool { + unsafe { UpgradedDuplex__is_shutdown(d) } + } + pub(crate) fn ssl(d: *mut UpgradedDuplex) -> *mut c_void { + unsafe { UpgradedDuplex__ssl(d) } + } + pub(crate) fn set_timeout(d: *mut UpgradedDuplex, seconds: c_uint) { + unsafe { UpgradedDuplex__set_timeout(d, seconds) } + } + pub(crate) fn flush(d: *mut UpgradedDuplex) { + unsafe { UpgradedDuplex__flush(d) } + } + pub(crate) fn encode_and_write(d: *mut UpgradedDuplex, data: &[u8]) -> i32 { + unsafe { UpgradedDuplex__encode_and_write(d, data.as_ptr(), data.len()) } + } + pub(crate) fn raw_write(d: *mut UpgradedDuplex, data: &[u8]) -> i32 { + unsafe { UpgradedDuplex__raw_write(d, data.as_ptr(), data.len()) } + } + pub(crate) fn shutdown(d: *mut UpgradedDuplex) { + unsafe { UpgradedDuplex__shutdown(d) } + } + pub(crate) fn shutdown_read(d: *mut UpgradedDuplex) { + unsafe { UpgradedDuplex__shutdown_read(d) } + } + pub(crate) fn close(d: *mut UpgradedDuplex) { + unsafe { UpgradedDuplex__close(d) } + } +} + +#[cfg(windows)] +pub(crate) mod named_pipe { + use core::ffi::{c_uint, c_void}; + + use crate::handle::WindowsNamedPipe; + use crate::tls::context::us_bun_verify_error_t; + + unsafe extern "C" { + fn WindowsNamedPipe__ssl_error(this: *mut WindowsNamedPipe) -> us_bun_verify_error_t; + fn WindowsNamedPipe__is_established(this: *mut WindowsNamedPipe) -> bool; + fn WindowsNamedPipe__is_closed(this: *mut WindowsNamedPipe) -> bool; + fn WindowsNamedPipe__is_shutdown(this: *mut WindowsNamedPipe) -> bool; + fn WindowsNamedPipe__ssl(this: *mut WindowsNamedPipe) -> *mut c_void; + fn WindowsNamedPipe__set_timeout(this: *mut WindowsNamedPipe, seconds: c_uint); + fn WindowsNamedPipe__flush(this: *mut WindowsNamedPipe); + fn WindowsNamedPipe__encode_and_write( + this: *mut WindowsNamedPipe, + ptr: *const u8, + len: usize, + ) -> i32; + fn WindowsNamedPipe__raw_write( + this: *mut WindowsNamedPipe, + ptr: *const u8, + len: usize, + ) -> i32; + fn WindowsNamedPipe__shutdown(this: *mut WindowsNamedPipe); + fn WindowsNamedPipe__shutdown_read(this: *mut WindowsNamedPipe); + fn WindowsNamedPipe__close(this: *mut WindowsNamedPipe); + fn WindowsNamedPipe__pause_stream(this: *mut WindowsNamedPipe) -> bool; + fn WindowsNamedPipe__resume_stream(this: *mut WindowsNamedPipe) -> bool; + } + + // SAFETY (all wrappers): live opaque handle; borrowed (ptr,len) only read. + pub(crate) fn ssl_error(p: *mut WindowsNamedPipe) -> us_bun_verify_error_t { + unsafe { WindowsNamedPipe__ssl_error(p) } + } + pub(crate) fn is_established(p: *mut WindowsNamedPipe) -> bool { + unsafe { WindowsNamedPipe__is_established(p) } + } + pub(crate) fn is_closed(p: *mut WindowsNamedPipe) -> bool { + unsafe { WindowsNamedPipe__is_closed(p) } + } + pub(crate) fn is_shutdown(p: *mut WindowsNamedPipe) -> bool { + unsafe { WindowsNamedPipe__is_shutdown(p) } + } + pub(crate) fn ssl(p: *mut WindowsNamedPipe) -> *mut c_void { + unsafe { WindowsNamedPipe__ssl(p) } + } + pub(crate) fn set_timeout(p: *mut WindowsNamedPipe, seconds: c_uint) { + unsafe { WindowsNamedPipe__set_timeout(p, seconds) } + } + pub(crate) fn flush(p: *mut WindowsNamedPipe) { + unsafe { WindowsNamedPipe__flush(p) } + } + pub(crate) fn encode_and_write(p: *mut WindowsNamedPipe, data: &[u8]) -> i32 { + unsafe { WindowsNamedPipe__encode_and_write(p, data.as_ptr(), data.len()) } + } + pub(crate) fn raw_write(p: *mut WindowsNamedPipe, data: &[u8]) -> i32 { + unsafe { WindowsNamedPipe__raw_write(p, data.as_ptr(), data.len()) } + } + pub(crate) fn shutdown(p: *mut WindowsNamedPipe) { + unsafe { WindowsNamedPipe__shutdown(p) } + } + pub(crate) fn shutdown_read(p: *mut WindowsNamedPipe) { + unsafe { WindowsNamedPipe__shutdown_read(p) } + } + pub(crate) fn close(p: *mut WindowsNamedPipe) { + unsafe { WindowsNamedPipe__close(p) } + } + pub(crate) fn pause_stream(p: *mut WindowsNamedPipe) -> bool { + unsafe { WindowsNamedPipe__pause_stream(p) } + } + pub(crate) fn resume_stream(p: *mut WindowsNamedPipe) -> bool { + unsafe { WindowsNamedPipe__resume_stream(p) } + } +} + +// ── raw lowering helpers ───────────────────────────────────────── + +/// Borrow one `UsIoVec` as a byte slice (duplex/pipe raw_writev lowering). +/// Contract: base/len reference caller-owned memory for the call's duration. +pub(crate) fn iovec_as_slice<'a>(v: &crate::write::UsIoVec) -> &'a [u8] { + if v.base.is_null() || v.len == 0 { + return &[]; + } + // SAFETY: UsIoVec contract — base is readable for len bytes. + unsafe { core::slice::from_raw_parts(v.base.cast::(), v.len) } +} + +/// Frozen erased `on_server_name` registration shape → the typed +/// `sni::OnServerName` (pointer-for-pointer, ABI-identical; the cabi side +/// performs the inverse transmute — docs/cabi.md §4.3). +pub(crate) fn server_name_cb_from_erased( + cb: extern "C" fn( + *mut ListenSocket, + *const c_char, + *mut c_int, + *mut core::ffi::c_void, + ) -> *mut core::ffi::c_void, +) -> crate::tls::sni::OnServerName { + // SAFETY: identical arity and pointer-sized params/return. + unsafe { core::mem::transmute(cb) } +} diff --git a/src/usockets/unsafe_core/io.rs b/src/usockets/unsafe_core/io.rs new file mode 100644 index 000000000000..9797b9ddb29c --- /dev/null +++ b/src/usockets/unsafe_core/io.rs @@ -0,0 +1,3859 @@ +//! Syscall edges beyond what `bun_sys` covers: the uSockets BSD layer per +//! docs/semantics.md §8 (socket creation, option sequences, addr plumbing, +//! unix-socket long-path workarounds, listen/connect/accept, SCM_RIGHTS). +//! ENOBUFS/ENOMEM mapping to would-block happens in write.rs, not here. +//! +//! Return conventions: byte-count ops return bytes or `-errno`; fd-producing +//! ops return `Result`; option setters return `0` or `-errno` +//! except `keepalive` (positive errno / `-1`, verbatim C convention). + +use crate::LIBUS_SOCKET_DESCRIPTOR; + +/// Clear TCP_CORK on Linux; no-op elsewhere (docs/semantics.md R4.6 — the +/// send path itself never corks, so this only matters if another layer did). +pub(crate) fn socket_flush(fd: LIBUS_SOCKET_DESCRIPTOR) { + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let enabled: core::ffi::c_int = 0; + // SAFETY: setsockopt reads sizeof(int) bytes from `enabled`; failure + // (e.g. closed fd) is deliberately ignored, matching bsd_socket_flush. + unsafe { + libc::setsockopt( + fd, + libc::IPPROTO_TCP, + libc::TCP_CORK, + (&raw const enabled).cast(), + core::mem::size_of::() as libc::socklen_t, + ); + } + } + #[cfg(not(any(target_os = "linux", target_os = "android")))] + { + let _ = fd; + } +} + +/// Connect-address currency of the bsd layer (`struct sockaddr_storage`). +#[cfg(not(windows))] +pub(crate) type ConnectAddr = libc::sockaddr_storage; +/// Windows: the shared winsock `SOCKADDR_STORAGE` layout (udp.rs owns the +/// definition; the libc crate ships no windows sockaddr types). +#[cfg(windows)] +pub(crate) type ConnectAddr = crate::udp::sockaddr_storage; + +/// Winsock declarations/constants shared by the windows `imp` and `udp_imp` +/// arms. Externs beyond `bun_windows_sys::ws2_32`'s subset are declared here +/// (namespaced — several share names with the wrappers below). +#[cfg(windows)] +mod win { + #![allow(non_camel_case_types, non_snake_case)] + use core::ffi::{c_char, c_int, c_ulong, c_void}; + + pub(super) use bun_windows_sys::kernel32; + pub(super) use bun_windows_sys::ws2_32 as ws2; + + pub(super) type SockaddrStorage = crate::udp::sockaddr_storage; + + // winsock2.h + pub(super) const SOL_SOCKET: c_int = 0xFFFF; + pub(super) const SO_REUSEADDR: c_int = 0x0004; + pub(super) const SO_KEEPALIVE: c_int = 0x0008; + pub(super) const SO_BROADCAST: c_int = 0x0020; + pub(super) const SO_LINGER: c_int = 0x0080; + /// `((int)(~SO_REUSEADDR))` (winsock2.h). + pub(super) const SO_EXCLUSIVEADDRUSE: c_int = !SO_REUSEADDR; + pub(super) const SD_RECEIVE: c_int = 0; + pub(super) const SD_SEND: c_int = 1; + pub(super) const SOCKET_ERROR: c_int = -1; + /// `_IOW('f', 126, u_long)` (winsock2.h). + pub(super) const FIONBIO: c_int = 0x8004667Eu32 as c_int; + // ws2def.h + pub(super) const AI_PASSIVE: c_int = 0x01; + pub(super) const IPPROTO_IP: c_int = 0; + pub(super) const IPPROTO_IPV6: c_int = 41; + // ws2ipdef.h + pub(super) const IP_TOS: c_int = 3; + pub(super) const IP_TTL: c_int = 4; + pub(super) const IP_MULTICAST_IF: c_int = 9; + pub(super) const IP_MULTICAST_TTL: c_int = 10; + pub(super) const IP_MULTICAST_LOOP: c_int = 11; + pub(super) const IP_ADD_MEMBERSHIP: c_int = 12; + pub(super) const IP_DROP_MEMBERSHIP: c_int = 13; + pub(super) const IP_ADD_SOURCE_MEMBERSHIP: c_int = 15; + pub(super) const IP_DROP_SOURCE_MEMBERSHIP: c_int = 16; + pub(super) const IP_PKTINFO: c_int = 19; + pub(super) const IP_RECVTOS: c_int = 40; + pub(super) const IPV6_UNICAST_HOPS: c_int = 4; + pub(super) const IPV6_MULTICAST_IF: c_int = 9; + pub(super) const IPV6_MULTICAST_HOPS: c_int = 10; + pub(super) const IPV6_MULTICAST_LOOP: c_int = 11; + pub(super) const IPV6_JOIN_GROUP: c_int = 12; + pub(super) const IPV6_LEAVE_GROUP: c_int = 13; + /// Windows has no IPV6_RECVPKTINFO; the C shim aliased it to IPV6_PKTINFO. + pub(super) const IPV6_PKTINFO: c_int = 19; + pub(super) const IPV6_V6ONLY: c_int = 27; + pub(super) const IPV6_TCLASS: c_int = 39; + pub(super) const IPV6_RECVTCLASS: c_int = 40; + pub(super) const MCAST_JOIN_SOURCE_GROUP: c_int = 45; + pub(super) const MCAST_LEAVE_SOURCE_GROUP: c_int = 46; + pub(super) const TCP_NODELAY: c_int = 0x0001; + /// ws2ipdef.h — keep-alive idle time in seconds (Win32's TCP_KEEPIDLE). + pub(super) const TCP_KEEPALIVE: c_int = 3; + // mstcpip.h `_WSAIOW(IOC_VENDOR, n)` + pub(super) const SIO_UDP_CONNRESET: u32 = 0x9800000C; + pub(super) const SIO_UDP_NETRESET: u32 = 0x9800000F; + pub(super) const SIO_TCP_INITIAL_RTO: u32 = 0x98000011; + /// mstcpip.h `((UCHAR)-2)`. + pub(super) const TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS: u8 = 0xFE; + /// handleapi.h. + pub(super) const HANDLE_FLAG_INHERIT: u32 = 0x1; + + pub(super) const WSAEINTR: c_int = ws2::WinsockError::WSAEINTR.0 as c_int; + pub(super) const WSAEBADF: c_int = ws2::WinsockError::WSAEBADF.0 as c_int; + pub(super) const WSAEINVAL: c_int = ws2::WinsockError::WSAEINVAL.0 as c_int; + pub(super) const WSAEWOULDBLOCK: c_int = ws2::WinsockError::WSAEWOULDBLOCK.0 as c_int; + pub(super) const WSAEINPROGRESS: c_int = ws2::WinsockError::WSAEINPROGRESS.0 as c_int; + pub(super) const WSAEALREADY: c_int = ws2::WinsockError::WSAEALREADY.0 as c_int; + pub(super) const WSAENOPROTOOPT: c_int = ws2::WinsockError::WSAENOPROTOOPT.0 as c_int; + pub(super) const WSAEOPNOTSUPP: c_int = ws2::WinsockError::WSAEOPNOTSUPP.0 as c_int; + pub(super) const WSAEAFNOSUPPORT: c_int = ws2::WinsockError::WSAEAFNOSUPPORT.0 as c_int; + pub(super) const WSAENETDOWN: c_int = ws2::WinsockError::WSAENETDOWN.0 as c_int; + pub(super) const WSAENETRESET: c_int = ws2::WinsockError::WSAENETRESET.0 as c_int; + pub(super) const WSAECONNRESET: c_int = ws2::WinsockError::WSAECONNRESET.0 as c_int; + /// winerror.h ERROR_PATH_NOT_FOUND — the C source simulated ENOENT with it. + pub(super) const ERROR_PATH_NOT_FOUND: c_int = + bun_windows_sys::Win32Error::PATH_NOT_FOUND.0 as c_int; + /// winerror.h — the C source simulated ENAMETOOLONG with it. + pub(super) const ERROR_FILENAME_EXCED_RANGE: c_int = 206; + + /// winsock2.h `struct linger` — `u_short` pair, unlike POSIX's ints. + #[repr(C)] + pub(super) struct linger { + pub(super) l_onoff: u16, + pub(super) l_linger: u16, + } + + /// ws2ipdef.h. + #[repr(C)] + pub(super) struct ip_mreq { + pub(super) imr_multiaddr: ws2::in_addr, + pub(super) imr_interface: ws2::in_addr, + } + + /// ws2ipdef.h — the interface is a `ULONG` index, not an address. + #[repr(C)] + pub(super) struct ipv6_mreq { + pub(super) ipv6mr_multiaddr: ws2::in6_addr, + pub(super) ipv6mr_interface: c_ulong, + } + + /// ws2ipdef.h — NOTE: field ORDER differs from Linux's ip_mreq_source. + #[repr(C)] + pub(super) struct ip_mreq_source { + pub(super) imr_multiaddr: ws2::in_addr, + pub(super) imr_sourceaddr: ws2::in_addr, + pub(super) imr_interface: ws2::in_addr, + } + + /// ws2ipdef.h GROUP_SOURCE_REQ (natural MSVC layout: 4 pad bytes after + /// the ULONG before the 8-aligned storages). + #[repr(C)] + pub(super) struct group_source_req { + pub(super) gsr_interface: c_ulong, + pub(super) gsr_group: SockaddrStorage, + pub(super) gsr_source: SockaddrStorage, + } + + /// mstcpip.h TCP_INITIAL_RTO_PARAMETERS. + #[repr(C)] + pub(super) struct TCP_INITIAL_RTO_PARAMETERS { + pub(super) Rtt: u16, + pub(super) MaxSynRetransmissions: u8, + } + + /// afunix.h SOCKADDR_UN (`UNIX_PATH_MAX` = 108). + #[repr(C)] + pub(super) struct sockaddr_un { + pub(super) sun_family: u16, + pub(super) sun_path: [u8; 108], + } + + #[link(name = "ws2_32")] + unsafe extern "system" { + pub(super) fn socket(af: c_int, ty: c_int, protocol: c_int) -> usize; + pub(super) fn bind(s: usize, name: *const ws2::sockaddr, namelen: c_int) -> c_int; + pub(super) fn listen(s: usize, backlog: c_int) -> c_int; + pub(super) fn accept(s: usize, addr: *mut ws2::sockaddr, addrlen: *mut c_int) -> usize; + pub(super) fn connect(s: usize, name: *const ws2::sockaddr, namelen: c_int) -> c_int; + pub(super) fn getsockname(s: usize, name: *mut ws2::sockaddr, namelen: *mut c_int) + -> c_int; + pub(super) fn getpeername(s: usize, name: *mut ws2::sockaddr, namelen: *mut c_int) + -> c_int; + pub(super) fn setsockopt( + s: usize, + level: c_int, + optname: c_int, + optval: *const c_void, + optlen: c_int, + ) -> c_int; + pub(super) fn getsockopt( + s: usize, + level: c_int, + optname: c_int, + optval: *mut c_void, + optlen: *mut c_int, + ) -> c_int; + pub(super) fn shutdown(s: usize, how: c_int) -> c_int; + pub(super) fn ioctlsocket(s: usize, cmd: c_int, argp: *mut c_ulong) -> c_int; + pub(super) fn sendto( + s: usize, + buf: *const c_void, + len: c_int, + flags: c_int, + to: *const ws2::sockaddr, + tolen: c_int, + ) -> c_int; + pub(super) fn recvfrom( + s: usize, + buf: *mut c_void, + len: c_int, + flags: c_int, + from: *mut ws2::sockaddr, + fromlen: *mut c_int, + ) -> c_int; + pub(super) fn inet_pton(family: c_int, src: *const c_char, dst: *mut c_void) -> c_int; + pub(super) fn WSAIoctl( + s: usize, + code: u32, + in_buf: *mut c_void, + in_len: u32, + out_buf: *mut c_void, + out_len: u32, + bytes_returned: *mut u32, + overlapped: *mut c_void, + completion_routine: *mut c_void, + ) -> c_int; + } + + #[inline] + pub(super) fn wsa_errno() -> i32 { + ws2::WSAGetLastError() + } + + #[inline] + pub(super) fn so(fd: usize, level: c_int, opt: c_int, val: &T) -> c_int { + // SAFETY: the kernel reads exactly size_of::() bytes from `val`. + unsafe { + setsockopt( + fd, + level, + opt, + core::ptr::from_ref(val).cast::(), + core::mem::size_of::() as c_int, + ) + } + } + + /// Zero-initialized C struct. + pub(super) fn pod_zeroed() -> T { + // SAFETY: only instantiated with plain-old-data winsock structs for + // which all-zero bytes is a valid value. + unsafe { core::mem::zeroed() } + } + + /// Caller must have checked `ss_family == AF_INET`. + pub(super) fn as_v4(ss: &SockaddrStorage) -> &ws2::sockaddr_in { + // SAFETY: SOCKADDR_STORAGE is sized/aligned for every sockaddr type. + unsafe { &*core::ptr::from_ref(ss).cast::() } + } + + /// Caller must have checked `ss_family == AF_INET6`. + pub(super) fn as_v6(ss: &SockaddrStorage) -> &ws2::sockaddr_in6 { + // SAFETY: SOCKADDR_STORAGE is sized/aligned for every sockaddr type. + unsafe { &*core::ptr::from_ref(ss).cast::() } + } + + /// FD_CLOEXEC parity: keep sockets out of spawned children (POSIX side + /// passes SOCK_CLOEXEC / sets the flag via fcntl). + pub(super) fn set_no_inherit(fd: usize) { + kernel32::SetHandleInformation(fd as bun_windows_sys::HANDLE, HANDLE_FLAG_INHERIT, 0); + } + + /// `win32_set_nonblocking` (bsd.c:343-354): libuv only sets FIONBIO at + /// poll init, so connect paths must set it explicitly. + pub(super) fn set_fionbio(fd: usize) { + let mut yes: c_ulong = 1; + // SAFETY: FIONBIO reads one u_long from `yes`; failure ignored as in C. + unsafe { ioctlsocket(fd, FIONBIO, &mut yes) }; + } + + /// Try the IPv6 option; on WSAENOPROTOOPT/WSAEINVAL retry the IPv4 option + /// (bsd.c:375-392). 0 or negative WSA error. + pub(super) fn setsockopt_6_or_4(fd: usize, option4: c_int, option6: c_int, val: &T) -> i32 { + if so(fd, IPPROTO_IPV6, option6, val) == 0 { + return 0; + } + let e = wsa_errno(); + if e == WSAENOPROTOOPT || e == WSAEINVAL { + if so(fd, IPPROTO_IP, option4, val) == 0 { + return 0; + } + return -wsa_errno(); + } + -e + } + + /// Connect/bind namelen by family (16 for v4, 28 for v6). + pub(super) fn ip_addrlen(family: c_int) -> c_int { + if family == ws2::AF_INET { + core::mem::size_of::() as c_int + } else { + core::mem::size_of::() as c_int + } + } +} + +#[cfg(not(windows))] +mod imp { + use core::ffi::{CStr, c_char, c_int, c_void}; + use core::mem::{offset_of, size_of, zeroed}; + use core::ptr; + + use crate::write::UsIoVec; + use crate::{ + LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE, LIBUS_LISTEN_REUSE_ADDR, LIBUS_LISTEN_REUSE_PORT, + LIBUS_SOCKET_IPV6_ONLY, + }; + use crate::{LIBUS_SOCKET_DESCRIPTOR, LIBUS_SOCKET_ERROR}; + + const _: () = assert!(size_of::() == size_of::()); + + #[cfg(target_vendor = "apple")] + const MSG_NOSIGNAL: c_int = 0; // no MSG_NOSIGNAL on Darwin; SO_NOSIGPIPE at creation + #[cfg(not(target_vendor = "apple"))] + const MSG_NOSIGNAL: c_int = libc::MSG_NOSIGNAL; + + #[inline] + pub(crate) fn errno() -> i32 { + std::io::Error::last_os_error().raw_os_error().unwrap_or(0) + } + + macro_rules! retry_eintr { + ($e:expr) => { + loop { + let r = $e; + if r == -1 && errno() == libc::EINTR { + continue; + } + break r; + } + }; + } + + /// Fault hook for byte-count ops: early-returns `-errno`/`0`, or clamps + /// `$len` in place (SHORT). No-op without the feature (R11.1). + macro_rules! fault_check { + ($sc:ident, $fd:expr, $len:ident) => { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::$sc, $fd as c_int, $len) { + Some(crate::fault::Fault::Errno(e)) => return -(e as isize), + Some(crate::fault::Fault::Zero) => return 0, + Some(crate::fault::Fault::Clamp(n)) => $len = n, + None => {} + } + }; + ($sc:ident, $fd:expr) => { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::$sc, $fd as c_int, 0) { + Some(crate::fault::Fault::Errno(e)) => return -(e as isize), + Some(crate::fault::Fault::Zero) => return 0, + Some(crate::fault::Fault::Clamp(_)) | None => {} + } + }; + } + + #[inline] + fn so(fd: LIBUS_SOCKET_DESCRIPTOR, level: c_int, opt: c_int, val: &T) -> c_int { + // SAFETY: the kernel reads exactly size_of::() bytes from `val`. + unsafe { + libc::setsockopt( + fd, + level, + opt, + ptr::from_ref(val).cast::(), + size_of::() as libc::socklen_t, + ) + } + } + + /// Zero-initialized C struct. + fn pod_zeroed() -> T { + // SAFETY: only instantiated with plain-old-data C structs (sockaddr_*, + // msghdr, addrinfo, mreq) for which all-zero bytes is a valid value. + unsafe { zeroed() } + } + + /// Caller must have checked `ss_family == AF_INET`. + fn as_v4(ss: &libc::sockaddr_storage) -> &libc::sockaddr_in { + // SAFETY: sockaddr_storage is sized/aligned for every sockaddr type. + unsafe { &*ptr::from_ref(ss).cast::() } + } + + /// Caller must have checked `ss_family == AF_INET6`. + fn as_v6(ss: &libc::sockaddr_storage) -> &libc::sockaddr_in6 { + // SAFETY: sockaddr_storage is sized/aligned for every sockaddr type. + unsafe { &*ptr::from_ref(ss).cast::() } + } + + // ───────────────────────── byte I/O (R8.11) ───────────────────────── + + /// send(2), MSG_NOSIGNAL|MSG_DONTWAIT, EINTR-retried. No MSG_MORE (C7). + pub(crate) fn send(fd: LIBUS_SOCKET_DESCRIPTOR, data: &[u8]) -> isize { + #[cfg_attr(not(feature = "socket_fault_injection"), allow(unused_mut))] + let mut len = data.len(); + fault_check!(SEND, fd, len); + // SAFETY: `data[..len]` is a valid read of `len` bytes (len ≤ data.len()). + let r = retry_eintr!(unsafe { + libc::send( + fd, + data.as_ptr().cast(), + len, + MSG_NOSIGNAL | libc::MSG_DONTWAIT, + ) + }); + if r < 0 { + -(errno() as isize) + } else { + r as isize + } + } + + /// writev(2), IOV_MAX-capped at 1024, EINTR-retried. + pub(crate) fn writev(fd: LIBUS_SOCKET_DESCRIPTOR, iov: &[UsIoVec]) -> isize { + fault_check!(WRITEV, fd); + let count = iov.len().min(1024); + // SAFETY: UsIoVec is layout-identical to iovec (asserted above); + // count ≤ iov.len(). + let r = retry_eintr!(unsafe { + libc::writev(fd, iov.as_ptr().cast::(), count as c_int) + }); + if r < 0 { + -(errno() as isize) + } else { + r as isize + } + } + + /// 2-chunk writev (`bsd_write2`); shares the WRITEV fault hook (R11.2). + pub(crate) fn write2(fd: LIBUS_SOCKET_DESCRIPTOR, first: &[u8], second: &[u8]) -> isize { + fault_check!(WRITEV, fd); + let chunks = [ + libc::iovec { + iov_base: first.as_ptr().cast_mut().cast(), + iov_len: first.len(), + }, + libc::iovec { + iov_base: second.as_ptr().cast_mut().cast(), + iov_len: second.len(), + }, + ]; + // SAFETY: `chunks` holds 2 valid iovecs borrowing `first`/`second`. + let r = retry_eintr!(unsafe { libc::writev(fd, chunks.as_ptr(), 2) }); + if r < 0 { + -(errno() as isize) + } else { + r as isize + } + } + + /// recv(2) with MSG_DONTWAIT into the loop's shared buffer, EINTR-retried. + pub(crate) fn recv(fd: LIBUS_SOCKET_DESCRIPTOR, buf: &mut [u8]) -> isize { + #[cfg_attr(not(feature = "socket_fault_injection"), allow(unused_mut))] + let mut len = buf.len(); + fault_check!(RECV, fd, len); + // SAFETY: `buf[..len]` is a valid write of `len` bytes (len ≤ buf.len()). + let r = retry_eintr!(unsafe { + libc::recv(fd, buf.as_mut_ptr().cast(), len, libc::MSG_DONTWAIT) + }); + if r < 0 { + -(errno() as isize) + } else { + r as isize + } + } + + /// Control buffer sized/aligned for one SCM_RIGHTS int. + #[repr(C)] + union CmsgBuf { + hdr: libc::cmsghdr, + buf: [u8; 64], + } + + /// sendmsg with SCM_RIGHTS fd attachment (SpawnIpc, C14; socket.c:558-600). + pub(crate) fn send_with_fd( + fd: LIBUS_SOCKET_DESCRIPTOR, + data: &[u8], + pass: LIBUS_SOCKET_DESCRIPTOR, + ) -> isize { + fault_check!(SENDMSG, fd); + // SAFETY: msg/iov/cbuf are stack-valid across the call; the control + // buffer is CMSG_SPACE(int)-sized and cmsghdr-aligned via the union. + unsafe { + let mut cbuf = CmsgBuf { buf: [0; 64] }; + let mut iov = libc::iovec { + iov_base: data.as_ptr().cast_mut().cast(), + iov_len: data.len(), + }; + let mut msg: libc::msghdr = zeroed(); + msg.msg_iov = &mut iov; + msg.msg_iovlen = 1; + msg.msg_control = cbuf.buf.as_mut_ptr().cast(); + msg.msg_controllen = libc::CMSG_SPACE(size_of::() as _) as _; + + let cmsg = libc::CMSG_FIRSTHDR(&msg); + (*cmsg).cmsg_level = libc::SOL_SOCKET; + (*cmsg).cmsg_type = libc::SCM_RIGHTS; + (*cmsg).cmsg_len = libc::CMSG_LEN(size_of::() as _) as _; + ptr::write_unaligned(libc::CMSG_DATA(cmsg).cast::(), pass); + + let r = retry_eintr!(libc::sendmsg(fd, &msg, 0)); + if r < 0 { + -(errno() as isize) + } else { + r as isize + } + } + } + + /// recvmsg with a one-int SCM_RIGHTS control buffer (ipc receive path, + /// loop.c:646-676). Returns (bytes-or-negative-errno, received fd). + pub(crate) fn recv_with_fd( + fd: LIBUS_SOCKET_DESCRIPTOR, + buf: &mut [u8], + ) -> (isize, Option) { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::RECVMSG, fd, 0) { + Some(crate::fault::Fault::Errno(e)) => return (-(e as isize), None), + Some(crate::fault::Fault::Zero) => return (0, None), + Some(crate::fault::Fault::Clamp(_)) | None => {} + } + // SAFETY: msg/iov/cbuf are stack-valid across the call; the kernel + // writes at most CMSG_LEN(int) control bytes and buf.len() data bytes. + unsafe { + let mut cbuf = CmsgBuf { buf: [0; 64] }; + let mut iov = libc::iovec { + iov_base: buf.as_mut_ptr().cast(), + iov_len: buf.len(), + }; + let mut msg: libc::msghdr = zeroed(); + msg.msg_iov = &mut iov; + msg.msg_iovlen = 1; + msg.msg_control = cbuf.buf.as_mut_ptr().cast(); + msg.msg_controllen = libc::CMSG_LEN(size_of::() as _) as _; + + let r = retry_eintr!(libc::recvmsg(fd, &mut msg, libc::MSG_DONTWAIT)); + if r < 0 { + return (-(errno() as isize), None); + } + let mut received = None; + if r > 0 && msg.msg_controllen > 0 { + let cmsg = libc::CMSG_FIRSTHDR(&msg); + if !cmsg.is_null() + && (*cmsg).cmsg_level == libc::SOL_SOCKET + && (*cmsg).cmsg_type == libc::SCM_RIGHTS + { + received = Some(ptr::read_unaligned(libc::CMSG_DATA(cmsg).cast::())); + } + } + (r as isize, received) + } + } + + // ─────────────────── close / shutdown / nonblocking ─────────────────── + + /// close(2) with optional SO_LINGER{1,0} RST (CloseCode::failure — C12, + /// socket.c:305-309). + pub(crate) fn close(fd: LIBUS_SOCKET_DESCRIPTOR, rst: bool) { + if rst { + let l = libc::linger { + l_onoff: 1, + l_linger: 0, + }; + so(fd, libc::SOL_SOCKET, libc::SO_LINGER, &l); + } + // SAFETY: plain fd syscall; caller owns the fd. + unsafe { libc::close(fd) }; + } + + pub(crate) fn shutdown(fd: LIBUS_SOCKET_DESCRIPTOR) { + // SAFETY: plain fd syscall. + unsafe { libc::shutdown(fd, libc::SHUT_WR) }; + } + + pub(crate) fn shutdown_read(fd: LIBUS_SOCKET_DESCRIPTOR) { + // SAFETY: plain fd syscall. + unsafe { libc::shutdown(fd, libc::SHUT_RD) }; + } + + /// Set O_NONBLOCK + FD_CLOEXEC via fcntl (bsd.c:356-373); returns `fd`. + pub(crate) fn set_nonblocking(fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + if fd != LIBUS_SOCKET_ERROR { + // SAFETY: plain fd syscalls; failures are ignored as in C. + unsafe { + let flags = libc::fcntl(fd, libc::F_GETFL, 0); + libc::fcntl(fd, libc::F_SETFL, flags | libc::O_NONBLOCK); + let flags = libc::fcntl(fd, libc::F_GETFD, 0); + libc::fcntl(fd, libc::F_SETFD, flags | libc::FD_CLOEXEC); + } + } + fd + } + + fn apple_no_sigpipe(fd: LIBUS_SOCKET_DESCRIPTOR) -> LIBUS_SOCKET_DESCRIPTOR { + #[cfg(target_vendor = "apple")] + if fd != LIBUS_SOCKET_ERROR { + let one: c_int = 1; + so(fd, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, &one); + } + fd + } + + /// Public alias for the from_fd path (R3.27 applies it to adopted fds). + pub(crate) fn no_sigpipe(fd: LIBUS_SOCKET_DESCRIPTOR) { + apple_no_sigpipe(fd); + } + + /// Write thread-local errno: listen registration failure reports through + /// BOTH the out-param and errno (context.c:379-389). + pub(crate) fn set_errno(v: i32) { + // SAFETY: thread-local errno slot is always valid to write. + unsafe { + #[cfg(target_os = "linux")] + { + *libc::__errno_location() = v; + } + #[cfg(target_os = "android")] + { + *libc::__errno() = v; + } + #[cfg(target_vendor = "apple")] + { + *libc::__error() = v; + } + #[cfg(target_os = "freebsd")] + { + *libc::__error() = v; + } + } + } + + /// socketpair(AF_UNIX, SOCK_STREAM) — POSIX only (R3.28). 0 on success + /// with both fds written; fds are NOT made nonblocking here (from_fd does). + pub(crate) fn socketpair_stream(fds: &mut [LIBUS_SOCKET_DESCRIPTOR; 2]) -> i32 { + // SAFETY: `fds` is a caller-owned 2-int out array. + unsafe { libc::socketpair(libc::AF_UNIX, libc::SOCK_STREAM, 0, fds.as_mut_ptr()) } + } + + // ───────────────────── socket creation (R8.1) ───────────────────── + + /// socket(2), EINTR-retried, nonblocking + cloexec (one syscall where + /// SOCK_CLOEXEC|SOCK_NONBLOCK exist), SO_NOSIGPIPE on Darwin. + pub(crate) fn create_socket( + domain: c_int, + ty: c_int, + protocol: c_int, + ) -> Result { + #[cfg(not(target_vendor = "apple"))] + { + let flags = libc::SOCK_CLOEXEC | libc::SOCK_NONBLOCK; + // SAFETY: plain syscall. + let fd = retry_eintr!(unsafe { libc::socket(domain, ty | flags, protocol) }); + if fd == -1 { + return Err(errno()); + } + Ok(apple_no_sigpipe(fd)) + } + #[cfg(target_vendor = "apple")] + { + // SAFETY: plain syscall. + let fd = retry_eintr!(unsafe { libc::socket(domain, ty, protocol) }); + if fd == -1 { + return Err(errno()); + } + Ok(set_nonblocking(apple_no_sigpipe(fd))) + } + } + + // ───────────────────── addr plumbing (R8.2/R8.3) ───────────────────── + + /// `struct bsd_addr_t` equivalent: raw sockaddr storage + finalized view. + /// IPs cross the API as raw 4/16 bytes — no string formatting (R8.2). + pub(crate) struct BsdAddr { + mem: libc::sockaddr_storage, + len: libc::socklen_t, + ip_off: u32, + ip_len: u32, + port: i32, + } + + impl BsdAddr { + pub(crate) fn zeroed() -> Self { + BsdAddr { + mem: pod_zeroed(), + len: size_of::() as _, + ip_off: 0, + ip_len: 0, + port: -1, + } + } + + /// `internal_finalize_bsd_addr` (bsd.c:743-757): unknown family → + /// empty ip, port −1. + fn finalize(&mut self) { + match self.mem.ss_family as c_int { + libc::AF_INET6 => { + let sa = as_v6(&self.mem); + self.ip_off = offset_of!(libc::sockaddr_in6, sin6_addr) as u32; + self.ip_len = 16; + self.port = u16::from_be(sa.sin6_port) as i32; + } + libc::AF_INET => { + let sa = as_v4(&self.mem); + self.ip_off = offset_of!(libc::sockaddr_in, sin_addr) as u32; + self.ip_len = 4; + self.port = u16::from_be(sa.sin_port) as i32; + } + _ => { + self.ip_len = 0; + self.port = -1; + } + } + } + + /// Raw address bytes (4 = v4, 16 = v6, empty = unknown family). + pub(crate) fn ip(&self) -> &[u8] { + // SAFETY: ip_off/ip_len point inside self.mem (set by finalize). + unsafe { + core::slice::from_raw_parts( + (&raw const self.mem).cast::().add(self.ip_off as usize), + self.ip_len as usize, + ) + } + } + + pub(crate) fn port(&self) -> i32 { + self.port + } + } + + /// getsockname + finalize; None on failure (bsd.c:759-766). + pub(crate) fn local_addr(fd: LIBUS_SOCKET_DESCRIPTOR) -> Option { + let mut addr = BsdAddr::zeroed(); + // SAFETY: addr.len starts as sizeof(sockaddr_storage); kernel writes ≤ that. + let rc = unsafe { libc::getsockname(fd, (&raw mut addr.mem).cast(), &mut addr.len) }; + if rc != 0 { + return None; + } + addr.finalize(); + Some(addr) + } + + /// getpeername + finalize; None on failure (bsd.c:768-775). + pub(crate) fn remote_addr(fd: LIBUS_SOCKET_DESCRIPTOR) -> Option { + let mut addr = BsdAddr::zeroed(); + // SAFETY: addr.len starts as sizeof(sockaddr_storage); kernel writes ≤ that. + let rc = unsafe { libc::getpeername(fd, (&raw mut addr.mem).cast(), &mut addr.len) }; + if rc != 0 { + return None; + } + addr.finalize(); + Some(addr) + } + + // ───────────────────────── accept (R8.10) ───────────────────────── + + /// accept4(SOCK_CLOEXEC|SOCK_NONBLOCK) where available, EINTR-retried, + /// with the macOS addrlen==0 dead-socket quirk (bsd.c:790-847). + pub(crate) fn accept( + fd: LIBUS_SOCKET_DESCRIPTOR, + ) -> Result<(LIBUS_SOCKET_DESCRIPTOR, BsdAddr), i32> { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::ACCEPT, fd, 0) { + Some(crate::fault::Fault::Errno(e)) => return Err(e), + Some(crate::fault::Fault::Zero) => return Err(errno()), + Some(crate::fault::Fault::Clamp(_)) | None => {} + } + let mut addr = BsdAddr::zeroed(); + let accepted = loop { + addr.len = size_of::() as _; + + // SAFETY: addr.len tracks the storage capacity; kernel writes ≤ that. + #[cfg(not(target_vendor = "apple"))] + let accepted = unsafe { + libc::accept4( + fd, + (&raw mut addr.mem).cast(), + &mut addr.len, + libc::SOCK_CLOEXEC | libc::SOCK_NONBLOCK, + ) + }; + // SAFETY: addr.len tracks the storage capacity; kernel writes ≤ that. + #[cfg(target_vendor = "apple")] + let accepted = unsafe { libc::accept(fd, (&raw mut addr.mem).cast(), &mut addr.len) }; + + if accepted == -1 && errno() == libc::EINTR { + continue; + } + if accepted == LIBUS_SOCKET_ERROR { + return Err(errno()); + } + + // XNU bug: dual-stack v4 RST-abort can accept() with addrlen==0 + // but buffered connectx() data may still be readable. + #[cfg(target_vendor = "apple")] + if addr.len == 0 { + let mut peek = [0u8; 1]; + // SAFETY: 1-byte peek into a stack buffer. + let has_data = unsafe { + libc::recv( + accepted, + peek.as_mut_ptr().cast(), + 1, + libc::MSG_PEEK | libc::MSG_DONTWAIT, + ) + }; + if has_data <= 0 { + close(accepted, false); + continue; + } + } + + break accepted; + }; + addr.finalize(); + #[cfg(target_vendor = "apple")] + let accepted = set_nonblocking(apple_no_sigpipe(accepted)); + Ok((accepted, addr)) + } + + // ─────────────────── option helpers (R8.12-R8.14) ─────────────────── + + pub(crate) fn nodelay(fd: LIBUS_SOCKET_DESCRIPTOR, enabled: bool) { + let v: c_int = enabled as c_int; + so(fd, libc::IPPROTO_TCP, libc::TCP_NODELAY, &v); + } + + /// SO_KEEPALIVE (+idle/intvl/cnt). Verbatim C convention (bsd.c:547-613): + /// 0 on success, positive errno on setsockopt failure, −1 for delay==0. + pub(crate) fn keepalive(fd: LIBUS_SOCKET_DESCRIPTOR, on: bool, delay: u32) -> i32 { + let on_val: c_int = on as c_int; + if so(fd, libc::SOL_SOCKET, libc::SO_KEEPALIVE, &on_val) != 0 { + return errno(); + } + if !on { + return 0; + } + if delay == 0 { + return -1; + } + #[cfg(target_vendor = "apple")] + const IDLE_OPT: c_int = libc::TCP_KEEPALIVE; + #[cfg(not(target_vendor = "apple"))] + const IDLE_OPT: c_int = libc::TCP_KEEPIDLE; + if so(fd, libc::IPPROTO_TCP, IDLE_OPT, &(delay as c_int)) != 0 { + return errno(); + } + let intvl: c_int = 1; + if so(fd, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, &intvl) != 0 { + return errno(); + } + let cnt: c_int = 10; + if so(fd, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, &cnt) != 0 { + return errno(); + } + 0 + } + + /// Option level for TOS: IP_TOS or IPV6_TCLASS by bound family (R8.13). + fn tos_level(fd: LIBUS_SOCKET_DESCRIPTOR) -> Result<(c_int, c_int), i32> { + let mut storage: libc::sockaddr_storage = pod_zeroed(); + let mut len = size_of::() as libc::socklen_t; + // SAFETY: `len` starts as sizeof(sockaddr_storage); kernel writes ≤ that. + if unsafe { libc::getsockname(fd, (&raw mut storage).cast(), &mut len) } != 0 { + return Err(-errno()); + } + match storage.ss_family as c_int { + libc::AF_INET => Ok((libc::IPPROTO_IP, libc::IP_TOS)), + libc::AF_INET6 => Ok((libc::IPPROTO_IPV6, libc::IPV6_TCLASS)), + _ => Err(-libc::EINVAL), + } + } + + /// 0 or negative errno. + pub(crate) fn set_tos(fd: LIBUS_SOCKET_DESCRIPTOR, tos: i32) -> i32 { + let (level, option) = match tos_level(fd) { + Ok(v) => v, + Err(e) => return e, + }; + if so(fd, level, option, &(tos as c_int)) != 0 { + return -errno(); + } + 0 + } + + /// TOS value or negative errno. + pub(crate) fn get_tos(fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + let (level, option) = match tos_level(fd) { + Ok(v) => v, + Err(e) => return e, + }; + let mut tos: c_int = 0; + let mut len = size_of::() as libc::socklen_t; + // SAFETY: kernel writes ≤ `len` (= sizeof(int)) bytes into `tos`. + let rc = unsafe { libc::getsockopt(fd, level, option, (&raw mut tos).cast(), &mut len) }; + if rc != 0 { + return -errno(); + } + tos + } + + /// Try the IPv6 option; on ENOPROTOOPT/EINVAL retry the IPv4 option + /// (bsd.c:375-392). 0 or negative errno. + fn setsockopt_6_or_4( + fd: LIBUS_SOCKET_DESCRIPTOR, + option4: c_int, + option6: c_int, + val: &T, + ) -> i32 { + if so(fd, libc::IPPROTO_IPV6, option6, val) == 0 { + return 0; + } + let e = errno(); + if e == libc::ENOPROTOOPT || e == libc::EINVAL { + if so(fd, libc::IPPROTO_IP, option4, val) == 0 { + return 0; + } + return -errno(); + } + -e + } + + pub(crate) fn broadcast(fd: LIBUS_SOCKET_DESCRIPTOR, enabled: bool) -> i32 { + let v: c_int = enabled as c_int; + if so(fd, libc::SOL_SOCKET, libc::SO_BROADCAST, &v) != 0 { + return -errno(); + } + 0 + } + + pub(crate) fn multicast_loopback(fd: LIBUS_SOCKET_DESCRIPTOR, enabled: bool) -> i32 { + let v: c_int = enabled as c_int; + setsockopt_6_or_4(fd, libc::IP_MULTICAST_LOOP, libc::IPV6_MULTICAST_LOOP, &v) + } + + /// Rejects multicast-range (224.0.0.0/4) IPv4 interface addresses + /// (bsd.c:406-435). 0 or negative errno. + pub(crate) fn multicast_interface( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: &libc::sockaddr_storage, + ) -> i32 { + if addr.ss_family as c_int == libc::AF_INET { + let addr4 = as_v4(addr); + let first_octet = u32::from_be(addr4.sin_addr.s_addr) >> 24; + if !(224..=239).contains(&first_octet) { + if so(fd, libc::IPPROTO_IP, libc::IP_MULTICAST_IF, &addr4.sin_addr) != 0 { + return -errno(); + } + return 0; + } + } + if addr.ss_family as c_int == libc::AF_INET6 { + let addr6 = as_v6(addr); + if so( + fd, + libc::IPPROTO_IPV6, + libc::IPV6_MULTICAST_IF, + &addr6.sin6_scope_id, + ) != 0 + { + return -errno(); + } + return 0; + } + -libc::EINVAL + } + + // Darwin's libc crate lacks group_source_req / MCAST_*_SOURCE_GROUP; + // values and pack(4) layout from xnu netinet/in.h. + #[cfg(target_vendor = "apple")] + #[repr(C, packed(4))] + struct GroupSourceReq { + gsr_interface: u32, + gsr_group: libc::sockaddr_storage, + gsr_source: libc::sockaddr_storage, + } + // BSD value 82/83 (FreeBSD netinet/in.h, copied by xnu); linux 46/47. + #[cfg(any(target_vendor = "apple", target_os = "freebsd"))] + const MCAST_JOIN_SOURCE_GROUP: c_int = 82; + #[cfg(any(target_vendor = "apple", target_os = "freebsd"))] + const MCAST_LEAVE_SOURCE_GROUP: c_int = 83; + // libc lacks `group_source_req` on linux/freebsd too; glibc/FreeBSD layout is + // naturally aligned (sockaddr_storage is 8-aligned, 4 pad bytes after gsr_interface). + #[cfg(not(target_vendor = "apple"))] + #[repr(C)] + struct GroupSourceReq { + gsr_interface: u32, + gsr_group: libc::sockaddr_storage, + gsr_source: libc::sockaddr_storage, + } + #[cfg(not(any(target_vendor = "apple", target_os = "freebsd")))] + use libc::{MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP}; + + /// IGMP membership; iface family must match addr's (bsd.c:437-475). + pub(crate) fn set_membership( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: &libc::sockaddr_storage, + iface: Option<&libc::sockaddr_storage>, + drop: bool, + ) -> i32 { + if let Some(iface) = iface { + if addr.ss_family != iface.ss_family { + return -libc::EINVAL; + } + } + let rc = if addr.ss_family as c_int == libc::AF_INET6 { + let addr6 = as_v6(addr); + let mut mreq: libc::ipv6_mreq = pod_zeroed(); + mreq.ipv6mr_multiaddr = addr6.sin6_addr; + if let Some(iface) = iface { + mreq.ipv6mr_interface = as_v6(iface).sin6_scope_id as _; + } + // linux libc spells IPV6_JOIN/LEAVE_GROUP as IPV6_ADD/DROP_MEMBERSHIP (same values). + #[cfg(any(target_os = "linux", target_os = "android"))] + let option = if drop { + libc::IPV6_DROP_MEMBERSHIP + } else { + libc::IPV6_ADD_MEMBERSHIP + }; + #[cfg(not(any(target_os = "linux", target_os = "android")))] + let option = if drop { + libc::IPV6_LEAVE_GROUP + } else { + libc::IPV6_JOIN_GROUP + }; + so(fd, libc::IPPROTO_IPV6, option, &mreq) + } else { + let addr4 = as_v4(addr); + let mut mreq: libc::ip_mreq = pod_zeroed(); + mreq.imr_multiaddr.s_addr = addr4.sin_addr.s_addr; + mreq.imr_interface.s_addr = match iface { + Some(iface) => as_v4(iface).sin_addr.s_addr, + None => libc::INADDR_ANY.to_be(), + }; + let option = if drop { + libc::IP_DROP_MEMBERSHIP + } else { + libc::IP_ADD_MEMBERSHIP + }; + so(fd, libc::IPPROTO_IP, option, &mreq) + }; + if rc != 0 { -errno() } else { 0 } + } + + /// Source-specific membership (bsd.c:477-525). All families must match. + pub(crate) fn set_source_specific_membership( + fd: LIBUS_SOCKET_DESCRIPTOR, + source: &libc::sockaddr_storage, + group: &libc::sockaddr_storage, + iface: Option<&libc::sockaddr_storage>, + drop: bool, + ) -> i32 { + let family_ok = source.ss_family == group.ss_family + && iface.is_none_or(|i| i.ss_family == group.ss_family); + if family_ok { + if source.ss_family as c_int == libc::AF_INET { + let mut mreq: libc::ip_mreq_source = pod_zeroed(); + mreq.imr_interface.s_addr = match iface { + Some(iface) => as_v4(iface).sin_addr.s_addr, + None => libc::INADDR_ANY.to_be(), + }; + mreq.imr_sourceaddr.s_addr = as_v4(source).sin_addr.s_addr; + mreq.imr_multiaddr.s_addr = as_v4(group).sin_addr.s_addr; + let option = if drop { + libc::IP_DROP_SOURCE_MEMBERSHIP + } else { + libc::IP_ADD_SOURCE_MEMBERSHIP + }; + if so(fd, libc::IPPROTO_IP, option, &mreq) != 0 { + return -errno(); + } + return 0; + } else if source.ss_family as c_int == libc::AF_INET6 { + let mut mreq: GroupSourceReq = pod_zeroed(); + if let Some(iface) = iface { + mreq.gsr_interface = as_v6(iface).sin6_scope_id as _; + } + mreq.gsr_source = *source; + mreq.gsr_group = *group; + let option = if drop { + MCAST_LEAVE_SOURCE_GROUP + } else { + MCAST_JOIN_SOURCE_GROUP + }; + if so(fd, libc::IPPROTO_IPV6, option, &mreq) != 0 { + return -errno(); + } + return 0; + } + } + -libc::EINVAL + } + + fn ttl_any(fd: LIBUS_SOCKET_DESCRIPTOR, ttl: i32, opt4: c_int, opt6: c_int) -> i32 { + if !(1..=255).contains(&ttl) { + return -libc::EINVAL; + } + setsockopt_6_or_4(fd, opt4, opt6, &(ttl as c_int)) + } + + pub(crate) fn ttl_unicast(fd: LIBUS_SOCKET_DESCRIPTOR, ttl: i32) -> i32 { + ttl_any(fd, ttl, libc::IP_TTL, libc::IPV6_UNICAST_HOPS) + } + + pub(crate) fn ttl_multicast(fd: LIBUS_SOCKET_DESCRIPTOR, ttl: i32) -> i32 { + ttl_any(fd, ttl, libc::IP_MULTICAST_TTL, libc::IPV6_MULTICAST_HOPS) + } + + /// Linux TCP_DEFER_ACCEPT = 1s; FreeBSD SO_ACCEPTFILTER "dataready" + /// (R8.8). 1 on success, 0 otherwise. + pub(crate) fn set_defer_accept(fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let timeout: c_int = 1; + (so(fd, libc::IPPROTO_TCP, libc::TCP_DEFER_ACCEPT, &timeout) == 0) as i32 + } + #[cfg(target_os = "freebsd")] + { + let mut afa: libc::accept_filter_arg = pod_zeroed(); + const NAME: &[u8] = b"dataready"; + for (dst, &src) in afa.af_name.iter_mut().zip(NAME) { + *dst = src as _; + } + (so(fd, libc::SOL_SOCKET, libc::SO_ACCEPTFILTER, &afa) == 0) as i32 + } + #[cfg(not(any(target_os = "linux", target_os = "android", target_os = "freebsd")))] + { + let _ = fd; + 0 + } + } + + // ───────────────────── listen path (R8.4-R8.6) ───────────────────── + + /// SO_REUSEPORT on non-Linux, SO_REUSEADDR on Linux — Android defines + /// __linux__ so it takes the SO_REUSEADDR branch (bsd.c:1044-1051). + fn set_reuseaddr(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + let one: c_int = 1; + #[cfg(not(any(target_os = "linux", target_os = "android")))] + return so(fd, libc::SOL_SOCKET, libc::SO_REUSEPORT, &one); + #[cfg(any(target_os = "linux", target_os = "android"))] + so(fd, libc::SOL_SOCKET, libc::SO_REUSEADDR, &one) + } + + fn set_reuseport(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + let one: c_int = 1; + so(fd, libc::SOL_SOCKET, libc::SO_REUSEPORT, &one) + } + + /// Reuse option sequence (R8.4). EXCLUSIVE_PORT is Windows-only. A + /// missing-SO_REUSEPORT ENOTSUP is swallowed unless DISALLOW is set. + /// pub(crate): shared with the UDP bind path (bsd_create_udp_socket). + pub(crate) fn set_reuse(fd: LIBUS_SOCKET_DESCRIPTOR, options: c_int) -> Result<(), i32> { + if options & LIBUS_LISTEN_REUSE_ADDR != 0 && set_reuseaddr(fd) != 0 { + return Err(errno()); + } + if options & LIBUS_LISTEN_REUSE_PORT != 0 && set_reuseport(fd) != 0 { + let e = errno(); + if !(e == libc::ENOTSUP && options & LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE == 0) { + return Err(e); + } + // C clears errno when swallowing the ENOTSUP (bsd.c:1091). + set_errno(0); + } + Ok(()) + } + + fn bind_and_listen( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: *const libc::sockaddr, + addrlen: libc::socklen_t, + backlog: c_int, + ) -> Result<(), i32> { + // SAFETY: caller passes a live sockaddr spanning `addrlen` bytes. + let rc = retry_eintr!(unsafe { libc::bind(fd, addr, addrlen) }); + if rc == -1 { + return Err(errno()); + } + // SAFETY: plain fd syscall. + let rc = retry_eintr!(unsafe { libc::listen(fd, backlog) }); + if rc != 0 { + return Err(errno()); + } + Ok(()) + } + + /// `bsd_bind_listen_fd` (R8.5): reuse options; plain SO_REUSEADDR always + /// on POSIX (TIME_WAIT rebinding); IPV6_V6ONLY per options (fatal on + /// failure); bind + listen(512). Err(None) = C quirk: set_reuse/V6ONLY + /// failures leave *error untouched (only bind/listen writes it). + fn bind_listen_fd( + fd: LIBUS_SOCKET_DESCRIPTOR, + family: c_int, + addr: *const libc::sockaddr, + addrlen: libc::socklen_t, + options: c_int, + ) -> Result<(), Option> { + set_reuse(fd, options).map_err(|_| None)?; + + let one: c_int = 1; + so(fd, libc::SOL_SOCKET, libc::SO_REUSEADDR, &one); + + if family == libc::AF_INET6 { + let enabled: c_int = (options & LIBUS_SOCKET_IPV6_ONLY != 0) as c_int; + if so(fd, libc::IPPROTO_IPV6, libc::IPV6_V6ONLY, &enabled) != 0 { + return Err(None); + } + } + + bind_and_listen(fd, addr, addrlen, 512).map_err(Some) + } + + /// `bsd_create_listen_socket` (R8.6): getaddrinfo(AI_PASSIVE, AF_UNSPEC, + /// SOCK_STREAM) on the decimal port; all AF_INET6 candidates first, then + /// AF_INET; first bind+listen wins. Err(0) when getaddrinfo itself failed + /// or no candidate socket could be created (C leaves `*error` untouched). + pub(crate) fn create_listen_socket( + host: Option<&CStr>, + port: i32, + options: c_int, + ) -> Result { + let mut hints: libc::addrinfo = pod_zeroed(); + hints.ai_flags = libc::AI_PASSIVE; + hints.ai_family = libc::AF_UNSPEC; + hints.ai_socktype = libc::SOCK_STREAM; + + let port_string = std::ffi::CString::new(port.to_string()).unwrap(); + let host_ptr = match host { + Some(h) => h.as_ptr(), + None => ptr::null(), + }; + let mut result: *mut libc::addrinfo = ptr::null_mut(); + // SAFETY: host/port are NUL-terminated; `result` is freed below on + // every path after a 0 return. + let rc = unsafe { libc::getaddrinfo(host_ptr, port_string.as_ptr(), &hints, &mut result) }; + if rc != 0 { + return Err(0); + } + + let mut error = 0; + for family in [libc::AF_INET6, libc::AF_INET] { + let mut a = result; + while !a.is_null() { + // SAFETY: non-null node of the live getaddrinfo list. + let ai = unsafe { &*a }; + if ai.ai_family == family { + if let Ok(fd) = create_socket(ai.ai_family, ai.ai_socktype, ai.ai_protocol) { + match bind_listen_fd( + fd, + ai.ai_family, + ai.ai_addr, + ai.ai_addrlen as _, + options, + ) { + Ok(()) => { + // SAFETY: `result` is the live list; freed once. + unsafe { libc::freeaddrinfo(result) }; + return Ok(fd); + } + Err(e) => { + if let Some(e) = e { + error = e; + } + close(fd, false); + } + } + } + } + a = ai.ai_next; + } + } + // SAFETY: `result` is the live list; freed once. + unsafe { libc::freeaddrinfo(result) }; + Err(error) + } + + // ──────────────── unix sockets (R8.7) — long-path workarounds ──────────────── + + #[cfg(target_vendor = "apple")] + unsafe extern "C" { + /// Per-thread chdir; stable Darwin syscall since 10.5. -1 clears it. + fn __pthread_fchdir(fd: c_int) -> c_int; + } + + /// sizeof(sun_path): 108 on Linux, 104 on Darwin. sun_path is the final, + /// unpadded field of sockaddr_un, so size minus offset is its length. + const SUN_PATH_LEN: usize = + size_of::() - offset_of!(libc::sockaddr_un, sun_path); + + struct UnixSocketAddr { + addr: libc::sockaddr_un, + len: libc::socklen_t, + /// Kept open across bind/connect for the long-path workaround; -1 = unused. + dirfd: c_int, + } + + /// Split `path` at the last '/' as bsd.c:1251-1254 does; dirname keeps the + /// trailing slash. Err(ENAMETOOLONG) mirrors every C failure in this path. + #[cfg(any(target_os = "linux", target_os = "android", target_vendor = "apple"))] + fn split_long_unix_path(path: &[u8]) -> Result<(usize, &[u8]), i32> { + let mut dirname_len = path.len(); + while dirname_len > 1 && path[dirname_len - 1] != b'/' { + dirname_len -= 1; + } + let basename = &path[dirname_len..]; + if dirname_len < 2 || basename.len() + 1 >= SUN_PATH_LEN || dirname_len + 1 > 4096 { + return Err(libc::ENAMETOOLONG); + } + Ok((dirname_len, basename)) + } + + #[cfg(any(target_os = "linux", target_os = "android", target_vendor = "apple"))] + fn open_socket_dir(path: &[u8], dirname_len: usize, flags: c_int) -> Result { + // C copies into a NUL-terminated buffer: an interior NUL truncates. + let dirname = &path[..dirname_len]; + let dirname = &dirname[..dirname + .iter() + .position(|&b| b == 0) + .unwrap_or(dirname.len())]; + let cstr = std::ffi::CString::new(dirname).unwrap(); + // SAFETY: cstr is NUL-terminated and outlives the call. + let dirfd = unsafe { libc::open(cstr.as_ptr(), flags | libc::O_CLOEXEC, 0o700) }; + if dirfd == -1 { + return Err(libc::ENAMETOOLONG); + } + Ok(dirfd) + } + + fn copy_to_sun_path(addr: &mut libc::sockaddr_un, bytes: &[u8]) { + // SAFETY: caller checked bytes.len() < SUN_PATH_LEN; sun_path is zeroed. + unsafe { + ptr::copy_nonoverlapping( + bytes.as_ptr(), + addr.sun_path.as_mut_ptr().cast::(), + bytes.len(), + ); + } + } + + /// sun_path overflow workaround: Linux rewrites through + /// /proc/self/fd// (bsd.c:1246-1296). + #[cfg(any(target_os = "linux", target_os = "android"))] + fn long_unix_path(path: &[u8], ua: &mut UnixSocketAddr) -> Result<(), i32> { + let (dirname_len, basename) = split_long_unix_path(path)?; + let dirfd = open_socket_dir(path, dirname_len, libc::O_PATH | libc::O_DIRECTORY)?; + + let mut sun = [0u8; SUN_PATH_LEN]; + let mut n = 0; + let mut push = |bytes: &[u8]| -> bool { + if n + bytes.len() >= SUN_PATH_LEN { + return false; + } + sun[n..n + bytes.len()].copy_from_slice(bytes); + n += bytes.len(); + true + }; + let fits = push(b"/proc/self/fd/") + && push(dirfd.to_string().as_bytes()) + && push(b"/") + && push(basename); + if !fits { + // SAFETY: dirfd is owned here and unpublished. + unsafe { libc::close(dirfd) }; + return Err(libc::ENAMETOOLONG); + } + copy_to_sun_path(&mut ua.addr, &sun[..n]); + ua.dirfd = dirfd; + Ok(()) + } + + /// Darwin: /dev/fd/N/ is not traversable, so open the parent dir and let + /// the caller __pthread_fchdir into it with a relative basename + /// (bsd.c:1298-1335). + #[cfg(target_vendor = "apple")] + fn long_unix_path(path: &[u8], ua: &mut UnixSocketAddr) -> Result<(), i32> { + let (dirname_len, basename) = split_long_unix_path(path)?; + let dirfd = open_socket_dir(path, dirname_len, libc::O_RDONLY | libc::O_DIRECTORY)?; + copy_to_sun_path(&mut ua.addr, basename); + ua.dirfd = dirfd; + Ok(()) + } + + /// `bsd_create_unix_socket_address` (R8.7). Empty path → ENOENT; abstract + /// sockets (leading NUL, Linux) shrink addrlen; oversize → ENAMETOOLONG. + fn create_unix_socket_address(path: &[u8]) -> Result { + let mut ua = UnixSocketAddr { + addr: pod_zeroed(), + len: size_of::() as _, + dirfd: -1, + }; + ua.addr.sun_family = libc::AF_UNIX as _; + + if path.is_empty() { + return Err(libc::ENOENT); + } + + #[cfg(any(target_os = "linux", target_os = "android"))] + if path.len() >= SUN_PATH_LEN && path[0] != 0 { + long_unix_path(path, &mut ua)?; + return Ok(ua); + } + #[cfg(target_vendor = "apple")] + if path.len() >= SUN_PATH_LEN { + long_unix_path(path, &mut ua)?; + return Ok(ua); + } + + if path.len() >= SUN_PATH_LEN { + return Err(libc::ENAMETOOLONG); + } + copy_to_sun_path(&mut ua.addr, path); + #[cfg(any(target_os = "linux", target_os = "android"))] + if path[0] == 0 { + ua.len = (offset_of!(libc::sockaddr_un, sun_path) + path.len()) as _; + } + Ok(ua) + } + + /// Builds the address, wraps `f` in the Darwin __pthread_fchdir dance, + /// and closes the workaround dirfd on every exit (bsd.c:1389-1414). + fn with_unix_addr( + path: &[u8], + f: impl FnOnce(*const libc::sockaddr, libc::socklen_t) -> Result, + ) -> Result { + // C sets errno on every synthesized address failure (bsd.c:1223-1339); + // callers like the server's listen-error path read thread errno. + let ua = match create_unix_socket_address(path) { + Ok(ua) => ua, + Err(e) => { + set_errno(e); + return Err(e); + } + }; + + // SAFETY: dirfd is a live directory fd owned by `ua`. + #[cfg(target_vendor = "apple")] + if ua.dirfd != -1 && unsafe { __pthread_fchdir(ua.dirfd) } != 0 { + // SAFETY: closing our own dirfd. + unsafe { libc::close(ua.dirfd) }; + set_errno(libc::ENAMETOOLONG); + return Err(libc::ENAMETOOLONG); + } + + let r = f((&raw const ua.addr).cast(), ua.len); + + if ua.dirfd != -1 { + // Darwin restores the bind/connect errno around the teardown + // (bsd.c saved_errno dance) — cabi consumers read thread errno. + #[cfg(target_vendor = "apple")] + { + let saved = errno(); + // SAFETY: -1 clears the per-thread cwd override set above. + unsafe { __pthread_fchdir(-1) }; + // SAFETY: closing our own dirfd, exactly once. + unsafe { libc::close(ua.dirfd) }; + set_errno(saved); + } + // SAFETY: closing our own dirfd, exactly once. + #[cfg(not(target_vendor = "apple"))] + unsafe { + libc::close(ua.dirfd) + }; + } + r + } + + /// `bsd_create_listen_socket_unix`: no reuse options, no unlink of stale + /// socket files — bind fails EADDRINUSE and the caller deals with it. + pub(crate) fn create_listen_socket_unix( + path: &[u8], + _options: c_int, + ) -> Result { + with_unix_addr(path, |addr, addrlen| { + let fd = create_socket(libc::AF_UNIX, libc::SOCK_STREAM, 0)?; + if let Err(e) = bind_and_listen(fd, addr, addrlen, 512) { + close(fd, false); + return Err(e); + } + Ok(fd) + }) + } + + /// `bsd_create_connect_socket_unix`. + pub(crate) fn create_connect_socket_unix( + path: &[u8], + _options: c_int, + ) -> Result { + with_unix_addr(path, |addr, addrlen| { + let fd = create_socket(libc::AF_UNIX, libc::SOCK_STREAM, 0)?; + let rc = do_connect_raw(fd, addr, addrlen); + if rc != 0 { + close(fd, false); + return Err(rc); + } + Ok(fd) + }) + } + + // ───────────────────────── connect (R8.9) ───────────────────────── + + /// EINTR-retried connect; EINPROGRESS and `-1 && errno==0` count as + /// success (bsd.c:1643-1690). Returns 0 or the connect errno. + pub(crate) fn do_connect_raw( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: *const libc::sockaddr, + addrlen: libc::socklen_t, + ) -> i32 { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::CONNECT, fd, 0) { + // C returns the (just-set) errno on fire. + Some(crate::fault::Fault::Errno(e)) => return e, + Some(crate::fault::Fault::Zero) => return errno(), + Some(crate::fault::Fault::Clamp(_)) | None => {} + } + let r = loop { + set_errno(0); + // SAFETY: caller passes a live sockaddr spanning `addrlen` bytes. + let r = unsafe { libc::connect(fd, addr, addrlen) }; + if r == -1 && errno() == libc::EINTR { + continue; + } + break r; + }; + if r == -1 && errno() != 0 { + if errno() == libc::EINPROGRESS { + return 0; + } + return errno(); + } + 0 + } + + fn ip_addrlen(family: c_int) -> libc::socklen_t { + if family == libc::AF_INET { + size_of::() as _ + } else { + size_of::() as _ + } + } + + /// `bsd_create_connect_socket` (R8.9): optional local bind (SO_REUSEADDR + /// first, matching libuv; TIME_WAIT local-port reuse), then nonblocking + /// connect. Err carries errno. + pub(crate) fn create_connect_socket( + addr: &libc::sockaddr_storage, + local_addr: Option<&libc::sockaddr_storage>, + _options: c_int, + ) -> Result { + let fd = create_socket(addr.ss_family as c_int, libc::SOCK_STREAM, 0)?; + + if let Some(local) = local_addr { + let one: c_int = 1; + so(fd, libc::SOL_SOCKET, libc::SO_REUSEADDR, &one); + let local_len = ip_addrlen(local.ss_family as c_int); + // SAFETY: `local` outlives the call; local_len ≤ its size. + let rc = unsafe { libc::bind(fd, ptr::from_ref(local).cast(), local_len) }; + if rc != 0 { + let e = errno(); + close(fd, false); + return Err(e); + } + } + + let rc = do_connect_raw( + fd, + ptr::from_ref(addr).cast(), + ip_addrlen(addr.ss_family as c_int), + ); + if rc != 0 { + close(fd, false); + return Err(rc); + } + Ok(fd) + } + + /// `init_addr_with_port` (context.c:530-540): resolved DNS entry → + /// connect sockaddr with the requested port stamped over the entry's. + pub(crate) fn addr_from_entry( + info: *const bun_dns::addrinfo, + port: u16, + ) -> libc::sockaddr_storage { + // SAFETY: `info` is a live entry of the DNS request's result buffer + // (borrowed until freeRequest); `ai_addr` spans `ai_addrlen` bytes of + // the family it declares. + unsafe { + let mut storage: libc::sockaddr_storage = zeroed(); + let len = (*info).ai_addrlen as usize; + ptr::copy_nonoverlapping( + (*info).ai_addr.cast::(), + (&raw mut storage).cast::(), + len.min(size_of::()), + ); + if (*info).ai_family == libc::AF_INET { + (*(&raw mut storage).cast::()).sin_port = port.to_be(); + } else { + (*(&raw mut storage).cast::()).sin6_port = port.to_be(); + } + storage + } + } + + // libc 0.2.186 does not declare inet_pton; POSIX symbol present in every unix libc. + unsafe extern "C" { + fn inet_pton(af: c_int, src: *const c_char, dst: *mut c_void) -> c_int; + } + + /// `try_parse_ip` (context.c:542-565): literal v4 then v6 with the port + /// stamped in; never resolves. `None` = not a literal. + pub(crate) fn try_parse_ip(host: &CStr, port: u16) -> Option { + // SAFETY: inet_pton reads the NUL-terminated string and writes only + // the (in-bounds) address field of the zeroed storage. + unsafe { + let mut storage: libc::sockaddr_storage = zeroed(); + let v4 = (&raw mut storage).cast::(); + if inet_pton( + libc::AF_INET, + host.as_ptr(), + (&raw mut (*v4).sin_addr).cast(), + ) == 1 + { + (*v4).sin_family = libc::AF_INET as libc::sa_family_t; + (*v4).sin_port = port.to_be(); + #[cfg(target_vendor = "apple")] + { + (*v4).sin_len = size_of::() as u8; + } + return Some(storage); + } + let v6 = (&raw mut storage).cast::(); + if inet_pton( + libc::AF_INET6, + host.as_ptr(), + (&raw mut (*v6).sin6_addr).cast(), + ) == 1 + { + (*v6).sin6_family = libc::AF_INET6 as libc::sa_family_t; + (*v6).sin6_port = port.to_be(); + #[cfg(target_vendor = "apple")] + { + (*v6).sin6_len = size_of::() as u8; + } + return Some(storage); + } + None + } + } +} + +/// Windows: the winsock arm of the BSD layer (bsd.c `_WIN32` branches). +/// Byte-count ops return `-WSAGetLastError()` (WSAEWOULDBLOCK = 10035 is the +/// would-block sentinel socket.rs/write.rs key on); fd ops return +/// `Result`; option setters `0 / -wsa_error` — the same +/// shapes as the POSIX arm above, so callers stay platform-neutral. +#[cfg(windows)] +mod imp { + use core::ffi::{CStr, c_int, c_void}; + use core::mem::{offset_of, size_of}; + use core::ptr; + + use super::win::{self, SockaddrStorage, ws2}; + use crate::write::UsIoVec; + use crate::{ + LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE, LIBUS_LISTEN_EXCLUSIVE_PORT, + LIBUS_LISTEN_REUSE_ADDR, LIBUS_LISTEN_REUSE_PORT, LIBUS_SOCKET_DESCRIPTOR, + LIBUS_SOCKET_ERROR, LIBUS_SOCKET_IPV6_ONLY, + }; + + pub(crate) fn errno() -> i32 { + std::io::Error::last_os_error().raw_os_error().unwrap_or(0) + } + + /// Fault hook for byte-count ops (mirrors the POSIX arm; R11.1). + #[cfg_attr(not(feature = "socket_fault_injection"), allow(unused_macros))] + macro_rules! fault_check { + ($sc:ident, $fd:expr, $len:ident) => { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::$sc, $fd as c_int, $len) { + Some(crate::fault::Fault::Errno(e)) => return -(e as isize), + Some(crate::fault::Fault::Zero) => return 0, + Some(crate::fault::Fault::Clamp(n)) => $len = n, + None => {} + } + }; + } + + /// send via winsock; flags 0 (no MSG_NOSIGNAL/MSG_DONTWAIT on Windows — + /// internal.h defined both to 0; sockets are nonblocking via FIONBIO). + pub(crate) fn send(fd: LIBUS_SOCKET_DESCRIPTOR, data: &[u8]) -> isize { + #[cfg_attr(not(feature = "socket_fault_injection"), allow(unused_mut))] + let mut len = data.len(); + fault_check!(SEND, fd, len); + let len = len.min(c_int::MAX as usize) as c_int; + let r = loop { + // SAFETY: `data[..len]` is a valid read of `len` bytes (len ≤ data.len()). + let r = unsafe { ws2::send(fd, data.as_ptr().cast(), len, 0) }; + if r == win::SOCKET_ERROR && win::wsa_errno() == win::WSAEINTR { + continue; + } + break r; + }; + if r < 0 { + -(win::wsa_errno() as isize) + } else { + r as isize + } + } + + /// `bsd_writev` windows arm (bsd.c:988-997): sequential sends, stopping + /// at the first short/failed chunk (each send carries the SEND fault + /// hook, as in C). The C returned `total>0 ? total : -1` with the WSA + /// error in TLS; the Rust convention carries it in the return instead. + pub(crate) fn writev(fd: LIBUS_SOCKET_DESCRIPTOR, iov: &[UsIoVec]) -> isize { + let mut total: isize = 0; + for chunk in iov { + // SAFETY: each UsIoVec borrows caller-owned bytes for this call. + let data = unsafe { core::slice::from_raw_parts(chunk.base.cast::(), chunk.len) }; + let written = send(fd, data); + if written < 0 { + return if total > 0 { total } else { written }; + } + total += written; + if written != data.len() as isize { + break; + } + } + total + } + + /// `bsd_write2` (bsd.c:999-1008): two sequential sends; the payload send + /// is attempted only if the header fully flushed. + pub(crate) fn write2(fd: LIBUS_SOCKET_DESCRIPTOR, first: &[u8], second: &[u8]) -> isize { + let written = send(fd, first); + if written == first.len() as isize { + let second_write = send(fd, second); + if second_write > 0 { + return written + second_write; + } + } + written + } + + const MSG_PUSH_IMMEDIATE: c_int = 0x20; // ws2def.h (0x8 is MSG_WAITALL) + + /// recv via winsock into the loop's shared buffer, WSAEINTR-retried. + /// MSG_PUSH_IMMEDIATE per the C read path (loop.c:636-640). + pub(crate) fn recv(fd: LIBUS_SOCKET_DESCRIPTOR, buf: &mut [u8]) -> isize { + #[cfg_attr(not(feature = "socket_fault_injection"), allow(unused_mut))] + let mut len = buf.len(); + fault_check!(RECV, fd, len); + let len = len.min(c_int::MAX as usize) as c_int; + let r = loop { + // SAFETY: `buf[..len]` is a valid write of `len` bytes (len ≤ buf.len()). + let r = unsafe { ws2::recv(fd, buf.as_mut_ptr().cast(), len, MSG_PUSH_IMMEDIATE) }; + if r == win::SOCKET_ERROR && win::wsa_errno() == win::WSAEINTR { + continue; + } + break r; + }; + if r < 0 { + -(win::wsa_errno() as isize) + } else { + r as isize + } + } + + /// R6.9 pre-step (context.c:749-765): zero-length MSG_PUSH_IMMEDIATE recv + /// exposes a connect that completed-then-reset in the AFD race window. + /// Returns 0 (still good) or the WSA error to treat as a connect error. + pub(crate) fn connect_probe(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + // SAFETY: zero-length recv reads no buffer memory. + if unsafe { ws2::recv(fd, core::ptr::null_mut(), 0, MSG_PUSH_IMMEDIATE) } + != win::SOCKET_ERROR + { + return 0; + } + match win::wsa_errno() { + e if e == win::WSAEWOULDBLOCK || e == win::WSAEINTR => 0, + e => e, + } + } + + /// closesocket with optional SO_LINGER{1,0} RST (CloseCode::failure — + /// C12, socket.c:305-309). `closesocket`, never CRT `close` (bsd.c:720-726). + pub(crate) fn close(fd: LIBUS_SOCKET_DESCRIPTOR, rst: bool) { + if rst { + let l = win::linger { + l_onoff: 1, + l_linger: 0, + }; + win::so(fd, win::SOL_SOCKET, win::SO_LINGER, &l); + } + // SAFETY: plain socket-handle call; caller owns the socket. + unsafe { ws2::closesocket(fd) }; + } + + pub(crate) fn shutdown(fd: LIBUS_SOCKET_DESCRIPTOR) { + // SAFETY: plain socket-handle call. + unsafe { win::shutdown(fd, win::SD_SEND) }; + } + + pub(crate) fn shutdown_read(fd: LIBUS_SOCKET_DESCRIPTOR) { + // SAFETY: plain socket-handle call. + unsafe { win::shutdown(fd, win::SD_RECEIVE) }; + } + + /// Mirror of `errno()`: winsock error codes live in the thread's + /// last-error slot (`WSAGetLastError` == `GetLastError`), so the + /// save/restore dance around close() round-trips through it. + pub(crate) fn set_errno(v: i32) { + ws2::WSASetLastError(v); + } + + /// POSIX-only (R3.28): pair() returns null on Windows. + pub(crate) fn socketpair_stream(_fds: &mut [LIBUS_SOCKET_DESCRIPTOR; 2]) -> i32 { + -1 + } + + /// `bsd_create_socket` (R8.1): plain socket() — nonblocking comes from + /// libuv poll init / explicit FIONBIO on connect paths. No-inherit is + /// the FD_CLOEXEC parity bit. + pub(crate) fn create_socket( + domain: c_int, + ty: c_int, + protocol: c_int, + ) -> Result { + let fd = loop { + // SAFETY: plain constructor call. + let fd = unsafe { win::socket(domain, ty, protocol) }; + if fd == LIBUS_SOCKET_ERROR && win::wsa_errno() == win::WSAEINTR { + continue; + } + break fd; + }; + if fd == LIBUS_SOCKET_ERROR { + return Err(win::wsa_errno()); + } + win::set_no_inherit(fd); + Ok(fd) + } + + // ───────────────────── addr plumbing (R8.2/R8.3) ───────────────────── + + /// `struct bsd_addr_t` equivalent (winsock SOCKADDR_STORAGE backing). + pub(crate) struct BsdAddr { + mem: SockaddrStorage, + len: c_int, + ip_off: u32, + ip_len: u32, + port: i32, + } + + impl BsdAddr { + pub(crate) fn zeroed() -> Self { + BsdAddr { + mem: win::pod_zeroed(), + len: size_of::() as c_int, + ip_off: 0, + ip_len: 0, + port: -1, + } + } + + /// `internal_finalize_bsd_addr` (bsd.c:743-757): unknown family → + /// empty ip, port −1. + fn finalize(&mut self) { + match c_int::from(self.mem.ss_family) { + x if x == ws2::AF_INET6 => { + let sa = win::as_v6(&self.mem); + self.ip_off = offset_of!(ws2::sockaddr_in6, sin6_addr) as u32; + self.ip_len = 16; + self.port = u16::from_be(sa.sin6_port) as i32; + } + x if x == ws2::AF_INET => { + let sa = win::as_v4(&self.mem); + self.ip_off = offset_of!(ws2::sockaddr_in, sin_addr) as u32; + self.ip_len = 4; + self.port = u16::from_be(sa.sin_port) as i32; + } + _ => { + self.ip_len = 0; + self.port = -1; + } + } + } + + /// Raw address bytes (4 = v4, 16 = v6, empty = unknown family). + pub(crate) fn ip(&self) -> &[u8] { + // SAFETY: ip_off/ip_len point inside self.mem (set by finalize). + unsafe { + core::slice::from_raw_parts( + (&raw const self.mem).cast::().add(self.ip_off as usize), + self.ip_len as usize, + ) + } + } + + pub(crate) fn port(&self) -> i32 { + self.port + } + } + + /// getsockname + finalize; None on failure (bsd.c:759-766). + pub(crate) fn local_addr(fd: LIBUS_SOCKET_DESCRIPTOR) -> Option { + let mut addr = BsdAddr::zeroed(); + // SAFETY: addr.len starts as sizeof(SOCKADDR_STORAGE); winsock writes ≤ that. + let rc = unsafe { win::getsockname(fd, (&raw mut addr.mem).cast(), &mut addr.len) }; + if rc != 0 { + return None; + } + addr.finalize(); + Some(addr) + } + + /// getpeername + finalize; None on failure (bsd.c:768-775). + pub(crate) fn remote_addr(fd: LIBUS_SOCKET_DESCRIPTOR) -> Option { + let mut addr = BsdAddr::zeroed(); + // SAFETY: addr.len starts as sizeof(SOCKADDR_STORAGE); winsock writes ≤ that. + let rc = unsafe { win::getpeername(fd, (&raw mut addr.mem).cast(), &mut addr.len) }; + if rc != 0 { + return None; + } + addr.finalize(); + Some(addr) + } + + /// Plain accept + no-inherit, WSAEINTR-retried (R8.10). The accepted + /// socket stays blocking until uv_poll_init_socket sets FIONBIO — the C + /// relied on the same poll-init timing. + pub(crate) fn accept( + fd: LIBUS_SOCKET_DESCRIPTOR, + ) -> Result<(LIBUS_SOCKET_DESCRIPTOR, BsdAddr), i32> { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::ACCEPT, fd as c_int, 0) { + Some(crate::fault::Fault::Errno(e)) => return Err(e), + Some(crate::fault::Fault::Zero) => return Err(errno()), + Some(crate::fault::Fault::Clamp(_)) | None => {} + } + let mut addr = BsdAddr::zeroed(); + let accepted = loop { + addr.len = size_of::() as c_int; + // SAFETY: addr.len tracks the storage capacity; winsock writes ≤ that. + let accepted = unsafe { win::accept(fd, (&raw mut addr.mem).cast(), &mut addr.len) }; + if accepted == LIBUS_SOCKET_ERROR { + if win::wsa_errno() == win::WSAEINTR { + continue; + } + return Err(win::wsa_errno()); + } + break accepted; + }; + win::set_no_inherit(accepted); + addr.finalize(); + Ok((accepted, addr)) + } + + // ─────────────────── option helpers (R8.12-R8.14) ─────────────────── + + pub(crate) fn nodelay(fd: LIBUS_SOCKET_DESCRIPTOR, enabled: bool) { + let v: c_int = enabled as c_int; + win::so(fd, ws2::IPPROTO_TCP, win::TCP_NODELAY, &v); + } + + /// SO_KEEPALIVE + TCP_KEEPALIVE idle seconds (bsd.c:583-611). Win32's + /// interval/count defaults already match the POSIX arm's 1 s / 10. + /// Verbatim C convention: 0 on success, positive WSA error on setsockopt + /// failure, −4071 (UV_EINVAL, the LIBUS_USE_LIBUV branch) for delay==0. + pub(crate) fn keepalive(fd: LIBUS_SOCKET_DESCRIPTOR, on: bool, delay: u32) -> i32 { + let on_val: c_int = on as c_int; + if win::so(fd, win::SOL_SOCKET, win::SO_KEEPALIVE, &on_val) != 0 { + return win::wsa_errno(); + } + if !on { + return 0; + } + if delay < 1 { + return -4071; // UV_EINVAL + } + if win::so(fd, ws2::IPPROTO_TCP, win::TCP_KEEPALIVE, &(delay as c_int)) != 0 { + return win::wsa_errno(); + } + 0 + } + + /// Option level for TOS: IP_TOS or IPV6_TCLASS by bound family (R8.13). + /// Unknown family → −EINVAL with the CRT value, exactly as the C did. + fn tos_level(fd: LIBUS_SOCKET_DESCRIPTOR) -> Result<(c_int, c_int), i32> { + const EINVAL_CRT: i32 = 22; // errno.h EINVAL (the C returned -EINVAL here) + let mut storage: SockaddrStorage = win::pod_zeroed(); + let mut len = size_of::() as c_int; + // SAFETY: `len` starts as sizeof(SOCKADDR_STORAGE); winsock writes ≤ that. + if unsafe { win::getsockname(fd, (&raw mut storage).cast(), &mut len) } != 0 { + return Err(-win::wsa_errno()); + } + match c_int::from(storage.ss_family) { + x if x == ws2::AF_INET => Ok((win::IPPROTO_IP, win::IP_TOS)), + x if x == ws2::AF_INET6 => Ok((win::IPPROTO_IPV6, win::IPV6_TCLASS)), + _ => Err(-EINVAL_CRT), + } + } + + /// 0 or negative WSA error. + pub(crate) fn set_tos(fd: LIBUS_SOCKET_DESCRIPTOR, tos: i32) -> i32 { + let (level, option) = match tos_level(fd) { + Ok(v) => v, + Err(e) => return e, + }; + if win::so(fd, level, option, &(tos as c_int)) != 0 { + return -win::wsa_errno(); + } + 0 + } + + /// TOS value or negative WSA error. + pub(crate) fn get_tos(fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + let (level, option) = match tos_level(fd) { + Ok(v) => v, + Err(e) => return e, + }; + let mut tos: c_int = 0; + let mut len = size_of::() as c_int; + // SAFETY: winsock writes ≤ `len` (= sizeof(int)) bytes into `tos`. + let rc = unsafe { win::getsockopt(fd, level, option, (&raw mut tos).cast(), &mut len) }; + if rc != 0 { + return -win::wsa_errno(); + } + tos + } + + pub(crate) fn broadcast(fd: LIBUS_SOCKET_DESCRIPTOR, enabled: bool) -> i32 { + let v: c_int = enabled as c_int; + if win::so(fd, win::SOL_SOCKET, win::SO_BROADCAST, &v) != 0 { + return -win::wsa_errno(); + } + 0 + } + + pub(crate) fn multicast_loopback(fd: LIBUS_SOCKET_DESCRIPTOR, enabled: bool) -> i32 { + let v: c_int = enabled as c_int; + win::setsockopt_6_or_4(fd, win::IP_MULTICAST_LOOP, win::IPV6_MULTICAST_LOOP, &v) + } + + /// Rejects multicast-range (224.0.0.0/4) IPv4 interface addresses; the + /// windows arm also rejects an invalid socket with WSAEBADF + /// (bsd.c:407-435). 0 or negative WSA error. + pub(crate) fn multicast_interface(fd: LIBUS_SOCKET_DESCRIPTOR, addr: &SockaddrStorage) -> i32 { + if fd == LIBUS_SOCKET_ERROR { + return -win::WSAEBADF; + } + if c_int::from(addr.ss_family) == ws2::AF_INET { + let addr4 = win::as_v4(addr); + let first_octet = u32::from_be(addr4.sin_addr.s_addr) >> 24; + if !(224..=239).contains(&first_octet) { + if win::so(fd, win::IPPROTO_IP, win::IP_MULTICAST_IF, &addr4.sin_addr) != 0 { + return -win::wsa_errno(); + } + return 0; + } + } + if c_int::from(addr.ss_family) == ws2::AF_INET6 { + let addr6 = win::as_v6(addr); + if win::so( + fd, + win::IPPROTO_IPV6, + win::IPV6_MULTICAST_IF, + &addr6.sin6_scope_id, + ) != 0 + { + return -win::wsa_errno(); + } + return 0; + } + -win::WSAEINVAL + } + + /// IGMP membership; iface family must match addr's (bsd.c:437-475). + pub(crate) fn set_membership( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: &SockaddrStorage, + iface: Option<&SockaddrStorage>, + drop: bool, + ) -> i32 { + if let Some(iface) = iface { + if addr.ss_family != iface.ss_family { + return -win::WSAEINVAL; + } + } + let rc = if c_int::from(addr.ss_family) == ws2::AF_INET6 { + let addr6 = win::as_v6(addr); + let mut mreq: win::ipv6_mreq = win::pod_zeroed(); + mreq.ipv6mr_multiaddr = addr6.sin6_addr; + if let Some(iface) = iface { + mreq.ipv6mr_interface = win::as_v6(iface).sin6_scope_id as _; + } + let option = if drop { + win::IPV6_LEAVE_GROUP + } else { + win::IPV6_JOIN_GROUP + }; + win::so(fd, win::IPPROTO_IPV6, option, &mreq) + } else { + let addr4 = win::as_v4(addr); + let mut mreq: win::ip_mreq = win::pod_zeroed(); + mreq.imr_multiaddr.s_addr = addr4.sin_addr.s_addr; + mreq.imr_interface.s_addr = match iface { + Some(iface) => win::as_v4(iface).sin_addr.s_addr, + None => 0, // INADDR_ANY + }; + let option = if drop { + win::IP_DROP_MEMBERSHIP + } else { + win::IP_ADD_MEMBERSHIP + }; + win::so(fd, win::IPPROTO_IP, option, &mreq) + }; + if rc != 0 { -win::wsa_errno() } else { 0 } + } + + /// Source-specific membership (bsd.c:477-525). All families must match. + pub(crate) fn set_source_specific_membership( + fd: LIBUS_SOCKET_DESCRIPTOR, + source: &SockaddrStorage, + group: &SockaddrStorage, + iface: Option<&SockaddrStorage>, + drop: bool, + ) -> i32 { + let family_ok = source.ss_family == group.ss_family + && iface.is_none_or(|i| i.ss_family == group.ss_family); + if family_ok { + if c_int::from(source.ss_family) == ws2::AF_INET { + let mut mreq: win::ip_mreq_source = win::pod_zeroed(); + mreq.imr_interface.s_addr = match iface { + Some(iface) => win::as_v4(iface).sin_addr.s_addr, + None => 0, // INADDR_ANY + }; + mreq.imr_sourceaddr.s_addr = win::as_v4(source).sin_addr.s_addr; + mreq.imr_multiaddr.s_addr = win::as_v4(group).sin_addr.s_addr; + let option = if drop { + win::IP_DROP_SOURCE_MEMBERSHIP + } else { + win::IP_ADD_SOURCE_MEMBERSHIP + }; + if win::so(fd, win::IPPROTO_IP, option, &mreq) != 0 { + return -win::wsa_errno(); + } + return 0; + } else if c_int::from(source.ss_family) == ws2::AF_INET6 { + let mut mreq: win::group_source_req = win::pod_zeroed(); + if let Some(iface) = iface { + mreq.gsr_interface = win::as_v6(iface).sin6_scope_id as _; + } + mreq.gsr_source = *source; + mreq.gsr_group = *group; + let option = if drop { + win::MCAST_LEAVE_SOURCE_GROUP + } else { + win::MCAST_JOIN_SOURCE_GROUP + }; + if win::so(fd, win::IPPROTO_IPV6, option, &mreq) != 0 { + return -win::wsa_errno(); + } + return 0; + } + } + -win::WSAEINVAL + } + + fn ttl_any(fd: LIBUS_SOCKET_DESCRIPTOR, ttl: i32, opt4: c_int, opt6: c_int) -> i32 { + if !(1..=255).contains(&ttl) { + return -win::WSAEINVAL; + } + win::setsockopt_6_or_4(fd, opt4, opt6, &(ttl as c_int)) + } + + pub(crate) fn ttl_unicast(fd: LIBUS_SOCKET_DESCRIPTOR, ttl: i32) -> i32 { + ttl_any(fd, ttl, win::IP_TTL, win::IPV6_UNICAST_HOPS) + } + + pub(crate) fn ttl_multicast(fd: LIBUS_SOCKET_DESCRIPTOR, ttl: i32) -> i32 { + ttl_any(fd, ttl, win::IP_MULTICAST_TTL, win::IPV6_MULTICAST_HOPS) + } + + /// Unsupported platform → 0 (R8.8). + pub(crate) fn set_defer_accept(_fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + 0 + } + + // ───────────────────── listen path (R8.4-R8.6) ───────────────────── + + /// Reuse option sequence (R8.4, windows arm): SO_EXCLUSIVEADDRUSE for + /// EXCLUSIVE_PORT; REUSE_ADDR → SO_REUSEADDR (no SO_REUSEPORT on + /// Windows, bsd.c:1044-1051); REUSE_PORT is always unsupported → + /// WSAEOPNOTSUPP, swallowed unless DISALLOW (bsd.c:1054-1098). + pub(crate) fn set_reuse(fd: LIBUS_SOCKET_DESCRIPTOR, options: c_int) -> Result<(), i32> { + let one: c_int = 1; + if options & LIBUS_LISTEN_EXCLUSIVE_PORT != 0 + && win::so(fd, win::SOL_SOCKET, win::SO_EXCLUSIVEADDRUSE, &one) != 0 + { + return Err(win::wsa_errno()); + } + if options & LIBUS_LISTEN_REUSE_ADDR != 0 + && win::so(fd, win::SOL_SOCKET, win::SO_REUSEADDR, &one) != 0 + { + return Err(win::wsa_errno()); + } + if options & LIBUS_LISTEN_REUSE_PORT != 0 { + if options & LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE != 0 { + return Err(win::WSAEOPNOTSUPP); + } + // C clears errno when swallowing the unsupported option. + set_errno(0); + } + Ok(()) + } + + fn bind_and_listen( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: *const ws2::sockaddr, + addrlen: c_int, + backlog: c_int, + ) -> Result<(), i32> { + loop { + // SAFETY: caller passes a live sockaddr spanning `addrlen` bytes. + let rc = unsafe { win::bind(fd, addr, addrlen) }; + if rc == win::SOCKET_ERROR { + if win::wsa_errno() == win::WSAEINTR { + continue; + } + return Err(win::wsa_errno()); + } + break; + } + loop { + // SAFETY: plain socket-handle call. + let rc = unsafe { win::listen(fd, backlog) }; + if rc != 0 { + if win::wsa_errno() == win::WSAEINTR { + continue; + } + return Err(win::wsa_errno()); + } + break; + } + Ok(()) + } + + /// `bsd_bind_listen_fd` (R8.5, windows arm): reuse options; NO plain + /// SO_REUSEADDR (port stealing — bsd.c:1115-1122); IPV6_V6ONLY per + /// options (fatal); bind + listen(512). Err(None) = C quirk: set_reuse/ + /// V6ONLY failures leave *error untouched (only bind/listen writes it). + fn bind_listen_fd( + fd: LIBUS_SOCKET_DESCRIPTOR, + family: c_int, + addr: *const ws2::sockaddr, + addrlen: c_int, + options: c_int, + ) -> Result<(), Option> { + set_reuse(fd, options).map_err(|_| None)?; + + if family == ws2::AF_INET6 { + let enabled: c_int = (options & LIBUS_SOCKET_IPV6_ONLY != 0) as c_int; + if win::so(fd, win::IPPROTO_IPV6, win::IPV6_V6ONLY, &enabled) != 0 { + return Err(None); + } + } + + bind_and_listen(fd, addr, addrlen, 512).map_err(Some) + } + + /// `bsd_create_listen_socket` (R8.6): getaddrinfo(AI_PASSIVE, AF_UNSPEC, + /// SOCK_STREAM) on the decimal port; all AF_INET6 candidates first, then + /// AF_INET; first bind+listen wins. Err(0) when getaddrinfo itself failed + /// or no candidate socket could be created (C leaves `*error` untouched). + pub(crate) fn create_listen_socket( + host: Option<&CStr>, + port: i32, + options: c_int, + ) -> Result { + let mut hints: ws2::addrinfo = win::pod_zeroed(); + hints.ai_flags = win::AI_PASSIVE; + hints.ai_family = ws2::AF_UNSPEC; + hints.ai_socktype = ws2::SOCK_STREAM; + + let port_string = std::ffi::CString::new(port.to_string()).unwrap(); + let host_ptr = match host { + Some(h) => h.as_ptr(), + None => ptr::null(), + }; + let mut result: *mut ws2::addrinfo = ptr::null_mut(); + // SAFETY: host/port are NUL-terminated; `result` is freed below on + // every path after a 0 return. + let rc = unsafe { ws2::getaddrinfo(host_ptr, port_string.as_ptr(), &hints, &mut result) }; + if rc != 0 { + return Err(0); + } + + let mut error = 0; + for family in [ws2::AF_INET6, ws2::AF_INET] { + let mut a = result; + while !a.is_null() { + // SAFETY: non-null node of the live getaddrinfo list. + let ai = unsafe { &*a }; + if ai.ai_family == family { + if let Ok(fd) = create_socket(ai.ai_family, ai.ai_socktype, ai.ai_protocol) { + match bind_listen_fd( + fd, + ai.ai_family, + ai.ai_addr, + ai.ai_addrlen as c_int, + options, + ) { + Ok(()) => { + // SAFETY: `result` is the live list; freed once. + unsafe { ws2::freeaddrinfo(result) }; + return Ok(fd); + } + Err(e) => { + if let Some(e) = e { + error = e; + } + close(fd, false); + } + } + } + } + a = ai.ai_next; + } + } + // SAFETY: `result` is the live list; freed once. + unsafe { ws2::freeaddrinfo(result) }; + Err(error) + } + + // ─────────────────────── unix sockets (R8.7) ─────────────────────── + // afunix.h since Win10 RS4; no long-path workaround (sun_path is 108 + // and NT paths can't be shortened the /proc/self/fd way). The C + // simulated ENOENT/ENAMETOOLONG via SetLastError win32 codes. + + /// Failures also set the thread last-error (C used `SetLastError`; + /// consumers such as the server's listen-error path read it back). + fn create_unix_socket_address(path: &[u8]) -> Result { + if path.is_empty() { + set_errno(win::ERROR_PATH_NOT_FOUND); // simulated ENOENT + return Err(win::ERROR_PATH_NOT_FOUND); + } + let mut addr: win::sockaddr_un = win::pod_zeroed(); + addr.sun_family = ws2::AF_UNIX as u16; + if path.len() >= addr.sun_path.len() { + set_errno(win::ERROR_FILENAME_EXCED_RANGE); // simulated ENAMETOOLONG + return Err(win::ERROR_FILENAME_EXCED_RANGE); + } + addr.sun_path[..path.len()].copy_from_slice(path); + Ok(addr) + } + + /// `bsd_create_listen_socket_unix`: no reuse options, no unlink of stale + /// socket files. afunix bind on a missing directory fails WSAENETDOWN, + /// which the C mapped to ERROR_PATH_NOT_FOUND (bsd.c:1362-1370). + pub(crate) fn create_listen_socket_unix( + path: &[u8], + _options: c_int, + ) -> Result { + let addr = create_unix_socket_address(path)?; + let fd = create_socket(ws2::AF_UNIX, ws2::SOCK_STREAM, 0)?; + if let Err(e) = bind_and_listen( + fd, + (&raw const addr).cast(), + size_of::() as c_int, + 512, + ) { + close(fd, false); + let e = if e == win::WSAENETDOWN { + win::ERROR_PATH_NOT_FOUND + } else { + e + }; + set_errno(e); + return Err(e); + } + Ok(fd) + } + + /// `bsd_create_connect_socket_unix`. + pub(crate) fn create_connect_socket_unix( + path: &[u8], + _options: c_int, + ) -> Result { + let addr = create_unix_socket_address(path)?; + let fd = create_socket(ws2::AF_UNIX, ws2::SOCK_STREAM, 0)?; + win::set_fionbio(fd); + let rc = do_connect_raw( + fd, + (&raw const addr).cast(), + size_of::() as c_int, + ); + if rc != 0 { + close(fd, false); + return Err(rc); + } + Ok(fd) + } + + // ───────────────────────── connect (R8.9) ───────────────────────── + + /// WSAEINTR-retried connect; WSAEINPROGRESS/WSAEWOULDBLOCK/WSAEALREADY + /// count as success (bsd.c:1648-1676). Returns 0 or the WSA error. + pub(crate) fn do_connect_raw( + fd: LIBUS_SOCKET_DESCRIPTOR, + addr: *const ws2::sockaddr, + addrlen: c_int, + ) -> i32 { + #[cfg(feature = "socket_fault_injection")] + match crate::fault::check(crate::fault::CONNECT, fd as c_int, 0) { + // C returns the (just-set) errno on fire. + Some(crate::fault::Fault::Errno(e)) => return e, + Some(crate::fault::Fault::Zero) => return errno(), + Some(crate::fault::Fault::Clamp(_)) | None => {} + } + loop { + // SAFETY: caller passes a live sockaddr spanning `addrlen` bytes. + if unsafe { win::connect(fd, addr, addrlen) } == 0 { + return 0; + } + match win::wsa_errno() { + e if e == win::WSAEINPROGRESS + || e == win::WSAEWOULDBLOCK + || e == win::WSAEALREADY => + { + return 0; + } + e if e == win::WSAEINTR => continue, + e => return e, + } + } + } + + /// Null-address connects (0.0.0.0 / ::) don't work on Windows — rewrite + /// to the loopback of the same family (bsd.c:1694-1712). + fn convert_null_addr(addr: &SockaddrStorage) -> Option { + if c_int::from(addr.ss_family) == ws2::AF_INET { + if win::as_v4(addr).sin_addr.s_addr == 0 { + let mut result = *addr; + // SAFETY: result is SOCKADDR_STORAGE with ss_family AF_INET. + unsafe { + (*(&raw mut result).cast::()) + .sin_addr + .s_addr = 0x7f000001u32.to_be(); // INADDR_LOOPBACK + } + return Some(result); + } + } else if c_int::from(addr.ss_family) == ws2::AF_INET6 { + let v6 = win::as_v6(addr); + if v6.sin6_addr.s6_addr == [0u8; 16] { + let mut result = *addr; + let mut loopback = [0u8; 16]; + loopback[15] = 1; // in6addr_loopback + // SAFETY: result is SOCKADDR_STORAGE with ss_family AF_INET6. + unsafe { + (*(&raw mut result).cast::()) + .sin6_addr + .s6_addr = loopback; + } + return Some(result); + } + } + None + } + + fn is_loopback(addr: &SockaddrStorage) -> bool { + if c_int::from(addr.ss_family) == ws2::AF_INET { + win::as_v4(addr).sin_addr.s_addr == 0x7f000001u32.to_be() + } else if c_int::from(addr.ss_family) == ws2::AF_INET6 { + let mut loopback = [0u8; 16]; + loopback[15] = 1; + win::as_v6(addr).sin6_addr.s6_addr == loopback + } else { + false + } + } + + /// `bsd_create_connect_socket` windows arm (bsd.c:1727-1799): optional + /// local bind (NO SO_REUSEADDR — port stealing), explicit FIONBIO, + /// null-addr→loopback rewrite, SIO_TCP_INITIAL_RTO fast-fail for + /// loopback (IPv6-first connect probing), then nonblocking connect. + pub(crate) fn create_connect_socket( + addr: &super::ConnectAddr, + local_addr: Option<&super::ConnectAddr>, + _options: c_int, + ) -> Result { + let fd = create_socket(c_int::from(addr.ss_family), ws2::SOCK_STREAM, 0)?; + + if let Some(local) = local_addr { + let local_len = win::ip_addrlen(c_int::from(local.ss_family)); + // SAFETY: `local` outlives the call; local_len ≤ its size. + let rc = unsafe { win::bind(fd, ptr::from_ref(local).cast(), local_len) }; + if rc != 0 { + let e = win::wsa_errno(); + close(fd, false); + // closesocket clobbers the thread error slot; C restores it. + set_errno(e); + return Err(e); + } + } + + win::set_fionbio(fd); + + let converted = convert_null_addr(addr); + let addr = converted.as_ref().unwrap_or(addr); + + if is_loopback(addr) { + // Fail fast (no SYN retransmissions) so the v6→v4 fallback isn't + // stuck behind the 2 s default (libuv win/tcp.c:806 parity). + let mut rto = win::TCP_INITIAL_RTO_PARAMETERS { + Rtt: win::TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS as u16, + MaxSynRetransmissions: win::TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS, + }; + let mut bytes: u32 = 0; + // SAFETY: in-buffer is a live TCP_INITIAL_RTO_PARAMETERS; no + // out-buffer; failure deliberately ignored, matching the C. + unsafe { + win::WSAIoctl( + fd, + win::SIO_TCP_INITIAL_RTO, + (&raw mut rto).cast::(), + size_of::() as u32, + ptr::null_mut(), + 0, + &mut bytes, + ptr::null_mut(), + ptr::null_mut(), + ) + }; + } + + let rc = do_connect_raw( + fd, + ptr::from_ref(addr).cast(), + win::ip_addrlen(c_int::from(addr.ss_family)), + ); + if rc != 0 { + close(fd, false); + return Err(rc); + } + Ok(fd) + } + + /// `init_addr_with_port` (context.c:530-540): resolved DNS entry → + /// connect sockaddr with the requested port stamped over the entry's. + pub(crate) fn addr_from_entry(info: *const bun_dns::addrinfo, port: u16) -> super::ConnectAddr { + // SAFETY: `info` is a live entry of the DNS request's result buffer + // (borrowed until freeRequest); `ai_addr` spans `ai_addrlen` bytes of + // the family it declares. + unsafe { + let mut storage: super::ConnectAddr = win::pod_zeroed(); + let len = (*info).ai_addrlen; + ptr::copy_nonoverlapping( + (*info).ai_addr.cast::(), + (&raw mut storage).cast::(), + len.min(size_of::()), + ); + if (*info).ai_family == ws2::AF_INET { + (*(&raw mut storage).cast::()).sin_port = port.to_be(); + } else { + (*(&raw mut storage).cast::()).sin6_port = port.to_be(); + } + storage + } + } + + /// `try_parse_ip` (context.c:542-565): literal v4 then v6 with the port + /// stamped in; never resolves. `None` = not a literal. + pub(crate) fn try_parse_ip(host: &CStr, port: u16) -> Option { + // SAFETY: inet_pton reads the NUL-terminated string and writes only + // the (in-bounds) address field of the zeroed storage. + unsafe { + let mut storage: super::ConnectAddr = win::pod_zeroed(); + let v4 = (&raw mut storage).cast::(); + if win::inet_pton( + ws2::AF_INET, + host.as_ptr(), + (&raw mut (*v4).sin_addr).cast(), + ) == 1 + { + (*v4).sin_family = ws2::AF_INET as u16; + (*v4).sin_port = port.to_be(); + return Some(storage); + } + let v6 = (&raw mut storage).cast::(); + if win::inet_pton( + ws2::AF_INET6, + host.as_ptr(), + (&raw mut (*v6).sin6_addr).cast(), + ) == 1 + { + (*v6).sin6_family = ws2::AF_INET6 as u16; + (*v6).sin6_port = port.to_be(); + return Some(storage); + } + None + } + } +} + +pub(crate) use imp::*; + +// ───────────────────────────────────────────────────────────────────────────── +// UDP edges (docs/semantics.md §9) — raw-pointer field +// access, kernel poll arming, and mmsg batches for udp.rs (forbid(unsafe)). +// Ownership: `udp::Socket` boxes come from `Socket::create` (heap::into_raw) +// and are freed ONLY by `udp_destroy` — create's failure path (before the +// pointer escapes) or the tick-postlude closed sweep (C6/C15). +// ───────────────────────────────────────────────────────────────────────────── + +use crate::udp; + +// ── udp::Socket raw-pointer access ─────────────────────────────────────────── + +pub(crate) fn udp_is_closed(s: *mut udp::Socket) -> bool { + // SAFETY: sockets on `closed_udp_head` stay readable until the tick + // postlude (C6/C15); live handles are always readable. + unsafe { (*s).closed } +} + +pub(crate) fn udp_meta(s: *mut udp::Socket) -> udp::Meta { + // SAFETY: same readability contract as `udp_is_closed`; every copied + // field is immutable after create. + unsafe { + udp::Meta { + fd: (*s).fd, + loop_: (*s).loop_, + data_cb: (*s).data_cb, + drain_cb: (*s).drain_cb, + recv_error_cb: (*s).recv_error_cb, + } + } +} + +pub(crate) fn udp_poll_events(s: *mut udp::Socket) -> u32 { + // SAFETY: readability contract as above. + unsafe { (*s).poll_events } +} + +/// kqueue EVFILT_WRITE is one-shot: drop the believed W bit after delivery +/// (loop.c:556-563 equivalent, scoped to the UDP poll). +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +pub(crate) fn udp_clear_writable_believed(s: *mut udp::Socket) { + // SAFETY: dispatch holds no other borrow of `*s` at the call site. + unsafe { (*s).poll_events &= !crate::backend::Events::WRITABLE.0 } +} + +pub(crate) fn udp_next_closed(s: *mut udp::Socket) -> *mut udp::Socket { + // SAFETY: closed-list nodes stay readable until swept (C6). + unsafe { (*s).next_closed } +} + +/// Close through a raw handle (dispatch's close-on-error path). +pub(crate) fn udp_close_raw(s: *mut udp::Socket) { + // SAFETY: dispatch holds no live borrow of `*s` when calling; `close` + // re-enters the consumer only via the raw pointer it derives itself. + unsafe { (&mut *s).close() } +} + +/// Free a swept socket — the ONLY deallocation site for `udp::Socket`. +pub(crate) fn udp_destroy(s: *mut udp::Socket) { + // SAFETY: called only by the tick-postlude sweep or create's failure + // path; no handle may touch `*s` afterwards (C6). + unsafe { bun_core::heap::destroy(s) } +} + +#[cfg(not(windows))] +mod udp_imp { + use core::ffi::{c_char, c_int, c_uint, c_void}; + use core::mem::size_of; + use core::ptr; + + use super::{close, create_socket, errno, local_addr, remote_addr, set_reuse}; + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + use crate::backend::Events; + use crate::backend::PollType; + use crate::loop_::Loop; + use crate::udp::{self, PacketBuffer}; + use crate::{LIBUS_SOCKET_DESCRIPTOR, LIBUS_SOCKET_ERROR, LIBUS_SOCKET_IPV6_ONLY}; + + #[inline] + fn so_int(fd: c_int, level: c_int, name: c_int, value: c_int) -> c_int { + // SAFETY: `value` outlives the call. + unsafe { + libc::setsockopt( + fd, + level, + name, + (&value as *const c_int).cast(), + size_of::() as libc::socklen_t, + ) + } + } + + // ── kernel poll arming (UDP-only subset of R2.7/R2.8/R2.9/R2.10) ──────── + + /// udata word: `socket_ptr | PollType::Udp` (`udp::Socket` is align(16), + /// so the tag fits the low 4 bits). Dispatch: mask with 0xf, match + /// `PollType::Udp`, call `udp::dispatch_ready_poll`. + fn udp_tag(s: *mut udp::Socket) -> usize { + (s as usize) | (PollType::Udp as usize) + } + + #[cfg(any(target_os = "linux", target_os = "android"))] + fn epoll_ctl_retry(epfd: c_int, op: c_int, fd: c_int, ev: *mut libc::epoll_event) -> c_int { + loop { + // SAFETY: plain epoll_ctl on fds we own; `ev` outlives the call. + let rc = unsafe { libc::epoll_ctl(epfd, op, fd, ev) }; + if rc == 0 || errno() != libc::EINTR { + return rc; + } + } + } + + /// R2.9 kqueue state machine: single source of truth in the backend + /// (level-triggered R, one-shot W, zero-events one-shot-W, errno mirror). + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + fn kqueue_change(kqfd: c_int, fd: c_int, old: u32, new: u32, udata: usize) -> c_int { + crate::backend::kqueue::kqueue_change(kqfd, fd, Events(old), Events(new), udata as u64) + } + + /// Register the UDP fd (`us_poll_start_rc` equivalent). 0 on success. + pub(crate) fn udp_poll_start(loop_: *mut Loop, s: *mut udp::Socket, events: u32) -> c_int { + // SAFETY: `s` is live and not yet visible to any callback. + let fd = unsafe { + (*s).poll_events = events; + (*s).fd + }; + let loop_fd = crate::unsafe_core::poll_access::loop_fd(loop_); + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let mut ev = libc::epoll_event { + events, + u64: udp_tag(s) as u64, + }; + epoll_ctl_retry(loop_fd, libc::EPOLL_CTL_ADD, fd, &mut ev) + } + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + kqueue_change(loop_fd, fd, 0, events, udp_tag(s)) + } + } + + /// `us_poll_change` equivalent: no-op when the believed events match. + pub(crate) fn udp_poll_change(loop_: *mut Loop, s: *mut udp::Socket, events: u32) { + // SAFETY: callers derive `s` from their own live handle/&mut. + let (fd, old) = unsafe { ((*s).fd, (*s).poll_events) }; + if old == events { + return; + } + // SAFETY: as above. + unsafe { (*s).poll_events = events }; + let loop_fd = crate::unsafe_core::poll_access::loop_fd(loop_); + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let _ = old; + let mut ev = libc::epoll_event { + events, + u64: udp_tag(s) as u64, + }; + epoll_ctl_retry(loop_fd, libc::EPOLL_CTL_MOD, fd, &mut ev); + } + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + kqueue_change(loop_fd, fd, old, events, udp_tag(s)); + } + } + + /// `us_poll_stop` equivalent. Poll bits in `*s` are NOT cleared (R2.10). + pub(crate) fn udp_poll_stop(loop_: *mut Loop, s: *mut udp::Socket) { + // SAFETY: as in `udp_poll_change`. + let (fd, old) = unsafe { ((*s).fd, (*s).poll_events) }; + let loop_fd = crate::unsafe_core::poll_access::loop_fd(loop_); + #[cfg(any(target_os = "linux", target_os = "android"))] + { + let _ = old; + // DEL's event argument may be null since Linux 2.6.9 (R2.10). + epoll_ctl_retry(loop_fd, libc::EPOLL_CTL_DEL, fd, ptr::null_mut()); + } + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + { + if old != 0 { + // The zero-events rule may arm a NULL-udata one-shot write; + // it is delivered later as a null ready poll and skipped. + kqueue_change(loop_fd, fd, old, 0, 0); + } + } + } + + // ── create/bind (bsd_create_udp_socket — R9.8) ────────────────────────── + + /// getaddrinfo(AI_PASSIVE, SOCK_DGRAM), IPv6-preferred; reuse opts, + /// IPV6_V6ONLY, PKTINFO, RECVTCLASS/RECVTOS, Linux IP_RECVERR(+v6); bind. + /// `*err` = -gai on DNS failure, errno otherwise; 0 on success. + pub(crate) fn udp_bind_fd( + host: *const c_char, + port: u16, + options: c_int, + err: &mut c_int, + ) -> LIBUS_SOCKET_DESCRIPTOR { + *err = 0; + // SAFETY: zeroed addrinfo is a valid hints value. + let mut hints: libc::addrinfo = unsafe { core::mem::zeroed() }; + hints.ai_flags = libc::AI_PASSIVE; + hints.ai_family = libc::AF_UNSPEC; + hints.ai_socktype = libc::SOCK_DGRAM; + let port_string = format!("{port}\0"); + let mut result: *mut libc::addrinfo = ptr::null_mut(); + // SAFETY: `host` is caller-provided NUL-terminated (or null); + // `port_string` is NUL-terminated and outlives the call. + let gai = + unsafe { libc::getaddrinfo(host, port_string.as_ptr().cast(), &hints, &mut result) }; + if gai != 0 { + *err = -gai; + return LIBUS_SOCKET_ERROR; + } + + let mut listen_fd = LIBUS_SOCKET_ERROR; + let mut listen_addr: *mut libc::addrinfo = ptr::null_mut(); + for family in [libc::AF_INET6, libc::AF_INET] { + let mut a = result; + while !a.is_null() && listen_fd == LIBUS_SOCKET_ERROR { + // SAFETY: `a` walks the getaddrinfo-owned list. + unsafe { + if (*a).ai_family == family { + *err = 0; + match create_socket((*a).ai_family, (*a).ai_socktype, (*a).ai_protocol) { + Ok(fd) => listen_fd = fd, + Err(e) => *err = e, + } + listen_addr = a; + } + a = (*a).ai_next; + } + } + } + if listen_fd == LIBUS_SOCKET_ERROR { + // SAFETY: `result` came from getaddrinfo above. + unsafe { libc::freeaddrinfo(result) }; + return LIBUS_SOCKET_ERROR; + } + + if let Err(e) = set_reuse(listen_fd, options) { + *err = e; + close(listen_fd, false); + // SAFETY: as above. + unsafe { libc::freeaddrinfo(result) }; + return LIBUS_SOCKET_ERROR; + } + + // SAFETY: listen_addr points into the live getaddrinfo list. + let family = unsafe { (*listen_addr).ai_family }; + if family == libc::AF_INET6 { + let enabled = c_int::from(options & LIBUS_SOCKET_IPV6_ONLY != 0); + if so_int(listen_fd, libc::IPPROTO_IPV6, libc::IPV6_V6ONLY, enabled) != 0 { + // Quirk ported verbatim (bsd.c:1478-1481): fd + addrinfo leak, + // *err left at 0. + return LIBUS_SOCKET_ERROR; + } + } + + // Destination-address reporting: IPV6_RECVPKTINFO with v4 fallback. + // C prefers IP_PKTINFO wherever defined (incl. Darwin, bsd.c:1493); + // only FreeBSD lacks it and falls back to IP_RECVDSTADDR. + if so_int(listen_fd, libc::IPPROTO_IPV6, libc::IPV6_RECVPKTINFO, 1) == -1 { + let e = errno(); + if e == libc::ENOPROTOOPT || e == libc::EINVAL { + #[cfg(not(target_os = "freebsd"))] + so_int(listen_fd, libc::IPPROTO_IP, libc::IP_PKTINFO, 1); + #[cfg(target_os = "freebsd")] + so_int(listen_fd, libc::IPPROTO_IP, libc::IP_RECVDSTADDR, 1); + } + } + // ECN/TOS reporting: IPV6_RECVTCLASS with IP_RECVTOS fallback. + if so_int(listen_fd, libc::IPPROTO_IPV6, libc::IPV6_RECVTCLASS, 1) == -1 { + let e = errno(); + if e == libc::ENOPROTOOPT || e == libc::EINVAL { + so_int(listen_fd, libc::IPPROTO_IP, libc::IP_RECVTOS, 1); + } + } + // Linux: surface ICMP errors instead of dropping them (libuv parity); + // drained via MSG_ERRQUEUE in dispatch. + #[cfg(any(target_os = "linux", target_os = "android"))] + { + so_int(listen_fd, libc::IPPROTO_IP, libc::IP_RECVERR, 1); + if family == libc::AF_INET6 { + so_int(listen_fd, libc::IPPROTO_IPV6, libc::IPV6_RECVERR, 1); + } + } + + // SAFETY: ai_addr/ai_addrlen come from the live getaddrinfo entry. + let bind_rc = + unsafe { libc::bind(listen_fd, (*listen_addr).ai_addr, (*listen_addr).ai_addrlen) }; + if bind_rc != 0 { + *err = errno(); + close(listen_fd, false); + // SAFETY: as above. + unsafe { libc::freeaddrinfo(result) }; + return LIBUS_SOCKET_ERROR; + } + + // SAFETY: as above. + unsafe { libc::freeaddrinfo(result) }; + *err = 0; + listen_fd + } + + /// Bound port, host order; 0 when getsockname fails, -1 for unknown + /// family (bsd_addr_get_port over the create-time `bsd_addr_t`). + pub(crate) fn udp_local_port(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + match local_addr(fd) { + Some(addr) => addr.port(), + None => 0, + } + } + + /// Raw local/remote IP bytes (4 or 16) into `buf`; `*length = 0` on + /// error, unknown family, or a too-small buffer (us_udp_socket_bound_ip). + pub(crate) fn udp_addr_ip( + fd: LIBUS_SOCKET_DESCRIPTOR, + remote: bool, + buf: *mut u8, + length: &mut i32, + ) { + let addr = if remote { + remote_addr(fd) + } else { + local_addr(fd) + }; + let Some(addr) = addr else { + *length = 0; + return; + }; + let ip = addr.ip(); + if *length < ip.len() as i32 { + *length = 0; + return; + } + *length = ip.len() as i32; + if !ip.is_empty() { + // SAFETY: caller guarantees `buf` holds at least the original + // `*length` bytes, checked >= ip.len() above. + unsafe { ptr::copy_nonoverlapping(ip.as_ptr(), buf, ip.len()) }; + } + } + + // ── connect / disconnect (bsd.c:1558-1610 — R9.9) ─────────────────────── + + /// `bsd_connect_udp_socket`: returns the gai error as-is when nonzero, + /// 0 on the first successful connect, else -1 (+errno). + pub(crate) fn udp_connect_fd( + fd: LIBUS_SOCKET_DESCRIPTOR, + host: *const c_char, + port: c_uint, + ) -> c_int { + // SAFETY: zeroed addrinfo is a valid hints value. + let mut hints: libc::addrinfo = unsafe { core::mem::zeroed() }; + hints.ai_family = libc::AF_UNSPEC; + hints.ai_socktype = libc::SOCK_DGRAM; + let port_string = format!("{port}\0"); + let mut result: *mut libc::addrinfo = ptr::null_mut(); + // SAFETY: host NUL-terminated per caller; port_string NUL-terminated. + let gai = + unsafe { libc::getaddrinfo(host, port_string.as_ptr().cast(), &hints, &mut result) }; + if gai != 0 { + return gai; + } + if result.is_null() { + return -1; + } + let mut rp = result; + while !rp.is_null() { + // SAFETY: rp walks the live getaddrinfo list. + unsafe { + if libc::connect(fd, (*rp).ai_addr, (*rp).ai_addrlen) == 0 { + libc::freeaddrinfo(result); + return 0; + } + rp = (*rp).ai_next; + } + } + // SAFETY: as above. + unsafe { libc::freeaddrinfo(result) }; + -1 + } + + /// `bsd_disconnect_udp_socket`: connect(AF_UNSPEC); EAFNOSUPPORT = ok. + pub(crate) fn udp_disconnect_fd(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + // SAFETY: zeroed sockaddr + AF_UNSPEC is the documented disconnect. + let mut addr: libc::sockaddr = unsafe { core::mem::zeroed() }; + addr.sa_family = libc::AF_UNSPEC as _; + #[cfg(target_vendor = "apple")] + { + addr.sa_len = size_of::() as u8; + } + // SAFETY: addr outlives the call. + let res = + unsafe { libc::connect(fd, &addr, size_of::() as libc::socklen_t) }; + if res == 0 || errno() == libc::EAFNOSUPPORT { + 0 + } else { + -1 + } + } + + // ── recv/send batches (bsd_recvmmsg / bsd_sendmmsg + setup — R9.5-R9.7) ─ + + #[cfg(target_vendor = "apple")] + unsafe extern "C" { + // Private Darwin batch syscalls (bsd.h); no addresses/ancillary data. + fn recvmsg_x(s: c_int, msgp: *const udp::Mmsghdr, cnt: c_uint, flags: c_int) -> isize; + fn sendmsg_x(s: c_int, msgp: *const udp::Mmsghdr, cnt: c_uint, flags: c_int) -> isize; + fn Bun__doesMacOSVersionSupportSendRecvMsgX() -> c_int; + } + + /// A zeroed receive batch (null msghdr/iovec are valid pre-setup states). + pub(crate) fn udp_recvbuf_zeroed() -> PacketBuffer { + // SAFETY: PacketBuffer is repr(C) POD (pointers + byte arrays). + unsafe { core::mem::zeroed() } + } + + /// `bsd_udp_setup_recvbuf` + `bsd_recvmmsg(MSG_DONTWAIT)` under one + /// borrow: wires each 64 KiB slot of `databuf` plus this batch's own + /// name/control slots, then receives. Packet count, 0, or -1 (+errno). + pub(crate) fn udp_recvmmsg( + fd: LIBUS_SOCKET_DESCRIPTOR, + buf: &mut PacketBuffer, + databuf: *mut u8, + ) -> c_int { + // SAFETY: re-zeroing POD; every pointer written below outlives the + // syscall (they point into `*buf` and the loop-owned `databuf`). + unsafe { + ptr::write_bytes( + (buf as *mut PacketBuffer).cast::(), + 0, + size_of::(), + ); + for i in 0..udp::LIBUS_UDP_RECV_COUNT { + buf.iov[i].iov_base = databuf.add(i * udp::LIBUS_UDP_MAX_SIZE).cast(); + buf.iov[i].iov_len = udp::LIBUS_UDP_MAX_SIZE as _; + let name = ptr::addr_of_mut!(buf.addr[i]); + let control = ptr::addr_of_mut!(buf.control[i]); + let iov = ptr::addr_of_mut!(buf.iov[i]); + let mh = &mut buf.msgvec[i].msg_hdr; + mh.msg_name = name.cast(); + mh.msg_namelen = size_of::() as libc::socklen_t; + mh.msg_iov = iov; + mh.msg_iovlen = 1 as _; + mh.msg_control = control.cast(); + mh.msg_controllen = udp::UDP_CONTROL_LEN as _; + } + } + + #[cfg(any(target_os = "linux", target_os = "android"))] + loop { + // SAFETY: msgvec fully wired above. + let ret = unsafe { + libc::recvmmsg( + fd, + buf.msgvec.as_mut_ptr(), + udp::LIBUS_UDP_RECV_COUNT as c_uint, + libc::MSG_DONTWAIT as _, + ptr::null_mut(), + ) + }; + if ret >= 0 || errno() != libc::EINTR { + return ret; + } + } + #[cfg(target_os = "freebsd")] + loop { + // SAFETY: msgvec fully wired above. + let ret = unsafe { + libc::recvmmsg( + fd, + buf.msgvec.as_mut_ptr(), + udp::LIBUS_UDP_RECV_COUNT as libc::size_t, + libc::MSG_DONTWAIT, + ptr::null_mut(), + ) + }; + if ret >= 0 || errno() != libc::EINTR { + return ret as c_int; + } + } + #[cfg(target_vendor = "apple")] + { + // SAFETY: pure version probe (provided by the C++ side). + if unsafe { Bun__doesMacOSVersionSupportSendRecvMsgX() } != 0 { + loop { + // SAFETY: msgvec fully wired above. + let ret = unsafe { + recvmsg_x( + fd, + buf.msgvec.as_ptr(), + udp::LIBUS_UDP_RECV_COUNT as c_uint, + libc::MSG_DONTWAIT, + ) + }; + if ret >= 0 || errno() != libc::EINTR { + return ret as c_int; + } + } + } + for i in 0..udp::LIBUS_UDP_RECV_COUNT { + loop { + // SAFETY: per-message recvmsg over the wired msghdr. + let ret = unsafe { + libc::recvmsg(fd, &mut buf.msgvec[i].msg_hdr, libc::MSG_DONTWAIT) + }; + if ret < 0 { + let e = errno(); + if e == libc::EINTR { + continue; + } + if e == libc::EAGAIN || e == libc::EWOULDBLOCK { + return i as c_int; + } + return ret as c_int; + } + buf.msgvec[i].msg_len = ret as usize; + break; + } + } + udp::LIBUS_UDP_RECV_COUNT as c_int + } + } + + /// Payload of packet `index`, clamped to LIBUS_UDP_MAX_SIZE (Darwin + /// recvmsg_x reports the pre-truncation datagram length). + pub(crate) fn udp_packet_payload(buf: &mut PacketBuffer, index: i32) -> &mut [u8] { + let i = usize::try_from(index).expect("int cast"); + let len = (buf.msgvec[i].msg_len as usize).min(udp::LIBUS_UDP_MAX_SIZE); + // SAFETY: iov_base points at 64 KiB slot `i` of the loop's shared + // recv_buf, which outlives the data callback this borrow is scoped to. + unsafe { core::slice::from_raw_parts_mut(buf.iov[i].iov_base.cast::(), len) } + } + + /// One `recvmsg(MSG_ERRQUEUE)` drain step (Linux IP_RECVERR): + /// `Some(ee_errno)` per queued ICMP error (0 when the cmsg is missing), + /// `None` once the queue is drained. + #[cfg(any(target_os = "linux", target_os = "android"))] + pub(crate) fn udp_recv_errqueue(fd: LIBUS_SOCKET_DESCRIPTOR) -> Option { + let mut ebuf = [0u8; 1]; + let mut ectrl = [0u8; 512]; + let mut eiov = libc::iovec { + iov_base: ebuf.as_mut_ptr().cast(), + iov_len: ebuf.len(), + }; + // SAFETY: zeroed msghdr then fully wired to live locals. + let mut eh: libc::msghdr = unsafe { core::mem::zeroed() }; + eh.msg_iov = &mut eiov; + eh.msg_iovlen = 1 as _; + eh.msg_control = ectrl.as_mut_ptr().cast(); + eh.msg_controllen = ectrl.len() as _; + // SAFETY: eh wired above; MSG_ERRQUEUE never blocks. + if unsafe { libc::recvmsg(fd, &mut eh, libc::MSG_ERRQUEUE) } < 0 { + return None; + } + let mut ee: c_int = 0; + // SAFETY: CMSG_* walk over the control buffer the kernel just filled. + unsafe { + let mut cm = libc::CMSG_FIRSTHDR(&eh); + while !cm.is_null() { + if ((*cm).cmsg_level == libc::IPPROTO_IP && (*cm).cmsg_type == libc::IP_RECVERR) + || ((*cm).cmsg_level == libc::IPPROTO_IPV6 + && (*cm).cmsg_type == libc::IPV6_RECVERR) + { + let se = libc::CMSG_DATA(cm).cast::(); + ee = (*se).ee_errno as c_int; + break; + } + cm = libc::CMSG_NXTHDR(&eh, cm); + } + } + Some(ee) + } + + /// One `bsd_udp_setup_sendbuf` + `bsd_sendmmsg(MSG_DONTWAIT)` batch over + /// the loop's shared send scratch. Returns `(packets_consumed_into_batch, + /// packets_sent_or_negative)`. `addresses[i] == null` = connected send. + pub(crate) fn udp_send_batch( + fd: LIBUS_SOCKET_DESCRIPTOR, + send_buf: *mut u8, + bufsize: usize, + payloads: &[*const u8], + lengths: &[usize], + addresses: &[*const c_void], + ) -> (c_int, c_int) { + // The C `struct udp_sendbuf` header is 8 bytes before msgvec[] + // (bit flags + unsigned num); the capacity formula keeps it. + const SENDBUF_HEADER: usize = 8; + let cap = + (bufsize - SENDBUF_HEADER) / (size_of::() + size_of::()); + let count = cap.min(payloads.len()); + if count == 0 { + return (0, 0); + } + + let mut has_empty = false; + let mut has_addresses = false; + // SAFETY: send_buf is the loop's LIBUS_SEND_BUFFER_LENGTH scratch, + // 16-aligned by the loop allocator; msgvec/iov stay within it by the + // capacity formula above; payload/address pointers are borrowed from + // the caller's slices for the duration of this call only. + let msgvec = unsafe { + let msgvec = send_buf.add(SENDBUF_HEADER).cast::(); + let iov = msgvec.add(count).cast::(); + for i in 0..count { + let addr = addresses[i].cast::(); + let mut addr_len: libc::socklen_t = 0; + if !addr.is_null() { + addr_len = match c_int::from((*addr).sa_family) { + libc::AF_INET => size_of::() as libc::socklen_t, + libc::AF_INET6 => size_of::() as libc::socklen_t, + _ => 0, + }; + if addr_len > 0 { + has_addresses = true; + } + } + (*iov.add(i)).iov_base = payloads[i] as *mut c_void; + (*iov.add(i)).iov_len = lengths[i] as _; + let m = &mut *msgvec.add(i); + m.msg_hdr = core::mem::zeroed(); + m.msg_hdr.msg_name = addresses[i] as *mut c_void; + m.msg_hdr.msg_namelen = addr_len; + m.msg_hdr.msg_iov = iov.add(i); + m.msg_hdr.msg_iovlen = 1 as _; + m.msg_len = 0 as _; + if lengths[i] == 0 { + has_empty = true; + } + } + msgvec + }; + + #[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))] + { + let _ = (has_empty, has_addresses); + loop { + #[cfg(not(target_os = "freebsd"))] + // SAFETY: msgvec holds `count` wired entries. + let ret = unsafe { + libc::sendmmsg( + fd, + msgvec, + count as c_uint, + (libc::MSG_DONTWAIT | libc::MSG_NOSIGNAL) as _, + ) + }; + #[cfg(target_os = "freebsd")] + // SAFETY: msgvec holds `count` wired entries. + let ret = unsafe { + libc::sendmmsg( + fd, + msgvec, + count as libc::size_t, + libc::MSG_DONTWAIT | libc::MSG_NOSIGNAL, + ) as c_int + }; + if ret >= 0 || errno() != libc::EINTR { + return (count as c_int, ret); + } + } + } + #[cfg(target_vendor = "apple")] + { + // sendmsg_x supports neither addresses nor empty payloads. + // SAFETY: pure version probe. + if !has_empty + && !has_addresses + && unsafe { Bun__doesMacOSVersionSupportSendRecvMsgX() } != 0 + { + loop { + // SAFETY: msgvec holds `count` wired entries. + let ret = unsafe { sendmsg_x(fd, msgvec, count as c_uint, libc::MSG_DONTWAIT) }; + if ret >= 0 { + return (count as c_int, ret as c_int); + } + let e = errno(); + if e == libc::EMSGSIZE { + break; // fall back to the per-message path + } + if e != libc::EINTR { + return (count as c_int, ret as c_int); + } + } + } + for i in 0..count { + loop { + // SAFETY: per-message sendmsg over wired headers. + let ret = + unsafe { libc::sendmsg(fd, &(*msgvec.add(i)).msg_hdr, libc::MSG_DONTWAIT) }; + if ret < 0 { + let e = errno(); + if e == libc::EINTR { + continue; + } + if e == libc::EAGAIN || e == libc::EWOULDBLOCK { + return (count as c_int, i as c_int); + } + return (count as c_int, ret as c_int); + } + break; + } + } + (count as c_int, count as c_int) + } + } +} + +/// Windows: UDP rides one uv_poll per socket (owned via `udp::Socket.uv_p`, +/// mirroring `SocketHeader.uv_p`) + Winsock recvfrom/sendto — the bsd.c +/// `_WIN32` UDP branches. Signatures preserved so udp.rs stays +/// platform-neutral. +#[cfg(windows)] +mod udp_imp { + use core::ffi::{c_char, c_int, c_uint, c_void}; + use core::mem::size_of; + use core::ptr; + + use bun_libuv_sys as sys; + use sys::UvHandle; + + use super::win::{self, ws2}; + use super::{close, create_socket, local_addr, remote_addr, set_errno, set_reuse}; + use crate::backend::Events; + use crate::loop_::Loop; + use crate::udp::{self, PacketBuffer}; + use crate::{ + LIBUS_RECV_BUFFER_LENGTH, LIBUS_SOCKET_DESCRIPTOR, LIBUS_SOCKET_ERROR, + LIBUS_SOCKET_IPV6_ONLY, + }; + + #[inline] + fn so_int(fd: LIBUS_SOCKET_DESCRIPTOR, level: c_int, name: c_int, value: c_int) -> c_int { + win::so(fd, level, name, &value) + } + + // ── uv_poll arming (the libuv arm of R2.7-R2.10, scoped to UDP) ───────── + // Same single-owner shape as ffi.rs's `UvPollHandle` for TCP: the wrapper + // box lives in `udp::Socket.uv_p` from first arm until stop; the pending + // uv_close callback frees it (deferred free, R2.4). + + #[repr(C)] + struct UvUdpPollHandle { + /// MUST stay first: `*mut UvUdpPollHandle` doubles as the uv handle ptr. + uv: sys::uv_poll_t, + } + + unsafe extern "C" fn udp_poll_cb(p: *mut sys::uv_poll_t, status: c_int, events: c_int) { + // SAFETY: `data` points at the owning udp::Socket, which stays + // readable until the tick-postlude sweep (C6/C15); uv fires no + // poll_cb after uv_poll_stop. + let s = unsafe { (*p).data.cast::() }; + // libuv.c:26-29: status<0 && !=UV_EOF → error; ==UV_EOF → eof + // (unread in the UDP arm, matching C's POLL_TYPE_UDP case). + let error = status < 0 && status != sys::UV_EOF; + let eof = status == sys::UV_EOF; + let ready = (events as u32) & super::udp_poll_events(s); + if ready != 0 || error || eof { + crate::udp::dispatch_ready_poll( + s, + error, + ready & Events::READABLE.0 != 0, + ready & Events::WRITABLE.0 != 0, + ); + } + } + + unsafe extern "C" fn udp_poll_close_cb(h: *mut sys::uv_poll_t) { + // SAFETY: sole owner post-close; box leaked in `udp_poll_start`. + drop(unsafe { Box::from_raw(h.cast::()) }); + } + + /// Register the UDP socket (`us_poll_start_rc` equivalent): alloc the + /// wrapper, uv_poll_init_socket (this also sets FIONBIO) + always-unref + /// (keep-alive is Bun's `Async.KeepAlive`), `data = s`, start. 0 on + /// success, −1 on init failure (the socket stays unarmed). + pub(crate) fn udp_poll_start(loop_: *mut Loop, s: *mut udp::Socket, events: u32) -> c_int { + // SAFETY: `s` is live and not yet visible to any callback. + let fd = unsafe { + (*s).poll_events = events; + (*s).fd + }; + // SAFETY: raw place read of the set-once `uv_loop` field; no `&mut + // Loop` formed (cross-thread wakeups touch sibling fields). + let uv_loop = unsafe { (*loop_).uv_loop }.cast::(); + // SAFETY: fresh zeroed POD box; init on this thread's loop; on init + // failure the box is reclaimed here (uv registered nothing). On + // success it is owned by `s.uv_p` until `udp_poll_stop`. + unsafe { + let h: *mut UvUdpPollHandle = Box::into_raw(Box::new(core::mem::zeroed())); + if sys::uv_poll_init_socket(uv_loop, &raw mut (*h).uv, fd) != 0 { + drop(Box::from_raw(h)); + return -1; + } + (*h).uv.unref(); + (*h).uv.data = s.cast(); + (*s).uv_p = h.cast(); + let _ = sys::uv_poll_start(&raw mut (*h).uv, events as c_int, Some(udp_poll_cb)); + } + 0 + } + + /// `us_poll_change` equivalent (libuv.c:112-121): no-op when the poll + /// was never armed / already stopped or the believed events match. + pub(crate) fn udp_poll_change(_loop: *mut Loop, s: *mut udp::Socket, events: u32) { + // SAFETY: callers derive `s` from their own live handle/&mut. + let (old, h) = unsafe { ((*s).poll_events, (*s).uv_p.cast::()) }; + if h.is_null() || old == events { + return; + } + // SAFETY: as above; non-null `uv_p` is live until `udp_poll_stop`. + unsafe { + (*s).poll_events = events; + let _ = sys::uv_poll_start(&raw mut (*h).uv, events as c_int, Some(udp_poll_cb)); + } + } + + /// `us_poll_stop` equivalent: stop, null the owner field, uv_close with + /// the freeing callback. Poll bits in `*s` are NOT cleared (R2.10). + pub(crate) fn udp_poll_stop(_loop: *mut Loop, s: *mut udp::Socket) { + // SAFETY: as in `udp_poll_change`; ownership of the wrapper moves to + // the pending close callback. + unsafe { + let h = (*s).uv_p.cast::(); + if h.is_null() { + return; + } + (*s).uv_p = ptr::null_mut(); + let _ = sys::uv_poll_stop(&raw mut (*h).uv); + (*h).uv.close(udp_poll_close_cb); + } + } + + // ── create/bind (bsd_create_udp_socket — R9.8, windows arm) ───────────── + + /// getaddrinfo(AI_PASSIVE, SOCK_DGRAM), IPv6-preferred; reuse opts, + /// IPV6_V6ONLY, PKTINFO/RECVTCLASS reporting, SIO_UDP_CONNRESET and + /// SIO_UDP_NETRESET disabled at the source; bind. `*err` = -gai on DNS + /// failure, WSA error otherwise; 0 on success. + pub(crate) fn udp_bind_fd( + host: *const c_char, + port: u16, + options: c_int, + err: &mut c_int, + ) -> LIBUS_SOCKET_DESCRIPTOR { + *err = 0; + let mut hints: ws2::addrinfo = win::pod_zeroed(); + hints.ai_flags = win::AI_PASSIVE; + hints.ai_family = ws2::AF_UNSPEC; + hints.ai_socktype = ws2::SOCK_DGRAM; + let port_string = format!("{port}\0"); + let mut result: *mut ws2::addrinfo = ptr::null_mut(); + // SAFETY: `host` is caller-provided NUL-terminated (or null); + // `port_string` is NUL-terminated and outlives the call. + let gai = + unsafe { ws2::getaddrinfo(host, port_string.as_ptr().cast(), &hints, &mut result) }; + if gai != 0 { + *err = -gai; + return LIBUS_SOCKET_ERROR; + } + + let mut listen_fd = LIBUS_SOCKET_ERROR; + let mut listen_addr: *mut ws2::addrinfo = ptr::null_mut(); + for family in [ws2::AF_INET6, ws2::AF_INET] { + let mut a = result; + while !a.is_null() && listen_fd == LIBUS_SOCKET_ERROR { + // SAFETY: `a` walks the getaddrinfo-owned list. + unsafe { + if (*a).ai_family == family { + *err = 0; + match create_socket((*a).ai_family, (*a).ai_socktype, (*a).ai_protocol) { + Ok(fd) => listen_fd = fd, + Err(e) => *err = e, + } + listen_addr = a; + } + a = (*a).ai_next; + } + } + } + if listen_fd == LIBUS_SOCKET_ERROR { + // SAFETY: `result` came from getaddrinfo above. + unsafe { ws2::freeaddrinfo(result) }; + return LIBUS_SOCKET_ERROR; + } + + if let Err(e) = set_reuse(listen_fd, options) { + *err = e; + close(listen_fd, false); + // SAFETY: as above. + unsafe { ws2::freeaddrinfo(result) }; + return LIBUS_SOCKET_ERROR; + } + + // SAFETY: listen_addr points into the live getaddrinfo list. + let family = unsafe { (*listen_addr).ai_family }; + if family == ws2::AF_INET6 { + let enabled = c_int::from(options & LIBUS_SOCKET_IPV6_ONLY != 0); + if so_int(listen_fd, win::IPPROTO_IPV6, win::IPV6_V6ONLY, enabled) != 0 { + // Quirk ported verbatim (bsd.c:1478-1481): fd + addrinfo leak, + // *err left at 0. + return LIBUS_SOCKET_ERROR; + } + } + + // Destination-address reporting: IPV6_PKTINFO (Windows has no + // IPV6_RECVPKTINFO alias) with the IP_PKTINFO v4 fallback. + if so_int(listen_fd, win::IPPROTO_IPV6, win::IPV6_PKTINFO, 1) == -1 { + let e = win::wsa_errno(); + if e == win::WSAENOPROTOOPT || e == win::WSAEINVAL { + so_int(listen_fd, win::IPPROTO_IP, win::IP_PKTINFO, 1); + } + } + // ECN/TOS reporting: IPV6_RECVTCLASS with IP_RECVTOS fallback. + if so_int(listen_fd, win::IPPROTO_IPV6, win::IPV6_RECVTCLASS, 1) == -1 { + let e = win::wsa_errno(); + if e == win::WSAENOPROTOOPT || e == win::WSAEINVAL { + so_int(listen_fd, win::IPPROTO_IP, win::IP_RECVTOS, 1); + } + } + + // Winsock reports ICMP "port unreachable" from a previous sendto as + // WSAECONNRESET (NETRESET for TTL-expired) on the next recv; disable + // at the source so a queued ICMP can't race a real packet either + // (bsd.c:1508-1520). Failures deliberately ignored, matching the C. + { + let mut off: u32 = 0; + let mut br: u32 = 0; + // SAFETY: in-buffer is a live DWORD; no out-buffer. + unsafe { + win::WSAIoctl( + listen_fd, + win::SIO_UDP_CONNRESET, + (&raw mut off).cast::(), + size_of::() as u32, + ptr::null_mut(), + 0, + &mut br, + ptr::null_mut(), + ptr::null_mut(), + ); + win::WSAIoctl( + listen_fd, + win::SIO_UDP_NETRESET, + (&raw mut off).cast::(), + size_of::() as u32, + ptr::null_mut(), + 0, + &mut br, + ptr::null_mut(), + ptr::null_mut(), + ); + } + } + + // SAFETY: ai_addr/ai_addrlen come from the live getaddrinfo entry. + let bind_rc = unsafe { + win::bind( + listen_fd, + (*listen_addr).ai_addr, + (*listen_addr).ai_addrlen as c_int, + ) + }; + if bind_rc != 0 { + *err = win::wsa_errno(); + close(listen_fd, false); + // SAFETY: as above. + unsafe { ws2::freeaddrinfo(result) }; + return LIBUS_SOCKET_ERROR; + } + + // SAFETY: as above. + unsafe { ws2::freeaddrinfo(result) }; + *err = 0; + listen_fd + } + + /// Bound port, host order; 0 when getsockname fails, -1 for unknown + /// family (bsd_addr_get_port over the create-time `bsd_addr_t`). + pub(crate) fn udp_local_port(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + match local_addr(fd) { + Some(addr) => addr.port(), + None => 0, + } + } + + /// Raw local/remote IP bytes (4 or 16) into `buf`; `*length = 0` on + /// error, unknown family, or a too-small buffer (us_udp_socket_bound_ip). + pub(crate) fn udp_addr_ip( + fd: LIBUS_SOCKET_DESCRIPTOR, + remote: bool, + buf: *mut u8, + length: &mut i32, + ) { + let addr = if remote { + remote_addr(fd) + } else { + local_addr(fd) + }; + let Some(addr) = addr else { + *length = 0; + return; + }; + let ip = addr.ip(); + if *length < ip.len() as i32 { + *length = 0; + return; + } + *length = ip.len() as i32; + if !ip.is_empty() { + // SAFETY: caller guarantees `buf` holds at least the original + // `*length` bytes, checked >= ip.len() above. + unsafe { ptr::copy_nonoverlapping(ip.as_ptr(), buf, ip.len()) }; + } + } + + // ── connect / disconnect (bsd.c:1558-1610 — R9.9) ─────────────────────── + + /// `bsd_connect_udp_socket`: returns the gai error as-is when nonzero, + /// 0 on the first successful connect, else -1 (+WSA error in TLS). + pub(crate) fn udp_connect_fd( + fd: LIBUS_SOCKET_DESCRIPTOR, + host: *const c_char, + port: c_uint, + ) -> c_int { + let mut hints: ws2::addrinfo = win::pod_zeroed(); + hints.ai_family = ws2::AF_UNSPEC; + hints.ai_socktype = ws2::SOCK_DGRAM; + let port_string = format!("{port}\0"); + let mut result: *mut ws2::addrinfo = ptr::null_mut(); + // SAFETY: host NUL-terminated per caller; port_string NUL-terminated. + let gai = + unsafe { ws2::getaddrinfo(host, port_string.as_ptr().cast(), &hints, &mut result) }; + if gai != 0 { + return gai; + } + if result.is_null() { + return -1; + } + let mut rp = result; + while !rp.is_null() { + // SAFETY: rp walks the live getaddrinfo list. + unsafe { + if win::connect(fd, (*rp).ai_addr, (*rp).ai_addrlen as c_int) == 0 { + ws2::freeaddrinfo(result); + return 0; + } + rp = (*rp).ai_next; + } + } + // SAFETY: as above. + unsafe { ws2::freeaddrinfo(result) }; + -1 + } + + /// `bsd_disconnect_udp_socket`: connect(AF_UNSPEC); WSAEAFNOSUPPORT = ok. + pub(crate) fn udp_disconnect_fd(fd: LIBUS_SOCKET_DESCRIPTOR) -> c_int { + let mut addr: ws2::sockaddr = win::pod_zeroed(); + addr.sa_family = ws2::AF_UNSPEC as u16; + // SAFETY: addr outlives the call. + let res = unsafe { win::connect(fd, &addr, size_of::() as c_int) }; + if res == 0 || win::wsa_errno() == win::WSAEAFNOSUPPORT { + 0 + } else { + -1 + } + } + + // ── recv/send (bsd_recvmmsg / bsd_sendmmsg windows arms — R9.5-R9.7) ──── + + pub(crate) fn udp_recvbuf_zeroed() -> PacketBuffer { + PacketBuffer { + buf: ptr::null_mut(), + buflen: 0, + recvlen: 0, + // SAFETY: sockaddr_storage is POD. + addr: unsafe { core::mem::zeroed() }, + } + } + + /// `bsd_udp_setup_recvbuf` + `bsd_recvmmsg` windows arm (bsd.c:131-155): + /// one recvfrom per call into the loop's shared recv_buf, swallowing + /// WSAECONNRESET/WSAENETRESET (per-destination ICMP — treating it as a + /// socket error would tear down every conn sharing the socket, e.g. the + /// QUIC client endpoint; mirrors libuv's uv__udp_recv handling). + /// 1 packet, or -1 with the WSA error left in TLS. + pub(crate) fn udp_recvmmsg( + fd: LIBUS_SOCKET_DESCRIPTOR, + buf: &mut PacketBuffer, + databuf: *mut u8, + ) -> c_int { + buf.buf = databuf; + buf.buflen = LIBUS_RECV_BUFFER_LENGTH; + loop { + let mut addr_len = size_of::() as c_int; + // SAFETY: `databuf` is the loop's LIBUS_RECV_BUFFER_LENGTH recv + // scratch; `buf.addr` is a live SOCKADDR_STORAGE out-param. + let ret = unsafe { + win::recvfrom( + fd, + databuf.cast::(), + LIBUS_RECV_BUFFER_LENGTH as c_int, + 0, + (&raw mut buf.addr).cast(), + &mut addr_len, + ) + }; + if ret < 0 { + let e = win::wsa_errno(); + if e == win::WSAEINTR || e == win::WSAECONNRESET || e == win::WSAENETRESET { + continue; + } + return -1; + } + buf.recvlen = ret as usize; + return 1; + } + } + + pub(crate) fn udp_packet_payload(buf: &mut PacketBuffer, _index: i32) -> &mut [u8] { + // SAFETY: buf.buf points at the loop's shared recv_buf; recvlen is + // the last recvfrom's byte count. + unsafe { core::slice::from_raw_parts_mut(buf.buf, buf.recvlen) } + } + + /// `bsd_sendmmsg` windows arm (bsd.c:70-97): per-packet send (connected) + /// or sendto by family. Returns `(packets_consumed_into_batch, + /// packets_sent_or_negative)`; consumed = all (the windows setup has no + /// capacity limit — no msgvec is built). WSAEWOULDBLOCK stops the batch + /// at `i`; unknown family → WSAEAFNOSUPPORT + -1, as in C. + pub(crate) fn udp_send_batch( + fd: LIBUS_SOCKET_DESCRIPTOR, + _send_buf: *mut u8, + _bufsize: usize, + payloads: &[*const u8], + lengths: &[usize], + addresses: &[*const c_void], + ) -> (c_int, c_int) { + let count = payloads.len(); + for i in 0..count { + loop { + let addr = addresses[i].cast::(); + let len = lengths[i].min(c_int::MAX as usize) as c_int; + // SAFETY: payload/address pointers are borrowed from the + // caller's slices for the duration of this call only. + let ret = unsafe { + let family = if addr.is_null() { + ws2::AF_UNSPEC + } else { + c_int::from((*addr).sa_family) + }; + if family == ws2::AF_UNSPEC { + ws2::send(fd, payloads[i].cast(), len, 0) + } else if family == ws2::AF_INET { + win::sendto( + fd, + payloads[i].cast(), + len, + 0, + addr, + size_of::() as c_int, + ) + } else if family == ws2::AF_INET6 { + win::sendto( + fd, + payloads[i].cast(), + len, + 0, + addr, + size_of::() as c_int, + ) + } else { + set_errno(win::WSAEAFNOSUPPORT); + return (count as c_int, -1); + } + }; + if ret < 0 { + let e = win::wsa_errno(); + if e == win::WSAEINTR { + continue; + } + if e == win::WSAEWOULDBLOCK { + return (count as c_int, i as c_int); + } + return (count as c_int, ret); + } + break; + } + } + (count as c_int, count as c_int) + } +} + +pub(crate) use udp_imp::*; + +// ── SO_ERROR (R3.22e / R6.8) ──────────────────────────────────── + +/// getsockopt(SO_ERROR); falls back to the thread errno if the getsockopt +/// itself fails (epoll_kqueue.c:863-871). +#[cfg(not(windows))] +pub(crate) fn so_error(fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + let mut error: core::ffi::c_int = 0; + let mut len = core::mem::size_of::() as libc::socklen_t; + // SAFETY: out-params are stack-valid ints of the advertised length. + let rc = unsafe { + libc::getsockopt( + fd, + libc::SOL_SOCKET, + libc::SO_ERROR, + (&raw mut error).cast(), + &raw mut len, + ) + }; + if rc == -1 { errno() } else { error } +} + +/// getsockopt(SO_ERROR) via winsock; falls back to WSAGetLastError when the +/// getsockopt itself fails (bsd.c / libuv.c:368-376 parity). +#[cfg(windows)] +pub(crate) fn so_error(fd: LIBUS_SOCKET_DESCRIPTOR) -> i32 { + const SO_ERROR: core::ffi::c_int = 0x1007; // winsock2.h + let mut error: core::ffi::c_int = 0; + let mut len = core::mem::size_of::() as core::ffi::c_int; + // SAFETY: out-params are stack-valid ints of the advertised length. + let rc = unsafe { + win::getsockopt( + fd, + win::SOL_SOCKET, + SO_ERROR, + (&raw mut error).cast(), + &raw mut len, + ) + }; + if rc == -1 { errno() } else { error } +} diff --git a/src/usockets/unsafe_core/mod.rs b/src/usockets/unsafe_core/mod.rs new file mode 100644 index 000000000000..08e1971b7721 --- /dev/null +++ b/src/usockets/unsafe_core/mod.rs @@ -0,0 +1,15 @@ +//! THE ONLY MODULE ALLOWED `unsafe` (docs/design.md §Strategy 5). Contents: chunked +//! slab + generations, kind-checked ext downcast, extern "C" trampolines, +//! syscall/FFI edges. Everything here is small, audited, and Miri-testable. + +#[allow(non_camel_case_types, non_snake_case)] +pub mod bssl; +pub mod deref; +pub mod ext; +pub mod ffi; +pub mod io; +pub mod poll_access; +pub mod slab; +#[cfg(all(test, not(miri), any(target_os = "linux", target_os = "android")))] +pub mod test_support; +pub mod trampolines; diff --git a/src/usockets/unsafe_core/poll_access.rs b/src/usockets/unsafe_core/poll_access.rs new file mode 100644 index 000000000000..73ba06a7ad25 --- /dev/null +++ b/src/usockets/unsafe_core/poll_access.rs @@ -0,0 +1,909 @@ +//! Poll-layer raw edges for backend/{epoll,kqueue}.rs: copy-in/copy-out +//! accessors over `*mut Loop` / `*mut PollState` (no borrow ever spans a +//! callback — C17), the slab generation probe (OQ-4), and the kernel +//! poll/change syscalls (epoll_pwait2 latch, kevent64 + FreeBSD shim). + +use core::ptr::NonNull; + +use crate::backend::{CallbackFn, CallbackPoll, PollState}; +use crate::socket::SocketHeader; +use crate::unsafe_core::slab::ChunkedSlab; + +#[cfg(not(windows))] +use crate::backend::{EventType, MAX_READY_POLLS}; +#[cfg(not(windows))] +use crate::loop_::Loop; + +// ── PollState / CallbackPoll raw access ────────────────────────────────────── + +/// Copy out the 4-byte poll state. Registered udata pointers stay readable +/// for the loop's lifetime (slab pages never unmap; callback/udp polls are +/// freed only after poll_stop nulls their pending ready entries). +#[inline] +pub(crate) fn read_poll(p: *const PollState) -> PollState { + // SAFETY: see above — `p` is a registered poll pointer. + unsafe { p.read() } +} + +#[inline] +pub(crate) fn write_poll(p: *mut PollState, v: PollState) { + // SAFETY: same contract as `read_poll`; 4-byte plain store. + unsafe { p.write(v) } +} + +/// Copy out a CALLBACK-kind poll body (dispatch reads it once, then calls +/// through the copy so the callback may free the poll — C17). +#[inline] +pub(crate) fn read_callback_poll(p: *mut CallbackPoll) -> CallbackPoll { + // SAFETY: caller verified kind_bits == Callback; layout is repr(C) with + // PollState first, so the udata pointer is the CallbackPoll pointer. + unsafe { p.read() } +} + +#[inline] +pub(crate) fn invoke_callback(cb: CallbackFn, arg: *mut core::ffi::c_void) { + // SAFETY: fn pointer installed by loop/wakeup init (C-ABI contract). + unsafe { cb(arg) } +} + +/// Closure-scoped access to an OCCUPIED registered-poll slot (poll registry). +/// Contract: caller validated generation parity; loop thread only; `f` must +/// not re-enter the registry or dispatch (the exclusive borrow ends with `f`). +#[inline] +pub(crate) fn with_registered( + p: *mut crate::loop_::poll_registry::RegisteredPoll, + f: impl FnOnce(&mut crate::loop_::poll_registry::RegisteredPoll) -> R, +) -> R { + // SAFETY: per fn contract; slab slots never move or unmap while the loop + // lives (docs/design.md §Strategy 1). + unsafe { f(&mut *p) } +} + +/// Current generation of the socket-slab slot holding `p` (odd = occupied). +/// OQ-4: dispatch drops events whose udata resolves to a vacant slot. +pub(crate) fn slab_generation(p: *mut PollState) -> u64 { + let header = NonNull::new(p.cast::()).expect("null slab poll"); + // SAFETY: slab-kind udata always points at a socket slab slot (fixed + // 16-byte meta prelude before the value); slab mappings stay readable + // while the loop lives — decommitted chunks read stale-even/zero + // generations, which never match an occupied (odd) handle. + unsafe { ChunkedSlab::::generation(header) } +} + +// ── Loop field access (copy-in/copy-out; POSIX layout only) ───────────────── +// SAFETY (all accessors): `loop_` is the live loop; each access forms only a +// transient place projection, never a reference that spans a callback. + +#[cfg(not(windows))] +pub(crate) fn loop_fd(loop_: *mut Loop) -> i32 { + unsafe { (*loop_).fd } +} + +#[cfg(not(windows))] +pub(crate) fn num_polls(loop_: *mut Loop) -> i32 { + unsafe { (*loop_).num_polls } +} + +#[cfg(not(windows))] +pub(crate) fn num_ready_polls(loop_: *mut Loop) -> i32 { + unsafe { (*loop_).num_ready_polls } +} + +#[cfg(not(windows))] +pub(crate) fn set_num_ready_polls(loop_: *mut Loop, v: i32) { + unsafe { (*loop_).num_ready_polls = v } +} + +#[cfg(not(windows))] +pub(crate) fn current_ready_poll(loop_: *mut Loop) -> i32 { + unsafe { (*loop_).current_ready_poll } +} + +#[cfg(not(windows))] +pub(crate) fn set_current_ready_poll(loop_: *mut Loop, v: i32) { + unsafe { (*loop_).current_ready_poll = v } +} + +#[cfg(not(windows))] +pub(crate) fn ready_poll_at(loop_: *mut Loop, i: i32) -> EventType { + unsafe { (*loop_).ready_polls[i as usize] } +} + +#[cfg(any(target_os = "linux", target_os = "android"))] +pub(crate) fn ready_poll_udata(loop_: *mut Loop, i: i32) -> u64 { + unsafe { (*loop_).ready_polls[i as usize].u64 } +} + +#[cfg(any(target_os = "linux", target_os = "android"))] +pub(crate) fn set_ready_poll_udata(loop_: *mut Loop, i: i32, udata: u64) { + unsafe { (*loop_).ready_polls[i as usize].u64 = udata } +} + +#[cfg(target_os = "macos")] +pub(crate) fn ready_poll_udata(loop_: *mut Loop, i: i32) -> u64 { + unsafe { (*loop_).ready_polls[i as usize].udata } +} + +#[cfg(target_os = "macos")] +pub(crate) fn set_ready_poll_udata(loop_: *mut Loop, i: i32, udata: u64) { + unsafe { (*loop_).ready_polls[i as usize].udata = udata } +} + +#[cfg(target_os = "freebsd")] +pub(crate) fn ready_poll_udata(loop_: *mut Loop, i: i32) -> u64 { + unsafe { (*loop_).ready_polls[i as usize].udata as u64 } +} + +#[cfg(target_os = "freebsd")] +pub(crate) fn set_ready_poll_udata(loop_: *mut Loop, i: i32, udata: u64) { + unsafe { (*loop_).ready_polls[i as usize].udata = udata as *mut core::ffi::c_void } +} + +// ── errno ──────────────────────────────────────────────────────────────────── + +#[cfg(target_os = "linux")] +pub(crate) fn last_errno() -> i32 { + // SAFETY: thread-local errno location. + unsafe { *libc::__errno_location() } +} + +#[cfg(target_os = "android")] +pub(crate) fn last_errno() -> i32 { + // SAFETY: thread-local errno location (bionic spelling). + unsafe { *libc::__errno() } +} + +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +pub(crate) fn last_errno() -> i32 { + // SAFETY: thread-local errno location. + unsafe { *libc::__error() } +} + +// macos-only: the sole caller is the ERROR_EVENTS kevent64 wrapper; the +// FreeBSD shim suppresses eventlist harvesting and never mirrors errno. +#[cfg(target_os = "macos")] +fn set_errno(v: i32) { + // SAFETY: thread-local errno location. + unsafe { *libc::__error() = v } +} + +#[cfg(not(windows))] +fn timespec_from_ns(ns: i64) -> libc::timespec { + libc::timespec { + tv_sec: (ns / 1_000_000_000) as _, + tv_nsec: (ns % 1_000_000_000) as _, + } +} + +// ── epoll syscall edges (R1.9, R2.7-R2.10) ─────────────────────────────────── + +#[cfg(any(target_os = "linux", target_os = "android"))] +mod epoll_sys { + use super::*; + use core::sync::atomic::{AtomicI32, Ordering}; + + /// −1 = unprobed, 0 = unavailable, else use the raw syscall (R1.9). + static HAS_EPOLL_PWAIT2: AtomicI32 = AtomicI32::new(-1); + + unsafe extern "C" { + /// Raw SYS_epoll_pwait2 (441) provided by `src/platform/linux.rs`; + /// returns -errno directly. + fn sys_epoll_pwait2( + epfd: i32, + events: *mut libc::epoll_event, + maxevents: i32, + timeout: *const libc::timespec, + sigmask: *const libc::sigset_t, + ) -> isize; + + fn Bun__isEpollPwait2SupportedOnLinuxKernel() -> i32; + } + + // libc 0.2.186 does not declare epoll_pwait for android; bionic has it + // since API 21. + #[cfg(target_os = "android")] + unsafe extern "C" { + fn epoll_pwait( + epfd: i32, + events: *mut libc::epoll_event, + maxevents: i32, + timeout: i32, + sigmask: *const libc::sigset_t, + ) -> i32; + } + #[cfg(target_os = "linux")] + use libc::epoll_pwait; + + pub(crate) fn epoll_create_cloexec() -> i32 { + // SAFETY: plain syscall, no pointers. + unsafe { libc::epoll_create1(libc::EPOLL_CLOEXEC) } + } + + /// Kernel-version probe, run once at loop creation (R1.3). + pub(crate) fn probe_epoll_pwait2() { + if HAS_EPOLL_PWAIT2.load(Ordering::Relaxed) == -1 { + // SAFETY: pure extern probe exported by the platform crate. + if unsafe { Bun__isEpollPwait2SupportedOnLinuxKernel() } == 0 { + HAS_EPOLL_PWAIT2.store(0, Ordering::Relaxed); + } + } + } + + /// EINTR-retried epoll_ctl. DEL ignores the event argument (legal since + /// Linux 2.6.9 — R2.10); a zeroed one is passed for it. + pub(crate) fn epoll_ctl(epfd: i32, op: i32, fd: i32, events: u32, data: u64) -> i32 { + let mut ev = libc::epoll_event { events, u64: data }; + loop { + // SAFETY: `ev` outlives the call; fd/epfd owned by the caller. + let rc = unsafe { libc::epoll_ctl(epfd, op, fd, &mut ev) }; + if rc == -1 && last_errno() == libc::EINTR { + continue; + } + return rc; + } + } + + /// `bun_epoll_pwait2` (R1.9): raw epoll_pwait2 retried on -EINTR; on + /// ENOSYS/EPERM/EOPNOTSUPP/EACCES/EFAULT latch off and fall back forever + /// to epoll_pwait with a truncating ms conversion (999999 ns → 0 ms). + fn bun_epoll_pwait2( + epfd: i32, + events: *mut libc::epoll_event, + maxevents: i32, + timeout: *const libc::timespec, + ) -> i32 { + // SAFETY: sigset init into a local. + let mut mask: libc::sigset_t = unsafe { core::mem::zeroed() }; + unsafe { libc::sigemptyset(&mut mask) }; + + if HAS_EPOLL_PWAIT2.load(Ordering::Relaxed) != 0 { + loop { + // SAFETY: events buffer valid for maxevents entries (caller); + // timeout/mask are live locals or null. + let ret = unsafe { sys_epoll_pwait2(epfd, events, maxevents, timeout, &mask) }; + if ret == -(libc::EINTR as isize) { + continue; + } + let neg = (-ret) as i32; + if !(ret < 0 + && matches!( + neg, + libc::ENOSYS | libc::EPERM | libc::EOPNOTSUPP | libc::EACCES | libc::EFAULT + )) + { + return ret as i32; + } + HAS_EPOLL_PWAIT2.store(0, Ordering::Relaxed); + break; + } + } + + let timeout_ms = if timeout.is_null() { + -1 + } else { + // SAFETY: non-null timeout points at the caller's live timespec. + unsafe { ((*timeout).tv_sec * 1000 + (*timeout).tv_nsec / 1_000_000) as i32 } + }; + loop { + // SAFETY: same buffers as above. + let ret = unsafe { epoll_pwait(epfd, events, maxevents, timeout_ms, &mask) }; + if ret == -1 && last_errno() == libc::EINTR { + continue; + } + return ret; + } + } + + /// Fill `loop.ready_polls` and store the raw return (possibly negative) + /// into `num_ready_polls`, matching the C call sites. `timeout_ns < 0` + /// blocks forever. + pub(crate) fn epoll_wait_ready(loop_: *mut Loop, timeout_ns: i64) -> i32 { + let ts; + let ts_ptr: *const libc::timespec = if timeout_ns < 0 { + core::ptr::null() + } else { + ts = timespec_from_ns(timeout_ns); + &ts + }; + // SAFETY: raw pointer into the live loop's ready_polls; no Rust + // reference is held across the kernel call. + let (epfd, buf) = unsafe { + ( + (*loop_).fd, + (&raw mut (*loop_).ready_polls).cast::(), + ) + }; + let n = bun_epoll_pwait2(epfd, buf, MAX_READY_POLLS as i32, ts_ptr); + set_num_ready_polls(loop_, n); + n + } + + /// Drain the wakeup eventfd (8-byte counter read, EINTR-retried). + pub(crate) fn read_eventfd8(fd: i32) -> u64 { + let mut buf: u64 = 0; + loop { + // SAFETY: 8-byte read into a local. + let r = unsafe { libc::read(fd, (&raw mut buf).cast(), 8) }; + if r == -1 && last_errno() == libc::EINTR { + continue; + } + return buf; + } + } +} + +#[cfg(any(target_os = "linux", target_os = "android"))] +pub(crate) use epoll_sys::{ + epoll_create_cloexec, epoll_ctl, epoll_wait_ready, probe_epoll_pwait2, read_eventfd8, +}; + +// ── kqueue syscall edges (R2.9, R2.13; FreeBSD kevent64 shim) ──────────────── + +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +mod kqueue_sys { + use super::*; + use crate::LIBUS_SOCKET_DESCRIPTOR; + + // Darwin sys/event.h values; FreeBSD takes the shimmed behavior instead. + #[cfg(target_os = "macos")] + const KEVENT_FLAG_IMMEDIATE: libc::c_uint = 0x001; + #[cfg(target_os = "macos")] + const KEVENT_FLAG_ERROR_EVENTS: libc::c_uint = 0x002; + + pub(crate) fn kqueue_create() -> i32 { + // SAFETY: plain syscall, no pointers. + unsafe { libc::kqueue() } + } + + pub(crate) fn zeroed_kev() -> EventType { + // SAFETY: all-zero bytes are a valid kevent (null udata included). + unsafe { core::mem::zeroed() } + } + + /// [`make_kev`] with a full-width ident and an fflags payload (registry + /// sources: EVFILT_PROC/NOTE_EXIT, EVFILT_MEMORYSTATUS levels). + pub(crate) fn make_kev_ex( + ident: u64, + filter: i16, + flags: u16, + fflags: u32, + udata: u64, + ) -> EventType { + let mut e = zeroed_kev(); + #[cfg(target_os = "macos")] + { + e.ident = ident; + e.filter = filter; + e.flags = flags; + e.fflags = fflags; + e.udata = udata; + } + #[cfg(target_os = "freebsd")] + { + e.ident = ident as usize; + e.filter = filter; + e.flags = flags; + e.fflags = fflags; + e.udata = udata as *mut core::ffi::c_void; + } + e + } + + pub(crate) fn make_kev( + fd: LIBUS_SOCKET_DESCRIPTOR, + filter: i16, + flags: u16, + udata: u64, + ) -> EventType { + let mut e = zeroed_kev(); + #[cfg(target_os = "macos")] + { + e.ident = fd as u64; + e.filter = filter; + e.flags = flags; + e.udata = udata; + } + #[cfg(target_os = "freebsd")] + { + e.ident = fd as usize; + e.filter = filter; + e.flags = flags; + e.udata = udata as *mut core::ffi::c_void; + } + e + } + + /// Submit a changelist with KEVENT_FLAG_ERROR_EVENTS semantics: per- + /// filter failures come back as EV_ERROR entries with the errno in + /// `.data`; mirror it into errno so callers keep epoll's contract (R2.9). + #[cfg(target_os = "macos")] + pub(crate) fn kevent_error_events(kqfd: i32, changes: &mut [EventType]) -> i32 { + let len = changes.len() as i32; + let ptr = changes.as_mut_ptr(); + loop { + // SAFETY: `changes` is a live slice used as both change- and + // event-list, exactly like the C call. + let ret = unsafe { + libc::kevent64( + kqfd, + ptr, + len, + ptr, + len, + KEVENT_FLAG_ERROR_EVENTS, + core::ptr::null(), + ) + }; + if ret == -1 && last_errno() == libc::EINTR { + continue; + } + if ret > 0 { + set_errno(changes[0].data as i32); + } + return ret; + } + } + + /// FreeBSD shim (epoll_kqueue.h:44-75): no ERROR_EVENTS equivalent — + /// suppress eventlist harvesting entirely (registration paths only need + /// syscall success), so no per-filter errno mirror exists here. + #[cfg(target_os = "freebsd")] + pub(crate) fn kevent_error_events(kqfd: i32, changes: &mut [EventType]) -> i32 { + let len = changes.len() as i32; + let ptr = changes.as_ptr(); + loop { + // SAFETY: live slice as changelist; eventlist suppressed. + let ret = unsafe { + libc::kevent(kqfd, ptr, len, core::ptr::null_mut(), 0, core::ptr::null()) + }; + if ret == -1 && last_errno() == libc::EINTR { + continue; + } + return ret; + } + } + + /// Fill `loop.ready_polls`, EINTR-retried; stores the raw return into + /// `num_ready_polls`. `immediate` = KEVENT_FLAG_IMMEDIATE (Darwin) / + /// zero-timespec (FreeBSD) — avoids the ~14 µs XNU thread_block for an + /// already-expired deadline (R1.10 step 8). + pub(crate) fn kevent_wait_ready(loop_: *mut Loop, timeout_ns: i64, immediate: bool) -> i32 { + let ts; + #[allow(unused_mut)] + let mut ts_ptr: *const libc::timespec = if timeout_ns < 0 { + core::ptr::null() + } else { + ts = timespec_from_ns(timeout_ns); + &ts + }; + + #[cfg(target_os = "freebsd")] + static ZERO_TS: libc::timespec = libc::timespec { + tv_sec: 0, + tv_nsec: 0, + }; + #[cfg(target_os = "freebsd")] + if immediate && ts_ptr.is_null() { + ts_ptr = &ZERO_TS; + } + + // SAFETY: raw pointer into the live loop's ready_polls; no Rust + // reference is held across the kernel call. + let (kqfd, buf) = unsafe { + ( + (*loop_).fd, + (&raw mut (*loop_).ready_polls).cast::(), + ) + }; + loop { + #[cfg(target_os = "macos")] + // SAFETY: buffer valid for MAX_READY_POLLS entries. + let n = unsafe { + libc::kevent64( + kqfd, + core::ptr::null(), + 0, + buf, + MAX_READY_POLLS as i32, + if immediate { KEVENT_FLAG_IMMEDIATE } else { 0 }, + ts_ptr, + ) + }; + #[cfg(target_os = "freebsd")] + // SAFETY: buffer valid for MAX_READY_POLLS entries. + let n = unsafe { + libc::kevent( + kqfd, + core::ptr::null(), + 0, + buf, + MAX_READY_POLLS as i32, + ts_ptr, + ) + }; + if n == -1 && last_errno() == libc::EINTR { + continue; + } + set_num_ready_polls(loop_, n); + return n; + } + } +} + +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +pub(crate) use kqueue_sys::{ + kevent_error_events, kevent_wait_ready, kqueue_create, make_kev, zeroed_kev, +}; +// Extended form (filter payloads): darwin Machport/Memorystatus arms plus the +// macos+freebsd Proc(NOTE_EXIT) arm. +#[cfg(any(target_os = "macos", target_os = "freebsd"))] +pub(crate) use kqueue_sys::make_kev_ex; + +// ── pending_wakeups + wakeup-async platform primitives ───────── +// (loop_/wakeup.rs is `deny(unsafe_code)`; everything below is its raw edge.) + +/// RELEASE increment of `loop.pending_wakeups` — pairs with the ACQUIRE swap +/// at the top of every bun tick (R10.1/R10.2). Callable from ANY thread. +#[cfg(not(windows))] +pub(crate) fn pending_wakeups_add_release(loop_: *mut Loop) { + // SAFETY: field projection into the live loop; AtomicU32 has u32 layout + // and the loop allocation outlives every wakeup caller (C lifetime rule). + let a = + unsafe { &*(&raw const (*loop_).pending_wakeups).cast::() }; + a.fetch_add(1, core::sync::atomic::Ordering::Release); +} + +/// Loop-thread `num_polls` adjustment through a raw place projection — +/// never forms `&mut Loop`, so the access span excludes `pending_wakeups`, +/// which other threads `fetch_add` concurrently (R10.6, C17). +#[cfg(not(windows))] +pub(crate) fn num_polls_add(loop_: *mut Loop, delta: i32) { + // SAFETY: `loop_` is live; `num_polls` is loop-thread-only; single raw + // place read-modify-write, no reference formed. + unsafe { *(&raw mut (*loop_).num_polls) += delta } +} + +/// Raise `num_polls` to at least `min` (daemon-loop keep-alive floor) — +/// same raw-place rule as [`num_polls_add`]. +#[cfg(not(windows))] +pub(crate) fn num_polls_raise(loop_: *mut Loop, min: i32) { + // SAFETY: see `num_polls_add`. + unsafe { + let p = &raw mut (*loop_).num_polls; + if *p < min { + *p = min; + } + } +} + +/// `ref_`/`unref` twins of [`num_polls_add`] (`num_polls` + `active`), raw +/// places only; `unref` saturates `active` at 0 like `PosixLoop::unref`. +#[cfg(not(windows))] +pub(crate) fn loop_ref_raw(loop_: *mut Loop) { + // SAFETY: see `num_polls_add`; `active` is loop-thread-only too. + unsafe { + *(&raw mut (*loop_).num_polls) += 1; + *(&raw mut (*loop_).active) += 1; + } +} + +#[cfg(not(windows))] +pub(crate) fn loop_unref_raw(loop_: *mut Loop) { + // SAFETY: see `loop_ref_raw`. + unsafe { + *(&raw mut (*loop_).num_polls) -= 1; + let a = &raw mut (*loop_).active; + *a = (*a).saturating_sub(1); + } +} + +/// `add_active`/`sub_active` twins of [`num_polls_add`] — raw places only; +/// both saturate like the old `&mut` accessors did. +#[cfg(not(windows))] +pub(crate) fn loop_active_add(loop_: *mut Loop, value: u32) { + // SAFETY: see `num_polls_add`; `active` is loop-thread-only. + unsafe { + let a = &raw mut (*loop_).active; + *a = (*a).saturating_add(value); + } +} + +#[cfg(not(windows))] +pub(crate) fn loop_active_sub(loop_: *mut Loop, value: u32) { + // SAFETY: see `loop_active_add`. + unsafe { + let a = &raw mut (*loop_).active; + *a = (*a).saturating_sub(value); + } +} + +/// Bulk `ref_`/`unref` twins ([`loop_ref_raw`] applied `count` times) for the +/// queued-concurrent-refs drain; same raw-place rule as [`num_polls_add`]. +#[cfg(not(windows))] +pub(crate) fn loop_ref_count_raw(loop_: *mut Loop, count: i32) { + // SAFETY: see `loop_ref_raw`. + unsafe { + *(&raw mut (*loop_).num_polls) += count; + let a = &raw mut (*loop_).active; + *a = (*a).saturating_add(u32::try_from(count).expect("int cast")); + } +} + +#[cfg(not(windows))] +pub(crate) fn loop_unref_count_raw(loop_: *mut Loop, count: i32) { + // SAFETY: see `loop_ref_raw`. + unsafe { + *(&raw mut (*loop_).num_polls) -= count; + let a = &raw mut (*loop_).active; + *a = (*a).saturating_sub(u32::try_from(count).expect("int cast")); + } +} + +/// ACQUIRE swap-to-0 before blocking (R1.10 step 5). +#[cfg(not(windows))] +pub(crate) fn pending_wakeups_swap_acquire(loop_: *mut Loop) -> u32 { + // SAFETY: see `pending_wakeups_add_release`. + let a = + unsafe { &*(&raw const (*loop_).pending_wakeups).cast::() }; + a.swap(0, core::sync::atomic::Ordering::Acquire) +} + +/// Erase a loop-taking callback to the `CallbackFn` shape — identical C ABI +/// (one pointer argument, no return); dispatch passes the loop pointer back +/// because `cb_expects_the_loop` is set. +#[cfg(not(windows))] +pub(crate) fn erase_loop_cb(cb: unsafe extern "C" fn(*mut crate::loop_::Loop)) -> CallbackFn { + // SAFETY: ABI-identical fn pointer types (pointer arg, unit return). + unsafe { core::mem::transmute::(cb) } +} + +/// Box-allocate the wakeup async's CALLBACK poll. Owner: +/// `loop.data.wakeup_async` until [`free_callback_poll`] at loop teardown. +#[cfg(not(windows))] +pub(crate) fn alloc_callback_poll(cp: CallbackPoll) -> *mut CallbackPoll { + bun_core::heap::into_raw(Box::new(cp)) +} + +/// Release a poll from [`alloc_callback_poll`] (exactly once, at async close). +#[cfg(not(windows))] +pub(crate) fn free_callback_poll(p: *mut CallbackPoll) { + // SAFETY: `p` came from `alloc_callback_poll`; the async is closed once + // and nothing references it afterwards. + unsafe { bun_core::heap::destroy(p) } +} + +// eventfd (R10.4 Linux/Android). +#[cfg(any(target_os = "linux", target_os = "android"))] +pub(crate) mod eventfd { + use super::last_errno; + + pub(crate) fn create() -> i32 { + // SAFETY: plain syscall. + unsafe { libc::eventfd(0, libc::EFD_NONBLOCK | libc::EFD_CLOEXEC) } + } + + /// write(8-byte 1); on EAGAIN (counter overflow) drain via read and + /// retry (epoll_kqueue.c:658-668). Callable from ANY thread. + pub(crate) fn send(fd: i32) { + let val: u64 = 1; + loop { + // SAFETY: 8-byte write from a stack u64 (eventfd contract). + if unsafe { libc::write(fd, (&raw const val).cast(), 8) } >= 0 { + return; + } + match last_errno() { + libc::EINTR => continue, + libc::EAGAIN => { + let mut drained: u64 = 0; + // SAFETY: 8-byte read into a stack u64. + let n = unsafe { libc::read(fd, (&raw mut drained).cast(), 8) }; + if n > 0 || matches!(last_errno(), libc::EAGAIN | libc::EINTR) { + continue; + } + return; + } + _ => return, + } + } + } +} + +// EVFILT_USER (R10.4 FreeBSD). +#[cfg(target_os = "freebsd")] +pub(crate) mod evuser { + use super::*; + + pub(crate) fn add(kqfd: i32, ident: u64, udata: u64) -> i32 { + let mut e = zeroed_kev(); + e.ident = ident as usize; + e.filter = libc::EVFILT_USER; + e.flags = libc::EV_ADD | libc::EV_ENABLE | libc::EV_CLEAR; + e.udata = udata as usize as *mut core::ffi::c_void; + let mut ch = [e]; + kevent_error_events(kqfd, &mut ch) + } + + /// NOTE_TRIGGER with NO eventlist — an eventlist could consume the + /// wakeup on the posting thread (epoll_kqueue.c:856-858). Any thread. + pub(crate) fn trigger(kqfd: i32, ident: u64, udata: u64) { + let mut e = zeroed_kev(); + e.ident = ident as usize; + e.filter = libc::EVFILT_USER; + e.fflags = libc::NOTE_TRIGGER; + e.udata = udata as usize as *mut core::ffi::c_void; + loop { + // SAFETY: one-change submit, eventlist suppressed, cannot block. + let ret = + unsafe { libc::kevent(kqfd, &e, 1, core::ptr::null_mut(), 0, core::ptr::null()) }; + if ret == -1 && last_errno() == libc::EINTR { + continue; + } + return; + } + } + + pub(crate) fn delete(kqfd: i32, ident: u64, udata: u64) { + let mut e = zeroed_kev(); + e.ident = ident as usize; + e.filter = libc::EVFILT_USER; + e.flags = libc::EV_DELETE; + e.udata = udata as usize as *mut core::ffi::c_void; + let mut ch = [e]; + let _ = kevent_error_events(kqfd, &mut ch); + } +} + +// EVFILT_MACHPORT (R10.4 macOS). Constants from xnu osfmk/mach/{message,port}.h; +// EVFILT_MACHPORT benchmarks faster than EVFILT_USER cross-thread +// (epoll_kqueue.c:735-742). +#[cfg(target_os = "macos")] +pub(crate) mod mach { + use super::*; + + pub(crate) const MACHPORT_BUF_LEN: usize = 1024; + + const MACH_PORT_RIGHT_RECEIVE: u32 = 1; + const MACH_MSG_TYPE_MAKE_SEND: u32 = 20; + const MACH_MSG_TYPE_COPY_SEND: u32 = 19; + const MACH_PORT_LIMITS_INFO: i32 = 1; + const MACH_PORT_LIMITS_INFO_COUNT: u32 = 1; + const MACH_SEND_MSG: i32 = 0x1; + const MACH_SEND_TIMEOUT: i32 = 0x10; + // MACH_RCV_OVERWRITE is 0 since xnu-3789 (0x1000 became + // MACH_RCV_GUARDED_DESC), so MACH_RCV_MSG alone matches the C build. + const MACH_RCV_MSG: u32 = 0x2; + const KERN_SUCCESS: i32 = 0; + + #[repr(C)] + struct MachMsgHeader { + bits: u32, + size: u32, + remote_port: u32, + local_port: u32, + voucher_port: u32, + id: i32, + } + + unsafe extern "C" { + static mach_task_self_: u32; + fn mach_port_allocate(task: u32, right: u32, name: *mut u32) -> i32; + fn mach_port_insert_right(task: u32, name: u32, poly: u32, poly_type: u32) -> i32; + fn mach_port_set_attributes( + task: u32, + name: u32, + flavor: i32, + info: *mut u32, + count: u32, + ) -> i32; + fn mach_port_deallocate(task: u32, name: u32) -> i32; + fn mach_msg( + msg: *mut MachMsgHeader, + option: i32, + send_size: u32, + rcv_size: u32, + rcv_name: u32, + timeout: u32, + notify: u32, + ) -> i32; + } + + /// Receive+send port with queue limit 1 (sends coalesce — port full == + /// wakeup already pending). Returns 0 on failure (the C returned NULL + /// and crashed at async_set; the Rust caller panics instead). + pub(crate) fn port_create_qlimit1() -> u32 { + let mut port: u32 = 0; + // SAFETY: mach kernel calls on the current task; `port`/`qlimit` are + // stack out-params (epoll_kqueue.c:675-710 port). + unsafe { + let task = mach_task_self_; + if mach_port_allocate(task, MACH_PORT_RIGHT_RECEIVE, &mut port) != KERN_SUCCESS { + return 0; + } + if mach_port_insert_right(task, port, port, MACH_MSG_TYPE_MAKE_SEND) != KERN_SUCCESS { + return 0; + } + let mut qlimit: u32 = 1; + if mach_port_set_attributes( + task, + port, + MACH_PORT_LIMITS_INFO, + &mut qlimit, + MACH_PORT_LIMITS_INFO_COUNT, + ) != KERN_SUCCESS + { + return 0; + } + } + port + } + + pub(crate) fn port_dealloc(port: u32) { + // SAFETY: balances `port_create_qlimit1`. + unsafe { + mach_port_deallocate(mach_task_self_, port); + } + } + + pub(crate) fn alloc_buf() -> *mut core::ffi::c_void { + bun_core::heap::into_raw(Box::new([0u8; MACHPORT_BUF_LEN])).cast() + } + + pub(crate) fn free_buf(buf: *mut core::ffi::c_void) { + // SAFETY: `buf` came from `alloc_buf`; freed exactly once at close. + unsafe { bun_core::heap::destroy(buf.cast::<[u8; MACHPORT_BUF_LEN]>()) } + } + + /// Non-blocking header-only send; TIMED_OUT/NO_BUFFER == queue full == + /// a wakeup is already pending (epoll_kqueue.c:766-803). Any thread. + pub(crate) fn send(port: u32) { + let mut msg = MachMsgHeader { + bits: MACH_MSG_TYPE_COPY_SEND, // MACH_MSGH_BITS(COPY_SEND, 0) + size: core::mem::size_of::() as u32, + remote_port: port, + local_port: 0, + voucher_port: 0, + id: 0, + }; + // SAFETY: header-only message from the stack; every rc case breaks + // in the C, so the result is deliberately ignored. + unsafe { + let _ = mach_msg( + &mut msg, + MACH_SEND_MSG | MACH_SEND_TIMEOUT, + msg.size, + 0, + 0, + 0, + 0, + ); + } + } + + /// EV_ADD|EV_ENABLE EVFILT_MACHPORT with MACH_RCV_MSG into the + /// async's buffer — the kernel performs the receive itself, so dispatch + /// never syscalls. Returns the kevent64 rc. + pub(crate) fn kev_add(kqfd: i32, port: u32, buf: *mut core::ffi::c_void, udata: u64) -> i32 { + let mut e = zeroed_kev(); + e.ident = port as u64; + e.filter = libc::EVFILT_MACHPORT; + e.flags = libc::EV_ADD | libc::EV_ENABLE; + e.fflags = MACH_RCV_MSG; + e.ext = [buf as usize as u64, MACHPORT_BUF_LEN as u64]; + e.udata = udata; + let mut ch = [e]; + kevent_error_events(kqfd, &mut ch) + } + + /// Deliberate deviation: the C passes the poll POINTER as ident + /// (epoll_kqueue.c:717-724), so its EV_DELETE silently fails and the + /// knote is only reaped when the kqueue fd closes; we delete for real. + pub(crate) fn kev_delete(kqfd: i32, port: u32, udata: u64) { + let mut e = zeroed_kev(); + e.ident = port as u64; + e.filter = libc::EVFILT_MACHPORT; + e.flags = libc::EV_DELETE; + e.udata = udata; + let mut ch = [e]; + let _ = kevent_error_events(kqfd, &mut ch); + } +} diff --git a/src/usockets/unsafe_core/slab.rs b/src/usockets/unsafe_core/slab.rs new file mode 100644 index 000000000000..cc8dfc65ca08 --- /dev/null +++ b/src/usockets/unsafe_core/slab.rs @@ -0,0 +1,999 @@ +//! Chunked slab with generation counters — the keystone of the ownership +//! model (docs/design.md §Strategy 1): slot addresses are stable for the slab's +//! lifetime (chunk mappings never move or unmap until Drop), freed slots are +//! reused with a generation bump so stale `SocketRef`s resolve to a failed +//! lookup, never a dangling deref. Size classes give group-vtable kinds +//! header-contiguous inline ext bytes (docs/design.md §Ext storage); empty +//! chunks are decommitted with an epoch ABA guard (docs/design.md §Slab reclamation). + +use core::marker::PhantomData; +use core::mem::{align_of, size_of}; +use core::ptr::{self, NonNull}; + +/// Slot prelude size AND slot/value/ext alignment (== LIBUS_EXT_ALIGNMENT). +/// Fixed across size classes so `generation` probes ptr−16 with no class info. +pub(crate) const SLOT_META_BYTES: usize = crate::LIBUS_EXT_ALIGNMENT; + +/// Minimum chunk mapping size; also the mapping granularity (a 64 KiB +/// multiple is page-aligned on 4 KiB and 16 KiB page systems and matches +/// Windows allocation granularity). +const CHUNK_BYTES_MIN: usize = 64 * 1024; + +/// Slots per chunk (docs/design.md §Slab reclamation). Fits `next_free`/`free_head` in u16. +const SLOTS_PER_CHUNK: usize = 256; + +/// Generation split (u64; docs/design.md §Slab reclamation): low 32 bits alloc/free counter (bit 0 +/// = parity, odd = occupied), high 32 bits per-chunk decommit epoch. The +/// epoch lives authoritatively in the loop-side `ChunkEntry` (never in +/// decommittable memory) and is packed into every generation stamped after +/// a (re)commit, so a handle from decommit cycle N can never validate in +/// cycle N+1; both halves' wrap is unreachable (~2^32 cycles each). +const EPOCH_SHIFT: u32 = 32; +const COUNTER_MASK: u64 = (1 << EPOCH_SHIFT) - 1; + +/// Counter increment confined to the low 32 bits: a hot slot's counter wrap +/// stays within its epoch and can never carry into the epoch bits. +const fn bump_counter(g: u64) -> u64 { + (g & !COUNTER_MASK) | (g.wrapping_add(1) & COUNTER_MASK) +} + +/// Free-list terminator for u16 chunk-local slot indices. +const NONE_SLOT: u16 = u16::MAX; + +/// Fixed 16-byte slot prelude, immediately BEFORE the value in every size +/// class (layout contract: the value keeps `PollState` first; the generation probe reads +/// this prelude adjacent to the value at a class-independent offset). +#[repr(C)] +struct SlotMeta { + generation: u64, + /// Index into `ChunkedSlab::chunks`; valid while the slot is occupied + /// (stamped on every alloc — `free` routes through it). + chunk_id: u32, + /// Intrusive free list (chunk-local slot index); valid while vacant and + /// the chunk is committed. + next_free: u16, + /// Inline ext capacity of this slot's class (bytes past the value + /// stride); stamped on alloc, read by `inline_ext_of`. + ext_capacity: u16, +} + +const _: () = assert!(size_of::() == SLOT_META_BYTES); +const _: () = assert!(align_of::() <= SLOT_META_BYTES); + +/// Loop-side chunk bookkeeping. Lives in the slab (ordinary heap), NOT in +/// the decommittable mapping — `epoch`/`committed`/`occupied` must survive +/// decommit. +struct ChunkEntry { + base: NonNull, + chunk_bytes: usize, + slot_size: u32, + slots: u32, + ext_capacity: u16, + class: u32, + /// Decommit epoch; bumped on every decommit, packed into generation + /// high bits at the next commit's free-list threading. + epoch: u32, + occupied: u32, + /// Head of the chunk-local vacant list; NONE_SLOT when decommitted or full. + free_head: u16, + committed: bool, + /// Membership flag for the class's `nonfull` stack (avoids duplicates). + in_nonfull: bool, +} + +/// One slot size class: slot = 16-byte meta + value stride + inline ext +/// capacity. Group-vtable kinds pick the class by the family-max ext size +/// passed at listen/context creation; Rust kinds and connecting sockets use +/// capacity 0. +struct SizeClass { + ext_capacity: u16, + slot_size: u32, + slots_per_chunk: u32, + chunk_bytes: usize, + /// Committed chunks that may have vacant slots (lazily pruned). + nonfull: Vec, + /// Decommitted (all-vacant) chunks, recommitted lazily on demand. + empty_decommitted: Vec, +} + +/// Chunked slab. Owner: the `Loop`. Every allocation is released back into +/// the slab by the tick postlude (deferred close) or by `Drop for +/// ChunkedSlab` at loop teardown; chunk mappings are released only by Drop. +pub struct ChunkedSlab { + classes: Vec, + chunks: Vec, + live: usize, + /// Decommit hysteresis: the most-recently-emptied chunk stays committed; + /// emptying another chunk decommits this one (if still empty). + last_emptied: Option, + _marker: PhantomData, +} + +/// Value stride inside a slot: `T` rounded up so the inline ext area (and +/// the next slot) stays LIBUS_EXT_ALIGNMENT-aligned. +const fn value_stride() -> usize { + size_of::().next_multiple_of(SLOT_META_BYTES) +} + +/// Slot prelude of the slot holding `value` — a raw place, no reference +/// formed; class-independent (meta is always exactly 16 bytes before the +/// value — layout contract). +fn meta_of(value: NonNull) -> *mut SlotMeta { + value + .as_ptr() + .cast::() + .wrapping_sub(SLOT_META_BYTES) + .cast() +} + +impl ChunkedSlab { + pub const fn new() -> Self { + ChunkedSlab { + classes: Vec::new(), + chunks: Vec::new(), + live: 0, + last_emptied: None, + _marker: PhantomData, + } + } + + pub fn live_count(&self) -> usize { + self.live + } + + /// Allocate a slot with no inline ext bytes (Rust kinds' 8-byte header + /// word IS the ext storage; connecting sockets likewise). + pub fn alloc(&mut self, value: T) -> (NonNull, u64) { + self.alloc_with_ext(value, 0) + } + + /// Allocate from the size class carrying at least `ext_capacity` inline + /// ext bytes contiguous after the value (zeroed). Returns the stable + /// value address and the slot's (odd) generation. The address stays + /// readable — though possibly vacant or decommitted-to-zero — until the + /// slab is dropped. + pub fn alloc_with_ext(&mut self, value: T, ext_capacity: usize) -> (NonNull, u64) { + const { + assert!( + align_of::() <= SLOT_META_BYTES, + "slab value over-aligned" + ); + } + let ci = self.class_index(ext_capacity.next_multiple_of(SLOT_META_BYTES)); + loop { + while let Some(&cid) = self.classes[ci].nonfull.last() { + let e = &mut self.chunks[cid as usize]; + if e.free_head == NONE_SLOT { + // Full or decommitted: prune lazily. + e.in_nonfull = false; + self.classes[ci].nonfull.pop(); + continue; + } + return self.pop_slot(cid, value); + } + if let Some(cid) = self.classes[ci].empty_decommitted.pop() { + self.recommit(cid); + self.chunks[cid as usize].in_nonfull = true; + self.classes[ci].nonfull.push(cid); + continue; + } + self.grow(ci); + } + } + + /// Take the head vacant slot of committed chunk `cid` (free_head != NONE_SLOT). + fn pop_slot(&mut self, cid: u32, value: T) -> (NonNull, u64) { + let e = &mut self.chunks[cid as usize]; + debug_assert!(e.committed); + let idx = e.free_head; + // SAFETY: `idx < e.slots` (only in-chunk indices are ever threaded), + // so every access below stays inside the committed chunk mapping. + unsafe { + let slot = e.base.as_ptr().add(idx as usize * e.slot_size as usize); + let meta = slot.cast::(); + e.free_head = (*meta).next_free; + debug_assert!((*meta).generation & 1 == 0, "allocating a live slot"); + let generation = bump_counter((*meta).generation); + (*meta).generation = generation; + (*meta).chunk_id = cid; + (*meta).ext_capacity = e.ext_capacity; + let vptr = slot.add(SLOT_META_BYTES).cast::(); + vptr.write(value); + if e.ext_capacity != 0 { + // Ext area contract: zeroed at creation (C parity for the + // former alloc_ext_area). + ptr::write_bytes( + slot.add(SLOT_META_BYTES + value_stride::()), + 0, + e.ext_capacity as usize, + ); + } + e.occupied += 1; + self.live += 1; + (NonNull::new_unchecked(vptr), generation) + } + } + + /// Current generation of the slot holding `ptr` (occupied, vacant, or + /// decommitted — decommitted pages read as stale-even/zero, which can + /// never equal an occupied handle's odd generation). + /// + /// # Safety + /// `ptr` must have been returned by `alloc`/`alloc_with_ext` on a slab + /// that has not been dropped (mappings stay readable while the slab + /// lives: POSIX decommit is MADV_DONTNEED, Windows is MEM_RESET). + pub unsafe fn generation(ptr: NonNull) -> u64 { + // SAFETY: meta precedes the value by SLOT_META_BYTES in every size + // class; caller guarantees the mapping is alive. + unsafe { (*meta_of(ptr)).generation } + } + + /// Drop the value, bump the generation (invalidating every outstanding + /// handle), and push the slot onto its chunk's free list. A chunk + /// reaching 0 occupied slots decommits the PREVIOUSLY emptied chunk + /// (hysteresis — see `note_emptied`). + /// + /// # Safety + /// `ptr` must have been returned by `alloc`/`alloc_with_ext` on this + /// slab and the slot must currently be occupied (not already freed). + pub unsafe fn free(&mut self, ptr: NonNull) { + let meta = meta_of(ptr); + // SAFETY: caller guarantees `ptr` is an occupied slot of this live + // slab — occupied slots always sit in committed chunks. + let (cid, emptied, class) = unsafe { + let generation = (*meta).generation; + debug_assert!(generation & 1 == 1, "double free of slab slot"); + // The slot is occupied, so the value is initialized; the caller + // relinquishes all access, making this the unique access. + ptr.as_ptr().drop_in_place(); + (*meta).generation = bump_counter(generation); + let cid = (*meta).chunk_id; + let e = &mut self.chunks[cid as usize]; + // Chunks are LSAN root regions: zero the vacant payload so stale + // pointer-shaped bytes can't keep dead allocations "reachable". + #[cfg(bun_asan)] + ptr.as_ptr() + .cast::() + .write_bytes(0, e.slot_size as usize - SLOT_META_BYTES); + let slot = ptr.as_ptr().cast::().sub(SLOT_META_BYTES); + let idx = (slot.offset_from(e.base.as_ptr()) as usize / e.slot_size as usize) as u16; + debug_assert!((idx as u32) < e.slots); + (*meta).next_free = e.free_head; + e.free_head = idx; + e.occupied -= 1; + (cid, e.occupied == 0, e.class) + }; + self.live -= 1; + if !self.chunks[cid as usize].in_nonfull { + self.chunks[cid as usize].in_nonfull = true; + self.classes[class as usize].nonfull.push(cid); + } + if emptied { + self.note_emptied(cid); + } + } + + /// Hysteresis: keep the most-recently-emptied chunk committed; decommit + /// the previous one if it is still committed and still empty (avoids + /// commit thrash on connect/close oscillation at a chunk boundary). + fn note_emptied(&mut self, cid: u32) { + if let Some(prev) = self.last_emptied { + if prev != cid { + let p = &self.chunks[prev as usize]; + if p.committed && p.occupied == 0 { + self.decommit(prev); + } + } + } + self.last_emptied = Some(cid); + } + + /// Return an all-vacant chunk's pages to the OS. The range stays + /// reserved and READABLE (stale probes hit stale-even/zero generations); + /// the loop-side epoch bump guarantees post-recommit generations can + /// never collide with pre-decommit handles. + fn decommit(&mut self, cid: u32) { + let e = &mut self.chunks[cid as usize]; + debug_assert!(e.committed && e.occupied == 0); + e.epoch = e.epoch.wrapping_add(1); + e.committed = false; + e.free_head = NONE_SLOT; + os::decommit(e.base, e.chunk_bytes); + let class = e.class; + self.classes[class as usize].empty_decommitted.push(cid); + } + + /// Lazy recommit: re-thread the free list, stamping every slot's + /// generation with the post-decommit epoch in the high bits. + fn recommit(&mut self, cid: u32) { + let e = &mut self.chunks[cid as usize]; + debug_assert!(!e.committed && e.occupied == 0); + os::recommit(e.base, e.chunk_bytes); + e.committed = true; + Self::thread_free_list(e); + } + + /// Thread all slots of a freshly (re)committed chunk onto its free list + /// in slot order, stamping generations to `epoch << EPOCH_SHIFT` (even = + /// vacant; counter restarts each epoch). + fn thread_free_list(e: &mut ChunkEntry) { + let base_generation = u64::from(e.epoch) << EPOCH_SHIFT; + let mut head = NONE_SLOT; + for i in (0..e.slots).rev() { + // SAFETY: `i < e.slots`, inside the committed chunk mapping; + // no external pointer may observe a vacant epoch-fresh slot yet. + unsafe { + let meta = e + .base + .as_ptr() + .add(i as usize * e.slot_size as usize) + .cast::(); + (*meta).generation = base_generation; + (*meta).next_free = head; + } + head = i as u16; + } + e.free_head = head; + } + + /// Map one more chunk for class `ci` and put it in rotation. + fn grow(&mut self, ci: usize) { + let class = &self.classes[ci]; + let cid = u32::try_from(self.chunks.len()).expect("chunk table overflow"); + let base = os::map(class.chunk_bytes); + // LSAN scans only malloc-tracked heap + globals/stacks; malloc'd objects + // owned by slot fields (e.g. Transport::Tls Box) are otherwise reported + // as leaks when live at exit. Chunks stay readable until unmap. + bun_core::asan::register_root_region(base.as_ptr().cast(), class.chunk_bytes); + let mut e = ChunkEntry { + base, + chunk_bytes: class.chunk_bytes, + slot_size: class.slot_size, + slots: class.slots_per_chunk, + ext_capacity: class.ext_capacity, + class: ci as u32, + epoch: 0, + occupied: 0, + free_head: NONE_SLOT, + committed: true, + in_nonfull: true, + }; + Self::thread_free_list(&mut e); + self.chunks.push(e); + self.classes[ci].nonfull.push(cid); + } + + /// Visit every occupied slot (odd generation parity). `f` must not call + /// back into this slab — the exclusive borrow spans the whole walk. + pub fn for_each_occupied(&mut self, mut f: impl FnMut(NonNull)) { + for e in &self.chunks { + if e.occupied == 0 { + continue; + } + for i in 0..e.slots { + // SAFETY: in-bounds slot of a committed chunk (occupied slots + // only ever live in committed chunks); odd parity == occupied + // == initialized value. + unsafe { + let slot = e.base.as_ptr().add(i as usize * e.slot_size as usize); + if (*slot.cast::()).generation & 1 == 1 { + f(NonNull::new_unchecked( + slot.add(SLOT_META_BYTES).cast::(), + )); + } + } + } + } + } + + /// Find or create the class for `cap` (already rounded to 16) — one per + /// distinct family-max ext size, ~5 per loop in practice. + fn class_index(&mut self, cap: usize) -> usize { + if let Some(i) = self + .classes + .iter() + .position(|c| c.ext_capacity as usize == cap) + { + return i; + } + // In-tree creation sites pass sizeof() constants; a cap past u16 would + // silently truncate the stamped capacity, so fail loudly instead. + assert!( + cap <= u16::MAX as usize, + "inline ext capacity exceeds size-class limit" + ); + let slot_size = SLOT_META_BYTES + value_stride::() + cap; + let chunk_bytes = (slot_size * SLOTS_PER_CHUNK).next_multiple_of(CHUNK_BYTES_MIN); + self.classes.push(SizeClass { + ext_capacity: cap as u16, + slot_size: slot_size as u32, + slots_per_chunk: SLOTS_PER_CHUNK as u32, + chunk_bytes, + nonfull: Vec::new(), + empty_decommitted: Vec::new(), + }); + self.classes.len() - 1 + } +} + +impl Drop for ChunkedSlab { + fn drop(&mut self) { + for e in &self.chunks { + if e.occupied != 0 { + for i in 0..e.slots { + // SAFETY: in-bounds slot of a committed chunk (occupied + // slots only ever live in committed chunks). + unsafe { + let slot = e.base.as_ptr().add(i as usize * e.slot_size as usize); + if (*slot.cast::()).generation & 1 == 1 { + // Odd parity == occupied == initialized value. + slot.add(SLOT_META_BYTES).cast::().drop_in_place(); + } + } + } + } + bun_core::asan::unregister_root_region(e.base.as_ptr().cast(), e.chunk_bytes); + os::unmap(e.base, e.chunk_bytes); + } + } +} + +/// Current generation of a slab-allocated pointer (occupied, vacant, or +/// decommitted). Safe wrapper: every `SocketRef`/`ConnectingRef` pointer +/// originates from a live per-loop slab whose chunk mappings stay readable +/// while the loop lives (docs/design.md §Strategy 1-2) — the crate handle invariant. +pub(crate) fn generation_of(ptr: NonNull) -> u64 { + // SAFETY: slab chunk mappings outlive every handle (see doc above). + unsafe { ChunkedSlab::generation(ptr) } +} + +/// Inline ext area of the slot holding `value`: a fixed header+1 projection +/// (value stride is 16-rounded, so the area is LIBUS_EXT_ALIGNMENT-aligned). +/// `None` when the slot's class carries no ext bytes. +pub(crate) fn inline_ext_of(value: NonNull) -> Option> { + // SAFETY: `value` is a live occupied slab slot (crate handle invariant); + // its meta stamped `ext_capacity` on alloc. + let cap = unsafe { (*meta_of(value)).ext_capacity }; + (cap != 0).then(|| { + // SAFETY: the slot's class sized the slot for `cap` bytes past the + // value stride. + unsafe { NonNull::new_unchecked(value.as_ptr().cast::().add(value_stride::())) } + }) +} + +/// Inline ext capacity (bytes) of the slot holding `value` (0 = no area). +pub(crate) fn inline_ext_capacity_of(value: NonNull) -> u32 { + // SAFETY: see `inline_ext_of`. + u32::from(unsafe { (*meta_of(value)).ext_capacity }) +} + +/// Chunk memory: mmap/VirtualAlloc reservations, decommitted when empty. +/// Invariant relied on crate-wide: a mapped chunk stays READABLE until +/// `unmap`, including after `decommit` — stale handle probes and stale +/// kernel-event udata may still read generations from it. +mod os { + use core::ptr::NonNull; + + #[cfg(all(unix, not(miri)))] + pub(super) fn map(bytes: usize) -> NonNull { + // SAFETY: plain anonymous private mapping; no fd, offset 0. + let p = unsafe { + libc::mmap( + core::ptr::null_mut(), + bytes, + libc::PROT_READ | libc::PROT_WRITE, + libc::MAP_PRIVATE | libc::MAP_ANON, + -1, + 0, + ) + }; + let p = if p == libc::MAP_FAILED { + core::ptr::null_mut() + } else { + p + }; + bun_core::handle_oom(NonNull::new(p.cast::()).ok_or(())) + } + + #[cfg(all(unix, not(miri)))] + pub(super) fn unmap(base: NonNull, bytes: usize) { + // SAFETY: `base`/`bytes` are exactly one live `map` result. + unsafe { libc::munmap(base.as_ptr().cast(), bytes) }; + } + + #[cfg(all(unix, not(miri)))] + pub(super) fn decommit(base: NonNull, bytes: usize) { + // MADV_DONTNEED (NEVER MADV_FREE — its zero-fill is not guaranteed + // before reclaim): range stays mapped; later reads fault in zero pages + // (never odd). Advisory — on failure the chunk simply stays resident. + // SAFETY: `base`/`bytes` are exactly one live `map` result. + unsafe { libc::madvise(base.as_ptr().cast(), bytes, libc::MADV_DONTNEED) }; + } + + #[cfg(all(unix, not(miri)))] + pub(super) fn recommit(_base: NonNull, _bytes: usize) { + // POSIX: first touch after MADV_DONTNEED recommits implicitly. + } + + #[cfg(all(windows, not(miri)))] + mod win { + // Windows deliberately uses MEM_RESET, not MEM_DECOMMIT: stale handle + // probes must stay a plain slot deref and MEM_DECOMMIT pages AV; + // MEM_RESET stays committed+readable while the OS discards the pages. + pub(super) const MEM_COMMIT: u32 = 0x1000; + pub(super) const MEM_RESERVE: u32 = 0x2000; + pub(super) const MEM_RESET: u32 = 0x8_0000; + pub(super) const MEM_RELEASE: u32 = 0x8000; + pub(super) const PAGE_READWRITE: u32 = 0x04; + unsafe extern "system" { + pub(super) fn VirtualAlloc( + addr: *mut core::ffi::c_void, + size: usize, + alloc_type: u32, + protect: u32, + ) -> *mut core::ffi::c_void; + pub(super) fn VirtualFree( + addr: *mut core::ffi::c_void, + size: usize, + free_type: u32, + ) -> i32; + } + } + + #[cfg(all(windows, not(miri)))] + pub(super) fn map(bytes: usize) -> NonNull { + // SAFETY: fresh reserve+commit; kernel32 is always linked. + let p = unsafe { + win::VirtualAlloc( + core::ptr::null_mut(), + bytes, + win::MEM_RESERVE | win::MEM_COMMIT, + win::PAGE_READWRITE, + ) + }; + bun_core::handle_oom(NonNull::new(p.cast::()).ok_or(())) + } + + #[cfg(all(windows, not(miri)))] + pub(super) fn unmap(base: NonNull, _bytes: usize) { + // SAFETY: `base` is exactly one live `map` result (MEM_RELEASE + // requires size 0 and the original base). + unsafe { win::VirtualFree(base.as_ptr().cast(), 0, win::MEM_RELEASE) }; + } + + #[cfg(all(windows, not(miri)))] + pub(super) fn decommit(base: NonNull, bytes: usize) { + // MEM_RESET: discardable but still committed+readable (see `win`). + // SAFETY: `base`/`bytes` are exactly one live `map` result. + unsafe { + win::VirtualAlloc( + base.as_ptr().cast(), + bytes, + win::MEM_RESET, + win::PAGE_READWRITE, + ) + }; + } + + #[cfg(all(windows, not(miri)))] + pub(super) fn recommit(_base: NonNull, _bytes: usize) { + // MEM_RESET pages revert to normal on the next write; the caller + // re-stamps every slot meta before use. + } + + // Miri has no mmap: plain 16-aligned heap chunks; decommit zeroes in + // place, which models the POSIX zero-page read semantics exactly. + #[cfg(miri)] + pub(super) fn map(bytes: usize) -> NonNull { + let layout = layout(bytes); + // SAFETY: `bytes >= CHUNK_BYTES_MIN > 0`. + bun_core::handle_oom(NonNull::new(unsafe { std::alloc::alloc_zeroed(layout) }).ok_or(())) + } + #[cfg(miri)] + pub(super) fn unmap(base: NonNull, bytes: usize) { + // SAFETY: `base`/`bytes` are exactly one live `map` result. + unsafe { std::alloc::dealloc(base.as_ptr(), layout(bytes)) }; + } + #[cfg(miri)] + pub(super) fn decommit(base: NonNull, bytes: usize) { + // SAFETY: whole-chunk write; every slot in a decommitting chunk is + // vacant, so no external borrow overlaps. + unsafe { core::ptr::write_bytes(base.as_ptr(), 0, bytes) }; + } + #[cfg(miri)] + pub(super) fn recommit(_base: NonNull, _bytes: usize) {} + #[cfg(miri)] + fn layout(bytes: usize) -> std::alloc::Layout { + std::alloc::Layout::from_size_align(bytes, super::SLOT_META_BYTES).expect("chunk layout") + } +} + +#[cfg(test)] +impl ChunkedSlab { + fn chunk_count(&self) -> usize { + self.chunks.len() + } + fn chunk_committed(&self, cid: u32) -> bool { + self.chunks[cid as usize].committed + } + fn chunk_occupied(&self, cid: u32) -> u32 { + self.chunks[cid as usize].occupied + } + fn chunk_base(&self, cid: u32) -> *mut u8 { + self.chunks[cid as usize].base.as_ptr() + } + fn slots_per_chunk(&mut self, ext_capacity: usize) -> usize { + let ci = self.class_index(ext_capacity.next_multiple_of(SLOT_META_BYTES)); + self.classes[ci].slots_per_chunk as usize + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::rc::Rc; + + #[test] + fn alloc_returns_value_and_odd_generation() { + let mut slab = ChunkedSlab::::new(); + let (p, g) = slab.alloc(42); + assert_eq!(g & 1, 1); + // SAFETY: freshly allocated, occupied slot. + assert_eq!(unsafe { *p.as_ref() }, 42); + assert_eq!(unsafe { ChunkedSlab::generation(p) }, g); + assert_eq!(slab.live_count(), 1); + } + + #[test] + fn free_bumps_generation_and_reuses_address() { + let mut slab = ChunkedSlab::::new(); + let (p1, g1) = slab.alloc(1); + // SAFETY: p1 is live. + unsafe { slab.free(p1) }; + assert_eq!(unsafe { ChunkedSlab::generation(p1) }, g1.wrapping_add(1)); + // LIFO free list → same address, new generation. + let (p2, g2) = slab.alloc(2); + assert_eq!(p1, p2); + assert_eq!(g2, g1.wrapping_add(2)); + assert_ne!(g1, g2, "stale handle must mismatch after reuse"); + assert_eq!(unsafe { *p2.as_ref() }, 2); + } + + #[test] + fn addresses_stable_across_growth() { + let mut slab = ChunkedSlab::::new(); + let n = slab.slots_per_chunk(0) * 3 + 5; + let handles: Vec<_> = (0..n).map(|i| (i, slab.alloc(i))).collect(); + for (i, (p, g)) in &handles { + // SAFETY: all slots still live; growth must not have moved them. + assert_eq!(unsafe { *p.as_ref() }, *i); + assert_eq!(unsafe { ChunkedSlab::generation(*p) }, *g); + } + assert_eq!(slab.live_count(), n); + assert_eq!(slab.chunk_count(), 4); + } + + #[test] + fn drop_runs_destructors_of_live_values_only() { + let counter = Rc::new(()); + let mut slab = ChunkedSlab::>::new(); + let (p1, _) = slab.alloc(Rc::clone(&counter)); + let (_p2, _) = slab.alloc(Rc::clone(&counter)); + // SAFETY: p1 is live. + unsafe { slab.free(p1) }; + assert_eq!(Rc::strong_count(&counter), 2); // freed slot dropped its Rc + drop(slab); + assert_eq!(Rc::strong_count(&counter), 1); // live slot dropped at Drop + } + + #[test] + #[cfg(debug_assertions)] + #[should_panic(expected = "double free of slab slot")] + fn double_free_is_caught_in_debug() { + let mut slab = ChunkedSlab::::new(); + let (p, _) = slab.alloc(7); + // SAFETY: p is live. + unsafe { slab.free(p) }; + // SAFETY-VIOLATION under test: second free must trip the parity assert. + unsafe { slab.free(p) }; + } + + #[test] + fn generation_parity_tracks_liveness() { + let mut slab = ChunkedSlab::::new(); + let (p, g0) = slab.alloc(0); + for cycle in 0..5u64 { + assert_eq!( + unsafe { ChunkedSlab::generation(p) } & 1, + 1, + "occupied must be odd" + ); + // SAFETY: p is live at the top of each cycle. + unsafe { slab.free(p) }; + assert_eq!( + unsafe { ChunkedSlab::generation(p) } & 1, + 0, + "vacant must be even" + ); + // Generation advances by exactly 2 per free+alloc cycle, so every + // prior handle mismatches forever (until counter wrap). + let (p2, g2) = slab.alloc(0); + assert_eq!(p2, p, "LIFO free list must reuse the slot"); + assert_eq!(g2, g0.wrapping_add(2 * (cycle + 1))); + } + } + + #[test] + fn freed_slots_are_reused_before_growing() { + let mut slab = ChunkedSlab::::new(); + let n = slab.slots_per_chunk(0); + let handles: Vec<_> = (0..n).map(|i| slab.alloc(i).0).collect(); + assert_eq!(slab.chunk_count(), 1); + for &p in &handles { + // SAFETY: each handle is live and freed exactly once. + unsafe { slab.free(p) }; + } + for i in 0..n { + let (p, _) = slab.alloc(i); + assert!(handles.contains(&p), "must reuse freed slots, not grow"); + } + assert_eq!(slab.chunk_count(), 1, "no growth while free slots exist"); + } + + #[test] + fn drop_of_fully_vacant_slab_runs_no_destructors() { + let counter = Rc::new(()); + let mut slab = ChunkedSlab::>::new(); + let (p, _) = slab.alloc(Rc::clone(&counter)); + // SAFETY: p is live. + unsafe { slab.free(p) }; + assert_eq!(Rc::strong_count(&counter), 1); + drop(slab); // must not touch the vacant slot's dropped value + assert_eq!(Rc::strong_count(&counter), 1); + drop(ChunkedSlab::>::new()); // empty slab: no chunks, no-op + } + + #[test] + fn stale_generation_mismatches_across_many_reuses() { + let mut slab = ChunkedSlab::::new(); + let (p, stale_gen) = slab.alloc(1); + // SAFETY: p is live. + unsafe { slab.free(p) }; + for _ in 0..8 { + let (p2, g2) = slab.alloc(2); + assert_eq!(p2, p); + assert_ne!(g2, stale_gen, "stale handle must never validate again"); + assert_ne!(unsafe { ChunkedSlab::generation(p) }, stale_gen); + // SAFETY: p2 is live. + unsafe { slab.free(p2) }; + assert_ne!(unsafe { ChunkedSlab::generation(p) }, stale_gen); + } + } + + #[test] + fn interleaved_alloc_free_keeps_live_count_coherent() { + let mut slab = ChunkedSlab::>::new(); + let per = slab.slots_per_chunk(0); + let mut live = Vec::new(); + for round in 0..4usize { + for i in 0..per { + live.push(slab.alloc(vec![round as u8; i % 61]).0); + } + for _ in 0..per / 2 { + let p = live.swap_remove(live.len() / 2); + // SAFETY: p is live (taken from the live set exactly once). + unsafe { slab.free(p) }; + } + } + assert_eq!(slab.live_count(), live.len()); + } + + // ── size classes / inline ext ──────────────────────────────────────── + + #[test] + fn inline_ext_is_contiguous_aligned_and_zeroed() { + let mut slab = ChunkedSlab::::new(); + let (p, _) = slab.alloc_with_ext(1, 40); // rounds up to 48 + let ext = inline_ext_of(p).expect("class carries ext bytes"); + assert_eq!(inline_ext_capacity_of(p), 48); + // Fixed header+1 projection: ext starts at the 16-rounded value end. + assert_eq!( + ext.as_ptr() as usize, + p.as_ptr() as usize + value_stride::() + ); + assert_eq!(ext.as_ptr() as usize % SLOT_META_BYTES, 0); + // SAFETY: 48 in-slot ext bytes, zeroed by alloc. + let bytes = unsafe { core::slice::from_raw_parts_mut(ext.as_ptr(), 48) }; + assert!(bytes.iter().all(|&b| b == 0)); + bytes.fill(0xab); + // Reuse re-zeroes: SAFETY: p is live. + unsafe { slab.free(p) }; + let (p2, _) = slab.alloc_with_ext(2, 40); + assert_eq!(p2, p, "LIFO reuse within the class"); + // SAFETY: same slot, same capacity. + let bytes = unsafe { core::slice::from_raw_parts(inline_ext_of(p2).unwrap().as_ptr(), 48) }; + assert!( + bytes.iter().all(|&b| b == 0), + "ext must be re-zeroed on reuse" + ); + } + + #[test] + fn size_classes_are_segregated_and_word_kind_has_no_ext() { + let mut slab = ChunkedSlab::::new(); + let (a, _) = slab.alloc(1); + let (b, _) = slab.alloc_with_ext(2, 64); + let (c, _) = slab.alloc_with_ext(3, 64); + assert!(inline_ext_of(a).is_none()); + assert_eq!(inline_ext_capacity_of(a), 0); + assert_eq!(inline_ext_capacity_of(b), 64); + assert_eq!(slab.chunk_count(), 2, "one chunk per class"); + // Neighbors in the 64-byte class are one slot stride apart — + // ext bytes are inside the slot, not shared. + let stride = (SLOT_META_BYTES + value_stride::() + 64) as isize; + // SAFETY: pointer identity arithmetic only. + assert_eq!( + unsafe { c.as_ptr().cast::().offset_from(b.as_ptr().cast::()) }, + stride + ); + assert_eq!(slab.live_count(), 3); + } + + // ── decommit reclamation ───────────────────────────────────────────── + + /// Fill exactly one chunk of the 0-ext class; returns its handles. + fn fill_chunk(slab: &mut ChunkedSlab) -> Vec> { + let per = slab.slots_per_chunk(0); + (0..per).map(|i| slab.alloc(i).0).collect() + } + + fn drain(slab: &mut ChunkedSlab, handles: &[NonNull]) { + for &p in handles { + // SAFETY: each handle is live and freed exactly once. + unsafe { slab.free(p) }; + } + } + + #[test] + fn decommit_hysteresis_keeps_most_recently_emptied_chunk() { + let mut slab = ChunkedSlab::::new(); + let a = fill_chunk(&mut slab); + let b = fill_chunk(&mut slab); + let c = fill_chunk(&mut slab); + assert_eq!(slab.chunk_count(), 3); + + drain(&mut slab, &a); + // First emptied chunk: kept committed (nothing to trade against). + assert!(slab.chunk_committed(0)); + + drain(&mut slab, &b); + // Emptying B decommits A; B is the new hysteresis keeper. + assert!(!slab.chunk_committed(0)); + assert!(slab.chunk_committed(1)); + + drain(&mut slab, &c); + assert!(!slab.chunk_committed(1)); + assert!(slab.chunk_committed(2)); + assert_eq!(slab.live_count(), 0); + + // Connect/close oscillation at the boundary: alloc+free against the + // kept chunk must not decommit or grow anything. + for i in 0..4 { + let (p, _) = slab.alloc(i); + // SAFETY: p is live. + unsafe { slab.free(p) }; + } + assert!(slab.chunk_committed(2)); + assert_eq!(slab.chunk_count(), 3); + } + + #[test] + fn stale_handle_is_safe_and_invalid_after_decommit() { + let mut slab = ChunkedSlab::::new(); + let a = fill_chunk(&mut slab); + let stale: Vec<(NonNull, u64)> = a.iter().map(|&p| (p, generation_of(p))).collect(); + let b = fill_chunk(&mut slab); + drain(&mut slab, &a); + drain(&mut slab, &b); // decommits chunk A (hysteresis keeps B) + assert!(!slab.chunk_committed(0)); + for (p, g) in stale { + // The probe stays a defined read (mapping intact) and can never + // validate: decommitted pages read even/zero vs the odd handle. + let now = generation_of(p); + assert_ne!(now, g); + assert_eq!(now & 1, 0); + #[cfg(any(target_os = "linux", miri))] + assert_eq!(now, 0, "MADV_DONTNEED reads as zero pages"); + } + } + + #[test] + fn counter_wrap_stays_within_its_epoch() { + // A hot slot's counter wrapping at 2^32 must not carry into the + // epoch bits (the within-epoch half of the ABA guard). + let g = (7u64 << EPOCH_SHIFT) | COUNTER_MASK; + let b = bump_counter(g); + assert_eq!(b >> EPOCH_SHIFT, 7); + assert_eq!(b & COUNTER_MASK, 0); + assert_eq!(bump_counter(b), (7u64 << EPOCH_SHIFT) | 1); + } + + #[test] + fn epoch_guards_generation_aba_across_decommit_cycles() { + let mut slab = ChunkedSlab::::new(); + let a = fill_chunk(&mut slab); + // Slot 0 of chunk A: first-ever generation is (epoch 0 << 32) | 1. + let victim = a[0]; + let stale_gen = generation_of(victim); + assert_eq!(stale_gen, 1); + let base_a = slab.chunk_base(0); + + let b = fill_chunk(&mut slab); + drain(&mut slab, &a); + drain(&mut slab, &b); // decommit A, epoch 0 → 1 + assert!(!slab.chunk_committed(0)); + + // Exhaust B, forcing lazy recommit of A; its first alloc reuses + // slot 0 — the exact ABA address. + let per = slab.slots_per_chunk(0); + let mut held = Vec::new(); + let mut reborn = None; + for i in 0..per + 1 { + let (p, g) = slab.alloc(i); + if p == victim { + reborn = Some(g); + } + held.push(p); + } + assert!(slab.chunk_committed(0), "recommit is lazy, on demand"); + assert_eq!(slab.chunk_base(0), base_a, "reservation address is stable"); + let reborn = reborn.expect("recommitted chunk must reuse slot 0 first"); + // Same low counter, different epoch: the packed high bits are the + // only thing separating cycle N from cycle N+1. + assert_eq!(reborn & COUNTER_MASK, stale_gen & COUNTER_MASK); + assert_eq!(reborn >> EPOCH_SHIFT, 1); + assert_ne!( + reborn, stale_gen, + "cycle-N handle must not validate in cycle N+1" + ); + assert_ne!(generation_of(victim), stale_gen); + } + + #[test] + fn teardown_releases_every_chunk_mapping() { + // Full-release-at-teardown (docs/design.md §Slab reclamation): create/destroy cycles must not + // accumulate reservations — Miri's leak check is the oracle for any + // chunk (committed, decommitted, or holding a live value) not unmapped. + for _ in 0..8 { + let mut slab = ChunkedSlab::::new(); + let a = fill_chunk(&mut slab); + let b = fill_chunk(&mut slab); + drain(&mut slab, &a); + drain(&mut slab, &b); // chunk A decommitted, B kept (hysteresis) + let _live = slab.alloc(1); // live slot at Drop + drop(slab); + } + } + + #[test] + fn decommitted_chunk_returns_to_service_with_working_slots() { + let mut slab = ChunkedSlab::::new(); + let a = fill_chunk(&mut slab); + let b = fill_chunk(&mut slab); + drain(&mut slab, &a); + drain(&mut slab, &b); + assert!(!slab.chunk_committed(0)); + // Fill both chunks again end-to-end: values survive, occupancy right. + let per = slab.slots_per_chunk(0); + let all: Vec<_> = (0..2 * per).map(|i| (i, slab.alloc(i).0)).collect(); + assert_eq!(slab.chunk_count(), 2, "reuse, don't grow"); + assert_eq!( + slab.chunk_occupied(0) + slab.chunk_occupied(1), + 2 * per as u32 + ); + for (i, p) in &all { + // SAFETY: all slots live. + assert_eq!(unsafe { *p.as_ref() }, *i); + } + } +} diff --git a/src/usockets/unsafe_core/test_support.rs b/src/usockets/unsafe_core/test_support.rs new file mode 100644 index 000000000000..e27d3c00734d --- /dev/null +++ b/src/usockets/unsafe_core/test_support.rs @@ -0,0 +1,143 @@ +//! Test-only loop helpers + link stubs for in-crate unit tests. The real +//! definitions of the stubbed symbols live outside this crate +//! (bun_threading, src/platform) and are only present in the full bun link; +//! this module exists only in `cargo test -p bun_usockets`. + +use crate::loop_::Loop; + +/// Bare loop (no pre/post/wakeup callbacks, no ext) for registry tests. +pub(crate) fn create_test_loop() -> *mut Loop { + super::ffi::create_loop_static(None, None, None, 0) +} + +/// Free a loop from [`create_test_loop`] exactly once. +pub(crate) fn free_test_loop(loop_: *mut Loop) { + // SAFETY: test contract — `loop_` came from `create_test_loop` and is + // freed exactly once. + unsafe { super::ffi::free_loop_raw(loop_) } +} + +// ── link stubs (ABI mirrors of the extern declarations in ffi.rs / +// poll_access.rs; single-threaded test binary, so no-op locks are sound) ── + +#[unsafe(no_mangle)] +pub extern "C" fn Bun__lock(_ptr: *mut core::ffi::c_void) {} + +#[unsafe(no_mangle)] +pub extern "C" fn Bun__unlock(_ptr: *mut core::ffi::c_void) {} + +#[unsafe(no_mangle)] +pub static Bun__lock__size: usize = core::mem::size_of::(); + +/// 0 = unsupported: the tick falls back to plain `epoll_pwait`, so the raw +/// `sys_epoll_pwait2` stub below is link-only, never executed. +#[unsafe(no_mangle)] +pub extern "C" fn Bun__isEpollPwait2SupportedOnLinuxKernel() -> i32 { + 0 +} + +/// Link-only: tests never create TLS transports, so `ssl_free` is unreachable. +#[unsafe(no_mangle)] +pub extern "C" fn SSL_free(_ssl: *mut core::ffi::c_void) { + unreachable!("test binary must not free SSL handles"); +} + +/// Link-only: replaces the C++ crash handler pulled in via bun_alloc's OOM path. +#[unsafe(no_mangle)] +pub extern "C" fn __bun_crash_handler_out_of_memory() -> ! { + std::process::abort(); +} + +#[unsafe(no_mangle)] +pub extern "C" fn sys_epoll_pwait2( + _epfd: i32, + _events: *mut libc::epoll_event, + _maxevents: i32, + _timeout: *const libc::timespec, + _sigmask: *const libc::sigset_t, +) -> isize { + -(libc::ENOSYS as isize) +} + +// Runtime hooks reached from group/tick tests (real definitions live in +// bun_runtime / quic.c / JSC glue): no-ops in the single-threaded test binary. +#[unsafe(no_mangle)] +pub extern "C" fn Bun__internal_ensureDateHeaderTimerIsEnabled(_loop: *mut Loop) {} + +#[unsafe(no_mangle)] +pub extern "C" fn us_quic_loop_process(_loop: *mut Loop) {} + +#[unsafe(no_mangle)] +pub extern "C" fn Bun__JSC_onBeforeWait(_vm: *const core::ffi::c_void) {} + +// Link-only BoringSSL / DNS surface pulled in by the socket close paths; +// group/tick tests never create TLS transports or DNS lookups, so every one +// of these is unreachable at runtime. +macro_rules! link_stub { + ($($name:ident),+ $(,)?) => {$( + #[unsafe(no_mangle)] + pub extern "C" fn $name() { + unreachable!(concat!("test binary must not call ", stringify!($name))); + } + )+}; +} + +link_stub!( + BIO_clear_retry_flags, + BIO_get_data, + BIO_get_new_index, + BIO_meth_new, + BIO_meth_set_create, + BIO_meth_set_ctrl, + BIO_meth_set_read, + BIO_meth_set_write, + BIO_set_init, + BIO_set_retry_read, + BIO_set_retry_write, + Bun__addrinfo_cancel, + Bun__addrinfo_getRequestResult, + SSL_CTX_get_ex_new_index, + SSL_get_error, + SSL_get_ex_new_index, + SSL_in_init, + SSL_shutdown, + SSL_write, + bun_ssl_ctx_cache_on_free, + ERR_clear_error, + ERR_error_string_n, + ERR_peek_last_error, + SSL_CIPHER_get_auth_nid, + SSL_CTX_get_ex_data, + SSL_CTX_get_verify_mode, + SSL_SESSION_get_protocol_version, + SSL_get_current_cipher, + SSL_get_ex_data, + SSL_get_peer_certificate, + SSL_get_session, + SSL_get_verify_result, + SSL_session_reused, + SSL_set_ex_data, + X509_free, + X509_verify_cert_error_string, + us_get_shared_default_ca_store, + BIO_free, + BIO_new, + BIO_set_data, + Bun__addrinfo_freeRequest, + SSL_CTX_free, + SSL_do_handshake, + SSL_get_SSL_CTX, + SSL_get_quiet_shutdown, + SSL_get_shutdown, + SSL_is_init_finished, + SSL_new, + SSL_read, + SSL_renegotiate, + SSL_set0_verify_cert_store, + SSL_set_accept_state, + SSL_set_bio, + SSL_set_connect_state, + SSL_set_renegotiate_mode, + SSL_set_tlsext_host_name, + SSL_set_verify, +); diff --git a/src/usockets/unsafe_core/trampolines.rs b/src/usockets/unsafe_core/trampolines.rs new file mode 100644 index 000000000000..8e8db6cc5b3d --- /dev/null +++ b/src/usockets/unsafe_core/trampolines.rs @@ -0,0 +1,796 @@ +//! extern "C" vtable/dispatch shims. Moved from `src/uws_sys/vtable.rs` +//! (`Trampolines`) with pointer types adapted to the native crate; the +//! Handler trait and `vtable::make` live in dispatch.rs. Exposed pub(crate) +//! so dispatch.rs can direct-call per-kind, bypassing the vtable pointer. +//! +//! Also home to the raw-header readers and vtable-slot invokers the dispatch +//! driver uses (dispatch.rs is deny(unsafe_code)). Shared invariant: the loop +//! only dispatches slab-resident headers, and slab memory is never returned +//! to the OS while the loop lives — so slot reads are in-bounds even for +//! vacant (freed-and-bumped) slots. Listener headers are slab-resident too +//! (group::finish_listen allocates via socket::alloc with kind=Invalid; only +//! the ListenerData is boxed into the ext word), so one reaching dispatch_* +//! reads an in-bounds generation and traps in `vt()` on kind=Invalid (R7.2). + +use core::ffi::{c_int, c_void}; +use core::ptr::NonNull; + +use crate::connecting::ConnectingSocket; +use crate::dispatch::Handler; +use crate::group::{SocketGroup, VTable}; +use crate::kind::SocketKind; +use crate::socket::us_socket_t; +use crate::tls::context::us_bun_verify_error_t; +use crate::unsafe_core::ext; +use crate::unsafe_core::slab::ChunkedSlab; + +// ── link-time dispatch tables ──────────────────────────────────────────────── +// The const kind table and TLS side-channel hooks are DEFINED (no_mangle) in +// the one crate that sees every protocol type — bun_runtime's +// socket/uws_dispatch.rs — and resolved here at link time, the same single +// seam the C loop's fixed dispatch switch used. Crate unit tests provide the +// empty fallbacks below so the test binary links without the runtime crate. + +#[cfg(not(test))] +unsafe extern "Rust" { + safe static BUN_UWS_KIND_TABLE: crate::dispatch::KindTable; + safe static BUN_UWS_TLS_SIDE_CHANNEL: crate::dispatch::TlsSideChannelHooks; +} + +#[cfg(test)] +static BUN_UWS_KIND_TABLE: crate::dispatch::KindTable = [None; crate::dispatch::SOCKET_KIND_COUNT]; +#[cfg(test)] +static BUN_UWS_TLS_SIDE_CHANNEL: crate::dispatch::TlsSideChannelHooks = + crate::dispatch::TlsSideChannelHooks { + ssl_raw_tap: |_, _| {}, + session: |_, _| {}, + keylog: |_, _| {}, + }; + +#[inline] +pub(crate) fn kind_table() -> &'static crate::dispatch::KindTable { + &BUN_UWS_KIND_TABLE +} + +#[inline] +pub(crate) fn tls_side_channel() -> &'static crate::dispatch::TlsSideChannelHooks { + &BUN_UWS_TLS_SIDE_CHANNEL +} + +pub(crate) struct Trampolines(core::marker::PhantomData); + +impl Trampolines { + #[inline(always)] + fn ext<'a>(s: *mut us_socket_t) -> ext::ExtMut<'a, H::Ext> + where + H::Ext: 'a, + { + // Generation validation before the ext read: parity odd = occupied + // (deferred-close slots stay occupied until the tick postlude, C6). + debug_assert!(socket_slot_live(s), "ext read on a dead slab slot"); + // Kind-registry type check (docs/design.md §Handle surface): the invoked + // handler is the one registered for this static kind. + debug_assert!( + crate::dispatch::kind_dispatches_to::(socket_kind(s)), + "trampoline invoked for a kind registered to a different handler" + ); + // SAFETY: dispatch only invokes trampolines on live sockets whose ext + // storage was sized for `H::Ext` at creation. No reference is formed + // here — every deref is a per-use reborrow inside `ExtMut::with`, so + // C17 re-entry (close/adopt from inside the handler) cannot overlap + // a live `&mut` to the same storage. + ext::ExtMut::new(unsafe { ext::downcast_raw::(s) }) + } + + pub(crate) extern "C" fn on_open( + s: *mut us_socket_t, + is_client: c_int, + ip: *mut u8, + ip_len: c_int, + ) -> *mut us_socket_t { + // SAFETY: the loop guarantees `ip[0..ip_len]` is valid when non-null. + let ip_slice: &[u8] = + unsafe { ext::c_slice(ip, usize::try_from(ip_len).expect("int cast")) }; + if H::HAS_EXT { + H::on_open(Self::ext(s), s, is_client != 0, ip_slice); + } else { + H::on_open_no_ext(s, is_client != 0, ip_slice); + } + s + } + + pub(crate) extern "C" fn on_data( + s: *mut us_socket_t, + data: *mut u8, + len: c_int, + ) -> *mut us_socket_t { + // SAFETY: the loop guarantees `data[0..len]` is valid (shared recv_buf). + let data_slice = unsafe { ext::c_slice(data, usize::try_from(len).expect("int cast")) }; + if H::HAS_EXT { + H::on_data(Self::ext(s), s, data_slice); + } else { + H::on_data_no_ext(s, data_slice); + } + s + } + + pub(crate) extern "C" fn on_fd(s: *mut us_socket_t, fd: c_int) -> *mut us_socket_t { + if H::HAS_EXT { + H::on_fd(Self::ext(s), s, fd); + } else { + H::on_fd_no_ext(s, fd); + } + s + } + + pub(crate) extern "C" fn on_writable(s: *mut us_socket_t) -> *mut us_socket_t { + if H::HAS_EXT { + H::on_writable(Self::ext(s), s); + } else { + H::on_writable_no_ext(s); + } + s + } + + pub(crate) extern "C" fn on_close( + s: *mut us_socket_t, + code: c_int, + reason: *mut c_void, + ) -> *mut us_socket_t { + let reason = if reason.is_null() { None } else { Some(reason) }; + if H::HAS_EXT { + H::on_close(Self::ext(s), s, code, reason); + } else { + H::on_close_no_ext(s, code, reason); + } + s + } + + pub(crate) extern "C" fn on_timeout(s: *mut us_socket_t) -> *mut us_socket_t { + if H::HAS_EXT { + H::on_timeout(Self::ext(s), s); + } else { + H::on_timeout_no_ext(s); + } + s + } + + pub(crate) extern "C" fn on_long_timeout(s: *mut us_socket_t) -> *mut us_socket_t { + if H::HAS_EXT { + H::on_long_timeout(Self::ext(s), s); + } else { + H::on_long_timeout_no_ext(s); + } + s + } + + pub(crate) extern "C" fn on_end(s: *mut us_socket_t) -> *mut us_socket_t { + if H::HAS_EXT { + H::on_end(Self::ext(s), s); + } else { + H::on_end_no_ext(s); + } + s + } + + pub(crate) extern "C" fn on_connect_error( + s: *mut us_socket_t, + code: c_int, + ) -> *mut us_socket_t { + if H::HAS_EXT { + H::on_connect_error(Self::ext(s), s, code); + } else { + H::on_connect_error_no_ext(s, code); + } + s + } + + pub(crate) extern "C" fn on_connecting_error( + cs: *mut ConnectingSocket, + code: c_int, + ) -> *mut ConnectingSocket { + H::on_connecting_error(cs, code); + cs + } + + pub(crate) extern "C" fn on_handshake( + s: *mut us_socket_t, + ok: c_int, + err: us_bun_verify_error_t, + _user: *mut c_void, + ) { + if H::HAS_EXT { + H::on_handshake(Self::ext(s), s, ok != 0, err); + } else { + H::on_handshake_no_ext(s, ok != 0, err); + } + } +} + +// ── raw header reads for the dispatch driver ──────────────────────────────── +// Short-lived field copies only — never a `&`/`&mut SocketHeader` that could +// alias re-entrant callback state (C17). + +/// Slot occupancy via generation parity (odd = occupied). Vacant ⇒ the event +/// is stale (quirk OQ-4 structural fix — docs/semantics.md) and must be dropped. +/// Parity cannot detect slot REUSE: stale kernel udata for a slot freed in a +/// prior tick postlude and re-allocated has odd parity again. Safe only +/// because deferred free (C6) covers intra-batch staleness and the backend +/// purges kernel-held udata (fd close/EPOLL_CTL_DEL) before slot reuse. +pub(crate) fn socket_slot_live(s: *mut us_socket_t) -> bool { + match NonNull::new(s) { + // SAFETY: slab-resident header per module invariant; the slot's + // generation cell is in-bounds even when the slot is vacant. + Some(nn) => (unsafe { ChunkedSlab::generation(nn) }) % 2 == 1, + None => false, + } +} + +/// Connecting-socket variant of [`socket_slot_live`]. +pub(crate) fn connecting_slot_live(cs: *mut ConnectingSocket) -> bool { + match NonNull::new(cs) { + // SAFETY: slab-resident per module invariant (connecting sockets live + // in the per-loop slab like sockets). + Some(nn) => (unsafe { ChunkedSlab::generation(nn) }) % 2 == 1, + None => false, + } +} + +pub(crate) fn socket_kind(s: *mut us_socket_t) -> SocketKind { + // SAFETY: occupied slab slot (dispatch validates parity first). + unsafe { (*s).kind } +} + +pub(crate) fn connecting_kind(cs: *mut ConnectingSocket) -> SocketKind { + // SAFETY: occupied slab slot (dispatch validates parity first). + unsafe { (*cs).kind } +} + +pub(crate) fn socket_group(s: *mut us_socket_t) -> *mut SocketGroup { + // SAFETY: occupied slab slot (dispatch validates parity first). + unsafe { (*s).group } +} + +pub(crate) fn socket_group_vtable(s: *mut us_socket_t) -> Option<&'static VTable> { + let g = socket_group(s); + // SAFETY: the group is embedded by-value in a live owner for as long as + // any of its sockets exists; the vtable slot is a `&'static` copy-out. + unsafe { (*g).vtable } +} + +pub(crate) fn connecting_group_vtable(cs: *mut ConnectingSocket) -> Option<&'static VTable> { + // SAFETY: occupied slab slot; group liveness as in `socket_group_vtable`. + unsafe { (*(*cs).group).vtable } +} + +// ── vtable slot invocation (NULL slot ⇒ skipped no-op, docs/cabi.md §4.1) ─── +// The `-> *mut us_socket_t` return is always the input with in-place adoption +// (docs/design.md §Strategy 3) and is deliberately discarded. + +fn c_len(len: usize) -> c_int { + c_int::try_from(len).expect("dispatch buffer length exceeds c_int") +} + +pub(crate) fn invoke_open(vt: &VTable, s: *mut us_socket_t, is_client: bool, ip: &[u8]) { + if let Some(f) = vt.on_open { + // SAFETY: slot signature matches this lowering; `ip` outlives the + // call. The `*mut` is C-ABI shape only — `ip` is lowered from a + // shared borrow, so the handler must not write through it (cabi §4.1). + let _ = unsafe { + f( + s, + is_client as c_int, + ip.as_ptr().cast_mut(), + c_len(ip.len()), + ) + }; + } +} + +pub(crate) fn invoke_data(vt: &VTable, s: *mut us_socket_t, data: &mut [u8]) { + if let Some(f) = vt.on_data { + // SAFETY: slot signature matches; `data` (shared recv_buf view, writable + // for in-place WS unmasking) outlives the call. + let _ = unsafe { f(s, data.as_mut_ptr(), c_len(data.len())) }; + } +} + +pub(crate) fn invoke_fd(vt: &VTable, s: *mut us_socket_t, fd: c_int) { + if let Some(f) = vt.on_fd { + // SAFETY: slot signature matches the C ABI. + let _ = unsafe { f(s, fd) }; + } +} + +pub(crate) fn invoke_close(vt: &VTable, s: *mut us_socket_t, code: c_int, reason: *mut c_void) { + if let Some(f) = vt.on_close { + // SAFETY: slot signature matches; `reason` is an opaque passthrough (C3). + let _ = unsafe { f(s, code, reason) }; + } +} + +pub(crate) fn invoke_connect_error(vt: &VTable, s: *mut us_socket_t, code: c_int) { + if let Some(f) = vt.on_connect_error { + // SAFETY: slot signature matches the C ABI. + let _ = unsafe { f(s, code) }; + } +} + +pub(crate) fn invoke_connecting_error(vt: &VTable, cs: *mut ConnectingSocket, code: c_int) { + if let Some(f) = vt.on_connecting_error { + // SAFETY: slot signature matches the C ABI. + let _ = unsafe { f(cs, code) }; + } +} + +pub(crate) fn invoke_handshake( + vt: &VTable, + s: *mut us_socket_t, + ok: bool, + err: us_bun_verify_error_t, +) { + if let Some(f) = vt.on_handshake { + // SAFETY: slot signature matches; custom_data is always NULL + // (docs/cabi.md §2.1). + unsafe { f(s, ok as c_int, err, core::ptr::null_mut()) }; + } +} + +/// Stamps the four `fn(s) -> s` slot invokers. +macro_rules! invoke_unary { + ($($name:ident => $slot:ident),* $(,)?) => {$( + pub(crate) fn $name(vt: &VTable, s: *mut us_socket_t) { + if let Some(f) = vt.$slot { + // SAFETY: slot signature matches the C ABI. + let _ = unsafe { f(s) }; + } + } + )*}; +} + +invoke_unary! { + invoke_writable => on_writable, + invoke_timeout => on_timeout, + invoke_long_timeout => on_long_timeout, + invoke_end => on_end, +} + +// ── Protocol v2 (docs/design.md): owner-guarded trampolines ─────────────── +// Owner storage: the 8-byte ext word of a static (non-group-vtable) kind +// holds a `*mut P::Owner` carrying ONE strong ref transferred by the attach +// APIs (handle.rs). Attempt sockets of an in-flight connect carry a BORROWED +// copy (connect_state != null); the owned word lives on the ConnectingSocket. + +use crate::handle::{AnySocket, NewSocketHandler, SocketRef}; +use crate::protocol::{CloseCode2, ConnectFailure, Protocol}; + +/// Type-erased owner release for the dispatch-side kind registry. +/// +/// # Safety +/// `word` must point to a live `O` with an outstanding strong ref (the one +/// being released here). +pub(crate) unsafe fn owner_deref_erased(word: *mut c_void) +where + O: bun_ptr::RefCounted, + O::DestructorCtx: Default, +{ + // SAFETY: forwarded caller contract. + unsafe { ::rc_deref(word.cast::()) }; +} + +/// Raw ext-word snapshot of a static-kind socket (never the group-vtable +/// inline-area pointer). Invariant: occupied slab slot. +fn owner_word(s: *mut us_socket_t) -> *mut c_void { + debug_assert!(!crate::dispatch::uses_group_vtable(socket_kind(s))); + // SAFETY: occupied slab slot (callers validate parity first); raw field + // read, no reference formed (C17). + unsafe { (*s).ext } +} + +/// Raw `connect_state` snapshot; occupied slab slot (callers resolve the +/// handle / validate parity first). Non-null = live happy-eyeballs attempt. +pub(crate) fn socket_connect_state(s: *mut us_socket_t) -> *mut ConnectingSocket { + // SAFETY: occupied slab slot; raw field read, no reference formed (C17). + unsafe { (*s).connect_state } +} + +/// Generation-checked [`AnySocket`] handle for a live dispatched socket; +/// SSL flavor follows the kind tag. +pub(crate) fn any_socket(s: *mut us_socket_t) -> AnySocket { + let r = SocketRef::from_live(NonNull::new(s).expect("dispatch on null socket")); + if socket_kind(s).is_tls() { + AnySocket::SocketTls(NewSocketHandler::from(r)) + } else { + AnySocket::SocketTcp(NewSocketHandler::from(r)) + } +} + +/// Release the core-owned ext ref at a socket terminal (on_close / +/// on_connect_error return, silent SEMI_SOCKET close, detach). Exactly-once: +/// the word is nulled before the deref. No-op for v1 kinds (no owner ops), +/// stale slots, null words, and borrowed attempt copies (connect_state set — +/// that ref is owned by the ConnectingSocket and released at ITS terminal). +pub(crate) fn release_owner_ext(s: *mut us_socket_t) { + if !socket_slot_live(s) { + return; + } + let Some(ops) = crate::dispatch::owner_ops(socket_kind(s)) else { + return; + }; + // SAFETY: occupied slab slot; raw field reads/writes, no reference formed. + let word = unsafe { + if !(*s).connect_state.is_null() { + return; + } + core::mem::replace(&mut (*s).ext, core::ptr::null_mut()) + }; + if word.is_null() { + return; + } + // SAFETY: `word` was stamped from an `OwnerRef` for this kind (attach + // invariant) and its strong ref is still outstanding (nulled-once above). + unsafe { (ops.deref)(word) }; +} + +/// Connecting-socket variant of [`release_owner_ext`]. Also nulls every live +/// attempt's borrowed ext copy so a later promotion/terminal cannot see a +/// dangling word. +pub(crate) fn release_owner_ext_connecting(cs: *mut ConnectingSocket) { + if !connecting_slot_live(cs) { + return; + } + let Some(ops) = crate::dispatch::owner_ops(connecting_kind(cs)) else { + return; + }; + // SAFETY: occupied slab slot; raw field access only (pending window, C13). + let word = unsafe { + let word = core::mem::replace(&mut (*cs).ext, core::ptr::null_mut()); + for attempt in (*cs).attempts { + if !attempt.is_null() { + (*attempt).ext = core::ptr::null_mut(); + } + } + word + }; + if word.is_null() { + return; + } + // SAFETY: as in `release_owner_ext`. + unsafe { (ops.deref)(word) }; +} + +/// Swap the OWNED ext word of a live in-flight connect (owner attach during +/// happy-eyeballs): stamps `word` on the ConnectingSocket and every live +/// attempt's borrowed copy; returns the previous owned word. +pub(crate) fn swap_owner_ext_connecting( + cs: *mut ConnectingSocket, + word: *mut c_void, +) -> *mut c_void { + // SAFETY: caller resolved a live socket whose connect_state is `cs`, so + // the slot is occupied; raw field access only (pending window, C13). + unsafe { + let old = core::mem::replace(&mut (*cs).ext, word); + for attempt in (*cs).attempts { + if !attempt.is_null() { + (*attempt).ext = word; + } + } + old + } +} + +/// Release an owner word captured BEFORE an adopt re-stamped the kind +/// (owner-swap: the new owner is stamped first, then the old ref is released +/// under the old kind's ops — no window where dispatch sees a stale owner). +pub(crate) fn release_owner_for_kind(word: *mut c_void, kind: SocketKind) { + let Some(ops) = crate::dispatch::owner_ops(kind) else { + return; + }; + if word.is_null() { + return; + } + // SAFETY: `word` was stamped from an `OwnerRef` for `kind` (attach + // invariant); the caller detached it from the socket, so this is the + // sole release of that ref. + unsafe { (ops.deref)(word) }; +} + +/// Mint a strong [`bun_ptr::RefPtr`] from a live owner borrow. Safe: `&O` +/// proves liveness (`RefPtr::init_ref`'s precondition) and the intrusive +/// count is interior-mutable, so the `&`-derived `*mut` never writes fields. +pub fn owner_ref_of(o: &O) -> bun_ptr::RefPtr { + // SAFETY: `o` is a live borrow; init_ref only touches the intrusive count. + unsafe { bun_ptr::RefPtr::init_ref(core::ptr::from_ref(o).cast_mut()) } +} + +/// [`bun_ptr::ThisPtr`] view of a live owner borrow, for legacy +/// dispatch-shaped call sites. Liveness beyond the borrow is the Protocol v2 +/// dispatch guard's guarantee (the trampoline holds a ref across the handler). +pub fn this_ptr_of(o: &O) -> bun_ptr::ThisPtr { + // SAFETY: non-null and live per the borrow. + unsafe { bun_ptr::ThisPtr::new(core::ptr::from_ref(o).cast_mut()) } +} + +/// Consumer-facing SAFE owner access (Protocol v2, docs/design.md): +/// take a transient strong ref on the typed owner of a live socket handle. +/// `None` for stale/detached handles, v1 kinds, owner-type mismatches, and +/// the detached/pre-stamp (null-word) window. The caller must `deref()` (or +/// transfer) the returned ref — `RefPtr` has no `Drop`. +pub fn socket_owner_ref(s: &NewSocketHandler) -> Option> +where + O: bun_ptr::RefCounted + 'static, +{ + let word = match s.socket { + crate::handle::InternalSocket::Connected(r) => { + let p = r.resolve()?.as_ptr(); + if !crate::dispatch::owner_registered_as::(socket_kind(p)) { + return None; + } + let cs = socket_connect_state(p); + if cs.is_null() { + owner_word(p) + } else { + // Live happy-eyeballs attempt: the owned word lives on the + // ConnectingSocket (the attempt's copy is a borrow). + // SAFETY: occupied slab slot; raw field read only (C13). + unsafe { (*cs).ext } + } + } + crate::handle::InternalSocket::Connecting(r) => { + let cs = r.resolve()?.as_ptr(); + if !crate::dispatch::owner_registered_as::(connecting_kind(cs)) { + return None; + } + // SAFETY: occupied slab slot; raw field read only (C13). + unsafe { (*cs).ext } + } + _ => return None, + }; + let p = NonNull::new(word.cast::())?; + // SAFETY: `owner_registered_as` proved the registered owner type is `O`, + // and the attach invariant says a non-null word is a live `O` carrying an + // outstanding strong ref; `init_ref` adds the caller's own ref. + Some(unsafe { bun_ptr::RefPtr::init_ref(p.as_ptr()) }) +} + +/// Closure form of [`socket_owner_ref`]: borrow the owner for the duration +/// of `f`, ref-guarded so a re-entrant release inside `f` cannot free it. +pub fn with_socket_owner( + s: &NewSocketHandler, + f: impl FnOnce(&O) -> R, +) -> Option +where + O: bun_ptr::RefCounted + 'static, +{ + let guard = socket_owner_ref::(s)?; + let out = f(guard.data()); + guard.deref(); + Some(out) +} + +pub(crate) struct Trampolines2

(core::marker::PhantomData

); + +impl Trampolines2

{ + /// The core-held dispatch guard: take a strong owner ref BEFORE the + /// handler and drop it after — the owner may lose every other ref + /// mid-callback (re-entrant JS) and still outlives the handler frame. + /// Null word (detached / pre-stamp window) is a silent no-op. + fn with_owner(word: *mut c_void, f: impl FnOnce(&P::Owner)) { + let Some(p) = NonNull::new(word.cast::()) else { + return; + }; + // SAFETY: the attach APIs stamped a live owner with a transferred + // strong ref; the loop thread is the only accessor. + let guard = unsafe { bun_ptr::RefPtr::init_ref(p.as_ptr()) }; + f(guard.data()); + // May run the owner's destructor — AFTER the handler returned; if the + // handler closed the socket, core's deferred-close already ran (C6). + guard.deref(); + } + + fn dispatch(s: *mut us_socket_t, f: impl FnOnce(&P::Owner, AnySocket)) { + let sock = any_socket(s); + Self::with_owner(owner_word(s), |o| f(o, sock)); + } + + pub(crate) extern "C" fn on_open( + s: *mut us_socket_t, + is_client: c_int, + ip: *mut u8, + ip_len: c_int, + ) -> *mut us_socket_t { + // SAFETY: the loop guarantees `ip[0..ip_len]` is valid when non-null. + let ip_slice = unsafe { ext::c_slice(ip, usize::try_from(ip_len).expect("int cast")) }; + Self::dispatch(s, |o, sock| P::on_open(o, sock, is_client != 0, ip_slice)); + s + } + + pub(crate) extern "C" fn on_data( + s: *mut us_socket_t, + data: *mut u8, + len: c_int, + ) -> *mut us_socket_t { + // SAFETY: the loop guarantees `data[0..len]` is valid (shared + // recv_buf, writable for in-place unmasking). + let slice = unsafe { ext::c_slice_mut(data, usize::try_from(len).expect("int cast")) }; + Self::dispatch(s, |o, sock| P::on_data(o, sock, slice)); + s + } + + pub(crate) extern "C" fn on_fd(s: *mut us_socket_t, fd: c_int) -> *mut us_socket_t { + // POSIX-only event (SCM_RIGHTS); the `as _` widens for the Windows + // Fd backing type, where this slot never fires. + Self::dispatch(s, |o, sock| { + P::on_fd(o, sock, bun_core::Fd::from_native(fd as _)) + }); + s + } + + pub(crate) extern "C" fn on_writable(s: *mut us_socket_t) -> *mut us_socket_t { + Self::dispatch(s, P::on_writable); + s + } + + pub(crate) extern "C" fn on_close( + s: *mut us_socket_t, + code: c_int, + _reason: *mut c_void, + ) -> *mut us_socket_t { + let (code, errno) = CloseCode2::decode(code); + Self::dispatch(s, |o, sock| P::on_close(o, sock, code, errno)); + s + } + + pub(crate) extern "C" fn on_timeout(s: *mut us_socket_t) -> *mut us_socket_t { + Self::dispatch(s, P::on_timeout); + s + } + + pub(crate) extern "C" fn on_long_timeout(s: *mut us_socket_t) -> *mut us_socket_t { + Self::dispatch(s, P::on_long_timeout); + s + } + + pub(crate) extern "C" fn on_end(s: *mut us_socket_t) -> *mut us_socket_t { + Self::dispatch(s, P::on_end); + s + } + + pub(crate) extern "C" fn on_connect_error( + s: *mut us_socket_t, + code: c_int, + ) -> *mut us_socket_t { + Self::with_owner(owner_word(s), |o| { + P::on_connect_error(o, ConnectFailure { errno: code }) + }); + s + } + + pub(crate) extern "C" fn on_connecting_error( + cs: *mut ConnectingSocket, + code: c_int, + ) -> *mut ConnectingSocket { + // SAFETY: occupied slab slot (dispatch validates parity first); raw + // field read only (pending window, C13). + let word = unsafe { (*cs).ext }; + Self::with_owner(word, |o| { + P::on_connect_error(o, ConnectFailure { errno: code }) + }); + cs + } + + pub(crate) extern "C" fn on_handshake( + s: *mut us_socket_t, + ok: c_int, + err: us_bun_verify_error_t, + _user: *mut c_void, + ) { + Self::dispatch(s, |o, sock| P::on_handshake(o, sock, ok != 0, err)); + } +} + +// ── poll registry: owner-guarded poll dispatch ──────────────────────────────── + +use crate::loop_::poll_registry::{PollEvents, PollOwnerOps, PollProtocol, PollRef}; + +/// Monomorphized owner ops for a registered poll — the non-socket sibling of +/// `make2` (same core-held dispatch-guard contract). +pub(crate) fn poll_owner_ops() -> &'static PollOwnerOps { + &MakePollOps::

::OPS +} + +struct MakePollOps

(core::marker::PhantomData

); + +impl MakePollOps

{ + const OPS: PollOwnerOps = PollOwnerOps { + dispatch: Self::dispatch_erased, + deref: owner_deref_erased::, + teardown: Self::teardown_erased, + }; + + /// # Safety + /// `word` must point to a live `P::Owner` whose slot-transferred strong + /// ref is still outstanding (released by the caller afterwards). + unsafe fn teardown_erased(word: *mut c_void) { + let Some(p) = NonNull::new(word.cast::()) else { + return; + }; + // SAFETY: forwarded caller contract — the outstanding ref keeps the + // owner alive for this shared borrow. + P::on_loop_teardown(unsafe { &*p.as_ptr() }); + } + + /// # Safety + /// `word` must point to a live `P::Owner` holding the slot-transferred + /// strong ref (registry invariant — dispatch validated the slot first). + unsafe fn dispatch_erased(word: *mut c_void, poll: PollRef, events: PollEvents) { + let Some(p) = NonNull::new(word.cast::()) else { + return; + }; + // SAFETY: forwarded caller contract. The guard ref keeps the owner + // alive across the handler even if it loses every other ref (C17); + // its release runs AFTER the handler returned. + let guard = unsafe { bun_ptr::RefPtr::init_ref(p.as_ptr()) }; + P::on_event(guard.data(), poll, events); + guard.deref(); + } +} + +/// Owner-guarded dispatch of a registered-poll event. +pub(crate) fn dispatch_poll_owner( + ops: &PollOwnerOps, + word: *mut c_void, + poll: PollRef, + events: PollEvents, +) { + // SAFETY: registry invariant — `word` was stamped from an `OwnerRef` at + // register and its strong ref is outstanding (nulled only at unregister, + // which frees the slot first so dispatch can no longer resolve it). + unsafe { (ops.dispatch)(word, poll, events) } +} + +/// Release the slot-transferred owner ref (unregister / slab-Drop teardown). +/// Null words (already-released) are a no-op. +pub(crate) fn release_poll_owner(ops: &PollOwnerOps, word: *mut c_void) { + if word.is_null() { + return; + } + // SAFETY: sole release of the register-transferred strong ref — every + // caller nulls the slot's word before (or while) handing it here. + unsafe { (ops.deref)(word) } +} + +/// Loop-teardown release: invalidate the owner's consumer-side handles (its +/// `PollRef` dangles once the slab unmaps), THEN release the transferred ref. +pub(crate) fn teardown_poll_owner(ops: &PollOwnerOps, word: *mut c_void) { + if word.is_null() { + return; + } + // SAFETY: teardown caller contract — live owner, ref still outstanding. + unsafe { (ops.teardown)(word) }; + release_poll_owner(ops, word); +} + +/// Produce the `&'static VTable` for a Protocol v2 registration — every slot +/// filled (v2 defaults are no-ops, so a filled slot == v1's skipped None). +pub(crate) const fn make2() -> &'static VTable { + &Make2::

::VT +} + +struct Make2

(core::marker::PhantomData

); + +impl Make2

{ + const VT: VTable = VTable { + on_open: Some(Trampolines2::

::on_open), + on_data: Some(Trampolines2::

::on_data), + on_fd: Some(Trampolines2::

::on_fd), + on_writable: Some(Trampolines2::

::on_writable), + on_close: Some(Trampolines2::

::on_close), + on_timeout: Some(Trampolines2::

::on_timeout), + on_long_timeout: Some(Trampolines2::

::on_long_timeout), + on_end: Some(Trampolines2::

::on_end), + on_connect_error: Some(Trampolines2::

::on_connect_error), + on_connecting_error: Some(Trampolines2::

::on_connecting_error), + on_handshake: Some(Trampolines2::

::on_handshake), + }; +} diff --git a/src/usockets/write.rs b/src/usockets/write.rs new file mode 100644 index 000000000000..86d91e2248c7 --- /dev/null +++ b/src/usockets/write.rs @@ -0,0 +1,224 @@ +//! Write path: write/write2/raw_write(v)/write_check_error/flush, sendfile +//! marker, IPC fd write (SCM_RIGHTS). Implements docs/semantics.md §4: +//! ENOBUFS/ENOMEM are would-block (return 0), <0 is fatal, no MSG_MORE; +//! on_writable fires after kernel drain; the paused bit resets on pool reuse +//! (contract C7). The JS stream buffer (`us_socket_stream_buffer_t`) is NOT +//! here — it lives above the core (docs/design.md §Resolved design decisions). + +use core::ffi::c_void; + +#[cfg(not(windows))] +use bun_core::Fd; + +use crate::backend::Events; +use crate::neterr::{is_transient_send_error, is_would_block}; +use crate::socket::{SocketFlags, SocketHeader, is_shut_down_full}; +use crate::tls::{TlsState, Transport}; +use crate::unsafe_core::{ext, io}; + +/// `us_iovec_t` — layout == POSIX iovec. +#[repr(C)] +#[derive(Copy, Clone)] +pub struct UsIoVec { + pub base: *const c_void, + pub len: usize, +} + +/// C7: the C surface was `int`-bounded; cap one submission at i32::MAX so +/// the returned `i32` can never wrap. A clamped submission always arms +/// backpressure, so the unreported tail reads as a short write to retry. +const MAX_WRITE_LEN: usize = i32::MAX as usize; + +/// Returns `(clamped slice, whether clamping occurred)`. +#[inline] +fn clamp_len(data: &[u8]) -> (&[u8], bool) { + if data.len() > MAX_WRITE_LEN { + (&data[..MAX_WRITE_LEN], true) + } else { + (data, false) + } +} + +/// Raw `*mut TlsState` behind the transport box (stable address; C6). The +/// header borrow ends here so callees may re-derive `&mut SocketHeader` (C17). +#[inline] +fn tls_state(s: *mut SocketHeader) -> Option<*mut TlsState> { + match &mut ext::header_mut(s).transport { + Transport::Tls(t) => Some(&raw mut **t), + Transport::Plain => None, + } +} + +/// OQ-2 quirk (ported verbatim): absolute R|W set — re-arms READABLE even on +/// a paused socket. `IS_PAUSED` stays set, so a later resume's R restore is a +/// no-op for the bit it thinks it is restoring. +#[inline] +fn poll_change_read_write(s: *mut SocketHeader) { + crate::socket::poll_change(s, Events::READABLE | Events::WRITABLE); +} + +/// Short/failed write: `last_write_failed = 1` + poll R|W. The next writable +/// dispatch clears the flag BEFORE on_writable; if the handler does not +/// write-and-fail again, W is disarmed (R4.9 — the entire backpressure protocol). +#[inline] +fn mark_backpressure(s: *mut SocketHeader) { + ext::header_mut(s) + .flags + .set(SocketFlags::LAST_WRITE_FAILED, true); + poll_change_read_write(s); +} + +/// Plaintext write; TLS-encrypts when the transport is Tls. Returns bytes +/// accepted (0..len); 0 = would-block; never negative on this path. +pub(crate) fn write(s: *mut SocketHeader, data: &[u8]) -> i32 { + let (data, clamped) = clamp_len(data); + // R4.1: TLS routes before the closed/shut-down gate (the SSL layer does + // its own gating; ENOBUFS mapping surfaces there per C7). + if let Some(tls) = tls_state(s) { + let written = TlsState::write(tls, s, data); + // C7: a full clamped write still reads short to the caller — arm W. + if clamped && written == data.len() as i32 && !ext::header_mut(s).is_closed() { + mark_backpressure(s); + } + return written; + } + if ext::header_mut(s).is_closed() || is_shut_down_full(s) { + return 0; + } + let fd = ext::header_mut(s).fd; + let written = io::send(fd, data); + // R4.1: fatal errors (EPIPE/ECONNRESET) are indistinguishable from + // would-block here; the error surfaces later as an error/HUP event. + if written != data.len() as isize || clamped { + mark_backpressure(s); + } + if written < 0 { 0 } else { written as i32 } +} + +/// Vectored 2-part write (frame header + body, no copy). +pub(crate) fn write2(s: *mut SocketHeader, first: &[u8], second: &[u8]) -> i32 { + // R4.3: no TLS branch — write2 on a TLS socket writes ciphertext-layer + // bytes raw (callers only use it on plain sockets). + if ext::header_mut(s).is_closed() || is_shut_down_full(s) { + return 0; + } + let requested = first.len().saturating_add(second.len()); + let (first, _) = clamp_len(first); + let second = &second[..second.len().min(MAX_WRITE_LEN - first.len())]; + let clamped = first.len() + second.len() != requested; + let total = first.len() as isize + second.len() as isize; + let fd = ext::header_mut(s).fd; + let written = io::write2(fd, first, second); + if written != total || clamped { + // OQ-3 quirk (ported verbatim): write2 does NOT set + // last_write_failed, unlike every other write variant. + poll_change_read_write(s); + } + if written < 0 { 0 } else { written as i32 } +} + +/// Raw write bypassing TLS framing. +pub(crate) fn raw_write(s: *mut SocketHeader, data: &[u8]) -> i32 { + // R4.4: gate on the TCP-level shutdown bit only, deliberately NOT the + // TLS-aware is_shut_down_full — the TLS layer flushes close_notify + // through here after SSL_shutdown already marked the SSL side shut down. + { + let h = ext::header_mut(s); + if h.is_closed() || h.is_shut_down_raw() { + return 0; + } + } + let (data, clamped) = clamp_len(data); + let fd = ext::header_mut(s).fd; + let written = io::send(fd, data); + if written != data.len() as isize || clamped { + mark_backpressure(s); + } + if written < 0 { 0 } else { written as i32 } +} + +/// One writev; plain-TCP only. +pub(crate) fn raw_writev(s: *mut SocketHeader, iov: &[UsIoVec]) -> i32 { + // R4.5: same weaker TCP-level gate as raw_write. + { + let h = ext::header_mut(s); + if h.is_closed() || h.is_shut_down_raw() { + return 0; + } + } + // Total over ALL iovecs; io::writev caps the submitted count at IOV_MAX + // (1024), so an over-long call always reads as short and arms W (R4.5). + let total = iov.iter().fold(0u64, |a, v| a.saturating_add(v.len as u64)); + let fd = ext::header_mut(s).fd; + let written = io::writev(fd, iov); + // C7: saturate the i32 report; an under-reported write must also read as + // short so the caller retries the unreported tail. + let reported = written.min(i32::MAX as isize); + if written < 0 || written as u64 != total || reported != written { + mark_backpressure(s); + } + if written < 0 { 0 } else { reported as i32 } +} + +/// Write that also reports a fatal non-EWOULDBLOCK send error (node:net). +/// Returns `(written, fatal)`; `fatal` is only ever true on the plain path. +pub(crate) fn write_check_error(s: *mut SocketHeader, data: &[u8]) -> (i32, bool) { + if ext::header_mut(s).is_closed() || is_shut_down_full(s) { + return (0, false); + } + if matches!(ext::header_mut(s).transport, Transport::Tls(_)) { + // R4.2: TLS errors propagate through the SSL layer; keep that path. + return (write(s, data), false); + } + let (data, clamped) = clamp_len(data); + let fd = ext::header_mut(s).fd; + let written = io::send(fd, data); + if written < 0 { + if is_would_block(written) || is_transient_send_error(written) { + mark_backpressure(s); + return (0, false); + } + // R4.2: fatal (EPIPE/ECONNRESET) — report it and do NOT arm + // writable; a retry can never succeed. + return (0, true); + } + if written != data.len() as isize || clamped { + mark_backpressure(s); + } + (written as i32, false) +} + +/// Flush pending kernel corking. R4.6: clears TCP_CORK on Linux, no-op +/// elsewhere; gated on !us_socket_is_shut_down only (no closed gate, verbatim). +pub(crate) fn flush(s: *mut SocketHeader) { + if !is_shut_down_full(s) { + io::socket_flush(ext::header_mut(s).fd); + } +} + +/// Mark a short sendfile(2): set `last_write_failed`, arm R|W so the next +/// writable event re-fires on_writable (R4.8; the sendfile syscall itself +/// lives outside the core). +pub(crate) fn sendfile_needs_more(s: *mut SocketHeader) { + if ext::header_mut(s).is_closed() { + return; + } + mark_backpressure(s); +} + +/// Write + SCM_RIGHTS fd pass (SpawnIpc; C14). Contract (R4.10): a return of +/// 0 means nothing (fd included) was sent; a return > 0 means the fd was +/// delivered with the first byte, so any retry must be data-only. +#[cfg(not(windows))] +pub(crate) fn write_fd(s: *mut SocketHeader, data: &[u8], fd: Fd) -> i32 { + if ext::header_mut(s).is_closed() || is_shut_down_full(s) { + return 0; + } + let (data, clamped) = clamp_len(data); + let sock_fd = ext::header_mut(s).fd; + let sent = io::send_with_fd(sock_fd, data, fd.native()); + if sent != data.len() as isize || clamped { + mark_backpressure(s); + } + if sent < 0 { 0 } else { sent as i32 } +} diff --git a/src/uws_sys/App.rs b/src/uws_shim/App.rs similarity index 96% rename from src/uws_sys/App.rs rename to src/uws_shim/App.rs index c8d1db854b6c..8a78839aa960 100644 --- a/src/uws_sys/App.rs +++ b/src/uws_shim/App.rs @@ -451,25 +451,29 @@ pub struct ListenSocket { } impl ListenSocket { + /// A uWS listen socket IS a live slab-resident `bun_usockets::ListenSocket` + /// (header-first, src/usockets/docs/cabi.md §1.5); this ZST view is only ever + /// materialised from pointers C++ received from `us_socket_group_listen`. + #[inline] + fn as_core(&mut self) -> &mut UwsListenSocket { + // SAFETY: live per the invariant above; exclusive — listen lambdas fire + // after group-listen returns and close_listen_socket never dispatches + // on_close (R3.29). ZST→header widening: FFI pointer's whole-header provenance. + unsafe { &mut *std::ptr::from_mut::(self).cast::() } + } + #[inline] pub fn close(&mut self) { - // S008: ListenSocket is layout-identical to crate::ListenSocket - // (both ZST opaques) — safe deref via `opaque_deref_mut`. - bun_opaque::opaque_deref_mut(std::ptr::from_mut::(self).cast::()) - .close() + self.as_core().close() } #[inline] pub fn get_local_port(&mut self) -> i32 { - // S008: opaque ZST cast as above. - bun_opaque::opaque_deref_mut(std::ptr::from_mut::(self).cast::()) - .get_local_port() + self.as_core().get_local_port() } - pub fn socket(&mut self) -> crate::socket::NewSocketHandler { - // SAFETY: ListenSocket is layout-identical to us_socket_t on the C side - // (a listen socket IS a us_socket_t). - crate::socket::NewSocketHandler::::from(std::ptr::from_mut::(self).cast()) + pub fn socket(&mut self) -> crate::NewSocketHandler { + self.as_core().socket::() } } diff --git a/src/uws_sys/BodyReaderMixin.rs b/src/uws_shim/BodyReaderMixin.rs similarity index 100% rename from src/uws_sys/BodyReaderMixin.rs rename to src/uws_shim/BodyReaderMixin.rs diff --git a/src/uws/Cargo.toml b/src/uws_shim/Cargo.toml similarity index 71% rename from src/uws/Cargo.toml rename to src/uws_shim/Cargo.toml index 8f5659b29db8..03be880713e3 100644 --- a/src/uws/Cargo.toml +++ b/src/uws_shim/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "bun_uws" +name = "bun_uws_shim" version.workspace = true edition.workspace = true @@ -10,17 +10,15 @@ path = "lib.rs" workspace = true [dependencies] -bun_opaque.workspace = true -strum.workspace = true -bstr.workspace = true -scopeguard.workspace = true -const_format.workspace = true -enum-map.workspace = true -enumset.workspace = true -libc.workspace = true +bun_alloc.workspace = true bitflags.workspace = true +bstr.workspace = true bun_boringssl.workspace = true bun_core.workspace = true +bun_http_types.workspace = true bun_jsc_macros.workspace = true -bun_uws_sys.workspace = true +bun_opaque.workspace = true bun_ptr.workspace = true +bun_usockets.workspace = true +scopeguard.workspace = true +strum.workspace = true diff --git a/src/uws_sys/Request.rs b/src/uws_shim/Request.rs similarity index 100% rename from src/uws_sys/Request.rs rename to src/uws_shim/Request.rs diff --git a/src/uws_sys/Response.rs b/src/uws_shim/Response.rs similarity index 97% rename from src/uws_sys/Response.rs rename to src/uws_shim/Response.rs index 6d51812af92a..e6bc97da846e 100644 --- a/src/uws_sys/Response.rs +++ b/src/uws_shim/Response.rs @@ -105,11 +105,6 @@ impl Response { unsafe { &mut *std::ptr::from_mut::(self).cast::() } } - #[inline] - pub fn downcast_socket(&mut self) -> *mut us_socket_t { - std::ptr::from_mut::(self).cast::() - } - pub fn end(&mut self, data: &[u8], close_connection: bool) { // SAFETY: self is a live opaque uws_res handle owned by uWS; FFI call has no extra preconditions. unsafe { @@ -812,16 +807,21 @@ impl AnyResponse { } pub fn force_close(self) { + // A uWS `HttpResponse*` IS a live slab-resident `us_socket_t*`; caller + // must pass a live one — from_live stamps the slot's CURRENT generation, + // so this gives NO staleness protection. is fine: close() is const-generic-blind. + fn close_raw(s: *mut us_socket_t) { + // uWS never hands out a null response: panic (as_handle's null + // policy) instead of a silent no-op the C path never had. + let p = core::ptr::NonNull::new(s).expect("force_close: null uWS response handle"); + bun_usockets::NewSocketHandler::::from(bun_usockets::SocketRef::from_live(p)) + .close(bun_usockets::CloseCode::failure); + } match self { - AnyResponse::SSL(ptr) => { - // S008: `us_socket_t` is an `opaque_ffi!` ZST — safe deref. - us_socket_t::opaque_mut(TLSResponse::as_handle(ptr).downcast_socket()) - .close(crate::us_socket::CloseCode::failure); - } - AnyResponse::TCP(ptr) => { - us_socket_t::opaque_mut(TCPResponse::as_handle(ptr).downcast_socket()) - .close(crate::us_socket::CloseCode::failure); - } + // Cast the FFI pointer directly — no intermediate ZST `&mut` retag — + // so the slab-header read keeps the C++ pointer's full provenance. + AnyResponse::SSL(ptr) => close_raw(ptr.cast::()), + AnyResponse::TCP(ptr) => close_raw(ptr.cast::()), AnyResponse::H3(ptr) => H3Response::as_handle(ptr).force_close(), } } diff --git a/src/uws_sys/WebSocket.rs b/src/uws_shim/WebSocket.rs similarity index 100% rename from src/uws_sys/WebSocket.rs rename to src/uws_shim/WebSocket.rs diff --git a/src/uws_sys/h3.rs b/src/uws_shim/h3.rs similarity index 99% rename from src/uws_sys/h3.rs rename to src/uws_shim/h3.rs index 1e454c926108..4703d2521139 100644 --- a/src/uws_sys/h3.rs +++ b/src/uws_shim/h3.rs @@ -5,8 +5,7 @@ use core::ffi::{c_char, c_int, c_void}; use core::ptr; -use crate::SocketAddress; -use crate::response::{State, WriteResult}; +use crate::response::{SocketAddress, State, WriteResult}; use crate::socket_context::BunSocketContextOptions; use crate::thunk; diff --git a/src/uws/lib.rs b/src/uws_shim/lib.rs similarity index 82% rename from src/uws/lib.rs rename to src/uws_shim/lib.rs index e3e02fe29da5..8ba10a820ae4 100644 --- a/src/uws/lib.rs +++ b/src/uws_shim/lib.rs @@ -1,28 +1,62 @@ -#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow( + non_snake_case, + non_camel_case_types, + non_upper_case_globals, + // C++-shim FFI bindings: fn bodies are `unsafe { ffi_call(args) }`; the + // safety contract is documented at each body and identical whether the + // wrapper is `unsafe fn` or not. + clippy::not_unsafe_ptr_arg_deref +)] #![warn(unused_must_use)] +//! `bun_uws_shim` — Rust bindings for the surviving uWebSockets C++ layer +//! (libuwsockets.cpp / libuwsockets_h3.cpp / quic.c) plus SSLWrapper. +//! +//! This crate is the relocation target for the old `bun_uws` + `bun_uws_sys` +//! C++-shim surface (src/usockets/docs/design.md §Crate layout): everything here points INTO C++ +//! or BoringSSL, never into the deleted uSockets C core. Socket/loop/group +//! types come from `bun_usockets`; module paths mirror the old `bun_uws` +//! layout so consumer imports are a mechanical `bun_uws::` → `bun_uws_shim::`. + use core::ffi::{c_char, c_void}; use bun_core::ZStr; -// ────────────────────────────────────────────────────────────────────────── -// Thin re-exports from uws_sys / runtime -// ────────────────────────────────────────────────────────────────────────── -// FFI types (`us_bun_verify_error_t`, `Opcode`, `SendStatus`, `SocketKind`, -// `SocketGroup`, `ConnectResult`, listen-flag constants) are re-exported from -// `bun_uws_sys` so this crate and `_sys` name the SAME `#[repr(C)]` types — -// callers no longer shim-convert between two layout-identical structs. -// -// Safe raw-pointer wrappers (`NewSocketHandler`/`SocketTCP`/`SocketTLS`, -// `InternalSocket`, `AnySocket`, `ConnectError`, `CloseKind`, owned -// `SocketAddress`) stay defined here; `bun_uws_sys::socket` has lifetime- -// bearing variants of the same names that are not yet reconciled. - -#[cfg(windows)] -pub use bun_uws_sys::Timer; -pub use bun_uws_sys::{ - AnyWebSocket, BodyReaderMixin, ConnectingSocket, ListenSocket, NewApp, RawWebSocket, Request, - WebSocketBehavior, us_socket_stream_buffer_t, us_socket_t, uws_res, -}; +// ───────────────────────────── module map ──────────────────────────────────── +// Snake-case module names; `#[path]` points at the PascalCase files on disk +// (same shape as the old `bun_uws_sys`). + +#[path = "App.rs"] +pub mod app; +#[path = "BodyReaderMixin.rs"] +pub mod body_reader_mixin; +#[path = "h3.rs"] +pub mod h3; +#[path = "quic.rs"] +pub mod quic; +#[path = "Request.rs"] +pub mod request; +#[path = "Response.rs"] +pub mod response; +#[path = "thunk.rs"] +pub mod thunk; +pub mod us_socket; +#[path = "WebSocket.rs"] +pub mod web_socket; + +// ───────────────── shim-owned surface (moved C++ bindings) ────────────────── + +pub use app::uws_app_t; +pub use body_reader_mixin::BodyReaderMixin; +pub use h3 as H3; +pub use request::{AnyRequest, Request}; +pub use response::c::uws_res; +pub use response::{AnyResponse, State, WebSocketUpgradeContext, WriteResult}; +pub use web_socket::{AnyWebSocket, RawWebSocket, WebSocketBehavior}; + +/// Legacy aliases for `App` / `Response`. +pub type NewApp = app::App; +pub type NewAppResponse = response::Response; +pub type Response = response::Response; /// `#[uws_callback]` — wraps a `&self`/`&mut self` method in an `extern "C"` /// thunk that recovers `Self` from `*mut c_void` and lowers `&[T]` params to @@ -30,22 +64,91 @@ pub use bun_uws_sys::{ /// contract. With `panic = "abort"` Rust panics terminate in the crash-handler /// hook, so no `catch_unwind` wrapper is emitted. pub use bun_jsc_macros::uws_callback; -pub use bun_uws_sys::response::State; -pub use bun_uws_sys::{h3 as H3, quic, udp, vtable}; + +// ─────────────── core types re-exported from `bun_usockets` ───────────────── +// One definition each; the shim only adds the C++-facing bindings above. + +#[cfg(not(windows))] +pub use bun_usockets::PosixLoop; +#[cfg(windows)] +pub use bun_usockets::WindowsLoop; +pub use bun_usockets::us_wakeup_loop; +pub use bun_usockets::{ + AnySocket, CloseCode, ConnectError, ConnectResult, ConnectingSocket, ExtSlot, InternalLoopData, + InternalSocket, LIBUS_LISTEN_DEFAULT, LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE, + LIBUS_LISTEN_EXCLUSIVE_PORT, LIBUS_LISTEN_REUSE_ADDR, LIBUS_LISTEN_REUSE_PORT, + LIBUS_SOCKET_ALLOW_HALF_OPEN, LIBUS_SOCKET_DESCRIPTOR, LIBUS_SOCKET_IPV6_ONLY, ListenSocket, + Loop, LoopHandler, NewSocketHandler, SocketGroup, SocketHandler, SocketKind, SocketRef, + SocketTCP, SocketTLS, SocketTcp, SocketTls, Timespec, create_bun_socket_error_t, + on_thread_exit, udp, us_bun_verify_error_t, us_socket_t, vtable, +}; +pub use bun_usockets::{Error, Result}; +pub use us_socket::us_socket_stream_buffer_t; + pub type Socket = us_socket_t; +/// Legacy alias — `CloseCode` is the one canonical `#[repr(i32)]` enum. +pub type CloseKind = CloseCode; + +pub mod SocketContext { + /// `#[repr(C)]` mirror of `us_bun_socket_context_options_t`. What + /// `SSLConfig.asUSockets()` produces and `ssl_ctx_from_options` consumes. + /// The struct body, `Default`, `digest()` and `create_ssl_context()` live + /// in `bun_usockets::tls::context`. + pub use bun_usockets::BunSocketContextOptions; +} +/// Snake-case module alias. +pub use SocketContext as socket_context; +pub use bun_usockets::BunSocketContextOptions; + +/// C-name alias for `SocketContext::BunSocketContextOptions` — what +/// `SSLConfig.asUSockets()` produces and `ssl_ctx_from_options` consumes. +pub type us_bun_socket_context_options_t = BunSocketContextOptions; /// Bare BoringSSL `SSL_CTX`. `SSL_CTX_up_ref`/`SSL_CTX_free` is the refcount; /// policy (verify mode, reneg limits) is encoded on the SSL_CTX itself via -/// `us_ssl_ctx_from_options`, so there's no wrapper struct. `Option<*mut SslCtx>` -/// is what listen/connect/adopt take. +/// `ssl_ctx_from_options`, so there's no wrapper struct. `Option<*mut SslCtx>` +/// is what listen/connect/adopt take. Same C type as +/// `bun_usockets::tls::context::SslCtx` (distinct Rust nominal; cast at the +/// boundary; TLS pointers cross as opaque pointers, no type unification). pub type SslCtx = bun_boringssl::c::SSL_CTX; -/// uWS C++ `WebSocketContext*`. Only ever produced by the -/// upgrade-handler thunk and round-tripped to `uws_res_upgrade`; Rust never -/// dereferences it. Re-exported from `bun_uws_sys` so the trait -/// `bun_uws_sys::web_socket::WebSocketUpgradeServer` and higher-tier callers -/// (`bun_runtime::server`, `bake::dev_server`) all name the *same* opaque. -pub use bun_uws_sys::WebSocketUpgradeContext; +// ───────────────────── shim-local FFI enums / constants ───────────────────── + +/// WebSocket frame opcode (`uWS::OpCode`). +/// +/// Spec is `enum(i32) { ..., _ }` — non-exhaustive, so any `i32` from C++ is a +/// valid bit pattern. This type crosses the FFI boundary *into* Rust via +/// `uws_websocket_message_handler`, so it must not be an exhaustive +/// `#[repr(i32)]` enum (an out-of-range discriminant would be instant UB). +#[repr(transparent)] +#[derive(Clone, Copy, Eq, PartialEq, Debug)] +pub struct Opcode(pub i32); + +impl Opcode { + pub const Continuation: Opcode = Opcode(0); + pub const Text: Opcode = Opcode(1); + pub const Binary: Opcode = Opcode(2); + pub const Close: Opcode = Opcode(8); + pub const Ping: Opcode = Opcode(9); + pub const Pong: Opcode = Opcode(10); + // Upper-case aliases for callers that use the screaming-snake names + // (`uWS::OpCode::TEXT` etc.). Same bit values. + pub const CONTINUATION: Opcode = Opcode(0); + pub const TEXT: Opcode = Opcode(1); + pub const BINARY: Opcode = Opcode(2); + pub const CLOSE: Opcode = Opcode(8); + pub const PING: Opcode = Opcode(9); + pub const PONG: Opcode = Opcode(10); +} + +/// `uWS::WebSocket::SendStatus`. +#[repr(u32)] +#[derive(Clone, Copy, Eq, PartialEq, Debug)] +pub enum SendStatus { + Backpressure = 0, + Success = 1, + Dropped = 2, +} /// Recovers the concrete uWS response type from `*mut c_void` across the /// Rust→C++ boundary. Mirrors `UWSResponseKind` in headers-handwritten.h. @@ -84,30 +187,20 @@ pub const DEDICATED_COMPRESSOR_128KB: i32 = 231; pub const DEDICATED_COMPRESSOR_256KB: i32 = 248; pub const DEDICATED_COMPRESSOR: i32 = 248; -pub use bun_uws_sys::{ - LIBUS_LISTEN_DEFAULT, LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE, LIBUS_LISTEN_EXCLUSIVE_PORT, - LIBUS_LISTEN_REUSE_ADDR, LIBUS_LISTEN_REUSE_PORT, LIBUS_SOCKET_ALLOW_HALF_OPEN, - LIBUS_SOCKET_IPV6_ONLY, -}; - -// Re-export the `_sys` definitions so higher tiers see one type. `to_js` -// (`createBunSocketErrorToJS` / `verifyErrorToJS`) live as extension traits -// in the *_jsc crate. -pub use bun_uws_sys::{Opcode, SendStatus, create_bun_socket_error_t, us_bun_verify_error_t}; - -/// Owned socket-address shape (boxed IP). Distinct from the sys type by -/// design — that one stores the IP text inline as returned from -/// `Response::get_remote_socket_info`. +/// Owned socket-address shape (boxed IP). Distinct from +/// [`response::SocketAddress`] by design — that one stores the IP text inline +/// as returned from `Response::get_remote_socket_info`. pub struct SocketAddress { pub ip: Box<[u8]>, pub port: i32, pub is_ipv6: bool, } -pub use bun_uws_sys::loop_::on_thread_exit; - /// # Safety /// `filename` and `error_msg` must be valid NUL-terminated C strings. +// Called by the surviving `root_certs.cpp` when NODE_EXTRA_CA_CERTS fails. +// Also #[no_mangle]-defined in src/uws until D1 deletes that crate; the two +// crates must never both link into bun_bin (duplicate symbol). #[unsafe(no_mangle)] pub(crate) unsafe extern "C" fn BUN__warn__extra_ca_load_failed( filename: *const c_char, @@ -124,24 +217,12 @@ pub(crate) unsafe extern "C" fn BUN__warn__extra_ca_load_failed( ); } -pub use bun_uws_sys::LIBUS_SOCKET_DESCRIPTOR; - -mod c { - unsafe extern "C" { - // safe: no args; returns a process-static NUL-terminated cipher list. - pub(crate) safe fn us_get_default_ciphers() -> *const core::ffi::c_char; - } -} - pub fn get_default_ciphers() -> &'static ZStr { - // SAFETY: us_get_default_ciphers returns a static NUL-terminated string; - // bun_core::ffi::cstr computes the length, ZStr::from_raw rebuilds the - // length-carrying slice (excluding the NUL). - unsafe { - let p = c::us_get_default_ciphers(); - let len = bun_core::ffi::cstr(p).to_bytes().len(); - ZStr::from_raw(p.cast::(), len) - } + let ciphers = bun_usockets::tls::context::default_ciphers(); + // SAFETY: `default_ciphers` returns a process-static NUL-terminated + // string; `ZStr::from_raw` rebuilds the length-carrying slice + // (excluding the NUL). + unsafe { ZStr::from_raw(ciphers.as_ptr().cast::(), ciphers.to_bytes().len()) } } // ═══════════════════════════════════════════════════════════════════════════ @@ -169,6 +250,10 @@ pub mod ssl_wrapper { use crate::us_bun_verify_error_t; use bun_ptr::LaunderedSelf; // brings `Self::r` into scope for SSLWrapper + // The five former `us_ssl_*` C helpers now live in bun_usockets + // (tls/context.rs). `SSL*`/`X509_STORE*` cross as raw pointers between + // the two BoringSSL binding crates — same C type, distinct Rust nominals. + use bun_usockets::tls::context as us_tls; bun_core::define_scoped_log!(log, SSLWrapper, hidden); @@ -433,7 +518,9 @@ pub mod ssl_wrapper { boring_sys::SSL_VERIFY_PEER, Some(always_continue_verify), ); - if let Some(roots) = NonNull::new(us_get_shared_default_ca_store()) { + if let Some(roots) = NonNull::new( + us_tls::shared_default_ca_store().cast::(), + ) { let _ = boring_sys::SSL_set0_verify_cert_store( ssl.as_ptr(), roots.as_ptr(), @@ -480,11 +567,10 @@ pub mod ssl_wrapper { let ssl = scopeguard::ScopeGuard::into_inner(ssl_guard); // Opt into the parked new-session/keylog queues only when a - // handler will drain them (see `flush_pending_events`); the C - // callbacks skip un-opted SSLs entirely. + // handler will drain them (see `flush_pending_events`); the + // BoringSSL callbacks skip un-opted SSLs entirely. if handlers.on_session.is_some() || handlers.on_keylog.is_some() { - // SAFETY: `ssl` is the live SSL* created above. - unsafe { us_ssl_enable_pending_events(ssl.as_ptr()) }; + us_tls::enable_pending_events(ssl.as_ptr().cast()); } let flags = Flags::default(); @@ -513,7 +599,11 @@ pub mod ssl_wrapper { bun_boringssl::load(); let mut err = crate::create_bun_socket_error_t::none; - let Some(ssl_ctx) = ctx_opts.create_ssl_context(&mut err).and_then(NonNull::new) else { + let Some(ssl_ctx) = (*ctx_opts) + .create_ssl_context(&mut err) + .map(|p| p.cast::()) + .and_then(NonNull::new) + else { return Err(InitError::InvalidOptions); }; // init_with_ctx adopts the SSL_CTX* (one ref). The passphrase was @@ -843,8 +933,7 @@ pub mod ssl_wrapper { let Some(ssl) = self.ssl else { return us_bun_verify_error_t::default(); }; - // SAFETY: ssl is a live SSL*; uSockets helper reads the verify result off it. - unsafe { us_ssl_socket_verify_error_from_ssl(ssl.as_ptr()) } + us_bun_verify_error_t::from_ssl(ssl.as_ptr().cast_const().cast()) } /// Update the handshake state. Returns true if we can call handle_reading. @@ -1177,40 +1266,26 @@ pub mod ssl_wrapper { if Self::r(this).handlers.on_session.is_some() { loop { let Some(ssl) = Self::r(this).ssl else { return }; - // SAFETY: ssl is live (checked above); buffer is writable - // for BUFFER_SIZE bytes, which covers the 64 KB parking cap. - let len = unsafe { - us_ssl_pop_pending_session( - ssl.as_ptr(), - buffer.as_mut_ptr(), - c_int::try_from(BUFFER_SIZE).expect("int cast"), - ) - }; - if len <= 0 { + // BUFFER_SIZE covers the 64 KB parking cap. + let len = us_tls::pop_pending_session(ssl.as_ptr().cast(), &mut buffer[..]); + if len == 0 { break; } if let Some(on_session) = Self::r(this).handlers.on_session { - on_session(Self::r(this).handlers.ctx, &buffer[..len as usize]); + on_session(Self::r(this).handlers.ctx, &buffer[..len]); } } } if Self::r(this).handlers.on_keylog.is_some() { loop { let Some(ssl) = Self::r(this).ssl else { return }; - // SAFETY: same as the session pop above; keylog entries - // are capped at 4 KB+1, well within BUFFER_SIZE. - let len = unsafe { - us_ssl_pop_pending_keylog( - ssl.as_ptr(), - buffer.as_mut_ptr(), - c_int::try_from(BUFFER_SIZE).expect("int cast"), - ) - }; - if len <= 0 { + // Keylog entries are capped at 4 KB+1, well within BUFFER_SIZE. + let len = us_tls::pop_pending_keylog(ssl.as_ptr().cast(), &mut buffer[..]); + if len == 0 { break; } if let Some(on_keylog) = Self::r(this).handlers.on_keylog { - on_keylog(Self::r(this).handlers.ctx, &buffer[..len as usize]); + on_keylog(Self::r(this).handlers.ctx, &buffer[..len]); } } } @@ -1233,47 +1308,11 @@ pub mod ssl_wrapper { extern "C" fn always_continue_verify(_: c_int, _: *mut boring_sys::X509_STORE_CTX) -> c_int { 1 } - - unsafe extern "C" { - /// Process-wide bundled root store from `root_certs.cpp` — built once and - /// up_ref'd per consumer so the ~150-cert load happens once total, not per - /// CTX. Returns null if root loading fails (treated as "no roots"). - // safe: no args; idempotent lazy init reading a process global — no preconditions. - safe fn us_get_shared_default_ca_store() -> *mut boring_sys::X509_STORE; - /// Implemented in uSockets C; reads - /// `SSL_get_verify_result` and maps it onto the C `us_bun_verify_error_t`. - fn us_ssl_socket_verify_error_from_ssl(ssl: *mut boring_sys::SSL) -> us_bun_verify_error_t; - /// Opt this SSL into the parked new-session/keylog queues - /// (openssl.c's `us_ssl_new_session_cb` / `us_ssl_keylog_cb` skip - /// SSLs without the marker). - // SAFETY (unsafe fn): `ssl` must be a live `SSL*`. - fn us_ssl_enable_pending_events(ssl: *mut boring_sys::SSL); - /// Pop the oldest parked session/keylog entry into `out`; returns the - /// entry length or 0 when the queue is empty. - // SAFETY (unsafe fn): `ssl` live; `out` writable for `out_cap` bytes. - fn us_ssl_pop_pending_session( - ssl: *mut boring_sys::SSL, - out: *mut u8, - out_cap: c_int, - ) -> c_int; - // SAFETY (unsafe fn): `ssl` live; `out` writable for `out_cap` bytes. - fn us_ssl_pop_pending_keylog( - ssl: *mut boring_sys::SSL, - out: *mut u8, - out_cap: c_int, - ) -> c_int; - } } // ═══════════════════════════════════════════════════════════════════════════ -// Loop / InternalLoopData +// Loop parent-handle extension (was `bun_uws`) // ═══════════════════════════════════════════════════════════════════════════ -// Mirrors `struct us_internal_loop_data_t` (packages/bun-usockets/src/internal/ -// loop_data.h) and `struct us_loop_t` (epoll_kqueue.h / libuv.h). Re-exported -// from bun_uws_sys so `bun_uws::Loop` and `bun_uws_sys::Loop` are the same -// type (bun_io's EventLoopCtxVTable is typed against the uws_sys version). -pub use bun_uws_sys::loop_::{LoopHandler, us_wakeup_loop}; -pub use bun_uws_sys::{InternalLoopData, Loop, PosixLoop, Timespec, WindowsLoop}; /// Carrier trait so `set_parent_event_loop` can accept the higher-tier /// `EventLoopHandle` without depending on it. The event-loop crate impls this @@ -1282,9 +1321,9 @@ pub trait ParentEventLoopHandle { fn into_tag_ptr(self) -> (core::ffi::c_char, *mut c_void); } -/// Extension methods on the re-exported `bun_uws_sys::InternalLoopData` for the -/// typed parent-loop accessors. The sys crate only stores tag+ptr; this tier -/// adds the trait-generic setter and the panicking getter that callers use. +/// Extension methods on `bun_usockets::InternalLoopData` for the typed +/// parent-loop accessors. The core crate only stores tag+ptr; this tier adds +/// the trait-generic setter and the raw getter that callers use. pub trait InternalLoopDataExt { fn set_parent_event_loop(&mut self, parent: H); fn get_parent(&self) -> (core::ffi::c_char, *mut c_void); @@ -1310,66 +1349,9 @@ impl InternalLoopDataExt for InternalLoopData { } // ═══════════════════════════════════════════════════════════════════════════ -// SocketGroup -// ═══════════════════════════════════════════════════════════════════════════ -// Re-exported from `bun_uws_sys` so this crate and `_sys` name the SAME -// `#[repr(C)]` mirror of `struct us_socket_group_t`. The previous duplicate -// definition forced callers (e.g. `socket_body.rs` start_tls) to -// `.cast::()` between two layout-identical types. - -/// Alias for the per-group C vtable struct under its pre-merge name. -pub use bun_uws_sys::socket_group::VTable as SocketGroupVTable; -pub use bun_uws_sys::{ConnectResult, SocketGroup}; - -// ═══════════════════════════════════════════════════════════════════════════ -// SocketContext::BunSocketContextOptions -// ═══════════════════════════════════════════════════════════════════════════ -pub mod SocketContext { - /// `#[repr(C)]` mirror of `us_bun_socket_context_options_t`. What - /// `SSLConfig.asUSockets()` produces and `us_ssl_ctx_from_options` consumes. - /// The struct body, `Default`, `digest()` and `create_ssl_context()` live in - /// `bun_uws_sys`; re-exported so this crate and `_sys` share one definition - /// (callers in higher tiers pass values to `_sys` constructors directly). - pub use bun_uws_sys::BunSocketContextOptions; -} -/// Snake-case module alias. -pub use SocketContext as socket_context; - -/// C-name alias for `SocketContext::BunSocketContextOptions` — what -/// `SSLConfig.asUSockets()` produces and `us_ssl_ctx_from_options` consumes. -/// Higher tiers (http, runtime/socket) reference it under the C struct name. -pub type us_bun_socket_context_options_t = SocketContext::BunSocketContextOptions; - -// ═══════════════════════════════════════════════════════════════════════════ -// SocketKind (a.k.a. DispatchKind) / CloseKind +// MaybeAnySocket (was `bun_uws`) // ═══════════════════════════════════════════════════════════════════════════ -/// Re-exported from `bun_uws_sys` so dispatch tables in both crates agree on -/// one `#[repr(u8)]` enum. -pub use bun_uws_sys::SocketKind; - -/// Alias used by some callers (`websocket_client`, `sql_jsc`) that named -/// the dispatch tag `DispatchKind`. Same enum. -pub type DispatchKind = SocketKind; - -pub use bun_uws_sys::CloseCode; -/// Legacy alias — `bun_uws_sys::CloseCode` is the one canonical `#[repr(i32)]` -/// enum (`normal`/`failure`/`fast_shutdown`, with `Normal`/`Failure`/ -/// `FastShutdown` associated-const aliases). -pub type CloseKind = CloseCode; - -// ═══════════════════════════════════════════════════════════════════════════ -// Socket handlers (NewSocketHandler / SocketHandler / AnySocket) -// ═══════════════════════════════════════════════════════════════════════════ -// Re-exported from `bun_uws_sys::socket` — that is the ONE canonical -// definition. Do NOT add a parallel `InternalSocket` / `NewSocketHandler` -// here again; an earlier "thin placeholder" that grew full bodies has been -// deleted. -pub use bun_uws_sys::socket::{ - AnySocket, ConnectError, InternalSocket, NewSocketHandler, SocketHandler, SocketTCP, SocketTLS, - SocketTcp, SocketTls, -}; - /// Runtime-tagged TCP/TLS socket with a `None` arm for the "no active socket" /// state. Used by proxy-tunnel layers (HTTP `ProxyTunnel`, WebSocket /// `WebSocketProxyTunnel`) where the inner socket may be either transport and @@ -1414,31 +1396,3 @@ impl MaybeAnySocket { } } } - -// ═══════════════════════════════════════════════════════════════════════════ -// AnyRequest / AnyResponse -// ═══════════════════════════════════════════════════════════════════════════ - -/// Transport-agnostic request handle. Static/file routes take this so the same -/// handler body serves HTTP/1.1 and HTTP/3. Re-exported from `bun_uws_sys` — -/// the sys-crate version already carries `header`/`method`/`url`/`set_yield`, -/// so route handlers need no local extension trait. -/// Variants: `H1(*mut Request)`, `H3(*mut H3::Request)` (same field types as -/// the previous local enum — both crates name `bun_uws_sys::{Request, h3::Request}`). -pub use bun_uws_sys::AnyRequest; - -/// `uws::Response` — re-exported from `bun_uws_sys` so callers get the full -/// method surface (`write`/`end`/`try_end`/`on_aborted`/`on_writable`/...) without -/// a separate local opaque. Both are `#[repr(C)]` zero-sized handles, so this is -/// a pure namespace reconciliation. -pub type Response = bun_uws_sys::response::Response; - -/// Transport-agnostic response handle. Re-exported from `bun_uws_sys` — the -/// sys-crate version already carries the full dispatch impl (`write`, `end`, -/// `try_end`, `on_aborted`, `on_writable`, `corked`, `write_status`, -/// `write_header`, `end_stream`, `clear_*`, `timeout`, `state`, `upgrade`, ...). -/// Variants: `SSL(*mut Response)`, `TCP(*mut Response)`, -/// `H3(*mut H3::Response)`. -pub use bun_uws_sys::AnyResponse; - -pub use bun_uws_sys::response::WriteResult; diff --git a/src/uws_sys/quic.rs b/src/uws_shim/quic.rs similarity index 100% rename from src/uws_sys/quic.rs rename to src/uws_shim/quic.rs diff --git a/src/uws_sys/quic/Context.rs b/src/uws_shim/quic/Context.rs similarity index 97% rename from src/uws_sys/quic/Context.rs rename to src/uws_shim/quic/Context.rs index 880c6091783a..51ff068335c6 100644 --- a/src/uws_sys/quic/Context.rs +++ b/src/uws_shim/quic/Context.rs @@ -9,6 +9,9 @@ use crate::quic::{PendingConnect, Socket, Stream}; bun_opaque::opaque_ffi! { pub struct Context; } +// `Loop`'s crate-private slab tail is not FFI-safe; quic.c only reads the +// repr(C) prefix. Same policy as `bun_usockets::unsafe_core::ffi`. +#[allow(improper_ctypes)] unsafe extern "C" { fn us_create_quic_client_context( loop_: *mut Loop, diff --git a/src/uws_sys/quic/Header.rs b/src/uws_shim/quic/Header.rs similarity index 100% rename from src/uws_sys/quic/Header.rs rename to src/uws_shim/quic/Header.rs diff --git a/src/uws_sys/quic/PendingConnect.rs b/src/uws_shim/quic/PendingConnect.rs similarity index 100% rename from src/uws_sys/quic/PendingConnect.rs rename to src/uws_shim/quic/PendingConnect.rs diff --git a/src/uws_sys/quic/Socket.rs b/src/uws_shim/quic/Socket.rs similarity index 100% rename from src/uws_sys/quic/Socket.rs rename to src/uws_shim/quic/Socket.rs diff --git a/src/uws_sys/quic/Stream.rs b/src/uws_shim/quic/Stream.rs similarity index 100% rename from src/uws_sys/quic/Stream.rs rename to src/uws_shim/quic/Stream.rs diff --git a/src/uws_sys/thunk.rs b/src/uws_shim/thunk.rs similarity index 61% rename from src/uws_sys/thunk.rs rename to src/uws_shim/thunk.rs index 3cd127969d00..ab8f543981c7 100644 --- a/src/uws_sys/thunk.rs +++ b/src/uws_shim/thunk.rs @@ -15,18 +15,17 @@ //! * `user_mut` — null-checked `*mut c_void → Option<&mut U>`. //! * `handle_mut` — `*mut Opaque → &mut Opaque` for uWS handles. //! * `c_slice` — `(ptr,len) → &[u8]` (empty when len==0 / null). -//! * `ext_owner` — `&Option> → Option<&mut T>` (the -//! `socket.ext(**T).*` pattern). -//! * `socket_ext_owner` / `connecting_ext_owner` — same, but starting from a -//! raw `*us_socket_t` / `*us_connecting_socket_t`. +//! * `ext_owner` / `socket_ext_owner` — owner-word deref for the +//! snapshot-after-close pattern. +//! +//! `ExtSlot` lives in `bun_usockets`; `ext_owner` stays here because it +//! derefs a *copied* owner word taken before a close that may free the ext +//! storage — a case `ExtSlot::owner_mut` (a slot reborrow) cannot express. //! //! All functions are `unsafe fn` (callers uphold the uWS callback contract) //! and `#[inline(always)]` so codegen is identical to the hand-rolled thunks. use core::ffi::c_void; -use core::ptr::NonNull; - -use crate::us_socket_t; /// Marker for `#[repr(C)]` zero-sized opaque FFI handles /// (`UnsafeCell<[u8; 0]>` + `PhantomPinned`). @@ -138,80 +137,28 @@ pub(crate) unsafe fn c_slice<'a>(ptr: *const u8, len: usize) -> &'a [u8] { } } -/// Dereference the `Option>` stored in a socket's ext slot. -/// `None` covers the calloc'd-but-not-yet-stamped window during -/// connect/accept. +/// Deref the `Option>` owner word from a socket ext slot. +/// `None` covers the zeroed-but-not-yet-stamped window during connect/accept. +/// Takes the word by value-ref so callers can snapshot it (`ExtSlot::get()`) +/// *before* a close that may free the slot storage, then deref the snapshot. /// /// # Safety /// The pointee, when present, must be live and uniquely borrowed for `'a` -/// (uWS dispatch is single-threaded so no aliasing `&mut` exists). +/// (loop dispatch is single-threaded so no aliasing `&mut` exists). #[inline(always)] -pub unsafe fn ext_owner<'a, T>(ext: &Option>) -> Option<&'a mut T> { +pub unsafe fn ext_owner<'a, T>(ext: &Option>) -> Option<&'a mut T> { // SAFETY: per caller contract above. ext.map(|mut p| unsafe { p.as_mut() }) } -/// `Option>` at context creation; pointee (if any) is live and -/// uniquely accessed. +/// [`ext_owner`] starting from a live socket whose ext slot was stamped +/// `Option>` at creation. +/// +/// # Safety +/// `s` must be a live socket with an `Option>`-typed ext slot; +/// the pointee (if any) is live and uniquely accessed for `'a`. #[inline(always)] -pub unsafe fn socket_ext_owner<'a, T>(s: *mut us_socket_t) -> Option<&'a mut T> { +pub unsafe fn socket_ext_owner<'a, T>(s: *mut bun_usockets::us_socket_t) -> Option<&'a mut T> { // SAFETY: per caller contract above. - unsafe { ext_owner(&*(*s).ext::>>()) } -} - -// ───────────────────────── safe-surface trampoline ────────────────────────── -// -// S005: the primitives above are `unsafe fn` because each call site must -// re-assert the uWS callback contract. For the common, *non-re-entrant* -// dispatch path (single-threaded event loop, handler does not call back into -// uWS on the same socket while holding `&mut Owner`) that contract is uniform -// and can be discharged once at the type level instead of at every call site. -// `ExtSlot` is that type-level discharge: choosing it as `Handler::Ext` -// moves the proof obligation from ~30 `unsafe { ext_owner(ext) }` blocks to -// the one `unsafe` inside `owner_mut()`. - -/// Typed-safe wrapper for the `Option>` word stored in a uWS socket -/// ext slot. The newtype is the safe-surface entry point for the -/// `socket.ext(**T).*` pattern: choosing `type Ext = ExtSlot` in a -/// [`crate::vtable::Handler`] impl asserts the **non-re-entrancy contract** — -/// that the handler bodies do not re-enter uWS dispatch on the same socket -/// while a `&mut T` borrowed from this slot is live (re-entrant consumers must -/// keep `type Ext = Option>` and pass `*mut T` onward; see -/// `RawPtrHandler`). -/// -/// Because the inner field is private and there is no public safe constructor, -/// safe Rust cannot fabricate an `ExtSlot` containing a dangling pointer; -/// every `&mut ExtSlot` reachable from safe code was materialised by the -/// `vtable::Trampolines` layer from C-allocated socket ext memory (via -/// `(*s).ext::>()`), and `calloc`-zero is `None`. That makes -/// [`Self::owner_mut`] sound as a *safe* fn — the one `unsafe { p.as_mut() }` -/// inside discharges the same invariant every former -/// `unsafe { thunk::ext_owner(ext) }` call site repeated open-coded. -#[repr(transparent)] -pub struct ExtSlot(Option>); - -impl ExtSlot { - /// Recover `&mut T` from the slot, or `None` for the calloc'd-but-not-yet- - /// stamped window during connect/accept. Safe: see type-level docs for the - /// invariant that discharges the `unsafe` inside. - #[inline(always)] - pub fn owner_mut(&mut self) -> Option<&mut T> { - match self.0 { - // SAFETY: `ExtSlot` is only ever materialised by the uws_sys - // trampoline layer from a live socket ext slot. The slot holds the - // unique heap owner; uWS dispatch is single-threaded and — per the - // `Handler::Ext = ExtSlot` contract — non-re-entrant on this - // user-data, so no aliasing `&mut T` exists for `'_`. - Some(mut p) => Some(unsafe { p.as_mut() }), - None => None, - } - } - - /// Snapshot the raw pointer word without forming a borrow. Used by - /// `on_connect_error` paths that must read the owner *before* closing the - /// socket (which may invalidate the ext storage `self` points into). - #[inline(always)] - pub fn get(&self) -> Option> { - self.0 - } + unsafe { ext_owner(&*(*s).ext::>>()) } } diff --git a/src/uws_shim/us_socket.rs b/src/uws_shim/us_socket.rs new file mode 100644 index 000000000000..880c684c994f --- /dev/null +++ b/src/uws_shim/us_socket.rs @@ -0,0 +1,94 @@ +//! JS stream buffer relocated from the deleted `bun_uws_sys::us_socket`. +//! Lives above the core: `bun_usockets::write` deliberately does NOT define +//! it (src/usockets/docs/design.md). Module path mirrors the old crate for consumers. + +use core::ptr; + +#[repr(C)] +pub struct us_socket_stream_buffer_t { + pub list_ptr: *mut u8, + pub list_cap: usize, + pub list_len: usize, + pub total_bytes_written: usize, + pub cursor: usize, +} + +impl Default for us_socket_stream_buffer_t { + fn default() -> Self { + Self { + list_ptr: ptr::null_mut(), + list_cap: 0, + list_len: 0, + total_bytes_written: 0, + cursor: 0, + } + } +} + +/// Minimal structural mirror of `bun_io::StreamBuffer` for tier-0 interop. +/// The higher-tier `bun_io::StreamBuffer` is field-identical and converts via +/// `From`/`Into`. +pub struct StreamBuffer { + pub list: Vec, + pub cursor: usize, +} + +impl us_socket_stream_buffer_t { + pub fn update(&mut self, stream_buffer: StreamBuffer) { + // Decompose the Vec backing `stream_buffer.list` into raw parts so + // the C side can read ptr/len/cap directly. + let mut list = core::mem::ManuallyDrop::new(stream_buffer.list); + if list.capacity() > 0 { + self.list_ptr = list.as_mut_ptr(); + } else { + self.list_ptr = ptr::null_mut(); + } + self.list_len = list.len(); + self.list_cap = list.capacity(); + self.cursor = stream_buffer.cursor; + } + + pub fn wrote(&mut self, written: usize) { + self.total_bytes_written = self.total_bytes_written.saturating_add(written); + } + + pub fn to_stream_buffer(&self) -> StreamBuffer { + StreamBuffer { + list: if !self.list_ptr.is_null() { + unsafe { + // SAFETY: list_ptr/list_len/list_cap were produced by decomposing a + // Vec in `update`; global allocator (mimalloc) matches. + Vec::from_raw_parts(self.list_ptr, self.list_len, self.list_cap) + } + } else { + Vec::new() + }, + cursor: self.cursor, + } + } + + /// Explicit teardown — this struct is `#[repr(C)]` and freed via the + /// exported `us_socket_free_stream_buffer`, so no `Drop` impl. + /// + /// SAFETY: `this` must point to a live `us_socket_stream_buffer_t` whose + /// `list_ptr`/`list_cap` were produced by `update` (decomposed `Vec` on + /// the global mimalloc allocator). Not called more than once. + pub unsafe fn destroy(this: *mut Self) { + // SAFETY: caller contract — `this` is non-null and exclusively borrowed + let this = unsafe { &mut *this }; + if !this.list_ptr.is_null() { + unsafe { + // SAFETY: list_ptr/list_cap came from a decomposed Vec (global mimalloc). + drop(Vec::from_raw_parts(this.list_ptr, 0, this.list_cap)); + } + } + } +} + +// Also #[no_mangle]-defined in src/uws_sys until D1 deletes that crate; the +// two crates must never both link into bun_bin (duplicate symbol). +#[unsafe(no_mangle)] +pub(crate) extern "C" fn us_socket_free_stream_buffer(buffer: *mut us_socket_stream_buffer_t) { + // SAFETY: caller (C) passes a live us_socket_stream_buffer_t* + unsafe { us_socket_stream_buffer_t::destroy(buffer) }; +} diff --git a/src/uws_sys/Cargo.toml b/src/uws_sys/Cargo.toml deleted file mode 100644 index 168e89a16124..000000000000 --- a/src/uws_sys/Cargo.toml +++ /dev/null @@ -1,33 +0,0 @@ -[package] -name = "bun_uws_sys" -version.workspace = true -edition.workspace = true - -[lib] -path = "lib.rs" - -[lints] -workspace = true - -[dependencies] -bun_alloc.workspace = true -bun_opaque.workspace = true -thiserror.workspace = true -strum.workspace = true -bstr.workspace = true -scopeguard.workspace = true -const_format.workspace = true -enum-map.workspace = true -enumset.workspace = true -libc.workspace = true -bitflags.workspace = true -bun_boringssl_sys.workspace = true -bun_core.workspace = true -bun_errno.workspace = true -bun_http_types.workspace = true - -[target.'cfg(windows)'.dependencies] -bun_windows_sys.workspace = true -bun_libuv_sys.workspace = true -bun_paths.workspace = true -# no cycle: bun_paths -> {bun_core, bun_alloc}; neither depends on bun_uws_sys diff --git a/src/uws_sys/ConnectingSocket.rs b/src/uws_sys/ConnectingSocket.rs deleted file mode 100644 index 5e64e57efb03..000000000000 --- a/src/uws_sys/ConnectingSocket.rs +++ /dev/null @@ -1,108 +0,0 @@ -use core::ffi::{c_uint, c_void}; - -use crate::{Loop, SocketGroup, SocketKind}; - -// `us_connecting_socket_t` — a connect in flight (DNS / non-blocking -// `connect()` / happy-eyeballs). No I/O is possible yet; on success the loop -// promotes it to a `us_socket_t` and fires `onOpen`, on failure -// `onConnectingError`. -bun_opaque::opaque_ffi! { pub struct ConnectingSocket; } - -impl ConnectingSocket { - pub fn close(&mut self) { - us_connecting_socket_close(self) - } - - /// Returns the owning `SocketGroup`. Raw pointer because the group is - /// shared by every socket it owns; - /// materializing `&mut SocketGroup` here would alias with other sockets' - /// borrows of the same group. - pub fn group(&mut self) -> *mut SocketGroup { - us_connecting_socket_group(self) - } - pub fn raw_group(&mut self) -> *mut SocketGroup { - self.group() - } - - pub fn kind(&mut self) -> SocketKind { - SocketKind::from_u8(us_connecting_socket_kind(self)) - } - - /// Returns the owning `Loop`. Raw pointer because the loop is a shared - /// singleton referenced by every group/socket/timer; - /// materializing `&mut Loop` here would be aliased UB. - pub fn r#loop(&mut self) -> *mut Loop { - us_connecting_socket_get_loop(self) - } - - pub fn ext(&mut self) -> &mut T { - // SAFETY: the ext slot is per-socket trailing storage inside this - // allocation; `&mut self` guarantees exclusive access to it for the - // returned borrow's lifetime. Caller asserts the slot was sized/ - // aligned for T at group creation. - unsafe { &mut *us_connecting_socket_ext(self).cast::() } - } - - pub fn get_error(&mut self) -> i32 { - us_connecting_socket_get_error(self) - } - - /// Raw `getaddrinfo(3)` return code when the name lookup itself failed; - /// 0 for a connect failure past name resolution. A different namespace - /// from [`Self::get_error`] (errno). - pub fn get_dns_error(&mut self) -> i32 { - us_connecting_socket_get_dns_error(self) - } - - pub fn get_native_handle(&mut self) -> *mut c_void { - us_connecting_socket_get_native_handle(self) - } - - pub fn is_closed(&mut self) -> bool { - us_connecting_socket_is_closed(self) == 1 - } - - pub fn is_shutdown(&mut self) -> bool { - us_connecting_socket_is_shut_down(self) == 1 - } - - pub fn long_timeout(&mut self, seconds: c_uint) { - us_connecting_socket_long_timeout(self, seconds) - } - - pub fn shutdown(&mut self) { - us_connecting_socket_shutdown(self) - } - - pub fn shutdown_read(&mut self) { - us_connecting_socket_shutdown_read(self) - } - - pub fn timeout(&mut self, seconds: c_uint) { - us_connecting_socket_timeout(self, seconds) - } -} - -// All shims take only a non-null `us_connecting_socket_t*` plus value types. -// `ConnectingSocket` is `#[repr(C)]` with `UnsafeCell<[u8; 0]>`, so `&mut -// ConnectingSocket` is ABI-identical to a non-null pointer (no readonly/noalias -// attribute). Declaring the shims with reference params and `safe fn` moves the -// validity proof into the type signature. -unsafe extern "C" { - pub(crate) safe fn us_connecting_socket_close(s: &mut ConnectingSocket); - pub(crate) safe fn us_connecting_socket_group(s: &mut ConnectingSocket) -> *mut SocketGroup; - pub(crate) safe fn us_connecting_socket_kind(s: &mut ConnectingSocket) -> u8; - pub(crate) safe fn us_connecting_socket_ext(s: &mut ConnectingSocket) -> *mut c_void; - pub(crate) safe fn us_connecting_socket_get_error(s: &mut ConnectingSocket) -> i32; - pub(crate) safe fn us_connecting_socket_get_dns_error(s: &mut ConnectingSocket) -> i32; - pub(crate) safe fn us_connecting_socket_get_native_handle( - s: &mut ConnectingSocket, - ) -> *mut c_void; - pub(crate) safe fn us_connecting_socket_is_closed(s: &mut ConnectingSocket) -> i32; - pub(crate) safe fn us_connecting_socket_is_shut_down(s: &mut ConnectingSocket) -> i32; - pub(crate) safe fn us_connecting_socket_long_timeout(s: &mut ConnectingSocket, seconds: c_uint); - pub(crate) safe fn us_connecting_socket_shutdown(s: &mut ConnectingSocket); - pub(crate) safe fn us_connecting_socket_shutdown_read(s: &mut ConnectingSocket); - pub(crate) safe fn us_connecting_socket_timeout(s: &mut ConnectingSocket, seconds: c_uint); - pub(crate) safe fn us_connecting_socket_get_loop(s: &mut ConnectingSocket) -> *mut Loop; -} diff --git a/src/uws_sys/InternalLoopData.rs b/src/uws_sys/InternalLoopData.rs deleted file mode 100644 index 5a38af507434..000000000000 --- a/src/uws_sys/InternalLoopData.rs +++ /dev/null @@ -1,99 +0,0 @@ -use core::ffi::{c_char, c_int, c_void}; - -#[cfg(windows)] -use crate::Timer; -use crate::{ConnectingSocket, Loop, SocketGroup, udp, us_socket_t}; - -/// Layout placeholder for the `mutex` field of `us_internal_loop_data_t`. -/// Must match `zig_mutex_t` in `packages/bun-usockets/src/internal/loop_data.h` -/// and `bun_threading::mutex::ReleaseImpl` (which exports `Bun__lock__size`): -/// - Windows: `SRWLOCK` (pointer-sized) -/// - macOS: `os_unfair_lock` (4-byte u32) -/// - Linux/FreeBSD: futex word (4-byte u32) -/// This crate never locks/unlocks it — C calls `Bun__lock`/`Bun__unlock` -/// (exported from `bun_threading`) on the raw field address. -#[cfg(windows)] -pub(crate) type LoopDataMutex = *mut c_void; -#[cfg(not(windows))] -pub(crate) type LoopDataMutex = u32; - -bun_opaque::opaque_ffi! { - /// Opaque C handle from `us_internal_create_async`. - pub struct us_internal_async; -} - -#[repr(C)] -pub struct InternalLoopData { - #[cfg(windows)] - pub sweep_timer: *mut Timer, - #[cfg(not(windows))] - pub sweep_next_tick_ns: i64, - pub sweep_timer_count: i32, - pub wakeup_async: *mut us_internal_async, - pub head: *mut SocketGroup, - pub quic_head: *mut c_void, - pub quic_next_tick_us: i64, - #[cfg(windows)] - pub quic_timer: *mut Timer, - pub iterator: *mut SocketGroup, - pub recv_buf: *mut u8, - pub send_buf: *mut u8, - pub ssl_data: *mut c_void, - pub pre_cb: Option, - pub post_cb: Option, - pub closed_udp_head: *mut udp::Socket, - pub closed_head: *mut us_socket_t, - pub low_prio_head: *mut us_socket_t, - pub low_prio_budget: i32, - pub dns_ready_head: *mut ConnectingSocket, - pub closed_connecting_head: *mut ConnectingSocket, - /// `bun.Mutex.ReleaseImpl.Type` — must match the C-side `zig_mutex_t` - /// (`packages/bun-usockets/src/internal/loop_data.h`). `Bun__lock`/`Bun__unlock` - /// are called on this field by C, and `loop.c` runtime-checks - /// `Bun__lock__size == sizeof(loop->data.mutex)`. This crate is tier-0 and - /// cannot name `bun_threading::ReleaseImpl` directly, so use a layout-only - /// placeholder of the correct size/align per platform. - pub mutex: LoopDataMutex, - pub parent_ptr: *mut c_void, - pub parent_tag: c_char, - pub iteration_nr: u64, - // SAFETY: erased `Option<&'static jsc::VM>` — tier-0 crate cannot name jsc types. - // Higher tier (`bun_runtime`) casts this back when reading. - pub jsc_vm: *const c_void, - pub tick_depth: c_int, -} - -impl InternalLoopData { - const LIBUS_RECV_BUFFER_LENGTH: usize = 524288; - - pub fn recv_slice(&mut self) -> &mut [u8] { - // SAFETY: `recv_buf` is malloc'd by C `us_internal_loop_data_init` with at least - // LIBUS_RECV_BUFFER_LENGTH bytes and lives as long as the loop. - unsafe { core::slice::from_raw_parts_mut(self.recv_buf, Self::LIBUS_RECV_BUFFER_LENGTH) } - } - - pub fn should_enable_date_header_timer(&self) -> bool { - self.sweep_timer_count > 0 - } - - /// Tag values for `parent_tag`: 1 = `jsc::EventLoop`, 2 = `jsc::MiniEventLoop`. - /// Low tier stores tag+ptr only; the typed `EventLoopHandle` wrappers - /// (`set_parent_event_loop` / `get_parent`) live in the higher-tier crate - /// that can name `bun_jsc` — see `bun_runtime::dispatch` (move-in pass). - #[inline] - pub fn set_parent_raw(&mut self, tag: c_char, ptr: *mut c_void) { - self.parent_tag = tag; - self.parent_ptr = ptr; - } - - #[inline] - pub fn get_parent_raw(&self) -> (c_char, *mut c_void) { - if self.parent_ptr.is_null() { - panic!("Parent loop not set - pointer is null"); - } - if self.parent_tag == 0 { - panic!("Parent loop not set - tag is zero"); - } - (self.parent_tag, self.parent_ptr) - } -} diff --git a/src/uws_sys/ListenSocket.rs b/src/uws_sys/ListenSocket.rs deleted file mode 100644 index 6f5ddd100ea0..000000000000 --- a/src/uws_sys/ListenSocket.rs +++ /dev/null @@ -1,142 +0,0 @@ -use core::ffi::{c_char, c_int, c_void}; -use core::ptr::NonNull; - -use bun_core::Fd; - -use crate::{LIBUS_SOCKET_DESCRIPTOR, SocketGroup, SslCtx, us_socket_t}; - -bun_opaque::opaque_ffi! { - /// Opaque FFI handle for a uSockets listen socket. - pub struct ListenSocket; -} - -impl ListenSocket { - pub fn close(&mut self) { - us_listen_socket_close(self) - } - - pub fn get_local_address<'a>(&mut self, buf: &'a mut [u8]) -> Result<&'a [u8], crate::Error> { - self.get_socket().local_address(buf) - } - - pub fn get_local_port(&mut self) -> i32 { - self.get_socket().local_port() - } - - pub fn get_socket(&mut self) -> &mut us_socket_t { - // SAFETY: ListenSocket is layout-compatible with us_socket_t on the C side - // (a listen socket IS a us_socket_t). The returned - // borrow reborrows `&mut self` exclusively — no alias is live while it exists. - unsafe { &mut *std::ptr::from_mut::(self).cast::() } - } - - pub fn socket(&mut self) -> crate::socket::NewSocketHandler { - // NewSocketHandler is local (crate::socket); no upward dep. - crate::socket::NewSocketHandler::::from(std::ptr::from_mut::( - self.get_socket(), - )) - } - - /// Group accepted sockets are linked into. - pub fn group(&mut self) -> &mut SocketGroup { - // SAFETY: self is a valid listen socket; C returns a non-null group. - unsafe { &mut *us_listen_socket_group(self) } - } - - pub fn ext(&mut self) -> &mut T { - // SAFETY: caller guarantees the ext storage was sized/aligned for T at - // group creation time. - unsafe { &mut *us_listen_socket_ext(self).cast::() } - } - - pub fn fd(&mut self) -> Fd { - let raw = us_listen_socket_get_fd(self); - // SOCKET → kind=system (mask bit 63); `from_native` would store the - // raw bits verbatim and mis-tag `INVALID_SOCKET` (~0) as kind=uv. - #[cfg(windows)] - { - Fd::from_system(raw as *mut core::ffi::c_void) - } - #[cfg(not(windows))] - { - Fd::from_native(raw) - } - } - - /// `ssl_ctx` is `SSL_CTX_up_ref`'d for the SNI node; the listener drops - /// that ref on close / `remove_server_name`. `user` is the per-domain handle - /// `find_server_name_userdata` recovers (uWS uses an `HttpRouter*`; Bun.listen - /// passes null). - /// - /// `ssl_ctx` is taken as a raw `*mut SslCtx` (not `&mut SslCtx`) because - /// `SSL_CTX` is a refcounted shared object — C `SSL_CTX_up_ref`s it and - /// stores the pointer past this call, so the caller cannot legitimately - /// hold exclusive `&mut` access. `user` is likewise raw `*mut` because the - /// C side stores it and `find_server_name_userdata` later hands it back as - /// a mutable pointer; accepting `&U` and const-casting would make that - /// round-trip UB. - pub fn add_server_name( - &mut self, - hostname: &core::ffi::CStr, - ssl_ctx: *mut SslCtx, - user: *mut c_void, - ) -> bool { - // SAFETY: self and hostname are valid for the duration of the call; - // caller guarantees `ssl_ctx` is non-null and points at a live SSL_CTX - // (C up-refs and stores it); `user` is an opaque caller-owned pointer - // stored verbatim by C. - unsafe { us_listen_socket_add_server_name(self, hostname.as_ptr(), ssl_ctx, user) == 0 } - } - - pub fn remove_server_name(&mut self, hostname: &core::ffi::CStr) { - // SAFETY: self and hostname are valid for the duration of the call. - unsafe { us_listen_socket_remove_server_name(self, hostname.as_ptr()) } - } - - /// Returns the raw userdata pointer registered via `add_server_name` for - /// `hostname`, cast to `*mut T`. Returned as `NonNull` (not `&mut T`) - /// because the pointee is caller-owned external storage — materializing a - /// `&mut T` here could alias the caller's own live reference to it. - pub fn find_server_name_userdata( - &mut self, - hostname: &core::ffi::CStr, - ) -> Option> { - // SAFETY: self and hostname valid; caller guarantees the stored userdata - // is a *T. - let p = unsafe { us_listen_socket_find_server_name_userdata(self, hostname.as_ptr()) }; - NonNull::new(p.cast::()) - } - - pub fn on_server_name( - &mut self, - cb: extern "C" fn(*mut ListenSocket, *const c_char, *mut c_int, *mut c_void) -> *mut c_void, - ) { - us_listen_socket_on_server_name(self, cb) - } -} - -// This file IS the *_sys crate, so externs live here. -// `ListenSocket` is `#[repr(C)]` with `UnsafeCell<[u8; 0]>`, so `&mut -// ListenSocket` is ABI-identical to a non-null pointer; value-typed shims are -// `safe fn`. Shims with nullable raw / ctx ptr stay unsafe. -unsafe extern "C" { - safe fn us_listen_socket_close(ls: &mut ListenSocket); - safe fn us_listen_socket_group(ls: &mut ListenSocket) -> *mut SocketGroup; - safe fn us_listen_socket_ext(ls: &mut ListenSocket) -> *mut c_void; - safe fn us_listen_socket_get_fd(ls: &mut ListenSocket) -> LIBUS_SOCKET_DESCRIPTOR; - fn us_listen_socket_add_server_name( - ls: *mut ListenSocket, - hostname: *const c_char, - ssl_ctx: *mut SslCtx, - user: *mut c_void, - ) -> c_int; - fn us_listen_socket_remove_server_name(ls: *mut ListenSocket, hostname: *const c_char); - fn us_listen_socket_find_server_name_userdata( - ls: *mut ListenSocket, - hostname: *const c_char, - ) -> *mut c_void; - safe fn us_listen_socket_on_server_name( - ls: &mut ListenSocket, - cb: extern "C" fn(*mut ListenSocket, *const c_char, *mut c_int, *mut c_void) -> *mut c_void, - ); -} diff --git a/src/uws_sys/Loop.rs b/src/uws_sys/Loop.rs deleted file mode 100644 index 8a6a20a8320b..000000000000 --- a/src/uws_sys/Loop.rs +++ /dev/null @@ -1,672 +0,0 @@ -use core::ffi::{c_int, c_uint, c_void}; - -use crate::InternalLoopData; -use crate::Timespec; - -#[cfg(windows)] -use bun_libuv_sys as uv; - -bun_core::declare_scope!(Loop, visible); - -// ───────────────────────────── PosixLoop ───────────────────────────── - -// Mirrors C `struct us_loop_t` (packages/bun-usockets/src/internal/eventing/ -// epoll_kqueue.h). The C struct has `alignas(LIBUS_EXT_ALIGNMENT /* 16 */)` on -// both `data` and `ready_polls`; Rust cannot align individual fields, so the -// struct head gets `#[repr(C, align(16))]` and `ready_polls` is preceded by a -// zero-sized align(16) field that forces the same offset rounding the C -// `alignas` performs (`libc::epoll_event` is `packed`/align(1) on x86-64 -// Linux, so the element type alone would not pad). Layout is verified by the -// static assertions below the struct. -#[repr(C, align(16))] -pub struct PosixLoop { - pub internal_loop_data: InternalLoopData, - - /// Number of non-fallthrough polls in the loop - pub num_polls: i32, - - /// Number of ready polls this iteration - pub num_ready_polls: i32, - - /// Current index in list of ready polls - pub current_ready_poll: i32, - - /// Loop's own file descriptor - pub fd: i32, - - /// Number of polls owned by Bun - pub active: u32, - - /// Incremented atomically by wakeup(), swapped to 0 before epoll/kqueue. - /// If non-zero, the event loop will return immediately so we can skip the GC safepoint. - pub pending_wakeups: u32, - - /// Forces `ready_polls` to the next 16-byte boundary, matching the C - /// `alignas(LIBUS_EXT_ALIGNMENT)` on `us_loop_t::ready_polls`. - _ready_polls_align: ReadyPollsAlign, - - /// The list of ready polls - pub ready_polls: [EventType; 1024], -} - -/// Zero-sized, 16-byte-aligned marker field type (see `_ready_polls_align`). -/// The zero-length array member keeps `improper_ctypes` satisfied (a -/// field-less struct is rejected in `extern` signatures) without changing -/// size (still 0) or alignment. -#[repr(C, align(16))] -struct ReadyPollsAlign { - _unused: [u8; 0], -} - -// Static layout verification against the C `us_loop_t` rules: scalar fields -// packed after `data`, `ready_polls` at the next 16-byte boundary, struct size -// padded to its 16-byte alignment. -#[cfg(not(windows))] -const _: () = { - use core::mem::{align_of, offset_of, size_of}; - assert!(align_of::() == 16); - assert!(offset_of!(PosixLoop, num_polls) == size_of::()); - assert!(offset_of!(PosixLoop, num_ready_polls) == offset_of!(PosixLoop, num_polls) + 4); - assert!(offset_of!(PosixLoop, current_ready_poll) == offset_of!(PosixLoop, num_polls) + 8); - assert!(offset_of!(PosixLoop, fd) == offset_of!(PosixLoop, num_polls) + 12); - assert!(offset_of!(PosixLoop, active) == offset_of!(PosixLoop, num_polls) + 16); - assert!(offset_of!(PosixLoop, pending_wakeups) == offset_of!(PosixLoop, num_polls) + 20); - assert!( - offset_of!(PosixLoop, ready_polls) - == (offset_of!(PosixLoop, pending_wakeups) + 4).next_multiple_of(16) - ); - assert!( - size_of::() - == (offset_of!(PosixLoop, ready_polls) + 1024 * size_of::()) - .next_multiple_of(16) - ); -}; - -// Android shares the Linux kernel's epoll ABI (uSockets' `epoll_kqueue.h` only -// branches on `LIBUS_USE_EPOLL` vs `LIBUS_USE_KQUEUE`, not on libc). -#[cfg(any(target_os = "linux", target_os = "android"))] -pub type EventType = libc::epoll_event; -#[cfg(target_os = "macos")] -pub type EventType = libc::kevent64_s; -// usockets aliases kevent64_s → struct kevent on FreeBSD (epoll_kqueue.h), -// so ready_polls is `struct kevent[1024]` there. -#[cfg(target_os = "freebsd")] -pub type EventType = libc::kevent; -// TODO: -#[cfg(windows)] -pub type EventType = *mut c_void; - -/// Loop handler trait with optional `pre`/`post` hooks. Implementors override -/// `PRE`/`POST` if they have them. -pub trait LoopHandler { - const WAKEUP: unsafe extern "C" fn(*mut Loop); - const PRE: Option = None; - const POST: Option = None; -} - -// `impl PosixLoop` is posix-only: every method calls into `c::*` whose -// signatures are typed `*mut Loop`, and on Windows `Loop = WindowsLoop` so -// `&mut PosixLoop` does not coerce. Windows callers go through the -// `impl WindowsLoop` block below (same surface, different routing). -#[cfg(not(windows))] -impl PosixLoop { - pub fn uncork(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::uws_res_clear_corked_socket(self) }; - } - - pub fn update_date(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::uws_loop_date_header_timer_update(self) }; - } - - pub fn iteration_number(&self) -> u64 { - self.internal_loop_data.iteration_nr - } - - /// Copy out the ready-poll event at `current_ready_poll`. - /// - /// Safe back-reference accessor consolidating the C-dispatch - /// `(*loop_).ready_polls[(*loop_).current_ready_poll]` raw-deref pattern - /// into one short-lived `&self` borrow. `EventType` is POD (`epoll_event` - /// / `kevent64_s` / `kevent` — all `Copy` in `libc`), so the by-value - /// return is a stack copy the caller may borrow across re-entrant handler - /// dispatch without aliasing the loop. - #[inline] - pub fn current_ready_event(&self) -> EventType { - let idx = usize::try_from(self.current_ready_poll).expect("int cast"); - self.ready_polls[idx] - } - - pub fn inc(&mut self) { - bun_core::scoped_log!(Loop, "inc {} + 1 = {}", self.num_polls, self.num_polls + 1); - self.num_polls += 1; - } - - pub fn dec(&mut self) { - bun_core::scoped_log!(Loop, "dec {} - 1 = {}", self.num_polls, self.num_polls - 1); - self.num_polls -= 1; - } - - pub fn ref_(&mut self) { - bun_core::scoped_log!( - Loop, - "ref {} + 1 = {} | {} + 1 = {}", - self.num_polls, - self.num_polls + 1, - self.active, - self.active + 1 - ); - self.num_polls += 1; - self.active += 1; - } - - pub fn unref(&mut self) { - bun_core::scoped_log!( - Loop, - "unref {} - 1 = {} | {} - 1 = {}", - self.num_polls, - self.num_polls - 1, - self.active, - self.active.saturating_sub(1) - ); - self.num_polls -= 1; - self.active = self.active.saturating_sub(1); - } - - pub fn is_active(&self) -> bool { - self.active > 0 - } - - // This exists as a method so that we can stick a debugger in here - pub fn add_active(&mut self, value: u32) { - bun_core::scoped_log!( - Loop, - "add {} + {} = {}", - self.active, - value, - self.active.saturating_add(value) - ); - self.active = self.active.saturating_add(value); - } - - // This exists as a method so that we can stick a debugger in here - pub fn sub_active(&mut self, value: u32) { - bun_core::scoped_log!( - Loop, - "sub {} - {} = {}", - self.active, - value, - self.active.saturating_sub(value) - ); - self.active = self.active.saturating_sub(value); - } - - pub fn unref_count(&mut self, count: i32) { - bun_core::scoped_log!(Loop, "unref x {}", count); - self.num_polls -= count; - self.active = self - .active - .saturating_sub(u32::try_from(count).expect("int cast")); - } - - pub fn get() -> *mut Loop { - c::uws_get_loop() - } - - /// Packetize HTTP/3 stream writes that happened since the last - /// process_conns. Early-returns when nothing wrote, so safe to call - /// from drainMicrotasks without per-iteration cost. - pub fn drain_quic_if_necessary(&mut self) { - if self.internal_loop_data.quic_head.is_null() { - return; - } - // SAFETY: self is a valid loop pointer - unsafe { c::us_quic_loop_flush_if_pending(self) }; - } - - pub fn create() -> *mut Loop { - // SAFETY: us_create_loop allocates and returns a new loop; null hint is valid - let p = unsafe { - c::us_create_loop(core::ptr::null_mut(), Some(H::WAKEUP), H::PRE, H::POST, 0) - }; - assert!(!p.is_null(), "us_create_loop returned null"); - p - } - - pub fn wakeup(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_wakeup_loop(self) }; - } - - #[inline] - pub fn wake(&mut self) { - self.wakeup(); - } - - pub fn tick(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_run_bun_tick(self, core::ptr::null()) }; - } - - pub fn tick_without_idle(&mut self) { - let timespec = Timespec { sec: 0, nsec: 0 }; - // SAFETY: self is a valid loop pointer; ×pec lives for the call - unsafe { c::us_loop_run_bun_tick(self, &raw const timespec) }; - } - - pub fn tick_with_timeout(&mut self, timespec: Option<&Timespec>) { - // SAFETY: self is a valid loop pointer - unsafe { - c::us_loop_run_bun_tick(self, timespec.map_or(core::ptr::null(), std::ptr::from_ref)) - }; - } - - /// Free everything queued on `loop->data.closed_head` / - /// `closed_connecting_head`. Normally `loop_post()` does this once per - /// tick; at process/Worker teardown the loop has stopped, so - /// `closeAllSocketGroups()` must drain it explicitly or every just-closed - /// `us_socket_t` (libc-allocated) shows up as an LSAN leak. - pub fn drain_closed_sockets(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_internal_free_closed_sockets(self) }; - } - - /// `us_socket_group_close_all()` on every group currently linked to this - /// loop — covers Listener/App-owned groups that `RareData`'s static field - /// list doesn't enumerate. Returns whether any group was linked. - pub fn close_all_groups(&mut self) -> bool { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_close_all_groups(self) != 0 } - } - - // Rust cannot monomorphize an `extern "C"` fn over a fn-pointer const generic on stable, - // so callers provide the C-ABI trampoline directly. - pub fn next_tick( - &mut self, - user_data: *mut c_void, - defer_callback: unsafe extern "C" fn(*mut c_void), - ) { - // SAFETY: self is a valid loop pointer; user_data lifetime is caller's responsibility - unsafe { c::uws_loop_defer(self, user_data, defer_callback) }; - } - - // Same trampoline-synthesis limitation as `next_tick` — callers pass the - // C-ABI callback directly. The returned `Handler` stores it for later removal. - // - // Takes `this: *mut Self` (not `&mut self`) so the stored `Handler.loop_` inherits the - // long-lived raw-pointer provenance from `us_create_loop`/`uws_get_loop`. Routing through - // a `&mut self` reborrow would bound the stored pointer's provenance to this call, and any - // subsequent `&mut`/`&` to the C-owned singleton would invalidate it under Stacked Borrows, - // making the later FFI write in `Handler::remove_*` UB. - /// # Safety - /// `this` must be the live C-allocated loop pointer returned by - /// `us_create_loop`/`uws_get_loop` (not derived from a `&mut` reborrow). - pub unsafe fn add_post_handler( - this: *mut Self, - ctx: *mut c_void, - callback: unsafe extern "C" fn(*mut c_void, *mut Loop), - ) -> Handler { - // SAFETY: `this` is the live C-allocated loop pointer per fn contract. - unsafe { c::uws_loop_addPostHandler(this, ctx, callback) }; - Handler { - loop_: this, - ctx, - callback, - } - } - - /// # Safety - /// `this` must be the live C-allocated loop pointer returned by - /// `us_create_loop`/`uws_get_loop` (not derived from a `&mut` reborrow). - pub unsafe fn add_pre_handler( - this: *mut Self, - ctx: *mut c_void, - callback: unsafe extern "C" fn(*mut c_void, *mut Loop), - ) -> Handler { - // SAFETY: `this` is the live C-allocated loop pointer per fn contract. - unsafe { c::uws_loop_addPreHandler(this, ctx, callback) }; - Handler { - loop_: this, - ctx, - callback, - } - } - - pub fn run(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_run(self) }; - } - - pub fn should_enable_date_header_timer(&self) -> bool { - self.internal_loop_data.should_enable_date_header_timer() - } - - /// FFI-destroy: `us_loop_free` frees the C-allocated loop itself. - /// Not `impl Drop` because the loop is C-owned (created by `us_create_loop`), - /// never lives as a Rust-owned value. - /// - /// # Safety - /// `this` must have been returned by `us_create_loop`/`uws_get_loop` and not - /// yet freed. - pub unsafe fn destroy(this: *mut PosixLoop) { - // SAFETY: `this` was returned by us_create_loop/uws_get_loop and not yet freed - unsafe { c::us_loop_free(this) }; - } -} - -/// Stores the loop ref and the C-ABI callback so it can be unregistered later. -/// -/// Stores `*mut Loop` (not `&Loop`) -/// — the loop is C-owned/heap-allocated and the FFI remove calls mutate it, so a -/// shared `&Loop` would make the `*const → *mut` cast UB when written through. -pub struct Handler { - pub loop_: *mut Loop, - ctx: *mut c_void, - callback: unsafe extern "C" fn(*mut c_void, *mut Loop), -} - -impl Handler { - pub fn remove_post(&self) { - // SAFETY: `loop_` is the original C-allocated raw pointer (from - // `us_create_loop`/`uws_get_loop`) stored by `add_*_handler`, with provenance - // that outlives this Handler and permits mutation; callback was previously registered. - unsafe { c::uws_loop_removePostHandler(self.loop_, self.ctx, self.callback) }; - } - - pub fn remove_pre(&self) { - // Intentionally calls `uws_loop_removePostHandler` here (likely an - // upstream bug); preserving longstanding behavior verbatim. - // SAFETY: `loop_` is the original C-allocated raw pointer (from - // `us_create_loop`/`uws_get_loop`) stored by `add_*_handler`, with provenance - // that outlives this Handler and permits mutation; callback was previously registered. - unsafe { c::uws_loop_removePostHandler(self.loop_, self.ctx, self.callback) }; - } -} - -// ───────────────────────────── WindowsLoop ───────────────────────────── - -#[cfg(windows)] -#[repr(C, align(16))] -pub struct WindowsLoop { - pub internal_loop_data: InternalLoopData, - - pub uv_loop: *mut uv::Loop, - pub is_default: c_int, - pub pre: *mut uv::uv_prepare_t, - pub check: *mut uv::uv_check_t, -} - -#[cfg(windows)] -impl WindowsLoop { - pub fn should_enable_date_header_timer(&self) -> bool { - self.internal_loop_data.should_enable_date_header_timer() - } - - pub fn uncork(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::uws_res_clear_corked_socket(self) }; - } - - pub fn get() -> *mut WindowsLoop { - // SAFETY: uv::Loop::get() returns the libuv default loop; uws wraps it - unsafe { c::uws_get_loop_with_native(uv::Loop::get() as *mut c_void) } - } - - pub fn iteration_number(&self) -> u64 { - self.internal_loop_data.iteration_nr - } - - /// Shared borrow of the backing libuv loop. - /// - /// `uv_loop` is a back-reference set once by C `us_create_loop` and never - /// reassigned for the `WindowsLoop`'s lifetime, so projecting `&uv::Loop` - /// from `&self` is sound. Consolidates the `unsafe { (*self.uv_loop).… }` - /// pattern (one `unsafe`, N safe callers). - #[inline] - pub fn uv(&self) -> &uv::Loop { - // SAFETY: `uv_loop` is non-null after `us_create_loop` and remains - // valid for the entire lifetime of `*self`; `&self` bounds the - // returned borrow so it cannot outlive the wrapper. - unsafe { &*self.uv_loop } - } - - /// Exclusive borrow of the backing libuv loop. Used only for the - /// `active_handles` bookkeeping field (Bun-private; libuv itself only - /// reads it inside `uv__loop_alive`). `&mut self` provides exclusivity - /// over the wrapper; the `uv_loop_t` is the per-thread singleton so no - /// other Rust `&mut` to it is live on this thread. - #[inline] - fn uv_mut(&mut self) -> &mut uv::Loop { - // SAFETY: see `uv()` for liveness; `&mut self` is the sole Rust - // borrow path to the wrapper, and the only mutation performed via - // this accessor is the `active_handles` counter. - unsafe { &mut *self.uv_loop } - } - - pub fn add_active(&mut self, val: u32) { - self.uv_mut().add_active(val); - } - - pub fn sub_active(&mut self, val: u32) { - self.uv_mut().sub_active(val); - } - - pub fn is_active(&self) -> bool { - self.uv().is_active() - } - - pub fn wakeup(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_wakeup_loop(self) }; - } - - #[inline] - pub fn wake(&mut self) { - self.wakeup(); - } - - pub fn tick_with_timeout(&mut self, _: Option<&Timespec>) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_run(self) }; - } - - pub fn tick_without_idle(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_pump(self) }; - } - - pub fn drain_quic_if_necessary(&mut self) { - if self.internal_loop_data.quic_head.is_null() { - return; - } - // SAFETY: self is a valid loop pointer - unsafe { c::us_quic_loop_flush_if_pending(self) }; - } - - pub fn create() -> *mut WindowsLoop { - // SAFETY: us_create_loop allocates and returns a new loop; null hint is valid - let p = unsafe { - c::us_create_loop(core::ptr::null_mut(), Some(H::WAKEUP), H::PRE, H::POST, 0) - }; - assert!(!p.is_null(), "us_create_loop returned null"); - p - } - - pub fn run(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_run(self) }; - } - - // TODO: remove these two aliases - #[inline] - pub fn tick(&mut self) { - self.run(); - } - #[inline] - pub fn wait(&mut self) { - self.run(); - } - - pub fn inc(&mut self) { - self.uv_mut().inc(); - } - - pub fn dec(&mut self) { - self.uv_mut().dec(); - } - - #[inline] - pub fn ref_(&mut self) { - self.inc(); - } - #[inline] - pub fn unref(&mut self) { - self.dec(); - } - - pub fn drain_closed_sockets(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::us_internal_free_closed_sockets(self) }; - } - - pub fn close_all_groups(&mut self) -> bool { - // SAFETY: self is a valid loop pointer - unsafe { c::us_loop_close_all_groups(self) != 0 } - } - - // See PosixLoop::next_tick — same trampoline-synthesis limitation. - pub fn next_tick( - &mut self, - user_data: *mut c_void, - defer_callback: unsafe extern "C" fn(*mut c_void), - ) { - // SAFETY: self is a valid loop pointer; user_data lifetime is caller's responsibility - unsafe { c::uws_loop_defer(self, user_data, defer_callback) }; - } - - pub fn update_date(&mut self) { - // SAFETY: self is a valid loop pointer - unsafe { c::uws_loop_date_header_timer_update(self) }; - } - - /// # Safety - /// `this` must have been returned by `us_create_loop`/`uws_get_loop_with_native` - /// and not yet freed. - pub unsafe fn destroy(this: *mut WindowsLoop) { - // SAFETY: `this` was returned by us_create_loop/uws_get_loop_with_native and not yet freed - unsafe { c::us_loop_free(this) }; - } - - // See PosixLoop::add_post_handler — same trampoline-synthesis limitation. - // Takes `this: *mut Self` (not `&mut self`) so the stored `Handler.loop_` inherits the - // long-lived raw-pointer provenance from `us_create_loop`/`uws_get_loop_with_native` - // rather than a transient `&mut` reborrow (which Stacked Borrows would invalidate on the - // next access to the C-owned singleton). - /// # Safety - /// `this` must be the live C-allocated loop pointer returned by - /// `us_create_loop`/`uws_get_loop_with_native` (not derived from a `&mut` reborrow). - pub unsafe fn add_post_handler( - this: *mut Self, - ctx: *mut c_void, - callback: unsafe extern "C" fn(*mut c_void, *mut Loop), - ) -> Handler { - // SAFETY: `this` is the live C-allocated loop pointer per fn contract. - unsafe { c::uws_loop_addPostHandler(this, ctx, callback) }; - Handler { - loop_: this, - ctx, - callback, - } - } - - /// # Safety - /// `this` must be the live C-allocated loop pointer returned by - /// `us_create_loop`/`uws_get_loop_with_native` (not derived from a `&mut` reborrow). - pub unsafe fn add_pre_handler( - this: *mut Self, - ctx: *mut c_void, - callback: unsafe extern "C" fn(*mut c_void, *mut Loop), - ) -> Handler { - // SAFETY: `this` is the live C-allocated loop pointer per fn contract. - unsafe { c::uws_loop_addPreHandler(this, ctx, callback) }; - Handler { - loop_: this, - ctx, - callback, - } - } -} - -// ───────────────────────────── Loop alias ───────────────────────────── - -#[cfg(windows)] -pub type Loop = WindowsLoop; -#[cfg(not(windows))] -pub type Loop = PosixLoop; - -// ───────────────────────────── extern "C" ───────────────────────────── - -pub(crate) type LoopCb = unsafe extern "C" fn(*mut Loop); -pub(crate) type LoopCtxCb = unsafe extern "C" fn(ctx: *mut c_void, loop_: *mut Loop); -pub(crate) type DeferCb = unsafe extern "C" fn(ctx: *mut c_void); - -#[allow(non_snake_case)] -mod c { - use super::*; - - // `Loop` (= `PosixLoop`/`WindowsLoop`) is a sized `#[repr(C)]` mirror of the - // C struct (NOT an opaque ZST with `UnsafeCell`), so the safe-fn-with-`&mut` - // pattern does not apply: `&mut Loop` at the FFI boundary would emit LLVM - // `noalias` over real fields, and the reentrant callees (`us_loop_run`, - // `us_loop_close_all_groups`, …) dispatch Rust callbacks that touch the same - // loop via `Loop::get()`. Keep all loop-taking decls as raw `*mut Loop`. - unsafe extern "C" { - pub(super) fn us_create_loop( - hint: *mut c_void, - wakeup_cb: Option, - pre_cb: Option, - post_cb: Option, - ext_size: c_uint, - ) -> *mut Loop; - pub(super) fn us_loop_free(loop_: *mut Loop); - pub(super) fn us_quic_loop_flush_if_pending(loop_: *mut Loop); - pub fn us_loop_run(loop_: *mut Loop); - #[cfg(windows)] - pub(super) fn us_loop_pump(loop_: *mut Loop); - pub fn us_wakeup_loop(loop_: *mut Loop); - pub(super) fn uws_loop_addPostHandler(loop_: *mut Loop, ctx: *mut c_void, cb: LoopCtxCb); - pub(super) fn uws_loop_removePostHandler(loop_: *mut Loop, ctx: *mut c_void, cb: LoopCtxCb); - pub(super) fn uws_loop_addPreHandler(loop_: *mut Loop, ctx: *mut c_void, cb: LoopCtxCb); - #[cfg(not(windows))] - pub(super) fn us_loop_run_bun_tick(loop_: *mut Loop, timeout_ms: *const Timespec); - pub(super) fn us_internal_free_closed_sockets(loop_: *mut Loop); - pub(super) fn us_loop_close_all_groups(loop_: *mut Loop) -> c_int; - #[cfg(not(windows))] - pub(super) safe fn uws_get_loop() -> *mut Loop; - #[cfg(windows)] - pub(super) fn uws_get_loop_with_native(native: *mut c_void) -> *mut WindowsLoop; - pub(super) fn uws_loop_defer(loop_: *mut Loop, ctx: *mut c_void, cb: DeferCb); - pub(super) fn uws_res_clear_corked_socket(loop_: *mut Loop); - pub(super) fn uws_loop_date_header_timer_update(loop_: *mut Loop); - } -} -// Re-exported raw externs for cross-thread callers (e.g. bun_http's -// `HTTPThread::wakeup`, bun_io's `WindowsWaker`) that hold only a `*mut Loop` -// and MUST NOT form a `&mut Loop` via `Loop::wakeup`/`Loop::run` — see the -// noalias warning on `mod c` above. `us_loop_run` is included because the -// event-loop thread parks inside it while worker threads call -// `us_wakeup_loop` concurrently; routing either through a `&mut self` -// receiver would create two live `&mut Loop` to the same singleton (UB). -pub use c::{us_loop_run, us_wakeup_loop}; - -unsafe extern "C" { - // safe: no args; clears the C side's thread-local loop pointer — no preconditions. - safe fn bun_clear_loop_at_thread_exit(); -} - -/// Clears the C side's thread-local loop pointer. Call when a thread that ran -/// a uws loop (e.g. a Worker thread) exits. -pub fn on_thread_exit() { - bun_clear_loop_at_thread_exit() -} diff --git a/src/uws_sys/SocketContext.rs b/src/uws_sys/SocketContext.rs deleted file mode 100644 index 01c214b0b098..000000000000 --- a/src/uws_sys/SocketContext.rs +++ /dev/null @@ -1,335 +0,0 @@ -//! Legacy home of the `us_socket_context_t` opaque, which is gone — sockets -//! now belong to embedded `SocketGroup`s and dispatch by `kind`. What remains -//! here is the `us_bun_socket_context_options_t` extern mirror, kept under its -//! old name so `SSLConfig.asUSockets()` callers don't churn. - -use core::ffi::{c_char, c_long}; -use core::ptr; - -use bun_boringssl_sys::SSL_CTX; - -use crate::create_bun_socket_error_t; - -/// `[mtime_sec, mtime_nsec, size]` for the SSL cache-key digest. -/// Body moved DOWN from `bun_sys` — it only needs `libc::stat`, which this -/// crate already links, so the former link-time hook bought nothing. Returns -/// `None` on stat failure (digest feeds zeros — `create_ssl_context` will then -/// fail on the same path and the entry never reaches the cache). -#[cfg(unix)] -fn stat_for_digest(path: &bun_core::ZStr) -> Option<[i64; 3]> { - // SAFETY: POD, zero-valid — `libc::stat` is all-integer; `stat(2)` writes it. - let mut st: libc::stat = bun_core::ffi::zeroed(); - // SAFETY: `path` is NUL-terminated (ZStr invariant). - let rc = unsafe { libc::stat(path.as_ptr().cast::(), &raw mut st) }; - if rc != 0 { - return None; - } - // libc exposes mtime as `st_mtime` (sec) + `st_mtime_nsec` (nsec) on - // Linux/BSD/macOS. Widen to i64 (already i64 on LP64; cast is a no-op). - Some([ - st.st_mtime as i64, - st.st_mtime_nsec as i64, - st.st_size as i64, - ]) -} - -#[cfg(windows)] -fn stat_for_digest(path: &bun_core::ZStr) -> Option<[i64; 3]> { - use bun_windows_sys as fs; - use bun_windows_sys::FILETIME; - // Spec parity: `bun.sys.stat` on Windows is libuv `uv_fs_stat`, which opens - // via `CreateFileW` *without* `FILE_FLAG_OPEN_REPARSE_POINT` and therefore - // follows symlinks to the target. `GetFileAttributesExW` does NOT follow - // reparse points — it would return the link's own mtime/size and miss an - // in-place cert rotation behind a symlink (stale SSL_CTX served). Match - // libuv: open query-only, `GetFileInformationByHandle`, close. - // - // `bun_core::to_w_path_normalized` lives above this crate, so widen - // inline: UTF-8→UTF-16LE (≤ input.len() code units), normalize `/`→`\`, - // NUL-terminate. Heap-allocated (cold init path; avoids a 64KB stack - // `WPathBuffer` and the wrong-unit `MAX_PATH_BYTES` previously used here). - let bytes = path.as_bytes(); - let mut wbuf = vec![0u16; bytes.len() + 1]; - let n = bun_core::strings::convert_utf8_to_utf16_in_buffer(&mut wbuf, bytes).len(); - bun_paths::slashes_to_windows_in_place(&mut wbuf[..n]); - wbuf[n] = 0; - // SAFETY: `wbuf` is NUL-terminated at `[n]`. dwDesiredAccess=0 is query- - // only (metadata). FILE_FLAG_BACKUP_SEMANTICS lets this succeed on dirs; - // omitting FILE_FLAG_OPEN_REPARSE_POINT makes CreateFileW follow symlinks. - let h = unsafe { - fs::CreateFileW( - wbuf.as_ptr(), - 0, - fs::FILE_SHARE_READ | fs::FILE_SHARE_WRITE | fs::FILE_SHARE_DELETE, - ptr::null_mut(), - fs::OPEN_EXISTING, - fs::FILE_FLAG_BACKUP_SEMANTICS, - ptr::null_mut(), - ) - }; - if h == fs::INVALID_HANDLE_VALUE { - return None; - } - let mut data: fs::BY_HANDLE_FILE_INFORMATION = bun_core::ffi::zeroed(); - // SAFETY: `h` is a valid open handle; `data` is a valid out-ptr. - let ok = unsafe { fs::GetFileInformationByHandle(h, &raw mut data) }; - // SAFETY: `h` is a valid open handle from CreateFileW above. - unsafe { fs::CloseHandle(h) }; - if ok == 0 { - return None; - } - let ft: FILETIME = data.ftLastWriteTime; - // FILETIME = 100ns ticks since 1601-01-01. Feed raw ticks split as - // `[sec_field, nsec_field, size]` — the digest only needs *some* - // deterministic encoding of mtime, not the libuv POSIX-epoch split the - // deleted `__bun_uws_stat_file` produced. The SSL-context cache keyed on - // this digest is in-memory process-lifetime only (no on-disk - // persistence), so cross-version byte-compat of the key is - // irrelevant; only stability *within* a process matters. - let ticks = (u64::from(ft.dwHighDateTime) << 32) | u64::from(ft.dwLowDateTime); - let size = (u64::from(data.nFileSizeHigh) << 32) | u64::from(data.nFileSizeLow); - Some([ - (ticks / 10_000_000) as i64, - (ticks % 10_000_000) as i64 * 100, - size as i64, - ]) -} - -#[repr(C)] -#[derive(Clone, Copy)] -pub struct BunSocketContextOptions { - pub key_file_name: *const c_char, - pub cert_file_name: *const c_char, - pub passphrase: *const c_char, - pub dh_params_file_name: *const c_char, - pub ca_file_name: *const c_char, - pub ssl_ciphers: *const c_char, - pub ssl_prefer_low_memory_usage: i32, - pub key: *const *const c_char, - pub key_count: u32, - pub cert: *const *const c_char, - pub cert_count: u32, - pub ca: *const *const c_char, - pub ca_count: u32, - pub secure_options: u32, - pub ssl_min_version: i32, - pub ssl_max_version: i32, - pub reject_unauthorized: i32, - pub request_cert: i32, - pub client_renegotiation_limit: u32, - pub client_renegotiation_window: u32, -} - -impl Default for BunSocketContextOptions { - fn default() -> Self { - Self { - key_file_name: ptr::null(), - cert_file_name: ptr::null(), - passphrase: ptr::null(), - dh_params_file_name: ptr::null(), - ca_file_name: ptr::null(), - ssl_ciphers: ptr::null(), - ssl_prefer_low_memory_usage: 0, - key: ptr::null(), - key_count: 0, - cert: ptr::null(), - cert_count: 0, - ca: ptr::null(), - ca_count: 0, - secure_options: 0, - ssl_min_version: 0, - ssl_max_version: 0, - reject_unauthorized: 0, - request_cert: 0, - client_renegotiation_limit: 3, - client_renegotiation_window: 600, - } - } -} - -impl BunSocketContextOptions { - /// Build a BoringSSL `SSL_CTX*` from these options. Caller owns one ref - /// and releases with `SSL_CTX_free` — the passphrase is freed inside this - /// call once private-key load completes, so plain `SSL_CTX_free` is - /// correct on every path. - /// - /// Mode-neutral: the same `SSL_CTX*` may back client connects and server - /// accepts. CTX-level verify mode comes from `request_cert`/`ca`/ - /// `reject_unauthorized` here; the per-socket client override (always run - /// chain validation, populate verify_error) is applied in - /// `us_internal_ssl_attach`, so a server reusing this ctx never sends - /// CertificateRequest unless these options asked it to. - pub fn create_ssl_context(self, err: &mut create_bun_socket_error_t) -> Option<*mut SSL_CTX> { - // SAFETY: FFI call; `self` is `#[repr(C)]` and passed by value, `err` is a valid out-param. - let ctx = unsafe { c::us_ssl_ctx_from_options(self, err) }; - if ctx.is_null() { None } else { Some(ctx) } - } - - /// SHA-256 over every field this struct carries, dereferencing string - /// pointers so the digest is content-addressed (not pointer-addressed). - /// Two option structs that build the same `SSL_CTX*` produce the same - /// digest. Used as the key for `SSLContextCache`. - pub fn digest(&self) -> [u8; 32] { - let mut h = Sha256::init(); - - let feed_z = |hp: &mut Sha256, s: *const c_char| { - // Presence byte so null ≠ "" — both would otherwise feed only - // the trailing 0. In practice "" usually fails create_ssl_context - // and never caches, but injectivity is cheap to guarantee. - hp.update(&[(!s.is_null()) as u8]); - if !s.is_null() { - // SAFETY: caller-provided NUL-terminated C string. - hp.update(unsafe { bun_core::ffi::cstr(s) }.to_bytes()); - } - hp.update(&[0]); // terminator so {a:"xy"} ≠ {a:"x",b:"y"} - }; - - let feed_arr = |hp: &mut Sha256, arr: *const *const c_char, n: u32| { - hp.update(&[(!arr.is_null()) as u8]); - hp.update(bun_core::bytes_of(&n)); - if !arr.is_null() { - // SAFETY: `arr` points to `n` (possibly null) C strings. - let slice = unsafe { bun_core::ffi::slice(arr, n as usize) }; - for &s in slice { - hp.update(&[(!s.is_null()) as u8]); - if !s.is_null() { - // SAFETY: NUL-terminated C string. - hp.update(unsafe { bun_core::ffi::cstr(s) }.to_bytes()); - } - hp.update(&[0]); - } - } - hp.update(&[0]); - }; - - // File-backed fields: feed path + (mtime, size) so an in-place cert - // rotation produces a fresh digest. stat() is ~1µs and only runs when - // the file form is used (Bun-specific; node:tls always passes inline - // bytes). On stat failure we feed zeros — `create_ssl_context` will fail - // on the same path and the entry never reaches the cache. - let feed_path = |hp: &mut Sha256, s: *const c_char| { - hp.update(&[(!s.is_null()) as u8]); - if !s.is_null() { - // SAFETY: NUL-terminated C string. - let bytes = unsafe { bun_core::ffi::cstr(s) }.to_bytes(); - // SAFETY: `s[bytes.len()] == 0` (CStr invariant) and `s[..len]` is readable. - let path = unsafe { bun_core::ZStr::from_raw(s.cast::(), bytes.len()) }; - hp.update(path.as_bytes()); - let mut meta: [i64; 3] = [0; 3]; - if !path.as_bytes().is_empty() { - if let Some(m) = stat_for_digest(path) { - meta = m; - } - } - hp.update(bun_core::bytes_of(&meta)); - } - hp.update(&[0]); - }; - - feed_path(&mut h, self.key_file_name); - feed_path(&mut h, self.cert_file_name); - feed_z(&mut h, self.passphrase); - feed_path(&mut h, self.dh_params_file_name); - feed_path(&mut h, self.ca_file_name); - feed_z(&mut h, self.ssl_ciphers); - h.update(bun_core::bytes_of(&self.ssl_prefer_low_memory_usage)); - feed_arr(&mut h, self.key, self.key_count); - feed_arr(&mut h, self.cert, self.cert_count); - feed_arr(&mut h, self.ca, self.ca_count); - h.update(bun_core::bytes_of(&self.secure_options)); - h.update(bun_core::bytes_of(&self.ssl_min_version)); - h.update(bun_core::bytes_of(&self.ssl_max_version)); - h.update(bun_core::bytes_of(&self.reject_unauthorized)); - h.update(bun_core::bytes_of(&self.request_cert)); - h.update(bun_core::bytes_of(&self.client_renegotiation_limit)); - h.update(bun_core::bytes_of(&self.client_renegotiation_window)); - let mut out = [0u8; 32]; - h.final_(&mut out); - out - } - - /// Best-effort byte count of cert/key/CA material — fed into - /// `SecureContext.memoryCost` so the GC sees the off-heap allocation. - pub fn approx_cert_bytes(&self) -> usize { - let mut n: usize = 0; - let sum = |arr: *const *const c_char, count: u32, n: &mut usize| { - if arr.is_null() { - return; - } - // SAFETY: `arr` points to `count` (possibly null) C strings. - let slice = unsafe { bun_core::ffi::slice(arr, count as usize) }; - for &s in slice { - if !s.is_null() { - // SAFETY: NUL-terminated C string. - *n += unsafe { bun_core::ffi::cstr(s) }.to_bytes().len(); - } - } - }; - sum(self.key, self.key_count, &mut n); - sum(self.cert, self.cert_count, &mut n); - sum(self.ca, self.ca_count, &mut n); - n - } -} - -/// Thin SHA-256 wrapper over the raw `bun_boringssl_sys` FFI. No higher-tier -/// `bun_boringssl::Sha256` exists yet; this stays local until one does. -struct Sha256(core::mem::MaybeUninit); -impl Sha256 { - #[inline] - fn init() -> Self { - let mut ctx = core::mem::MaybeUninit::::uninit(); - // SAFETY: SHA256_Init writes the full ctx; never reads uninit bytes. - unsafe { bun_boringssl_sys::SHA256_Init(ctx.as_mut_ptr()) }; - Self(ctx) - } - #[inline] - fn update(&mut self, data: &[u8]) { - // SAFETY: ctx was initialized in `init`; data is a valid readable slice. - unsafe { - bun_boringssl_sys::SHA256_Update( - self.0.as_mut_ptr(), - data.as_ptr().cast::(), - data.len(), - ) - }; - } - #[inline] - fn final_(&mut self, out: &mut [u8; 32]) { - // SAFETY: ctx was initialized in `init`; out has room for 32 bytes. - unsafe { bun_boringssl_sys::SHA256_Final(out.as_mut_ptr(), self.0.as_mut_ptr()) }; - } -} - -pub mod c { - use super::*; - unsafe extern "C" { - pub(crate) fn us_ssl_ctx_from_options( - options: BunSocketContextOptions, - err: *mut create_bun_socket_error_t, - ) -> *mut SSL_CTX; - // safe: no args; reads a process-global counter — no preconditions. - pub safe fn us_ssl_ctx_live_count() -> c_long; - /// Appends the certificates in the NUL-terminated PEM `content` to - /// `ctx`'s trust store; returns 0 when nothing could be added. - pub fn us_ssl_ctx_add_ca_cert( - ctx: *mut SSL_CTX, - content: *const core::ffi::c_char, - ) -> core::ffi::c_int; - /// Parses a PKCS#12 blob into malloc'd PEM key/cert/ca strings (the - /// caller frees them with libc free); returns 0 with a static - /// `err_reason` tag on failure. - pub fn us_ssl_parse_pkcs12( - data: *const core::ffi::c_char, - len: usize, - pass: *const core::ffi::c_char, - out_key: *mut *mut core::ffi::c_char, - out_key_len: *mut usize, - out_cert: *mut *mut core::ffi::c_char, - out_cert_len: *mut usize, - out_ca: *mut *mut core::ffi::c_char, - out_ca_len: *mut usize, - err_reason: *mut *const core::ffi::c_char, - ) -> core::ffi::c_int; - } -} diff --git a/src/uws_sys/SocketGroup.rs b/src/uws_sys/SocketGroup.rs deleted file mode 100644 index 5f79040e190c..000000000000 --- a/src/uws_sys/SocketGroup.rs +++ /dev/null @@ -1,384 +0,0 @@ -//! Rust mirror of `struct us_socket_group_t`. Embedded by value in its owner -//! (Listener, VirtualMachine, uWS App, HTTPThread) — never heap-allocated on -//! its own. The loop links it lazily on first socket and unlinks on last, so -//! unused kinds cost nothing. -//! -//! `#[repr(C)]` so field order/padding match the C definition exactly — this is -//! read/written directly by C (loop.c walks `head_sockets`/`iterator`, -//! context.c flips `linked`). - -use core::ffi::{c_char, c_int, c_void}; -use core::ptr; - -use crate::{ - ConnectingSocket, LIBUS_SOCKET_DESCRIPTOR, ListenSocket, Loop, SocketKind, SslCtx, - us_bun_verify_error_t, us_socket_t, -}; - -#[repr(C)] -pub struct SocketGroup { - pub loop_: *mut Loop, - pub vtable: Option<&'static VTable>, - /// Embedding owner — typed access via `owner()`. `*mut c_void` only - /// because the C ABI slot is heterogenous (Listener / uWS App / RareData / - /// null); never read this field directly — go through `owner::()`. - ext: *mut c_void, - pub head_sockets: *mut us_socket_t, - pub head_connecting_sockets: *mut ConnectingSocket, - pub head_listen_sockets: *mut ListenSocket, - pub iterator: *mut us_socket_t, - pub prev: *mut SocketGroup, - pub next: *mut SocketGroup, - pub global_tick: u32, - /// Sockets currently parked in `loop.data.low_prio_head` with - /// `s->group == this`. They are NOT in `head_sockets` while queued, so - /// `close_all`/`destroy` must account for them separately. - pub low_prio_count: u16, - pub timestamp: u8, - pub long_timestamp: u8, - pub linked: u8, -} - -#[repr(C)] -pub struct VTable { - pub on_open: - Option *mut us_socket_t>, - pub on_data: Option *mut us_socket_t>, - pub on_fd: Option *mut us_socket_t>, - pub on_writable: Option *mut us_socket_t>, - pub on_close: - Option *mut us_socket_t>, - pub on_timeout: Option *mut us_socket_t>, - pub on_long_timeout: Option *mut us_socket_t>, - pub on_end: Option *mut us_socket_t>, - pub on_connect_error: Option *mut us_socket_t>, - pub on_connecting_error: - Option *mut ConnectingSocket>, - pub on_handshake: - Option, -} - -// Must match `struct us_socket_group_t` in libusockets.h. -// 9 ptrs + u32 + u16 + 3×u8, padded to 8-byte alignment. -const _: () = assert!( - core::mem::size_of::() == 9 * core::mem::size_of::<*mut c_void>() + 16, - "SocketGroup layout drifted from us_socket_group_t" -); -const _: () = assert!( - core::mem::size_of::() == 11 * core::mem::size_of::<*mut c_void>(), - "VTable layout drifted from us_socket_vtable_t" -); - -// SAFETY: all-zero is a valid SocketGroup — every field is a raw pointer -// (null), `Option<&'static _>` (None via NPO), or an integer (0). -unsafe impl bun_core::ffi::Zeroable for SocketGroup {} -// SAFETY: all-zero is a valid VTable — every field is `Option` (None via NPO). -unsafe impl bun_core::ffi::Zeroable for VTable {} - -impl Default for SocketGroup { - fn default() -> Self { - bun_core::ffi::zeroed() - } -} - -impl Default for VTable { - fn default() -> Self { - bun_core::ffi::zeroed() - } -} - -pub enum ConnectResult { - Socket(*mut us_socket_t), - Connecting(*mut ConnectingSocket), - Failed, -} - -impl SocketGroup { - /// Initialise an embedded group. `owner_ptr` is what `group.owner::()` - /// recovers inside handlers — pass the embedding struct so dispatch can - /// find it from a raw `*us_socket_t`. - // Callers cast to `*mut c_void` at the call site. - pub fn init(&mut self, loop_: *mut Loop, vt: Option<&'static VTable>, owner_ptr: *mut c_void) { - // SAFETY: C initializes all fields of `self` in-place; `self` is a valid - // `#[repr(C)]` slot embedded in the caller. - unsafe { - us_socket_group_init( - self, - loop_, - match vt { - Some(v) => std::ptr::from_ref::(v), - None => ptr::null(), - }, - owner_ptr, - ); - } - } - - // Not `impl Drop`. SocketGroup is `#[repr(C)]`, embedded - // by-value in its owner, and its lifecycle is FFI-managed (C unlinks it - // from the loop). PORTING.md's #[repr(C)]-across-FFI exception applies: - // expose `unsafe fn destroy(*mut Self)` and have the owner call it - // explicitly during its own teardown. - /// - /// # Safety - /// `this` must point to a group previously passed to `init`; not called - /// concurrently with the loop walking this group. - pub unsafe fn destroy(this: *mut Self) { - // SAFETY: caller upholds the contract above. - unsafe { us_socket_group_deinit(this) } - } - - pub fn close_all(&mut self) { - // SAFETY: forwarding to C; `self` is a valid initialized group. - unsafe { us_socket_group_close_all(self) } - } - - /// Non-null after `init`. The fields stay nullable raw pointers only because - /// the struct is zero-init'd by default and read directly by C; these - /// accessors encode the post-init invariant. - pub fn get_loop(&self) -> *mut Loop { - debug_assert!(!self.loop_.is_null()); - self.loop_ - } - - /// Recover the embedding owner. Only valid for groups whose `init` passed a - /// non-null owner (Listener, uWS App/Context). Per-kind VM groups in - /// `RareData` pass null, so callers must know which they have. - /// - /// Returns a raw pointer; the cast itself is sound for any `T`. The caller - /// must still deref it with the correct `T` (the type whose pointer was - /// passed to `init`) — that obligation lives at the deref site, not here, - /// so this accessor is a safe fn. - pub fn owner(&self) -> *mut T { - debug_assert!(!self.ext.is_null()); - self.ext.cast::() - } - - pub fn is_empty(&self) -> bool { - self.head_sockets.is_null() - && self.head_connecting_sockets.is_null() - && self.head_listen_sockets.is_null() - && self.low_prio_count == 0 - } - - pub fn listen( - &mut self, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - host: Option<&core::ffi::CStr>, - port: c_int, - options: c_int, - socket_ext_size: c_int, - err: &mut c_int, - ) -> *mut ListenSocket { - // SAFETY: forwarding to C; all pointers are valid or null as documented. - unsafe { - us_socket_group_listen( - self, - kind as u8, - ssl_ctx.unwrap_or(ptr::null_mut()), - host.map_or(ptr::null(), |h| h.as_ptr()), - port, - options, - socket_ext_size, - err, - ) - } - } - - pub fn listen_unix( - &mut self, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - path: &[u8], - options: c_int, - socket_ext_size: c_int, - err: &mut c_int, - ) -> *mut ListenSocket { - // SAFETY: forwarding to C; `path` ptr+len derived from a valid slice. - unsafe { - us_socket_group_listen_unix( - self, - kind as u8, - ssl_ctx.unwrap_or(ptr::null_mut()), - path.as_ptr(), - path.len(), - options, - socket_ext_size, - err, - ) - } - } - - pub fn connect( - &mut self, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - host: &core::ffi::CStr, - port: c_int, - local_binding: Option<(&core::ffi::CStr, u16)>, - options: c_int, - socket_ext_size: c_int, - ) -> ConnectResult { - // context.c writes 1 here on the synchronous path (DNS already resolved - // → real `us_socket_t*` returned), 0 when it hands back a - // `us_connecting_socket_t*` placeholder. Named to match the C side so - // the branches read the right way round — see PR review #3161005603. - let mut has_dns_resolved: c_int = 0; - // SAFETY: forwarding to C; `host` is a valid NUL-terminated C string. - let ptr = unsafe { - us_socket_group_connect( - self, - kind as u8, - ssl_ctx.unwrap_or(ptr::null_mut()), - host.as_ptr(), - port, - local_binding.map_or(ptr::null(), |(h, _)| h.as_ptr()), - local_binding.map_or(0, |(_, p)| c_int::from(p)), - options, - socket_ext_size, - &raw mut has_dns_resolved, - ) - }; - if ptr.is_null() { - return ConnectResult::Failed; - } - if has_dns_resolved != 0 { - ConnectResult::Socket(ptr.cast::()) - } else { - ConnectResult::Connecting(ptr.cast::()) - } - } - - pub fn connect_unix( - &mut self, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - path: &[u8], - options: c_int, - socket_ext_size: c_int, - ) -> *mut us_socket_t { - // SAFETY: forwarding to C; `path` ptr+len derived from a valid slice. - unsafe { - us_socket_group_connect_unix( - self, - kind as u8, - ssl_ctx.unwrap_or(ptr::null_mut()), - path.as_ptr(), - path.len(), - options, - socket_ext_size, - ) - } - } - - pub fn from_fd( - &mut self, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - socket_ext_size: c_int, - fd: LIBUS_SOCKET_DESCRIPTOR, - ipc: bool, - ) -> *mut us_socket_t { - // SAFETY: forwarding to C. - unsafe { - us_socket_from_fd( - self, - kind as u8, - ssl_ctx.unwrap_or(ptr::null_mut()), - socket_ext_size, - fd, - ipc as c_int, - ) - } - } - - pub fn pair( - &mut self, - kind: SocketKind, - ext_size: c_int, - fds: &mut [LIBUS_SOCKET_DESCRIPTOR; 2], - ) -> *mut us_socket_t { - // SAFETY: forwarding to C; `fds` is a valid 2-element array. - unsafe { us_socket_pair(self, kind as u8, ext_size, fds.as_mut_ptr().cast()) } - } - - pub fn next_in_loop(&mut self) -> *mut SocketGroup { - // `us_socket_group_next` is `return group->next` (context.c:165); this - // struct is a full `#[repr(C)]` mirror, so read the field directly. - self.next - } -} - -unsafe extern "C" { - fn us_socket_group_init( - group: *mut SocketGroup, - loop_: *mut Loop, - vt: *const VTable, - ext: *mut c_void, - ); - fn us_socket_group_deinit(group: *mut SocketGroup); - // `SocketGroup` is a sized `#[repr(C)]` mirror (not an opaque ZST) — keep - // raw `*mut` so the FFI boundary does not emit `noalias` over real fields; - // `close_all` reenters Rust callbacks that touch this group via aliasing - // pointers (`us_socket_group(s)`). - fn us_socket_group_close_all(group: *mut SocketGroup); - fn us_socket_group_listen( - group: *mut SocketGroup, - kind: u8, - ssl_ctx: *mut SslCtx, - host: *const c_char, - port: c_int, - options: c_int, - socket_ext_size: c_int, - err: *mut c_int, - ) -> *mut ListenSocket; - fn us_socket_group_listen_unix( - group: *mut SocketGroup, - kind: u8, - ssl_ctx: *mut SslCtx, - path: *const u8, - pathlen: usize, - options: c_int, - socket_ext_size: c_int, - err: *mut c_int, - ) -> *mut ListenSocket; - /// Returns `us_socket_t*` (fast path) OR `us_connecting_socket_t*` (slow - /// path), discriminated by `*is_connecting`. The public `connect()` method - /// turns this into the typed `ConnectResult` enum — call that, not this. - fn us_socket_group_connect( - group: *mut SocketGroup, - kind: u8, - ssl_ctx: *mut SslCtx, - host: *const c_char, - port: c_int, - local_host: *const c_char, - local_port: c_int, - options: c_int, - socket_ext_size: c_int, - is_connecting: *mut c_int, - ) -> *mut c_void; - fn us_socket_group_connect_unix( - group: *mut SocketGroup, - kind: u8, - ssl_ctx: *mut SslCtx, - path: *const u8, - pathlen: usize, - options: c_int, - socket_ext_size: c_int, - ) -> *mut us_socket_t; - fn us_socket_from_fd( - group: *mut SocketGroup, - kind: u8, - ssl_ctx: *mut SslCtx, - socket_ext_size: c_int, - fd: LIBUS_SOCKET_DESCRIPTOR, - ipc: c_int, - ) -> *mut us_socket_t; - fn us_socket_pair( - group: *mut SocketGroup, - kind: u8, - ext_size: c_int, - fds: *mut [LIBUS_SOCKET_DESCRIPTOR; 2], - ) -> *mut us_socket_t; -} diff --git a/src/uws_sys/SocketKind.rs b/src/uws_sys/SocketKind.rs deleted file mode 100644 index d52e2f745719..000000000000 --- a/src/uws_sys/SocketKind.rs +++ /dev/null @@ -1,140 +0,0 @@ -//! Closed-world enum of every us_socket_t consumer in Bun. Stamped on the -//! socket at creation (`s->kind`) and switched on in `dispatch.rs` so the -//! event loop calls straight into the right Rust/C++ handler with the ext -//! already typed — no per-context vtable, no runtime SSL flag. -//! -//! Adding a kind: -//! 1. Add it here. -//! 2. Add an arm to every match in `dispatch.rs` (it's exhaustive, so -//! forgetting is a compile error). -//! 3. Add a `SocketGroup` field to whatever owns the sockets. -//! -//! The `*Tls` variants exist so dispatch can devirtualise the TLS layer too: -//! the loop already knows from `s->ssl != NULL` whether to decrypt, but the -//! *handler* often differs (e.g. `Bun.connect` TCP vs TLS land in different -//! Rust types). Where the handler is identical for both, a single kind is used -//! and the handler reads `s.is_tls()` itself. - -#[repr(u8)] -#[derive(Copy, Clone, Eq, PartialEq, Debug)] -pub enum SocketKind { - /// Reserved. `loop.c` callocs sockets, so 0 must be a value that crashes - /// loudly if dispatch ever sees it instead of silently routing somewhere. - Invalid = 0, - - /// Dispatch reads `group->vtable->on_*`. For sockets whose handler set is - /// only known at runtime (uWS C++ via per-App vtable, tests). - Dynamic, - - // ── Bun.connect / Bun.listen ─────────────────────────────────────────── - BunSocketTcp, - BunSocketTls, - /// Server-accepted socket; ext is the `*Listener` so onCreate can attach - /// a fresh `NewSocket` before re-stamping to `BunSocket{Tcp,Tls}`. - BunListenerTcp, - BunListenerTls, - - // ── HTTP client thread (src/http/HTTPContext.rs) ────────────────────── - HttpClient, - HttpClientTls, - - // ── new WebSocket(...) client (src/http/websocket_client*) ──────────── - WsClientUpgrade, - WsClientUpgradeTls, - WsClient, - WsClientTls, - - // ── Database drivers ────────────────────────────────────────────────── - Postgres, - PostgresTls, - Mysql, - MysqlTls, - Valkey, - ValkeyTls, - - // ── Bun.spawn IPC over socketpair ───────────────────────────────────── - SpawnIpc, - - // ── Bun.serve / uWS — handlers live in C++; dispatch calls a thunk and - // the thunk reads `group->ext` as the templated `HttpContext*`. - UwsHttp, - UwsHttpTls, - UwsWs, - UwsWsTls, -} - -impl SocketKind { - /// Checked conversion from the raw `u8` returned by C (`us_socket_kind`). - /// An invalid discriminant in a `#[repr(u8)]` enum is - /// immediate UB in Rust, so this is an exhaustive match — LLVM folds the - /// contiguous arms to a single range-check + reinterpret. - #[inline] - pub fn from_u8(v: u8) -> Self { - match v { - 0 => SocketKind::Invalid, - 1 => SocketKind::Dynamic, - 2 => SocketKind::BunSocketTcp, - 3 => SocketKind::BunSocketTls, - 4 => SocketKind::BunListenerTcp, - 5 => SocketKind::BunListenerTls, - 6 => SocketKind::HttpClient, - 7 => SocketKind::HttpClientTls, - 8 => SocketKind::WsClientUpgrade, - 9 => SocketKind::WsClientUpgradeTls, - 10 => SocketKind::WsClient, - 11 => SocketKind::WsClientTls, - 12 => SocketKind::Postgres, - 13 => SocketKind::PostgresTls, - 14 => SocketKind::Mysql, - 15 => SocketKind::MysqlTls, - 16 => SocketKind::Valkey, - 17 => SocketKind::ValkeyTls, - 18 => SocketKind::SpawnIpc, - 19 => SocketKind::UwsHttp, - 20 => SocketKind::UwsHttpTls, - 21 => SocketKind::UwsWs, - 22 => SocketKind::UwsWsTls, - _ => unreachable!("invalid SocketKind discriminant {v} from C"), - } - } - - #[inline] - pub const fn is_tls(self) -> bool { - matches!( - self, - SocketKind::BunSocketTls - | SocketKind::BunListenerTls - | SocketKind::HttpClientTls - | SocketKind::WsClientUpgradeTls - | SocketKind::WsClientTls - | SocketKind::PostgresTls - | SocketKind::MysqlTls - | SocketKind::ValkeyTls - | SocketKind::UwsHttpTls - | SocketKind::UwsWsTls - ) - } -} - -// `unsigned char kind` on us_socket_t — full byte, not the flags bitfield. -// `#[repr(u8)]` already refuses to compile with >256 variants, so the -// invariant is enforced by the type system; no explicit assert needed. - -/// The four kinds whose handlers live in C++ are also referenced from C++ -/// (`packages/bun-uws/src/SocketKinds.h`). Export their ordinals so the C++ -/// side links against the Rust source of truth instead of mirroring literals -/// that silently rot if this enum is reordered. -#[unsafe(no_mangle)] -pub(crate) static BUN_SOCKET_KIND_DYNAMIC: u8 = SocketKind::Dynamic as u8; -#[unsafe(no_mangle)] -pub(crate) static BUN_SOCKET_KIND_UWS_HTTP: u8 = SocketKind::UwsHttp as u8; -#[unsafe(no_mangle)] -pub(crate) static BUN_SOCKET_KIND_UWS_HTTP_TLS: u8 = SocketKind::UwsHttpTls as u8; -#[unsafe(no_mangle)] -pub(crate) static BUN_SOCKET_KIND_UWS_WS: u8 = SocketKind::UwsWs as u8; -#[unsafe(no_mangle)] -pub(crate) static BUN_SOCKET_KIND_UWS_WS_TLS: u8 = SocketKind::UwsWsTls as u8; -/// Referenced from `openssl.c` so the new-session callback's per-SSL marker is -/// only set for the sockets that actually surface the `'session'` event. -#[unsafe(no_mangle)] -pub(crate) static BUN_SOCKET_KIND_BUN_SOCKET_TLS: u8 = SocketKind::BunSocketTls as u8; diff --git a/src/uws_sys/Timer.rs b/src/uws_sys/Timer.rs deleted file mode 100644 index c6c8aed41875..000000000000 --- a/src/uws_sys/Timer.rs +++ /dev/null @@ -1,67 +0,0 @@ -use core::ffi::{c_uint, c_void}; -use core::mem::size_of; -use core::ptr::NonNull; - -use crate::Loop; - -bun_core::declare_scope!(uws, visible); - -// Windows (libuv) only. Use `JSC.EventLoopTimer` everywhere else. -bun_opaque::opaque_ffi! { pub struct Timer; } - -impl Timer { - pub fn create(loop_: &mut Loop, _ptr: T) -> NonNull { - // SAFETY: `loop_` is a valid loop pointer. - let t = unsafe { - us_create_timer( - loop_, - 0, - c_uint::try_from(size_of::()).expect("int cast"), - ) - }; - NonNull::new(t).unwrap_or_else(|| { - panic!( - "us_create_timer: returned null: {}", - std::io::Error::last_os_error().raw_os_error().unwrap_or(0) - ) - }) - } - - pub fn set( - &mut self, - ptr: T, - cb: Option, - ms: i32, - repeat_ms: i32, - ) { - // SAFETY: ext storage was allocated with size_of::() in create(); - // caller guarantees T matches. - unsafe { - us_timer_set(self, cb, ms, repeat_ms); - let value_ptr = us_timer_ext(self); - (value_ptr.cast::()).write(ptr); - } - } - - pub unsafe fn close(this: *mut Self) { - bun_core::scoped_log!(uws, "Timer.deinit()"); - // SAFETY: `this` is a live timer handle; us_timer_close frees it. - unsafe { us_timer_close(this, FALLTHROUGH as i32) }; - } -} - -unsafe extern "C" { - pub(crate) fn us_create_timer( - loop_: *mut Loop, - fallthrough: i32, - ext_size: c_uint, - ) -> *mut Timer; - pub(crate) safe fn us_timer_ext(timer: &mut Timer) -> *mut *mut c_void; - pub(crate) fn us_timer_close(timer: *mut Timer, fallthrough: i32); - pub(crate) safe fn us_timer_set( - timer: &mut Timer, - cb: Option, - ms: i32, - repeat_ms: i32, - ); -} diff --git a/src/uws_sys/lib.rs b/src/uws_sys/lib.rs deleted file mode 100644 index 28b97a278f8e..000000000000 --- a/src/uws_sys/lib.rs +++ /dev/null @@ -1,473 +0,0 @@ -#![allow( - non_snake_case, - non_camel_case_types, - non_upper_case_globals, - // *_sys FFI bindings: every fn body is `unsafe { ffi_call(args) }`; the - // safety contract is documented at each body and identical whether the - // wrapper is `unsafe fn` or not. - clippy::not_unsafe_ptr_arg_deref -)] -#![warn(unused_must_use)] -//! Low-level FFI bindings for uSockets / uWebSockets as used by Bun. -//! -//! Each `*.rs` file is mapped to a snake_case -//! module name (the names downstream `bun_uws` expects). Crate-root re-exports -//! flatten the common handle types. - -// ───────────────────────── crate-root FFI primitives ───────────────────────── - -/// `LIBUS_SOCKET_DESCRIPTOR` — `int` on POSIX, `SOCKET` (`uintptr`) on Windows. -#[cfg(not(windows))] -pub type LIBUS_SOCKET_DESCRIPTOR = core::ffi::c_int; -#[cfg(windows)] -pub type LIBUS_SOCKET_DESCRIPTOR = usize; - -/// `enum us_socket_options_t` — listen / connect option flags. -pub const LIBUS_LISTEN_DEFAULT: core::ffi::c_int = 0; -pub const LIBUS_LISTEN_EXCLUSIVE_PORT: core::ffi::c_int = 1; -pub const LIBUS_SOCKET_ALLOW_HALF_OPEN: core::ffi::c_int = 2; -pub const LIBUS_LISTEN_REUSE_PORT: core::ffi::c_int = 4; -pub const LIBUS_SOCKET_IPV6_ONLY: core::ffi::c_int = 8; -pub const LIBUS_LISTEN_REUSE_ADDR: core::ffi::c_int = 16; -pub const LIBUS_LISTEN_DISALLOW_REUSE_PORT_FAILURE: core::ffi::c_int = 32; - -/// BoringSSL `SSL_CTX` (alias so callers don't need a direct boringssl dep). -pub type SslCtx = bun_boringssl_sys::SSL_CTX; - -/// `struct us_bun_verify_error_t` — TLS handshake verification result. -/// -/// Field is named `error_no` so the Node-compat -/// `verifyError`/`authorizationError` paths read naturally; the C struct's -/// first member is `int error` and the layout is identical. -#[repr(C)] -#[derive(Clone, Copy)] -pub struct us_bun_verify_error_t { - pub error_no: core::ffi::c_int, - pub code: *const core::ffi::c_char, - pub reason: *const core::ffi::c_char, -} -impl Default for us_bun_verify_error_t { - fn default() -> Self { - Self { - error_no: 0, - code: core::ptr::null(), - reason: core::ptr::null(), - } - } -} -impl us_bun_verify_error_t { - /// Borrow the BoringSSL verify-error `code` as a `CStr`, or `None` if null. - /// - /// uSockets populates `code`/`reason` from BoringSSL's static error-string - /// table (`X509_verify_cert_error_string` and friends), so the pointee is - /// `'static` in practice; the borrow is conservatively tied to `&self` so - /// the accessor is sound even if a future caller heap-allocates the struct. - #[inline] - pub fn code(&self) -> Option<&core::ffi::CStr> { - if self.code.is_null() { - return None; - } - // SAFETY: uSockets guarantees a non-null `code` is a valid - // NUL-terminated C string that outlives this struct (it points into - // BoringSSL's static error table). Lifetime narrowed to `&self`. - Some(unsafe { core::ffi::CStr::from_ptr(self.code) }) - } - - /// Borrow the BoringSSL verify-error `reason` as a `CStr`, or `None` if null. - /// See [`Self::code`] for the safety argument. - #[inline] - pub fn reason(&self) -> Option<&core::ffi::CStr> { - if self.reason.is_null() { - return None; - } - // SAFETY: same invariant as `code()` — non-null `reason` is a valid - // NUL-terminated C string from BoringSSL's static error table. - Some(unsafe { core::ffi::CStr::from_ptr(self.reason) }) - } - - /// `code` as a byte slice (no NUL), or `b""` if null. Convenience for the - /// dominant `BunString::clone_utf8(..)` / `ZigString::from_utf8(..)` shape. - #[inline] - pub fn code_bytes(&self) -> &[u8] { - self.code().map_or(b"", core::ffi::CStr::to_bytes) - } - - /// `reason` as a byte slice (no NUL), or `b""` if null. - #[inline] - pub fn reason_bytes(&self) -> &[u8] { - self.reason().map_or(b"", core::ffi::CStr::to_bytes) - } -} - -/// `enum create_bun_socket_error_t` — out-param from `us_ssl_ctx_from_options`. -#[repr(C)] -#[derive(Clone, Copy, Eq, PartialEq, Debug)] -pub enum create_bun_socket_error_t { - none = 0, - load_ca_file, - invalid_ca_file, - invalid_ca, - invalid_ciphers, -} - -impl create_bun_socket_error_t { - pub fn message(self) -> Option<&'static [u8]> { - match self { - Self::none => None, - Self::load_ca_file => Some(b"Failed to load CA file"), - Self::invalid_ca_file => Some(b"Invalid CA file"), - Self::invalid_ca => Some(b"Invalid CA"), - Self::invalid_ciphers => Some(b"Invalid ciphers"), - } - } -} - -/// WebSocket frame opcode (`uWS::OpCode`). -/// -/// Spec is `enum(i32) { ..., _ }` — non-exhaustive, so any `i32` from C++ is a -/// valid bit pattern. This type crosses the FFI boundary *into* Rust via -/// `uws_websocket_message_handler`, so it must not be an exhaustive -/// `#[repr(i32)]` enum (an out-of-range discriminant would be instant UB). -#[repr(transparent)] -#[derive(Clone, Copy, Eq, PartialEq, Debug)] -pub struct Opcode(pub i32); - -impl Opcode { - pub const Continuation: Opcode = Opcode(0); - pub const Text: Opcode = Opcode(1); - pub const Binary: Opcode = Opcode(2); - pub const Close: Opcode = Opcode(8); - pub const Ping: Opcode = Opcode(9); - pub const Pong: Opcode = Opcode(10); - // Upper-case aliases for callers that use the screaming-snake names - // (`uWS::OpCode::TEXT` etc.). Same bit values; both spellings are accepted - // so the merge of `bun_uws::Opcode` into this type doesn't ripple. - pub const CONTINUATION: Opcode = Opcode(0); - pub const TEXT: Opcode = Opcode(1); - pub const BINARY: Opcode = Opcode(2); - pub const CLOSE: Opcode = Opcode(8); - pub const PING: Opcode = Opcode(9); - pub const PONG: Opcode = Opcode(10); -} - -/// `uWS::WebSocket::SendStatus`. -#[repr(u32)] -#[derive(Clone, Copy, Eq, PartialEq, Debug)] -pub enum SendStatus { - Backpressure = 0, - Success = 1, - Dropped = 2, -} - -/// `bun.timespec` — `us_loop_run_bun_tick` takes `*const timespec`. -pub use bun_core::Timespec; - -// Opaque FFI handles (Nomicon pattern) — what higher tiers reach for when the -// real module body isn't needed. See `bun_core::opaque_extern!` doc for the -// `UnsafeCell<[u8;0]>` / `!Freeze` rationale; with UnsafeCell the reference is -// ABI-identical to a non-null pointer, which lets us declare value-typed shims -// as `safe fn` and drop per-call-site `unsafe { }`. -bun_core::opaque_extern!( - pub us_loop_t, pub us_socket_context_t, pub us_udp_socket_t, pub us_udp_packet_buffer_t, - pub UpgradedDuplex, pub WindowsNamedPipe, -); - -// ── UpgradedDuplex (cycle-break shim) ──────────────────────────────────────── -// The full `UpgradedDuplex` lives in `bun_runtime::socket` (T6); `socket.rs` -// here dispatches to it from the low-tier `InternalSocket` enum. To avoid an -// upward dep, the opaque handle gets thin inherent methods that forward to -// `extern "C"` symbols which the runtime crate exports with `#[no_mangle]`. -// This is the same link-time-dispatch pattern as other `*_sys` crates use for -// their C backends — only here the "backend" is Rust in a higher tier. -// Signatures must stay in sync with `src/runtime/socket/UpgradedDuplex.rs`. -// SAFETY (safe fn): `UpgradedDuplex` is an `opaque_extern!` ZST handle (`!Freeze` -// via `UnsafeCell`), so `&`/`&mut` carry no `readonly`/`noalias` and are -// ABI-identical to non-null `*const`/`*mut`. Shims taking only the handle + -// scalars are `safe fn`; the two `(ptr,len)` slice writers stay `unsafe fn`. -unsafe extern "C" { - safe fn UpgradedDuplex__ssl_error(this: &UpgradedDuplex) -> us_bun_verify_error_t; - safe fn UpgradedDuplex__is_established(this: &UpgradedDuplex) -> bool; - safe fn UpgradedDuplex__is_closed(this: &UpgradedDuplex) -> bool; - safe fn UpgradedDuplex__is_shutdown(this: &UpgradedDuplex) -> bool; - safe fn UpgradedDuplex__ssl(this: &UpgradedDuplex) -> *mut bun_boringssl_sys::SSL; - safe fn UpgradedDuplex__set_timeout(this: &mut UpgradedDuplex, seconds: core::ffi::c_uint); - safe fn UpgradedDuplex__flush(this: &mut UpgradedDuplex); - fn UpgradedDuplex__encode_and_write( - this: *mut UpgradedDuplex, - ptr: *const u8, - len: usize, - ) -> i32; - fn UpgradedDuplex__raw_write(this: *mut UpgradedDuplex, ptr: *const u8, len: usize) -> i32; - safe fn UpgradedDuplex__shutdown(this: &mut UpgradedDuplex); - safe fn UpgradedDuplex__shutdown_read(this: &mut UpgradedDuplex); - safe fn UpgradedDuplex__close(this: &mut UpgradedDuplex); -} -impl UpgradedDuplex { - #[inline] - pub fn ssl_error(&self) -> us_bun_verify_error_t { - UpgradedDuplex__ssl_error(self) - } - #[inline] - pub fn is_established(&self) -> bool { - UpgradedDuplex__is_established(self) - } - #[inline] - pub fn is_closed(&self) -> bool { - UpgradedDuplex__is_closed(self) - } - #[inline] - pub fn is_shutdown(&self) -> bool { - UpgradedDuplex__is_shutdown(self) - } - #[inline] - pub fn ssl(&self) -> Option<*mut bun_boringssl_sys::SSL> { - let p = UpgradedDuplex__ssl(self); - if p.is_null() { None } else { Some(p) } - } - #[inline] - pub fn set_timeout(&mut self, seconds: core::ffi::c_uint) { - UpgradedDuplex__set_timeout(self, seconds) - } - #[inline] - pub fn flush(&mut self) { - UpgradedDuplex__flush(self) - } - #[inline] - pub fn encode_and_write(&mut self, data: &[u8]) -> i32 { - // SAFETY: `&mut self` coerces to a non-null `*mut UpgradedDuplex` valid for - // the call, and `(data.as_ptr(), data.len())` is a valid readable region - // borrowed for the call's duration; the callee only reads from it. - unsafe { UpgradedDuplex__encode_and_write(self, data.as_ptr(), data.len()) } - } - #[inline] - pub fn raw_write(&mut self, data: &[u8]) -> i32 { - // SAFETY: `&mut self` coerces to a non-null `*mut UpgradedDuplex` valid for - // the call, and `(data.as_ptr(), data.len())` is a valid readable region - // borrowed for the call's duration; the callee only reads from it. - unsafe { UpgradedDuplex__raw_write(self, data.as_ptr(), data.len()) } - } - #[inline] - pub fn shutdown(&mut self) { - UpgradedDuplex__shutdown(self) - } - #[inline] - pub fn shutdown_read(&mut self) { - UpgradedDuplex__shutdown_read(self) - } - #[inline] - pub fn close(&mut self) { - UpgradedDuplex__close(self) - } -} - -// ── WindowsNamedPipe (cycle-break shim) ───────────────────────────────────── -// Same link-time-dispatch as `UpgradedDuplex` above: the real -// `WindowsNamedPipe` lives in `bun_runtime::socket`; this opaque handle -// forwards to `extern "C"` symbols that the runtime crate exports with -// `#[no_mangle]`. -#[cfg(windows)] -unsafe extern "C" { - safe fn WindowsNamedPipe__ssl_error(this: &WindowsNamedPipe) -> us_bun_verify_error_t; - safe fn WindowsNamedPipe__is_established(this: &WindowsNamedPipe) -> bool; - safe fn WindowsNamedPipe__is_closed(this: &WindowsNamedPipe) -> bool; - safe fn WindowsNamedPipe__is_shutdown(this: &WindowsNamedPipe) -> bool; - safe fn WindowsNamedPipe__ssl(this: &WindowsNamedPipe) -> *mut bun_boringssl_sys::SSL; - safe fn WindowsNamedPipe__set_timeout(this: &mut WindowsNamedPipe, seconds: core::ffi::c_uint); - safe fn WindowsNamedPipe__flush(this: &mut WindowsNamedPipe); - fn WindowsNamedPipe__encode_and_write( - this: *mut WindowsNamedPipe, - ptr: *const u8, - len: usize, - ) -> i32; - fn WindowsNamedPipe__raw_write(this: *mut WindowsNamedPipe, ptr: *const u8, len: usize) -> i32; - safe fn WindowsNamedPipe__shutdown(this: &mut WindowsNamedPipe); - safe fn WindowsNamedPipe__shutdown_read(this: &mut WindowsNamedPipe); - safe fn WindowsNamedPipe__close(this: &mut WindowsNamedPipe); - safe fn WindowsNamedPipe__pause_stream(this: &mut WindowsNamedPipe) -> bool; - safe fn WindowsNamedPipe__resume_stream(this: &mut WindowsNamedPipe) -> bool; -} -#[cfg(windows)] -impl WindowsNamedPipe { - #[inline] - pub fn ssl_error(&self) -> us_bun_verify_error_t { - WindowsNamedPipe__ssl_error(self) - } - #[inline] - pub fn is_established(&self) -> bool { - WindowsNamedPipe__is_established(self) - } - #[inline] - pub fn is_closed(&self) -> bool { - WindowsNamedPipe__is_closed(self) - } - #[inline] - pub fn is_shutdown(&self) -> bool { - WindowsNamedPipe__is_shutdown(self) - } - #[inline] - pub fn ssl(&self) -> Option<*mut bun_boringssl_sys::SSL> { - let p = WindowsNamedPipe__ssl(self); - if p.is_null() { None } else { Some(p) } - } - #[inline] - pub fn set_timeout(&mut self, seconds: core::ffi::c_uint) { - WindowsNamedPipe__set_timeout(self, seconds) - } - #[inline] - pub fn flush(&mut self) { - WindowsNamedPipe__flush(self) - } - #[inline] - pub fn encode_and_write(&mut self, data: &[u8]) -> i32 { - unsafe { WindowsNamedPipe__encode_and_write(self, data.as_ptr(), data.len()) } - } - #[inline] - pub fn raw_write(&mut self, data: &[u8]) -> i32 { - unsafe { WindowsNamedPipe__raw_write(self, data.as_ptr(), data.len()) } - } - #[inline] - pub fn shutdown(&mut self) { - WindowsNamedPipe__shutdown(self) - } - #[inline] - pub fn shutdown_read(&mut self) { - WindowsNamedPipe__shutdown_read(self) - } - #[inline] - pub fn close(&mut self) { - WindowsNamedPipe__close(self) - } - #[inline] - pub fn pause_stream(&mut self) -> bool { - WindowsNamedPipe__pause_stream(self) - } - #[inline] - pub fn resume_stream(&mut self) -> bool { - WindowsNamedPipe__resume_stream(self) - } -} - -// ───────────────────────────── module map ──────────────────────────────────── -// Snake-case names are what `bun_uws` imports; `#[path]` points at the -// PascalCase source files on disk. - -pub mod error; -pub use error::{Error, Result}; - -#[path = "App.rs"] -pub mod app; -#[path = "BodyReaderMixin.rs"] -pub mod body_reader_mixin; -#[path = "ConnectingSocket.rs"] -pub mod connecting_socket; -#[path = "h3.rs"] -pub mod h3; -#[path = "InternalLoopData.rs"] -pub mod internal_loop_data; -#[path = "ListenSocket.rs"] -pub mod listen_socket; -#[path = "Loop.rs"] -pub mod loop_; -#[path = "quic.rs"] -pub mod quic; -#[path = "Request.rs"] -pub mod request; -#[path = "Response.rs"] -pub mod response; -#[path = "SocketContext.rs"] -pub mod socket_context; -#[path = "SocketGroup.rs"] -pub mod socket_group; -#[path = "SocketKind.rs"] -pub mod socket_kind; -#[path = "thunk.rs"] -pub mod thunk; -// libuv only — use `bun_event_loop::EventLoopTimer` elsewhere. -#[cfg(windows)] -#[path = "Timer.rs"] -pub mod timer; -#[path = "udp.rs"] -pub mod udp; -#[path = "us_socket_t.rs"] -pub mod us_socket; -#[path = "vtable.rs"] -pub mod vtable; -#[path = "WebSocket.rs"] -pub mod web_socket; - -#[path = "socket.rs"] -pub mod socket; - -#[cfg(socket_fault_injection)] -pub mod fault_inject { - use core::ffi::c_int; - - pub const RECV: c_int = 0; - pub const SEND: c_int = 1; - pub const WRITEV: c_int = 2; - pub const SENDMSG: c_int = 3; - pub const RECVMSG: c_int = 4; - pub const CONNECT: c_int = 5; - pub const ACCEPT: c_int = 6; - pub const SOCKET: c_int = 7; - pub const CLOSE: c_int = 8; - pub const SHUTDOWN: c_int = 9; - /// Not a syscall: the per-loop TLS plaintext buffer allocation in - /// `us_internal_init_loop_ssl_data`. - pub const SSL_LOOP_BUFFER: c_int = 10; - - pub const ACTION_NONE: c_int = 0; - pub const ACTION_ERRNO: c_int = 1; - pub const ACTION_SHORT: c_int = 2; - pub const ACTION_ZERO: c_int = 3; - - #[repr(C)] - pub struct UsFaultRule { - pub action: c_int, - pub errno_value: c_int, - pub clamp_bytes: c_int, - pub after_n_calls: c_int, - pub repeat: c_int, - pub target_fd: c_int, - } - - unsafe extern "C" { - pub fn us_fault_set(syscall: c_int, rule: *const UsFaultRule); - pub safe fn us_fault_clear(syscall: c_int); - pub safe fn us_fault_clear_all(); - } -} -pub use socket::{ - AnySocket, ConnectError, InternalSocket, NewSocketHandler, SocketHandler, SocketTCP, SocketTLS, - SocketTcp, SocketTls, -}; - -// ───────────────────────────── re-exports ──────────────────────────────────── - -pub use internal_loop_data::InternalLoopData; -#[cfg(windows)] -pub use loop_::WindowsLoop; -pub use loop_::{Loop, PosixLoop}; -pub use socket_kind::SocketKind; -#[cfg(windows)] -pub use timer::Timer; -#[cfg(not(windows))] -pub type WindowsLoop = loop_::PosixLoop; // unified on non-Windows -pub use app::uws_app_t; -pub use body_reader_mixin::BodyReaderMixin; -pub use connecting_socket::ConnectingSocket; -pub use listen_socket::ListenSocket; -pub use request::{AnyRequest, Request}; -pub use response::c::uws_res; -pub use response::{AnyResponse, SocketAddress, WebSocketUpgradeContext}; -pub use socket_context::BunSocketContextOptions; -pub use socket_group::ConnectResult; -pub use socket_group::SocketGroup; -pub use us_socket::{CloseCode, UsIoVec, us_socket_stream_buffer_t, us_socket_t}; -pub use web_socket::{AnyWebSocket, RawWebSocket, WebSocketBehavior}; - -/// Legacy aliases for `App` / `Response`. -pub type NewApp = app::App; -pub type NewAppResponse = response::Response; -pub type Socket = us_socket::us_socket_t; -pub type SocketContext = us_socket_context_t; diff --git a/src/uws_sys/libuwsockets.cpp b/src/uws_sys/libuwsockets.cpp index b9a49d00bb6c..eea04344a692 100644 --- a/src/uws_sys/libuwsockets.cpp +++ b/src/uws_sys/libuwsockets.cpp @@ -3,7 +3,6 @@ #include "libusockets.h" #include #include -#include #include extern "C" const char* ares_inet_ntop(int af, const char *src, char *dst, size_t size); @@ -1707,15 +1706,6 @@ size_t uws_req_get_header(uws_req_t *res, const char *lower_case_header, } } - void us_socket_mark_needs_more_not_ssl(uws_res_r res) - { - us_socket_r s = (us_socket_t *)res; - if(us_socket_is_closed(s)) return; - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, - LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - void uws_res_override_write_offset(int ssl, uws_res_r res, uint64_t offset) { if (ssl) @@ -1874,16 +1864,6 @@ __attribute__((callback (corker, ctx))) } } - void us_socket_sendfile_needs_more(us_socket_r s) { - if(us_socket_is_closed(s)) return; - s->flags.last_write_failed = 1; - us_poll_change(&s->p, s->group->loop, LIBUS_SOCKET_READABLE | LIBUS_SOCKET_WRITABLE); - } - - LIBUS_SOCKET_DESCRIPTOR us_socket_get_fd(us_socket_r s) { - return us_poll_fd(&s->p); - } - // Gets the remote address and port // Returns 0 if failure / unix socket uint64_t uws_res_get_remote_address_info(uws_res_r res, const char **dest, int *port, bool *is_ipv6) diff --git a/src/uws_sys/socket.rs b/src/uws_sys/socket.rs deleted file mode 100644 index f73ff4adecd0..000000000000 --- a/src/uws_sys/socket.rs +++ /dev/null @@ -1,982 +0,0 @@ -//! High-level socket wrapper over `us_socket_t` / `ConnectingSocket` / -//! `UpgradedDuplex` / `WindowsNamedPipe`. -//! -//! THIS IS THE ONE CANONICAL IMPLEMENTATION. `bun_uws` -//! re-exports everything here; do NOT add a parallel `InternalSocket` / -//! `NewSocketHandler` in `bun_uws` again — the earlier "thin placeholder" -//! that grew full bodies there has been deleted. -//! -//! Shape: `InternalSocket` is a `Copy` tagged raw pointer (passed by value -//! through the entire HTTP-client state machine), all -//! `NewSocketHandler` methods take `&self`, and the `#[cfg(windows)]` Pipe -//! split is owned exactly once by the `on_socket!` macro below. - -use core::ffi::{c_int, c_uint, c_void}; -use core::mem::size_of; -use core::ptr::NonNull; - -use bun_core::{Fd, ZStr}; - -#[cfg(windows)] -use crate::WindowsNamedPipe; -use crate::{ - CloseCode, ConnectResult, ConnectingSocket, LIBUS_SOCKET_ALLOW_HALF_OPEN, - LIBUS_SOCKET_DESCRIPTOR, SocketGroup, SocketKind, SslCtx, UpgradedDuplex, - us_bun_verify_error_t, us_socket_t, -}; - -bun_core::declare_scope!(uws, visible); - -// ────────────────────────────────────────────────────────────────────────── -// CloseCode PascalCase aliases -// ────────────────────────────────────────────────────────────────────────── -// `bun_uws_sys::CloseCode` (us_socket_t.rs) keeps the snake-case variant -// names (`normal`/`failure`/`fast_shutdown`). The deleted `bun_uws::CloseKind` -// duplicate used PascalCase. Expose both spellings via associated consts so -// every existing call site (`CloseCode::Normal`, `CloseKind::Failure`, …) -// resolves against the one canonical `#[repr(i32)]` enum. -#[allow(non_upper_case_globals)] -impl CloseCode { - pub const Normal: CloseCode = CloseCode::normal; - pub const Failure: CloseCode = CloseCode::failure; - pub const FastShutdown: CloseCode = CloseCode::fast_shutdown; -} - -// ────────────────────────────────────────────────────────────────────────── -// InternalSocket -// ────────────────────────────────────────────────────────────────────────── - -/// State of a single connection. `Copy` — passed by value -/// through the entire HTTP-client / Bun.Socket state machines, so the handle -/// is a trivially-copyable tagged pointer. The `UpgradedDuplex` / `Pipe` -/// payloads are raw `*mut` (NOT `&mut`): they are stored in long-lived -/// `Cell` fields and re-borrowed per call via the opaque -/// deref helpers below. -#[derive(Copy, Clone)] -pub enum InternalSocket { - Connected(*mut us_socket_t), - Connecting(*mut ConnectingSocket), - Detached, - UpgradedDuplex(*mut UpgradedDuplex), - #[cfg(windows)] - Pipe(*mut WindowsNamedPipe), - #[cfg(not(windows))] - Pipe, -} - -// Variant + pointer-identity equality. The `Pipe` arm intentionally returns -// `false` even for `(Pipe, Pipe)` on non-Windows (the variant carries no -// payload there, so identity is meaningless) — debug-asserts that compare -// sockets rely on this matching the original `InternalSocket.eq` semantics. -impl PartialEq for InternalSocket { - fn eq(&self, other: &Self) -> bool { - match (*self, *other) { - (InternalSocket::Connected(a), InternalSocket::Connected(b)) => core::ptr::eq(a, b), - (InternalSocket::Connecting(a), InternalSocket::Connecting(b)) => core::ptr::eq(a, b), - (InternalSocket::Detached, InternalSocket::Detached) => true, - (InternalSocket::UpgradedDuplex(a), InternalSocket::UpgradedDuplex(b)) => { - core::ptr::eq(a, b) - } - #[cfg(windows)] - (InternalSocket::Pipe(a), InternalSocket::Pipe(b)) => core::ptr::eq(a, b), - #[cfg(not(windows))] - (InternalSocket::Pipe, InternalSocket::Pipe) => false, - _ => false, - } - } -} - -impl InternalSocket { - /// `Some` only for `.connected`. - #[inline] - pub fn get(&self) -> Option<*mut us_socket_t> { - match *self { - InternalSocket::Connected(s) => Some(s), - _ => None, - } - } - #[inline] - pub fn is_detached(&self) -> bool { - matches!(self, InternalSocket::Detached) - } - #[inline] - pub fn is_named_pipe(&self) -> bool { - #[cfg(windows)] - return matches!(self, InternalSocket::Pipe(_)); - #[cfg(not(windows))] - return matches!(self, InternalSocket::Pipe); - } -} - -// ── Safe deref helpers for `InternalSocket` payloads ──────────────────────── -// All four payload types are `#[repr(C)] UnsafeCell<[u8; 0]>` opaque ZSTs -// (`opaque_ffi!` / `opaque_extern!`): zero-sized, align-1, no `noalias` / -// `readonly`. Materializing `&mut T` from `*mut T` therefore has exactly one -// validity requirement — non-null — which uSockets guarantees for every -// pointer it stores in `Connected` / `Connecting` / `UpgradedDuplex` / `Pipe`. -// Centralizing the deref keeps the proof local instead of repeating -// `unsafe { &mut *s }` at ~50 match arms. - -/// Reborrow the `InternalSocket::Connected` payload. -#[inline(always)] -fn sock<'a>(p: *mut us_socket_t) -> &'a mut us_socket_t { - bun_opaque::opaque_deref_mut(p) -} -/// Reborrow the `InternalSocket::Connecting` payload. -#[inline(always)] -fn conn<'a>(p: *mut ConnectingSocket) -> &'a mut ConnectingSocket { - bun_opaque::opaque_deref_mut(p) -} -/// Reborrow the `InternalSocket::UpgradedDuplex` payload (cycle-break shim). -#[inline(always)] -fn duplex<'a>(p: *mut UpgradedDuplex) -> &'a mut UpgradedDuplex { - bun_opaque::opaque_deref_mut(p) -} -/// Reborrow the `InternalSocket::Pipe` payload (Windows only). -#[cfg(windows)] -#[inline(always)] -fn pipe<'a>(p: *mut WindowsNamedPipe) -> &'a mut WindowsNamedPipe { - bun_opaque::opaque_deref_mut(p) -} - -/// Five-arm `match self.socket` with the `#[cfg(windows)]` Pipe split owned -/// exactly once. Each arm binds the deref'd opaque (`$s` / `$c` / `$d` / `$p`) -/// so method bodies are one-liners and the per-arm `#[cfg]` noise lives here. -/// -/// Arms not supplied default to: `connecting`/`detached` → `$det` expr; -/// `pipe` → `$det` on non-Windows (no payload), supplied body on Windows. -macro_rules! on_socket { - ( - $sock:expr; - connected $s:ident => $conn:expr, - connecting $c:ident => $cing:expr, - detached => $det:expr, - duplex $d:ident => $dup:expr, - pipe $p:ident => $pip:expr $(,)? - ) => { - match $sock { - InternalSocket::Connected(__s) => { let $s = sock(__s); $conn } - InternalSocket::Connecting(__c) => { let $c = conn(__c); $cing } - InternalSocket::Detached => $det, - InternalSocket::UpgradedDuplex(__d) => { let $d = duplex(__d); $dup } - #[cfg(windows)] - InternalSocket::Pipe(__p) => { let $p = pipe(__p); $pip } - #[cfg(not(windows))] - InternalSocket::Pipe => $det, - } - }; - // Short form: connecting/detached/pipe-absent collapse to one default. - ( - $sock:expr; - connected $s:ident => $conn:expr, - duplex $d:ident => $dup:expr, - pipe $p:ident => $pip:expr, - else => $det:expr $(,)? - ) => { - on_socket!($sock; - connected $s => $conn, - connecting _c => { let _ = _c; $det }, - detached => $det, - duplex $d => $dup, - pipe $p => $pip, - ) - }; -} - -// ────────────────────────────────────────────────────────────────────────── -// NewSocketHandler -// ────────────────────────────────────────────────────────────────────────── - -/// The const generic only -/// selects `*SSL` vs fd for `get_native_handle`; it is NOT forwarded to C — -/// TLS is per-socket there. -#[derive(Copy, Clone)] -pub struct NewSocketHandler { - pub socket: InternalSocket, -} - -pub type SocketTCP = NewSocketHandler; -pub type SocketTLS = NewSocketHandler; -/// snake-case aliases (match `AnySocket` variant names). -pub type SocketTcp = NewSocketHandler; -pub type SocketTls = NewSocketHandler; -/// Alias used by `http`, `ipc`, `websocket_client` — same type, less ceremony. -pub type SocketHandler = NewSocketHandler; - -impl NewSocketHandler { - pub const DETACHED: Self = Self { - socket: InternalSocket::Detached, - }; - - /// Constructor form of [`Self::DETACHED`]. - #[inline] - pub const fn detached() -> Self { - Self::DETACHED - } - - // ── const-generic discriminant casts ──────────────────────────────────── - // Layout is identical (single `InternalSocket` field — the bool only gates - // `get_native_handle`); these are safe field moves with a matching debug - // assert that the caller passed the right arm. - #[inline] - pub const fn assume_ssl(self) -> NewSocketHandler { - debug_assert!(IS_SSL); - NewSocketHandler { - socket: self.socket, - } - } - #[inline] - pub const fn assume_tcp(self) -> NewSocketHandler { - debug_assert!(!IS_SSL); - NewSocketHandler { - socket: self.socket, - } - } - /// Generic counterpart of [`Self::assume_ssl`]/[`Self::assume_tcp`] for - /// callers inside an `if IS_SSL { ... }` arm widening a concrete handle - /// back to the surrounding `NewSocketHandler`. - #[inline] - pub const fn cast_ssl(self) -> NewSocketHandler { - debug_assert!(IS_SSL == NEW_SSL); - NewSocketHandler { - socket: self.socket, - } - } - - #[inline] - pub fn detach(&mut self) { - self.socket = InternalSocket::Detached; - } - #[inline] - pub fn is_detached(&self) -> bool { - self.socket.is_detached() - } - #[inline] - pub fn is_named_pipe(&self) -> bool { - self.socket.is_named_pipe() - } - - // ── state queries ─────────────────────────────────────────────────────── - - /// Raw-TCP write that also reports a fatal send error; non-Connected and - /// TLS-wrapped sockets fall back to the plain write (no fatal signal). - pub fn write_check_error(&self, data: &[u8]) -> (i32, bool) { - on_socket!(self.socket; - connected s => s.write_check_error(data), - duplex d => (d.encode_and_write(data), false), - pipe p => (p.encode_and_write(data), false), - else => (0, false), - ) - } - - pub fn is_closed(&self) -> bool { - on_socket!(self.socket; - connected s => s.is_closed(), - connecting c => c.is_closed(), - detached => true, - duplex d => d.is_closed(), - pipe p => p.is_closed(), - ) - } - - pub fn is_shutdown(&self) -> bool { - on_socket!(self.socket; - connected s => s.is_shutdown(), - connecting c => c.is_shutdown(), - detached => true, - duplex d => d.is_shutdown(), - pipe p => p.is_shutdown(), - ) - } - - pub fn is_established(&self) -> bool { - on_socket!(self.socket; - connected s => s.is_established(), - duplex d => d.is_established(), - pipe p => p.is_established(), - else => false, - ) - } - - #[inline] - pub fn is_closed_or_has_error(&self) -> bool { - self.is_closed() || self.is_shutdown() || self.get_error() != 0 - } - - pub fn get_verify_error(&self) -> us_bun_verify_error_t { - on_socket!(self.socket; - connected s => s.get_verify_error(), - duplex d => d.ssl_error(), - pipe p => p.ssl_error(), - else => us_bun_verify_error_t::default(), - ) - } - - pub fn get_error(&self) -> i32 { - on_socket!(self.socket; - connected s => s.get_error(), - connecting c => c.get_error(), - detached => 0, - duplex d => d.ssl_error().error_no, - pipe p => p.ssl_error().error_no, - ) - } - - /// Raw `getaddrinfo(3)` return code for a pending connect whose name - /// lookup failed; 0 otherwise (a connect failure past name resolution, or - /// any non-connecting handle). A different namespace from - /// [`Self::get_error`] (errno). - pub fn dns_error(&self) -> i32 { - match self.socket { - InternalSocket::Connecting(c) => conn(c).get_dns_error(), - _ => 0, - } - } - - // ── lifecycle ─────────────────────────────────────────────────────────── - - pub fn close(&self, code: CloseCode) { - on_socket!(self.socket; - connected s => s.close(code), - connecting c => c.close(), - detached => {}, - duplex d => d.close(), - pipe p => p.close(), - ) - } - - pub fn shutdown(&self) { - on_socket!(self.socket; - connected s => s.shutdown(), - connecting c => c.shutdown(), - detached => {}, - duplex d => d.shutdown(), - pipe p => p.shutdown(), - ) - } - - pub fn shutdown_read(&self) { - on_socket!(self.socket; - connected s => s.shutdown_read(), - connecting c => c.shutdown_read(), - detached => {}, - duplex d => d.shutdown_read(), - pipe p => p.shutdown_read(), - ) - } - - // ── I/O ───────────────────────────────────────────────────────────────── - - pub fn write(&self, data: &[u8]) -> i32 { - on_socket!(self.socket; - connected s => s.write(data), - duplex d => d.encode_and_write(data), - pipe p => p.encode_and_write(data), - else => 0, - ) - } - - /// Write `data` and pass `file_descriptor` over the socket via SCM_RIGHTS. - /// POSIX-only — Windows IPC fd passing goes through libuv pipes instead. - /// - /// LAYERING: takes the raw POSIX fd (`c_int`) rather than `bun_sys::Fd` — - /// `bun_uws_sys` sits below `bun_sys`; callers extract `.native()` at the - /// boundary. - #[cfg(not(windows))] - pub fn write_fd(&self, data: &[u8], file_descriptor: c_int) -> i32 { - match self.socket { - InternalSocket::Connected(s) => { - sock(s).write_fd(data, Fd::from_native(file_descriptor)) - } - // Duplex/pipe fall back to a plain write (the fd is silently - // dropped). - InternalSocket::UpgradedDuplex(_) | InternalSocket::Pipe => self.write(data), - InternalSocket::Connecting(_) | InternalSocket::Detached => 0, - } - } - - /// Vectored raw write: one writev on real sockets; sequential raw writes on - /// transports without an fd (duplex/pipe). Plain-TCP callers only — raw - /// writes bypass TLS framing. - pub fn raw_writev(&self, iov: &[crate::UsIoVec]) -> i32 { - on_socket!(self.socket; - connected s => s.raw_writev(iov), - duplex d => { - let mut total: i32 = 0; - for v in iov { - // SAFETY: UsIoVec contract — base/len reference caller-owned memory - let slice = unsafe { core::slice::from_raw_parts(v.base.cast::(), v.len) }; - let w = d.raw_write(slice); - if w > 0 { total += w; } - if w < slice.len() as i32 { break; } - } - total - }, - pipe p => { - let mut total: i32 = 0; - for v in iov { - // SAFETY: UsIoVec contract — base/len reference caller-owned memory - let slice = unsafe { core::slice::from_raw_parts(v.base.cast::(), v.len) }; - let w = p.raw_write(slice); - if w > 0 { total += w; } - if w < slice.len() as i32 { break; } - } - total - }, - else => 0, - ) - } - - /// Bypass TLS — raw bytes to the fd even on a TLS socket. - pub fn raw_write(&self, data: &[u8]) -> i32 { - on_socket!(self.socket; - connected s => s.raw_write(data), - duplex d => d.raw_write(data), - pipe p => p.raw_write(data), - else => 0, - ) - } - - pub fn flush(&self) { - on_socket!(self.socket; - connected s => s.flush(), - duplex d => d.flush(), - pipe p => p.flush(), - else => {}, - ) - } - - // ── timeouts ──────────────────────────────────────────────────────────── - - /// Direct seconds timeout (no long-timeout split). - pub fn timeout(&self, seconds: c_uint) { - on_socket!(self.socket; - connected s => s.set_timeout(seconds), - connecting c => c.timeout(seconds), - detached => {}, - duplex d => d.set_timeout(seconds), - pipe p => p.set_timeout(seconds), - ) - } - - /// Splits >240s onto the minute-granularity long-timeout wheel. - pub fn set_timeout(&self, seconds: c_uint) { - on_socket!(self.socket; - connected s => if seconds > 240 { - s.set_timeout(0); - s.set_long_timeout(seconds / 60); - } else { - s.set_timeout(seconds); - s.set_long_timeout(0); - }, - connecting c => if seconds > 240 { - c.timeout(0); - c.long_timeout(seconds / 60); - } else { - c.timeout(seconds); - c.long_timeout(0); - }, - detached => {}, - duplex d => d.set_timeout(seconds), - pipe p => p.set_timeout(seconds), - ) - } - - pub fn set_timeout_minutes(&self, minutes: c_uint) { - on_socket!(self.socket; - connected s => { s.set_timeout(0); s.set_long_timeout(minutes); }, - connecting c => { c.timeout(0); c.long_timeout(minutes); }, - detached => {}, - duplex d => d.set_timeout(minutes * 60), - pipe p => p.set_timeout(minutes * 60), - ) - } - - // ── flow control / sockopts ───────────────────────────────────────────── - - pub fn pause_stream(&self) -> bool { - on_socket!(self.socket; - connected s => { s.pause(); true }, - connecting _c => false, - detached => true, - duplex _d => false, // TODO: pause/resume upgraded duplex - pipe p => p.pause_stream(), - ) - } - - pub fn resume_stream(&self) -> bool { - on_socket!(self.socket; - connected s => { s.resume(); true }, - connecting _c => false, - detached => true, - duplex _d => false, // TODO: pause/resume upgraded duplex - pipe p => p.resume_stream(), - ) - } - - pub fn set_no_delay(&self, enabled: bool) -> bool { - match self.socket { - InternalSocket::Connected(s) => { - sock(s).set_nodelay(enabled); - true - } - _ => false, - } - } - - pub fn set_keep_alive(&self, enabled: bool, delay: u32) -> bool { - match self.socket { - InternalSocket::Connected(s) => sock(s).set_keepalive(enabled, delay) == 0, - _ => false, - } - } - - /// Set the IP type-of-service. Returns 0 on success or a negative errno; - /// non-TCP sockets (pipes, duplexes, not-yet-connected) report -EBADF (-9) - /// the way Node's no-handle fallback does. - pub fn set_tos(&self, tos: i32) -> i32 { - match self.socket { - InternalSocket::Connected(s) => sock(s).set_tos(tos), - _ => -9, - } - } - - /// Get the IP type-of-service (>= 0) or a negative errno. - pub fn get_tos(&self) -> i32 { - match self.socket { - InternalSocket::Connected(s) => sock(s).get_tos(), - _ => -9, - } - } - - /// Resume a handshake suspended by an asynchronous SNICallback. The ctx - /// reference is consumed (freed here when the socket is no longer a real - /// connected socket). - pub fn sni_resolve(&self, ctx: *mut crate::SslCtx, error: bool) { - match self.socket { - InternalSocket::Connected(s) => sock(s).sni_resolve(ctx, error), - _ => { - // The socket is gone; release the reference the caller handed us. - if !ctx.is_null() { - // SAFETY: the caller passed an owned SSL_CTX reference. - unsafe { bun_boringssl_sys::SSL_CTX_free(ctx) }; - } - } - } - } - - // ── TLS ───────────────────────────────────────────────────────────────── - - /// Kick TLS open (ClientHello / accept) on an already-connected socket. - pub fn start_tls(&self, is_client: bool) { - if let InternalSocket::Connected(s) = self.socket { - sock(s).open(is_client, None); - } - } - - /// `SSL*` if this is a TLS socket, else `None`. - #[inline] - pub fn ssl(&self) -> Option<*mut bun_boringssl_sys::SSL> { - if !IS_SSL { - return None; - } - self.get_native_handle().map(|h| h.cast()) - } - - /// `*SSL` when `IS_SSL`, raw fd-as-ptr otherwise. Type-erased to - /// `*mut c_void` here because const-generic type dispatch - /// (`NativeSocketHandleType(is_ssl)`) is unsupported in stable Rust; - /// callers `cast()` immediately anyway. - pub fn get_native_handle(&self) -> Option<*mut c_void> { - match self.socket { - InternalSocket::Connected(s) => sock(s).get_native_handle(), - InternalSocket::Connecting(s) => { - let h = conn(s).get_native_handle(); - if h.is_null() { None } else { Some(h) } - } - InternalSocket::UpgradedDuplex(s) if IS_SSL => duplex(s).ssl().map(|p| p.cast()), - InternalSocket::UpgradedDuplex(_) => None, - #[cfg(windows)] - InternalSocket::Pipe(s) if IS_SSL => pipe(s).ssl().map(|p| p.cast()), - #[cfg(windows)] - InternalSocket::Pipe(_) => None, - #[cfg(not(windows))] - InternalSocket::Pipe => None, - InternalSocket::Detached => None, - } - } - - // ── ext / group / fd ──────────────────────────────────────────────────── - - /// Typed ext storage. `None` for non-uSockets transports. - pub fn ext(&self) -> Option<*mut T> { - match self.socket { - // Raw `*mut T` only — do NOT route through `ext::()` (which - // materializes `&mut T` and would assert validity invariants). - InternalSocket::Connected(s) => Some(sock(s).ext_ptr().cast::()), - InternalSocket::Connecting(s) => { - Some(crate::connecting_socket::us_connecting_socket_ext(conn(s)).cast::()) - } - _ => None, - } - } - - /// Group this socket is linked into. `None` for non-uSockets transports. - pub fn group(&self) -> Option<*mut SocketGroup> { - match self.socket { - InternalSocket::Connected(s) => { - Some(std::ptr::from_mut::(sock(s).group())) - } - InternalSocket::Connecting(s) => Some(conn(s).group()), - _ => None, - } - } - - /// Underlying fd. Same fd regardless of TLS — read directly off the poll. - #[inline] - pub fn fd(&self) -> Fd { - match self.socket { - InternalSocket::Connected(s) => sock(s).get_fd(), - _ => Fd::INVALID, - } - } - - pub fn local_port(&self) -> i32 { - match self.socket { - InternalSocket::Connected(s) => sock(s).local_port(), - _ => 0, - } - } - - pub fn remote_port(&self) -> i32 { - match self.socket { - InternalSocket::Connected(s) => sock(s).remote_port(), - _ => 0, - } - } - - pub fn local_address<'b>(&self, buf: &'b mut [u8]) -> Option<&'b [u8]> { - match self.socket { - InternalSocket::Connected(s) => match sock(s).local_address(buf) { - Ok(v) => Some(v), - Err(e) => bun_core::Output::panic(format_args!( - "Failed to get socket's local address: {}", - e.name() - )), - }, - _ => None, - } - } - - pub fn remote_address<'b>(&self, buf: &'b mut [u8]) -> Option<&'b [u8]> { - match self.socket { - InternalSocket::Connected(s) => match sock(s).remote_address(buf) { - Ok(v) => Some(v), - Err(e) => bun_core::Output::panic(format_args!( - "Failed to get socket's remote address: {}", - e.name() - )), - }, - _ => None, - } - } - - pub fn mark_needs_more_for_sendfile(&self) { - const { assert!(!IS_SSL, "SSL sockets do not support sendfile yet") }; - if let InternalSocket::Connected(s) = self.socket { - sock(s).send_file_needs_more(); - } - } - - // ── constructors ──────────────────────────────────────────────────────── - - #[inline] - pub fn from(socket: *mut us_socket_t) -> Self { - Self { - socket: InternalSocket::Connected(socket), - } - } - #[inline] - pub fn from_connecting(connecting: *mut ConnectingSocket) -> Self { - Self { - socket: InternalSocket::Connecting(connecting), - } - } - #[inline] - pub fn from_any(socket: InternalSocket) -> Self { - Self { socket } - } - #[inline] - pub fn from_duplex(d: *mut UpgradedDuplex) -> Self { - Self { - socket: InternalSocket::UpgradedDuplex(d), - } - } - #[cfg(windows)] - #[inline] - pub fn from_named_pipe(p: *mut WindowsNamedPipe) -> Self { - Self { - socket: InternalSocket::Pipe(p), - } - } - - /// Wrap an already-open fd. Ext stores `*mut This`; the socket is linked - /// into `g` with kind `k`. Port of `NewSocketHandler.fromFd`. - pub fn from_fd( - g: &mut SocketGroup, - k: SocketKind, - handle: Fd, - this: *mut This, - is_ipc: bool, - ) -> Option { - // The dispatch trampolines read the ext slot as `Option>` - // (8 bytes, null-niche optimized), so size and write must match that - // layout — NOT `Option<*mut This>` (16 bytes). - let ext_size = size_of::>>() as c_int; - let raw = g.from_fd( - k, - None, - ext_size, - handle.native() as LIBUS_SOCKET_DESCRIPTOR, - is_ipc, - ); - if raw.is_null() { - return None; - } - // ext storage was sized for `?*This` above; `raw` is a freshly-created - // live socket. `ext::()` is sound here because we immediately - // overwrite the slot, never reading the prior (zeroed) bit pattern. - *sock(raw).ext::>>() = NonNull::new(this); - Some(Self { - socket: InternalSocket::Connected(raw), - }) - } - - /// Connect via a `SocketGroup` and stash `owner` in the socket ext. - /// Replaces the deleted `connectAnon`/`connectPtr`. - pub fn connect_group( - g: &mut SocketGroup, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - raw_host: &[u8], - port: c_int, - owner: *mut Owner, - allow_half_open: bool, - ) -> Result { - let opts: c_int = if allow_half_open { - LIBUS_SOCKET_ALLOW_HALF_OPEN - } else { - 0 - }; - // getaddrinfo doesn't understand bracketed IPv6 literals; URL parsing - // leaves them in (`[::1]`), so strip here like the old connectAnon did. - let host = - if raw_host.len() > 1 && raw_host[0] == b'[' && raw_host[raw_host.len() - 1] == b']' { - &raw_host[1..raw_host.len() - 1] - } else { - raw_host - }; - // SocketGroup.connect needs a NUL-terminated host. - let mut stack = [0u8; 256]; - let heap: Vec; - let host_z: &core::ffi::CStr = if host.len() < stack.len() { - stack[..host.len()].copy_from_slice(host); - stack[host.len()] = 0; - ZStr::from_buf(&stack, host.len()).as_cstr() - } else { - heap = { - let mut v = Vec::with_capacity(host.len() + 1); - v.extend_from_slice(host); - v.push(0); - v - }; - ZStr::from_slice_with_nul(&heap).as_cstr() - }; - - // The dispatch trampolines read the ext slot as `Option>` - // (8 bytes, null-niche optimized), so size and write must match that - // layout — NOT `Option<*mut Owner>` (16 bytes, discriminant-first), - // which would hand the trampoline `1` instead of the owner pointer. - let ext_size = size_of::>>() as c_int; - match g.connect(kind, ssl_ctx, host_z, port, None, opts, ext_size) { - ConnectResult::Failed => Err(ConnectError::FailedToOpenSocket), - ConnectResult::Socket(s) => { - *sock(s).ext::>>() = NonNull::new(owner); - Ok(Self { - socket: InternalSocket::Connected(s), - }) - } - ConnectResult::Connecting(cs) => { - *conn(cs).ext::>>() = NonNull::new(owner); - Ok(Self { - socket: InternalSocket::Connecting(cs), - }) - } - } - } - - pub fn connect_unix_group( - g: &mut SocketGroup, - kind: SocketKind, - ssl_ctx: Option<*mut SslCtx>, - path: &[u8], - owner: *mut Owner, - allow_half_open: bool, - ) -> Result { - let opts: c_int = if allow_half_open { - LIBUS_SOCKET_ALLOW_HALF_OPEN - } else { - 0 - }; - // See connect_group above for the ext-slot layout rationale. - let ext_size = size_of::>>() as c_int; - let s = g.connect_unix(kind, ssl_ctx, path, opts, ext_size); - if s.is_null() { - return Err(ConnectError::FailedToOpenSocket); - } - *sock(s).ext::>>() = NonNull::new(owner); - Ok(Self { - socket: InternalSocket::Connected(s), - }) - } - - /// Move an open socket into a new group/kind, stashing `owner` in the ext. - /// Replaces `Socket.adoptPtr`. - /// - /// `set_socket_field` — the closure writes the resulting - /// `Self` into the owner's socket field via the raw `*mut Owner` (passing - /// `&mut Owner` here would alias any live `&mut` the caller already holds). - pub fn adopt_group( - tcp: *mut us_socket_t, - g: *mut SocketGroup, - kind: SocketKind, - owner: *mut Owner, - set_socket_field: impl FnOnce(*mut Owner, Self), - ) -> bool { - // SAFETY: `tcp` and `g` are non-null FFI handles; ext sizes are word-sized. - let new_s = unsafe { - sock_c::us_socket_adopt( - tcp, - g, - kind as u8, - size_of::<*mut c_void>() as i32, - size_of::<*mut c_void>() as i32, - ) - }; - if new_s.is_null() { - return false; - } - *sock(new_s).ext::<*mut c_void>() = owner.cast::(); - // Forward the raw pointer — do NOT materialize `&mut *owner` here: - // callers (e.g. websocket_client) hold a live `&mut Owner` across this - // call, so creating a second one would be aliased UB. The closure - // performs the field write through the raw pointer itself. - set_socket_field( - owner, - Self { - socket: InternalSocket::Connected(new_s), - }, - ); - true - } -} - -/// Residual raw FFI: `adopt` takes a raw `*mut SocketGroup` from a caller -/// that already holds it as raw, and `SocketGroup` is a sized `#[repr(C)]` -/// mirror (not an opaque ZST), so `opaque_deref_mut` can't help. -mod sock_c { - use super::{SocketGroup, us_socket_t}; - unsafe extern "C" { - pub(super) fn us_socket_adopt( - s: *mut us_socket_t, - group: *mut SocketGroup, - kind: u8, - old_ext_size: i32, - ext_size: i32, - ) -> *mut us_socket_t; - } -} - -// ────────────────────────────────────────────────────────────────────────── -// ConnectError -// ────────────────────────────────────────────────────────────────────────── - -#[derive(strum::IntoStaticStr, Debug)] -pub enum ConnectError { - FailedToOpenSocket, -} -impl From for crate::Error { - fn from(_: ConnectError) -> Self { - crate::Error::FailedToOpenSocket - } -} - -// ────────────────────────────────────────────────────────────────────────── -// AnySocket -// ────────────────────────────────────────────────────────────────────────── - -/// TODO: rename to ConnectedSocket -#[derive(Copy, Clone)] -pub enum AnySocket { - SocketTcp(SocketTCP), - SocketTls(SocketTLS), -} - -/// Stamp out `AnySocket::$m` as a two-arm forward to `NewSocketHandler::$m`. -macro_rules! any_socket_forward { - ($( fn $name:ident(&self $(, $arg:ident : $ty:ty)* ) $(-> $ret:ty)? ; )*) => {$( - #[inline] - pub fn $name(&self $(, $arg: $ty)*) $(-> $ret)? { - match self { - AnySocket::SocketTcp(s) => s.$name($($arg),*), - AnySocket::SocketTls(s) => s.$name($($arg),*), - } - } - )*}; -} - -impl AnySocket { - #[inline] - pub fn is_ssl(&self) -> bool { - matches!(self, AnySocket::SocketTls(_)) - } - #[inline] - pub fn socket(&self) -> &InternalSocket { - match self { - AnySocket::SocketTcp(s) => &s.socket, - AnySocket::SocketTls(s) => &s.socket, - } - } - #[inline] - pub fn ext(&self) -> Option<*mut T> { - match self { - AnySocket::SocketTcp(s) => s.ext::(), - AnySocket::SocketTls(s) => s.ext::(), - } - } - #[inline] - pub fn terminate(&self) { - self.close(CloseCode::failure) - } - #[inline] - pub fn group(&self) -> *mut SocketGroup { - match self { - AnySocket::SocketTcp(s) => s.group(), - AnySocket::SocketTls(s) => s.group(), - } - .unwrap() - } - - any_socket_forward! { - fn is_closed(&self) -> bool; - fn is_shutdown(&self) -> bool; - fn is_established(&self) -> bool; - fn close(&self, code: CloseCode); - fn write(&self, data: &[u8]) -> i32; - fn set_timeout(&self, seconds: c_uint); - fn shutdown(&self); - fn shutdown_read(&self); - fn local_port(&self) -> i32; - fn get_native_handle(&self) -> Option<*mut c_void>; - } -} diff --git a/src/uws_sys/udp.rs b/src/uws_sys/udp.rs deleted file mode 100644 index 8a69b996fe40..000000000000 --- a/src/uws_sys/udp.rs +++ /dev/null @@ -1,237 +0,0 @@ -use core::ffi::{c_char, c_int, c_uint, c_ushort, c_void}; - -use crate::Loop; -// `sockaddr_storage` is not in `libc` on Windows; route through the leaf -// ws2_32 shim there. Both definitions are 128-byte 8-aligned POD. -#[cfg(windows)] -use bun_windows_sys::ws2_32::sockaddr_storage; -#[cfg(not(windows))] -use libc::sockaddr_storage; - -bun_opaque::opaque_ffi! { - /// Opaque uSockets UDP socket handle (`us_udp_socket_t`). - pub struct Socket; -} - -impl Socket { - pub fn create( - loop_: *mut Loop, - data_cb: extern "C" fn(*mut Socket, *mut PacketBuffer, c_int), - drain_cb: extern "C" fn(*mut Socket), - close_cb: extern "C" fn(*mut Socket), - recv_error_cb: extern "C" fn(*mut Socket, c_int), - host: *const c_char, - port: c_ushort, - options: c_int, - err: Option<&mut c_int>, - user_data: *mut c_void, - ) -> *mut Socket { - // SAFETY: thin wrapper over us_create_udp_socket; all pointer args are - // forwarded as-is from the caller, who upholds uSockets' contract. - unsafe { - us_create_udp_socket( - loop_, - data_cb, - drain_cb, - close_cb, - recv_error_cb, - host, - port, - options, - match err { - Some(e) => std::ptr::from_mut::(e), - None => core::ptr::null_mut(), - }, - user_data, - ) - } - } - - pub fn send( - &mut self, - payloads: &[*const u8], - lengths: &[usize], - addresses: &[*const c_void], - ) -> c_int { - debug_assert!(payloads.len() == lengths.len() && payloads.len() == addresses.len()); - // SAFETY: slices share length (asserted above); self is a live us_udp_socket_t. - unsafe { - us_udp_socket_send( - self, - payloads.as_ptr(), - lengths.as_ptr(), - addresses.as_ptr(), - c_int::try_from(payloads.len()).expect("int cast"), - ) - } - } - - pub fn user(&mut self) -> *mut c_void { - us_udp_socket_user(self) - } - - /// Get the bound port in host byte order - pub fn bound_port(&mut self) -> c_int { - us_udp_socket_bound_port(self) - } - - pub fn bound_ip(&mut self, buf: *mut u8, length: &mut i32) { - // SAFETY: buf must point to at least *length bytes; thin FFI passthrough. - unsafe { us_udp_socket_bound_ip(self, buf, length) } - } - - pub fn remote_ip(&mut self, buf: *mut u8, length: &mut i32) { - // SAFETY: buf must point to at least *length bytes; thin FFI passthrough. - unsafe { us_udp_socket_remote_ip(self, buf, length) } - } - - pub fn close(&mut self) { - us_udp_socket_close(self) - } - - pub fn connect(&mut self, hostname: *const c_char, port: c_uint) -> c_int { - // SAFETY: thin FFI passthrough; hostname must be NUL-terminated per uSockets. - unsafe { us_udp_socket_connect(self, hostname, port) } - } - - pub fn disconnect(&mut self) -> c_int { - us_udp_socket_disconnect(self) - } - - pub fn set_broadcast(&mut self, enabled: bool) -> c_int { - us_udp_socket_set_broadcast(self, enabled as c_int) - } - - pub fn set_unicast_ttl(&mut self, ttl: i32) -> c_int { - us_udp_socket_set_ttl_unicast(self, ttl as c_int) - } - - pub fn set_multicast_ttl(&mut self, ttl: i32) -> c_int { - us_udp_socket_set_ttl_multicast(self, ttl as c_int) - } - - pub fn set_multicast_loopback(&mut self, enabled: bool) -> c_int { - us_udp_socket_set_multicast_loopback(self, enabled as c_int) - } - - pub fn set_multicast_interface(&mut self, iface: &sockaddr_storage) -> c_int { - us_udp_socket_set_multicast_interface(self, iface) - } - - pub fn set_membership( - &mut self, - address: &sockaddr_storage, - iface: Option<&sockaddr_storage>, - drop: bool, - ) -> c_int { - us_udp_socket_set_membership(self, address, iface, drop as c_int) - } - - pub fn set_source_specific_membership( - &mut self, - source: &sockaddr_storage, - group: &sockaddr_storage, - iface: Option<&sockaddr_storage>, - drop: bool, - ) -> c_int { - us_udp_socket_set_source_specific_membership(self, source, group, iface, drop as c_int) - } -} - -unsafe extern "C" { - fn us_create_udp_socket( - loop_: *mut Loop, - data_cb: extern "C" fn(*mut Socket, *mut PacketBuffer, c_int), - drain_cb: extern "C" fn(*mut Socket), - close_cb: extern "C" fn(*mut Socket), - recv_error_cb: extern "C" fn(*mut Socket, c_int), - host: *const c_char, - port: c_ushort, - options: c_int, - err: *mut c_int, - user_data: *mut c_void, - ) -> *mut Socket; - fn us_udp_socket_connect(socket: *mut Socket, hostname: *const c_char, port: c_uint) -> c_int; - safe fn us_udp_socket_disconnect(socket: &mut Socket) -> c_int; - fn us_udp_socket_send( - socket: *mut Socket, - payloads: *const *const u8, - lengths: *const usize, - addresses: *const *const c_void, - num: c_int, - ) -> c_int; - safe fn us_udp_socket_user(socket: &mut Socket) -> *mut c_void; - safe fn us_udp_socket_bound_port(socket: &mut Socket) -> c_int; - fn us_udp_socket_bound_ip(socket: *mut Socket, buf: *mut u8, length: *mut i32); - fn us_udp_socket_remote_ip(socket: *mut Socket, buf: *mut u8, length: *mut i32); - safe fn us_udp_socket_close(socket: &mut Socket); - safe fn us_udp_socket_set_broadcast(socket: &mut Socket, enabled: c_int) -> c_int; - safe fn us_udp_socket_set_ttl_unicast(socket: &mut Socket, ttl: c_int) -> c_int; - safe fn us_udp_socket_set_ttl_multicast(socket: &mut Socket, ttl: c_int) -> c_int; - safe fn us_udp_socket_set_multicast_loopback(socket: &mut Socket, enabled: c_int) -> c_int; - safe fn us_udp_socket_set_multicast_interface( - socket: &mut Socket, - iface: &sockaddr_storage, - ) -> c_int; - // `Option<&sockaddr_storage>` is FFI-safe (null-pointer niche → `*const`); - // the C side reads through `iface` only when non-null. With every pointer - // arg either a reference or a niche-optimized `Option<&T>`, the validity - // proof is in the type signature — no remaining preconditions, so `safe fn`. - safe fn us_udp_socket_set_membership( - socket: &mut Socket, - address: &sockaddr_storage, - iface: Option<&sockaddr_storage>, - drop: c_int, - ) -> c_int; - safe fn us_udp_socket_set_source_specific_membership( - socket: &mut Socket, - source: &sockaddr_storage, - group: &sockaddr_storage, - iface: Option<&sockaddr_storage>, - drop: c_int, - ) -> c_int; -} - -bun_opaque::opaque_ffi! { - /// Opaque uSockets UDP packet buffer (`us_udp_packet_buffer_t`). - pub struct PacketBuffer; -} - -impl PacketBuffer { - pub fn get_peer(&mut self, index: c_int) -> &mut sockaddr_storage { - // SAFETY: uSockets guarantees a non-null, properly-aligned peer pointer for - // indices < packet count. The returned storage lives inside the C-owned packet - // buffer, which is exclusively loaned to the data callback for its duration; no - // other Rust or C path holds a reference to it. The reborrow of `&mut self` - // ties the returned lifetime to this handle, so the borrow checker prevents - // obtaining a second overlapping `&mut` via `get_peer`/`get_payload`. - unsafe { &mut *us_udp_packet_buffer_peer(self, index) } - } - - pub fn get_payload(&mut self, index: c_int) -> &mut [u8] { - // SAFETY: for `index < packet_count`, uSockets returns a non-null - // pointer to `len` initialized bytes inside the C-owned packet buffer, - // exclusively loaned to the data callback for its duration. The - // returned borrow is tied to `&mut self`, so the borrow checker - // prevents overlapping `&mut` via `get_peer`/`get_payload`. - unsafe { - let payload = us_udp_packet_buffer_payload(self, index); - let len = us_udp_packet_buffer_payload_length(self, index); - core::slice::from_raw_parts_mut(payload, usize::try_from(len).expect("int cast")) - } - } - - pub fn get_truncated(&mut self, index: c_int) -> bool { - us_udp_packet_buffer_truncated(self, index) != 0 - } -} - -unsafe extern "C" { - safe fn us_udp_packet_buffer_peer( - buf: &mut PacketBuffer, - index: c_int, - ) -> *mut sockaddr_storage; - safe fn us_udp_packet_buffer_payload(buf: &mut PacketBuffer, index: c_int) -> *mut u8; - safe fn us_udp_packet_buffer_payload_length(buf: &mut PacketBuffer, index: c_int) -> c_int; - safe fn us_udp_packet_buffer_truncated(buf: &mut PacketBuffer, index: c_int) -> c_int; -} diff --git a/src/uws_sys/us_socket_t.rs b/src/uws_sys/us_socket_t.rs deleted file mode 100644 index a7cd043d1ded..000000000000 --- a/src/uws_sys/us_socket_t.rs +++ /dev/null @@ -1,691 +0,0 @@ -use core::ffi::{c_char, c_int, c_uint, c_void}; -use core::ptr::{self, NonNull}; - -use bun_core::Fd; - -use crate::{LIBUS_SOCKET_DESCRIPTOR, SocketGroup, SocketKind, SslCtx, us_bun_verify_error_t}; - -bun_core::declare_scope!(uws, visible); - -const MAX_I32: usize = i32::MAX as usize; - -// Rust bindings for `us_socket_t`. -// -// TLS is per-socket (`s->ssl != NULL` in C); there is no `int ssl` selector. -// Dispatch is by `kind()` — see `SocketKind` and `dispatch.rs`. -// -// Higher-level wrappers (`uws::SocketTCP`/`SocketTLS`) cover named pipes, -// upgraded duplexes, and async DNS. -bun_opaque::opaque_ffi! { pub struct us_socket_t; } - -#[repr(i32)] -#[derive(Copy, Clone, Eq, PartialEq, strum::IntoStaticStr)] -pub enum CloseCode { - /// TLS: send close_notify and defer fd close until peer replies. TCP: FIN. - normal = 0, - /// TLS: fast-shutdown (no wait). TCP: SO_LINGER{1,0} → RST, dropping any - /// unflushed send buffer. Only for `terminate()` / GC abort. - failure = 1, - /// TLS: fast-shutdown (no wait). TCP: FIN. For `_handle.close()` where - /// the JS wrapper detaches immediately so `.normal`'s deferral would - /// orphan the `us_socket_t`, but already-written data must still drain. - fast_shutdown = 2, -} - -/// Layout-compatible with `struct us_iovec_t` in libusockets.h (== POSIX iovec). -#[repr(C)] -#[derive(Clone, Copy)] -pub struct UsIoVec { - pub base: *const core::ffi::c_void, - pub len: usize, -} - -impl us_socket_t { - pub fn open(&mut self, is_client: bool, ip_addr: Option<&[u8]>) { - bun_core::scoped_log!(uws, "us_socket_open({:p}, is_client: {})", self, is_client); - if let Some(ip) = ip_addr { - debug_assert!(ip.len() < MAX_I32); - unsafe { - // SAFETY: self is a live us_socket_t; ip.ptr valid for ip.len bytes - let _ = c::us_socket_open( - self, - is_client as i32, - ip.as_ptr(), - i32::try_from(ip.len().min(MAX_I32)).expect("int cast"), - ); - } - } else { - unsafe { - // SAFETY: self is a live us_socket_t - let _ = c::us_socket_open(self, is_client as i32, ptr::null(), 0); - } - } - } - - pub fn pause(&mut self) { - bun_core::scoped_log!(uws, "us_socket_pause({:p})", self); - c::us_socket_pause(self); - } - - pub fn resume(&mut self) { - bun_core::scoped_log!(uws, "us_socket_resume({:p})", self); - c::us_socket_resume(self); - } - - pub fn close(&mut self, code: CloseCode) { - bun_core::scoped_log!( - uws, - "us_socket_close({:p}, {})", - self, - <&'static str>::from(code) - ); - unsafe { - // SAFETY: self is a live us_socket_t - let _ = c::us_socket_close(self, code, ptr::null_mut()); - } - } - - pub fn shutdown(&mut self) { - bun_core::scoped_log!(uws, "us_socket_shutdown({:p})", self); - c::us_socket_shutdown(self); - } - - pub fn shutdown_read(&mut self) { - c::us_socket_shutdown_read(self); - } - - pub fn is_closed(&self) -> bool { - c::us_socket_is_closed(self) > 0 - } - - /// Write that also reports a fatal (non-would-block) send error so the - /// node:net path can fail the pending write instead of waiting forever. - pub fn write_check_error(&self, data: &[u8]) -> (i32, bool) { - let mut fatal: i32 = 0; - // SAFETY: `self` is a live `us_socket_t`; `data` is valid for its length - // (clamped to i32) and `fatal` outlives the call as the out-parameter. - let written = unsafe { - c::us_socket_write_check_error( - self, - data.as_ptr().cast(), - i32::try_from(data.len().min(MAX_I32)).expect("int cast"), - &raw mut fatal, - ) - }; - (written, fatal != 0) - } - - pub fn is_shutdown(&self) -> bool { - c::us_socket_is_shut_down(self) > 0 - } - - pub fn is_tls(&self) -> bool { - c::us_socket_is_tls(self) > 0 - } - - pub fn local_port(&self) -> i32 { - c::us_socket_local_port(self) - } - - pub fn remote_port(&self) -> i32 { - c::us_socket_remote_port(self) - } - - /// Returned slice is a view into `buf`. - pub fn local_address<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], crate::Error> { - let mut length: i32 = i32::try_from(buf.len().min(MAX_I32)).expect("int cast"); - unsafe { - // SAFETY: buf.as_mut_ptr() valid for `length` bytes; length is in/out - c::us_socket_local_address(self, buf.as_mut_ptr(), &raw mut length); - } - if length < 0 { - let errno = bun_errno::get_errno(length); - debug_assert!(errno != bun_errno::E::SUCCESS); - return Err(crate::Error::Sys( - bun_errno::SystemErrno::init(errno as i64).unwrap_or(bun_errno::SystemErrno::EIO), - )); - } - debug_assert!(buf.len() >= length as usize); - Ok(&buf[..usize::try_from(length).expect("int cast")]) - } - - /// Returned slice is a view into `buf`. On error, `errno` should be set. - pub fn remote_address<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], crate::Error> { - let mut length: i32 = i32::try_from(buf.len().min(MAX_I32)).expect("int cast"); - unsafe { - // SAFETY: buf.as_mut_ptr() valid for `length` bytes; length is in/out - c::us_socket_remote_address(self, buf.as_mut_ptr(), &raw mut length); - } - if length < 0 { - let errno = bun_errno::get_errno(length); - debug_assert!(errno != bun_errno::E::SUCCESS); - return Err(crate::Error::Sys( - bun_errno::SystemErrno::init(errno as i64).unwrap_or(bun_errno::SystemErrno::EIO), - )); - } - debug_assert!(buf.len() >= length as usize); - Ok(&buf[..usize::try_from(length).expect("int cast")]) - } - - pub fn set_timeout(&mut self, seconds: u32) { - c::us_socket_timeout(self, seconds); - } - - pub fn set_long_timeout(&mut self, minutes: u32) { - c::us_socket_long_timeout(self, minutes); - } - - pub fn set_nodelay(&mut self, enabled: bool) { - c::us_socket_nodelay(self, enabled as c_int); - } - - pub fn set_keepalive(&mut self, enabled: bool, delay: u32) -> i32 { - c::us_socket_keepalive(self, enabled as c_int, delay) - } - - /// Set the IP type-of-service / traffic class. Returns 0 on success or a - /// negative platform errno. - pub fn set_tos(&mut self, tos: i32) -> i32 { - c::us_socket_set_tos(self, tos) - } - - /// Get the IP type-of-service / traffic class (>= 0) or a negative errno. - pub fn get_tos(&mut self) -> i32 { - c::us_socket_get_tos(self) - } - - /// Resume a handshake suspended by an asynchronous SNICallback. `ctx` - /// carries an owned SSL_CTX reference that the call consumes (may be - /// null = fall through to the default context); `error` aborts instead. - pub fn sni_resolve(&mut self, ctx: *mut SslCtx, error: bool) { - c::us_socket_sni_resolve(self, ctx, error as c_int); - } - - /// `SSL*` if TLS, else null. Use `get_fd()` for the descriptor. - pub fn ssl(&mut self) -> Option<&mut bun_boringssl_sys::SSL> { - if !self.is_tls() { - return None; - } - unsafe { - // SAFETY: is_tls() guarantees the native handle is a non-null SSL* - c::us_socket_get_native_handle(self) - .cast::() - .as_mut() - } - } - - /// Node-compat `_handle` shape: `SSL*` for TLS sockets, fd-as-pointer for - /// plain TCP. Consumers that want one or the other should call `ssl()` / - /// `get_fd()` directly; this is the round-trip-to-JS form. - pub fn get_native_handle(&mut self) -> Option<*mut c_void> { - let p = c::us_socket_get_native_handle(self); - if p.is_null() { None } else { Some(p) } - } - - pub fn ext(&mut self) -> &mut T { - unsafe { - // SAFETY: us_socket_ext returns LIBUS_EXT_ALIGNMENT-aligned storage - // sized for T at socket creation; caller picks the same T it stored. - &mut *c::us_socket_ext(self).cast::() - } - } - - /// Type-erased ext storage — `LIBUS_EXT_ALIGNMENT`-aligned bytes - /// immediately after the C struct. Prefer `ext()`. - pub fn ext_ptr(&mut self) -> *mut u8 { - c::us_socket_ext(self).cast::() - } - - pub fn group(&mut self) -> &mut SocketGroup { - unsafe { - // SAFETY: us_socket_group never returns null for a live socket - &mut *c::us_socket_group(self) - } - } - #[inline] - pub fn raw_group(&mut self) -> &mut SocketGroup { - self.group() - } - - pub fn kind(&self) -> SocketKind { - SocketKind::from_u8(c::us_socket_kind(self)) - } - - /// Re-stamp the dispatch kind in place. Used after `Listener.onCreate` - /// stashes the `NewSocket*` in ext so subsequent events skip the listener - /// arm and route straight to `BunSocket`. - pub fn set_kind(&mut self, k: SocketKind) { - c::us_socket_set_kind(self, k as u8); - } - - /// Move this socket to a new group/kind, optionally resizing its ext. - /// Returns the (possibly relocated) socket; `self` is invalid after. - // TODO: take `self` by value — it is consumed/invalidated; the returned ptr may be a different allocation - pub fn adopt( - &mut self, - g: &mut SocketGroup, - k: SocketKind, - old_ext: i32, - new_ext: i32, - ) -> Option> { - // SAFETY: self and g are live; C may realloc and return a different us_socket_t* - unsafe { NonNull::new(c::us_socket_adopt(self, g, k as u8, old_ext, new_ext)) } - } - - /// `adopt` + attach a fresh `SSL*` from `ssl_ctx` (refcounted by the C - /// side for the socket's lifetime). Does NOT kick the handshake — the - /// caller must repoint `ext` first (so any dispatch lands in the new - /// owner) and then call `start_tls_handshake`. Replaces - /// `us_socket_upgrade_to_tls` / `wrapTLS`. - // TODO: take `self` by value — it is consumed/invalidated; the returned ptr may be a different allocation - pub fn adopt_tls( - &mut self, - g: &mut SocketGroup, - k: SocketKind, - ssl_ctx: &mut SslCtx, - sni: Option<&core::ffi::CStr>, - is_client: bool, - old_ext: i32, - new_ext: i32, - ) -> Option> { - // SAFETY: self/g/ssl_ctx are live; sni is null or a valid C string; C may - // realloc and return a different us_socket_t* - unsafe { - NonNull::new(c::us_socket_adopt_tls( - self, - g, - k as u8, - ssl_ctx, - sni.map_or(ptr::null(), |s| s.as_ptr()), - is_client as i32, - old_ext, - new_ext, - )) - } - } - - /// Send ClientHello. Separate from `adopt_tls` so the ext slot can be - /// repointed before any handshake/close dispatch can fire. - pub fn start_tls_handshake(&mut self) { - c::us_socket_start_tls_handshake(self); - } - - /// Feed bytes that were already read off the wire (e.g. a ClientHello the - /// plain-TCP layer consumed before the upgrade) through the same decrypt - /// path as bytes arriving from the kernel. - pub fn tls_feed(&mut self, data: &[u8]) { - if data.is_empty() { - return; - } - // The C side takes an `int` length: feed in i32-sized chunks instead of - // truncating the cast (a clamp would silently drop the tail and there is - // no return value to report a partial feed). Each chunk can re-enter the - // data dispatch, which may close the socket — stop feeding once it does. - for chunk in data.chunks(MAX_I32) { - if self.is_closed() { - return; - } - // SAFETY: `self` is a live TLS `us_socket_t`; `chunk` is valid for its - // length, which fits in an i32 by construction. - unsafe { - c::us_socket_tls_feed(self, chunk.as_ptr().cast(), chunk.len() as i32); - } - } - } - - /// Tee inbound ciphertext to `us_dispatch_ssl_raw_tap` before `SSL_read` - /// consumes it, so the `[raw, tls]` pair from `upgradeTLS` can surface - /// encrypted bytes to the original net.Socket `data` listener. - pub fn set_ssl_raw_tap(&mut self, enabled: bool) { - c::us_socket_set_ssl_raw_tap(self, enabled as c_int); - } - - pub fn write(&mut self, data: &[u8]) -> i32 { - let rc = unsafe { - // SAFETY: data.as_ptr() valid for data.len() bytes - c::us_socket_write( - self, - data.as_ptr(), - i32::try_from(data.len().min(MAX_I32)).expect("int cast"), - ) - }; - bun_core::scoped_log!(uws, "us_socket_write({:p}, {}) = {}", self, data.len(), rc); - rc - } - - #[cfg(not(windows))] - pub fn write_fd(&mut self, data: &[u8], file_descriptor: Fd) -> i32 { - let rc = unsafe { - // SAFETY: data.as_ptr() valid for data.len() bytes; fd is a valid native descriptor - c::us_socket_ipc_write_fd( - self, - data.as_ptr(), - i32::try_from(data.len().min(MAX_I32)).expect("int cast"), - file_descriptor.native(), - ) - }; - bun_core::scoped_log!( - uws, - "us_socket_ipc_write_fd({:p}, {}, {}) = {}", - self, - data.len(), - file_descriptor.native(), - rc - ); - rc - } - #[cfg(windows)] - pub fn write_fd(&mut self, _data: &[u8], _file_descriptor: Fd) -> i32 { - // A `compile_error!` here would brick the windows build even with no - // callers (it is evaluated at item definition), so use a runtime trap - // instead; no current Windows call site. - unreachable!("us_socket_t::write_fd is not implemented on Windows") - } - - pub fn write2(&mut self, first: &[u8], second: &[u8]) -> i32 { - let rc = unsafe { - // SAFETY: both slices valid for their respective lengths - c::us_socket_write2( - self, - first.as_ptr(), - first.len(), - second.as_ptr(), - second.len(), - ) - }; - bun_core::scoped_log!( - uws, - "us_socket_write2({:p}, {}, {}) = {}", - self, - first.len(), - second.len(), - rc - ); - rc - } - - /// Vectored raw write — all chunks reach the fd in one writev (sequential - /// sends on platforms without it). Same closed/shutdown gating and - /// partial-write poll handling as `raw_write`. Plain-TCP only by contract: - /// raw writes bypass TLS framing. - pub fn raw_writev(&mut self, iov: &[UsIoVec]) -> i32 { - bun_core::scoped_log!(uws, "us_socket_raw_writev({:p}, {})", self, iov.len()); - // SAFETY: iov entries reference memory owned by the caller for the - // duration of this call; the C side only reads them synchronously. - unsafe { - c::us_socket_raw_writev( - self, - iov.as_ptr(), - i32::try_from(iov.len()).expect("int cast"), - ) - } - } - - /// Bypass TLS — raw bytes to the fd even if `is_tls()`. - pub fn raw_write(&mut self, data: &[u8]) -> i32 { - bun_core::scoped_log!(uws, "us_socket_raw_write({:p}, {})", self, data.len()); - unsafe { - // SAFETY: data.as_ptr() valid for data.len() bytes - c::us_socket_raw_write( - self, - data.as_ptr(), - i32::try_from(data.len().min(MAX_I32)).expect("int cast"), - ) - } - } - - pub fn flush(&mut self) { - c::us_socket_flush(self); - } - - pub fn send_file_needs_more(&mut self) { - c::us_socket_sendfile_needs_more(self); - } - - pub fn get_fd(&self) -> Fd { - let raw = c::us_socket_get_fd(self); - // LIBUS_SOCKET_DESCRIPTOR is `c_int` on POSIX, `SOCKET` (`usize`) on - // Windows. Tag kind=system explicitly — `from_native` would store raw - // bits verbatim and mis-tag `INVALID_SOCKET` (~0) as kind=uv. - #[cfg(windows)] - { - Fd::from_system(raw as *mut core::ffi::c_void) - } - #[cfg(not(windows))] - { - Fd::from_native(raw) - } - } - - pub fn get_verify_error(&self) -> us_bun_verify_error_t { - c::us_socket_verify_error(self) - } - - pub fn get_error(&self) -> i32 { - c::us_socket_get_error(self) - } - - pub fn is_established(&self) -> bool { - c::us_socket_is_established(self) > 0 - } -} - -/// Raw externs. Private — every operation has a typed method on `us_socket_t`. -mod c { - use super::*; - - // Every C-side decl takes `us_socket_r` (= `us_socket_t* nonnull_arg`), so - // mirror that here — passing null is UB and the typed methods above never do. - // `us_socket_t` is `#[repr(C)]` with `UnsafeCell<[u8; 0]>`, so `&us_socket_t` - // / `&mut us_socket_t` are ABI-identical to a non-null pointer with no - // `readonly`/`noalias` attribute. Shims whose only pointer argument is the - // socket itself (plus value types) are declared `safe fn` so the validity - // proof lives in the type signature instead of per-call-site `unsafe { }`. - // Shims that take a (ptr,len) pair, nullable raw, or transfer ownership - // stay unsafe. - unsafe extern "C" { - pub(super) safe fn us_socket_get_native_handle(s: &mut us_socket_t) -> *mut c_void; - - pub(super) safe fn us_socket_local_port(s: &us_socket_t) -> i32; - pub(super) safe fn us_socket_remote_port(s: &us_socket_t) -> i32; - pub(super) fn us_socket_remote_address( - s: *const us_socket_t, - buf: *mut u8, - length: *mut i32, - ); - pub(super) fn us_socket_local_address( - s: *const us_socket_t, - buf: *mut u8, - length: *mut i32, - ); - pub(super) safe fn us_socket_timeout(s: &mut us_socket_t, seconds: c_uint); - pub(super) safe fn us_socket_long_timeout(s: &mut us_socket_t, minutes: c_uint); - pub(super) safe fn us_socket_nodelay(s: &mut us_socket_t, enable: c_int); - pub(super) safe fn us_socket_set_tos(s: &mut us_socket_t, tos: c_int) -> c_int; - pub(super) safe fn us_socket_get_tos(s: &mut us_socket_t) -> c_int; - pub(super) safe fn us_socket_sni_resolve( - s: &mut us_socket_t, - ctx: *mut SslCtx, - error: c_int, - ); - pub(super) safe fn us_socket_keepalive( - s: &mut us_socket_t, - enable: c_int, - delay: c_uint, - ) -> c_int; - - pub(super) safe fn us_socket_ext(s: &mut us_socket_t) -> *mut c_void; - pub(super) safe fn us_socket_group(s: &mut us_socket_t) -> *mut SocketGroup; - pub(super) safe fn us_socket_kind(s: &us_socket_t) -> u8; - pub(super) safe fn us_socket_set_kind(s: &mut us_socket_t, kind: u8); - pub(super) safe fn us_socket_set_ssl_raw_tap(s: &mut us_socket_t, enabled: c_int); - pub(super) safe fn us_socket_is_tls(s: &us_socket_t) -> i32; - - pub(super) fn us_socket_write(s: *mut us_socket_t, data: *const u8, length: i32) -> i32; - #[cfg(not(windows))] - pub(super) fn us_socket_ipc_write_fd( - s: *mut us_socket_t, - data: *const u8, - length: i32, - fd: i32, - ) -> i32; - pub(super) fn us_socket_write2( - s: *mut us_socket_t, - header: *const u8, - len: usize, - payload: *const u8, - len2: usize, - ) -> i32; - pub(super) fn us_socket_raw_writev( - s: *mut us_socket_t, - iov: *const super::UsIoVec, - count: i32, - ) -> i32; - pub(super) fn us_socket_raw_write(s: *mut us_socket_t, data: *const u8, length: i32) - -> i32; - pub(super) safe fn us_socket_flush(s: &mut us_socket_t); - - pub(super) fn us_socket_open( - s: *mut us_socket_t, - is_client: i32, - ip: *const u8, - ip_length: i32, - ) -> *mut us_socket_t; - pub(super) safe fn us_socket_pause(s: &mut us_socket_t); - pub(super) safe fn us_socket_resume(s: &mut us_socket_t); - pub(super) fn us_socket_close( - s: *mut us_socket_t, - code: CloseCode, - reason: *mut c_void, - ) -> *mut us_socket_t; - pub(super) safe fn us_socket_shutdown(s: &mut us_socket_t); - pub(super) safe fn us_socket_is_closed(s: &us_socket_t) -> i32; - pub(super) fn us_socket_write_check_error( - s: &us_socket_t, - data: *const core::ffi::c_char, - length: i32, - fatal_write_error: *mut i32, - ) -> i32; - pub(super) safe fn us_socket_shutdown_read(s: &mut us_socket_t); - pub(super) safe fn us_socket_is_shut_down(s: &us_socket_t) -> i32; - pub(super) safe fn us_socket_sendfile_needs_more(socket: &mut us_socket_t); - pub(super) safe fn us_socket_get_fd(s: &us_socket_t) -> LIBUS_SOCKET_DESCRIPTOR; - pub(super) safe fn us_socket_verify_error(s: &us_socket_t) -> us_bun_verify_error_t; - pub(super) safe fn us_socket_get_error(s: &us_socket_t) -> c_int; - pub(super) safe fn us_socket_is_established(s: &us_socket_t) -> i32; - - pub(super) fn us_socket_adopt( - s: *mut us_socket_t, - group: *mut SocketGroup, - kind: u8, - old_ext_size: i32, - ext_size: i32, - ) -> *mut us_socket_t; - /// ssl_ctx is required (the whole point); sni may be null. - pub(super) fn us_socket_adopt_tls( - s: *mut us_socket_t, - group: *mut SocketGroup, - kind: u8, - ssl_ctx: *mut SslCtx, - sni: *const c_char, - is_client: i32, - old_ext_size: i32, - ext_size: i32, - ) -> *mut us_socket_t; - /// Feed already-read bytes through the TLS decrypt path. - pub(super) fn us_socket_tls_feed( - s: *mut us_socket_t, - data: *const c_char, - length: i32, - ) -> *mut us_socket_t; - pub(super) safe fn us_socket_start_tls_handshake(s: &mut us_socket_t); - } -} - -#[repr(C)] -pub struct us_socket_stream_buffer_t { - pub list_ptr: *mut u8, - pub list_cap: usize, - pub list_len: usize, - pub total_bytes_written: usize, - pub cursor: usize, -} - -impl Default for us_socket_stream_buffer_t { - fn default() -> Self { - Self { - list_ptr: ptr::null_mut(), - list_cap: 0, - list_len: 0, - total_bytes_written: 0, - cursor: 0, - } - } -} - -/// Minimal structural mirror of `bun_io::StreamBuffer` for tier-0 interop. -/// The higher-tier `bun_io::StreamBuffer` is field-identical and converts via -/// `From`/`Into` (added in the move-in pass). -pub struct StreamBuffer { - pub list: Vec, - pub cursor: usize, -} - -impl us_socket_stream_buffer_t { - pub fn update(&mut self, stream_buffer: StreamBuffer) { - // Decompose the Vec backing `stream_buffer.list` into raw parts so - // the C side can read ptr/len/cap directly. - let mut list = core::mem::ManuallyDrop::new(stream_buffer.list); - if list.capacity() > 0 { - self.list_ptr = list.as_mut_ptr(); - } else { - self.list_ptr = ptr::null_mut(); - } - self.list_len = list.len(); - self.list_cap = list.capacity(); - self.cursor = stream_buffer.cursor; - } - - pub fn wrote(&mut self, written: usize) { - self.total_bytes_written = self.total_bytes_written.saturating_add(written); - } - - pub fn to_stream_buffer(&self) -> StreamBuffer { - StreamBuffer { - list: if !self.list_ptr.is_null() { - unsafe { - // SAFETY: list_ptr/list_len/list_cap were produced by decomposing a - // Vec in `update`; global allocator (mimalloc) matches. - Vec::from_raw_parts(self.list_ptr, self.list_len, self.list_cap) - } - } else { - Vec::new() - }, - cursor: self.cursor, - } - } - - /// Explicit teardown — this struct is `#[repr(C)]` and freed via the - /// exported `us_socket_free_stream_buffer`, so no `Drop` impl. - /// - /// SAFETY: `this` must point to a live `us_socket_stream_buffer_t` whose - /// `list_ptr`/`list_cap` were produced by `update` (decomposed `Vec` on - /// the global mimalloc allocator). Not called more than once. - pub unsafe fn destroy(this: *mut Self) { - // SAFETY: caller contract — `this` is non-null and exclusively borrowed - let this = unsafe { &mut *this }; - if !this.list_ptr.is_null() { - unsafe { - // SAFETY: list_ptr/list_cap came from a decomposed Vec (global mimalloc). - drop(Vec::from_raw_parts(this.list_ptr, 0, this.list_cap)); - } - } - } -} - -#[unsafe(no_mangle)] -pub(crate) extern "C" fn us_socket_free_stream_buffer(buffer: *mut us_socket_stream_buffer_t) { - // SAFETY: caller (C) passes a live us_socket_stream_buffer_t* - unsafe { us_socket_stream_buffer_t::destroy(buffer) }; -} -// us_socket_buffered_js_write moved to src/runtime/socket/uws_jsc.rs diff --git a/src/uws_sys/vtable.rs b/src/uws_sys/vtable.rs deleted file mode 100644 index f8947ea9fe6d..000000000000 --- a/src/uws_sys/vtable.rs +++ /dev/null @@ -1,344 +0,0 @@ -//! Compile-time `us_socket_vtable_t` generator. Given a Rust handler type and -//! the ext payload type, emits a single static-const `VTable` whose entries are -//! `extern "C"` trampolines that recover the typed ext from the raw socket and -//! forward. -//! -//! This replaces `NewSocketHandler.configure`/`unsafeConfigure`/`wrapTLS`, -//! which did the same trampoline dance per-call at runtime via -//! `us_socket_context_on_*`. One handler type → one vtable in `.rodata`. -//! -//! Handler shape (any subset; missing methods → vtable entry left null): -//! type Ext = MySocket; // what `us_socket_ext` holds -//! fn on_open(ext, *us_socket_t, is_client: bool, ip: &[u8]) -//! fn on_data(ext, *us_socket_t, data: &[u8]) -//! fn on_writable(ext, *us_socket_t) -//! fn on_close(ext, *us_socket_t, code: i32, reason: Option<*mut c_void>) -//! -//! `Ext` may be omitted entirely (HAS_EXT = false); handlers then take -//! `(*us_socket_t, …)` and recover their owner from `s.group().owner::()` -//! instead. -//! -//! fn on_timeout(ext, *us_socket_t) -//! fn on_long_timeout(ext, *us_socket_t) -//! fn on_end(ext, *us_socket_t) -//! fn on_fd(ext, *us_socket_t, fd: c_int) -//! fn on_connect_error(ext, *us_socket_t, code: i32) -//! fn on_connecting_error(*ConnectingSocket, code: i32) -//! fn on_handshake(ext, *us_socket_t, ok: bool, err: us_bun_verify_error_t) - -use core::ffi::{c_int, c_void}; - -use crate::socket_group::VTable; -use crate::thunk; -use crate::{ConnectingSocket, us_bun_verify_error_t, us_socket_t}; - -// Handlers implement this trait and set the `HAS_ON_*` associated consts for -// each method they actually provide. Default impls are `unreachable!()` and -// the corresponding vtable slot is left `None` when the const is `false`. -pub trait Handler: 'static { - /// What `us_socket_ext` holds. Ignored when `HAS_EXT == false`. - type Ext; - /// When false, handlers take `(s, …)` instead - /// of `(ext, s, …)` and recover their owner from `s.group().owner::()`. - const HAS_EXT: bool = true; - - const HAS_ON_OPEN: bool = false; - const HAS_ON_DATA: bool = false; - const HAS_ON_FD: bool = false; - const HAS_ON_WRITABLE: bool = false; - const HAS_ON_CLOSE: bool = false; - const HAS_ON_TIMEOUT: bool = false; - const HAS_ON_LONG_TIMEOUT: bool = false; - const HAS_ON_END: bool = false; - const HAS_ON_CONNECT_ERROR: bool = false; - const HAS_ON_CONNECTING_ERROR: bool = false; - const HAS_ON_HANDSHAKE: bool = false; - - fn on_open(_ext: &mut Self::Ext, _s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - unreachable!() - } - fn on_data(_ext: &mut Self::Ext, _s: *mut us_socket_t, _data: &[u8]) { - unreachable!() - } - fn on_fd(_ext: &mut Self::Ext, _s: *mut us_socket_t, _fd: c_int) { - unreachable!() - } - fn on_writable(_ext: &mut Self::Ext, _s: *mut us_socket_t) { - unreachable!() - } - fn on_close( - _ext: &mut Self::Ext, - _s: *mut us_socket_t, - _code: i32, - _reason: Option<*mut c_void>, - ) { - unreachable!() - } - fn on_timeout(_ext: &mut Self::Ext, _s: *mut us_socket_t) { - unreachable!() - } - fn on_long_timeout(_ext: &mut Self::Ext, _s: *mut us_socket_t) { - unreachable!() - } - fn on_end(_ext: &mut Self::Ext, _s: *mut us_socket_t) { - unreachable!() - } - fn on_connect_error(_ext: &mut Self::Ext, _s: *mut us_socket_t, _code: i32) { - unreachable!() - } - fn on_connecting_error(_cs: *mut ConnectingSocket, _code: i32) { - unreachable!() - } - fn on_handshake( - _ext: &mut Self::Ext, - _s: *mut us_socket_t, - _ok: bool, - _err: us_bun_verify_error_t, - ) { - unreachable!() - } - - // When `HAS_EXT == false`, handlers take `(s, …)`. Rust can't change a - // trait method's arity by a const, so the no-ext variants are separate - // methods. Only called when `HAS_EXT == false`. - fn on_open_no_ext(_s: *mut us_socket_t, _is_client: bool, _ip: &[u8]) { - unreachable!() - } - fn on_data_no_ext(_s: *mut us_socket_t, _data: &[u8]) { - unreachable!() - } - fn on_fd_no_ext(_s: *mut us_socket_t, _fd: c_int) { - unreachable!() - } - fn on_writable_no_ext(_s: *mut us_socket_t) { - unreachable!() - } - fn on_close_no_ext(_s: *mut us_socket_t, _code: i32, _reason: Option<*mut c_void>) { - unreachable!() - } - fn on_timeout_no_ext(_s: *mut us_socket_t) { - unreachable!() - } - fn on_long_timeout_no_ext(_s: *mut us_socket_t) { - unreachable!() - } - fn on_end_no_ext(_s: *mut us_socket_t) { - unreachable!() - } - fn on_connect_error_no_ext(_s: *mut us_socket_t, _code: i32) { - unreachable!() - } - fn on_handshake_no_ext(_s: *mut us_socket_t, _ok: bool, _err: us_bun_verify_error_t) { - unreachable!() - } -} - -/// Produce a `&'static VTable` for `H`. The result is a const address into -/// `.rodata`; safe to store in any number of `SocketGroup`s. -pub fn make() -> &'static VTable { - &Make::::VT -} - -struct Make(core::marker::PhantomData); - -impl Make { - const VT: VTable = VTable { - on_open: if H::HAS_ON_OPEN { - Some(Trampolines::::on_open) - } else { - None - }, - on_data: if H::HAS_ON_DATA { - Some(Trampolines::::on_data) - } else { - None - }, - on_fd: if H::HAS_ON_FD { - Some(Trampolines::::on_fd) - } else { - None - }, - on_writable: if H::HAS_ON_WRITABLE { - Some(Trampolines::::on_writable) - } else { - None - }, - on_close: if H::HAS_ON_CLOSE { - Some(Trampolines::::on_close) - } else { - None - }, - on_timeout: if H::HAS_ON_TIMEOUT { - Some(Trampolines::::on_timeout) - } else { - None - }, - on_long_timeout: if H::HAS_ON_LONG_TIMEOUT { - Some(Trampolines::::on_long_timeout) - } else { - None - }, - on_end: if H::HAS_ON_END { - Some(Trampolines::::on_end) - } else { - None - }, - on_connect_error: if H::HAS_ON_CONNECT_ERROR { - Some(Trampolines::::on_connect_error) - } else { - None - }, - on_connecting_error: if H::HAS_ON_CONNECTING_ERROR { - Some(Trampolines::::on_connecting_error) - } else { - None - }, - on_handshake: if H::HAS_ON_HANDSHAKE { - Some(Trampolines::::on_handshake) - } else { - None - }, - }; -} - -/// The trampolines themselves, exposed so `dispatch.rs` can direct-call them -/// per-kind without going through the vtable pointer at all. -pub(crate) struct Trampolines(core::marker::PhantomData); - -impl Trampolines { - // Rust can't splat tuples into a call, so each trampoline inlines the - // HAS_EXT branch. - #[inline(always)] - fn ext(s: *mut us_socket_t) -> &'static mut H::Ext { - // S008: `us_socket_t` is an `opaque_ffi!` ZST — `opaque_mut` is the - // safe const-asserted ZST deref accessor. ext storage was sized for - // `H::Ext` at context creation; lifetime is bounded by the trampoline - // call (we lie with 'static because the borrow never escapes the - // handler call). - us_socket_t::opaque_mut(s).ext::() - } - - pub(crate) extern "C" fn on_open( - s: *mut us_socket_t, - is_client: c_int, - ip: *mut u8, - ip_len: c_int, - ) -> *mut us_socket_t { - // SAFETY: usockets guarantees `ip[0..ip_len]` is valid when non-null. - let ip_slice: &[u8] = - unsafe { thunk::c_slice(ip, usize::try_from(ip_len).expect("int cast")) }; - if H::HAS_EXT { - H::on_open(Self::ext(s), s, is_client != 0, ip_slice); - } else { - H::on_open_no_ext(s, is_client != 0, ip_slice); - } - s - } - - pub(crate) extern "C" fn on_data( - s: *mut us_socket_t, - data: *mut u8, - len: c_int, - ) -> *mut us_socket_t { - // SAFETY: usockets guarantees `data[0..len]` is valid. - let data_slice = unsafe { thunk::c_slice(data, usize::try_from(len).expect("int cast")) }; - if H::HAS_EXT { - H::on_data(Self::ext(s), s, data_slice); - } else { - H::on_data_no_ext(s, data_slice); - } - s - } - - pub(crate) extern "C" fn on_fd(s: *mut us_socket_t, fd: c_int) -> *mut us_socket_t { - if H::HAS_EXT { - H::on_fd(Self::ext(s), s, fd); - } else { - H::on_fd_no_ext(s, fd); - } - s - } - - pub(crate) extern "C" fn on_writable(s: *mut us_socket_t) -> *mut us_socket_t { - if H::HAS_EXT { - H::on_writable(Self::ext(s), s); - } else { - H::on_writable_no_ext(s); - } - s - } - - pub(crate) extern "C" fn on_close( - s: *mut us_socket_t, - code: c_int, - reason: *mut c_void, - ) -> *mut us_socket_t { - let reason = if reason.is_null() { None } else { Some(reason) }; - if H::HAS_EXT { - H::on_close(Self::ext(s), s, code, reason); - } else { - H::on_close_no_ext(s, code, reason); - } - s - } - - pub(crate) extern "C" fn on_timeout(s: *mut us_socket_t) -> *mut us_socket_t { - if H::HAS_EXT { - H::on_timeout(Self::ext(s), s); - } else { - H::on_timeout_no_ext(s); - } - s - } - - pub(crate) extern "C" fn on_long_timeout(s: *mut us_socket_t) -> *mut us_socket_t { - if H::HAS_EXT { - H::on_long_timeout(Self::ext(s), s); - } else { - H::on_long_timeout_no_ext(s); - } - s - } - - pub(crate) extern "C" fn on_end(s: *mut us_socket_t) -> *mut us_socket_t { - if H::HAS_EXT { - H::on_end(Self::ext(s), s); - } else { - H::on_end_no_ext(s); - } - s - } - - pub(crate) extern "C" fn on_connect_error( - s: *mut us_socket_t, - code: c_int, - ) -> *mut us_socket_t { - if H::HAS_EXT { - H::on_connect_error(Self::ext(s), s, code); - } else { - H::on_connect_error_no_ext(s, code); - } - s - } - - pub(crate) extern "C" fn on_connecting_error( - cs: *mut ConnectingSocket, - code: c_int, - ) -> *mut ConnectingSocket { - H::on_connecting_error(cs, code); - cs - } - - pub(crate) extern "C" fn on_handshake( - s: *mut us_socket_t, - ok: c_int, - err: us_bun_verify_error_t, - _user: *mut c_void, - ) { - if H::HAS_EXT { - H::on_handshake(Self::ext(s), s, ok != 0, err); - } else { - H::on_handshake_no_ext(s, ok != 0, err); - } - } -} diff --git a/test/cli/inspect/inspect.test.ts b/test/cli/inspect/inspect.test.ts index e0e6b8471fd3..760f07dc5283 100644 --- a/test/cli/inspect/inspect.test.ts +++ b/test/cli/inspect/inspect.test.ts @@ -454,6 +454,105 @@ describe("unix domain socket without websocket", () => { const path = randomSocketPath(); await runTest(path, [], { ...bunEnv, BUN_INSPECT: "unix:" + path }); }); + + // Replies larger than the kernel socket buffer make the inspectee's framed + // transport hit partial vectored writes; the unwritten remainder must be + // retransmitted exactly once, in order, with intact 4-byte length headers. + test("large replies survive partial writes under backpressure", async () => { + const path = randomSocketPath(); + const REPLIES = 6; + const CHUNK = 512 * 1024; + const expected = new Map(); + for (let id = 1; id <= REPLIES; id++) { + expected.set(id, Buffer.alloc(CHUNK, String.fromCharCode(64 + id)).toString()); + } + + const { promise, resolve, reject } = Promise.withResolvers>(); + const received = new Map(); + const framer = new SocketFramer(message => { + try { + const m = JSON.parse(message); + if (m.id) { + received.set(m.id, m); + if (received.size === REPLIES + 1) resolve(received); + } + } catch (error) { + reject(error); + } + }); + + let sock: any; + const opened = Promise.withResolvers(); + using listener = Bun.listen({ + unix: path, + socket: { + open: socket => { + sock = socket; + // Stop reading so the inspectee's replies pile up until its + // writes go partial and the remainder is buffered natively. + socket.pause(); + opened.resolve(); + }, + data: (socket, bytes) => framer.onData(socket, bytes), + error: (_socket, error) => reject(error), + close: () => reject(new Error("inspector socket closed before all replies arrived")), + }, + }); + + const inspectee = spawn({ + cmd: [bunExe(), join(import.meta.dir, "inspectee.js")], + env: { ...bunEnv, BUN_INSPECT: "unix:" + path }, + stdout: "pipe", + stderr: "inherit", + stdin: "ignore", + }); + try { + await opened.promise; + for (let id = 1; id <= REPLIES; id++) { + framer.send( + sock, + JSON.stringify({ + id, + method: "Runtime.evaluate", + params: { + expression: `Buffer.alloc(${CHUNK}, ${JSON.stringify(String.fromCharCode(64 + id))}).toString()`, + returnByValue: true, + }, + }), + ); + } + // Marker request: evaluations are dispatched in order, so this marker + // on stdout means every large reply above was already (partially) + // written into the paused socket. + framer.send( + sock, + JSON.stringify({ + id: REPLIES + 1, + method: "Runtime.evaluate", + params: { expression: `(process.stdout.write("ALL_EVALUATED\\n"), "ok")`, returnByValue: true }, + }), + ); + + let stdout = ""; + const decoder = new TextDecoder(); + for await (const chunkBytes of inspectee.stdout as ReadableStream) { + stdout += decoder.decode(chunkBytes, { stream: true }); + if (stdout.includes("ALL_EVALUATED")) break; + } + expect(stdout).toContain("ALL_EVALUATED"); + + sock.resume(); + const got = await promise; + for (let id = 1; id <= REPLIES; id++) { + const value = got.get(id)?.result?.result?.value; + expect(value?.length).toBe(CHUNK); + expect(value).toBe(expected.get(id)!); + } + expect(got.get(REPLIES + 1)?.result?.result?.value).toBe("ok"); + } finally { + inspectee.kill(); + } + }); } }); diff --git a/test/internal/dead-code-escape-limits.json b/test/internal/dead-code-escape-limits.json index ca28f91a5105..e26cfa3e2f04 100644 --- a/test/internal/dead-code-escape-limits.json +++ b/test/internal/dead-code-escape-limits.json @@ -11,11 +11,13 @@ "src/install/isolated_install/FileCloner.rs": 3, "src/install/lockfile/Package.rs": 1, "src/io/lib.rs": 2, - "src/io/posix_event_loop.rs": 8, + "src/io/posix_event_loop.rs": 1, "src/jsc/PosixSignalHandle.rs": 6, + "src/jsc/lib.rs": 1, "src/jsc_macros/lib.rs": 2, "src/opaque/lib.rs": 5, "src/patch/lib.rs": 2, + "src/router/lib.rs": 1, "src/runtime/api/bun/Terminal.rs": 2, "src/runtime/cli/test/ChangedFilesFilter.rs": 1, "src/runtime/dns_jsc/dns.rs": 5, @@ -25,5 +27,7 @@ "src/runtime/server/NodeHTTPResponse.rs": 1, "src/runtime/shell/IOWriter.rs": 1, "src/runtime/test_runner/expect.rs": 1, - "src/spawn_sys/posix_spawn.rs": 4 + "src/spawn_sys/posix_spawn.rs": 4, + "src/usockets/socket.rs": 1, + "src/usockets/udp.rs": 1 } diff --git a/test/js/bun/http/fetch-abort-ssl-context-eviction.test.ts b/test/js/bun/http/fetch-abort-ssl-context-eviction.test.ts index 59ace22ed13f..03921bf36a61 100644 --- a/test/js/bun/http/fetch-abort-ssl-context-eviction.test.ts +++ b/test/js/bun/http/fetch-abort-ssl-context-eviction.test.ts @@ -1,23 +1,17 @@ import { expect, test } from "bun:test"; import { bunEnv, bunExe } from "harness"; -// Evicting a custom SSL context while it still has in-flight sockets closes -// those sockets via no-op callbacks (cleanCallbacks runs first in -// HTTPContext.deinit), so unregisterAbortTracker() never runs and -// socket_async_http_abort_tracker is left pointing at freed sockets. The next -// drainQueuedShutdowns then UAF'd. Fix: skip eviction when the context has -// active (non-pooled) sockets. +// Evicting a custom SSL context while it still has in-flight sockets must not +// leave socket_async_http_abort_tracker pointing at freed sockets (the next +// drainQueuedShutdowns UAF'd). The fixture fills the cache past +// SSL_CONTEXT_CACHE_MAX_SIZE (60, HTTPThread.rs) with distinct TLS configs +// whose handshakes hang against a local server that never replies, so every +// entry has an active socket when the 61st+ config evicts the oldest. +// Aborting everything then drains the tracker. // -// This test fills the cache past ssl_context_cache_max_size (60) with distinct -// TLS configs whose connects never complete (TEST-NET-1), so every cache entry -// has an active connecting socket. The 61st distinct config triggers -// evictOldestSslContext. Aborting all requests then drains the tracker. -// -// In debug+ASAN builds the existing assertUnpoisoned check at -// HTTPThread.processEvents catches the freed socket deterministically. In -// release builds the UAF only crashes when the freed slot is reused; the -// fixture spams same-size-class allocations to make that likely (~30% per -// run before the fix), so loop a few times. +// In release builds the UAF only faulted once the freed slot was reused; the +// fixture spams refused connects (same size class) to make that likely, and +// the test runs the fixture several times. test("aborting fetches whose custom SSL context was evicted does not crash", async () => { const results = await Promise.all( Array.from({ length: 5 }, async () => { @@ -29,57 +23,124 @@ test("aborting fetches whose custom SSL context was evicted does not crash", asy }); const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); - return { stdout, stderr, exitCode }; + return { stdout: stdout.trim(), stderr, exitCode }; }), ); for (const { stdout, stderr, exitCode } of results) { - expect(stderr).not.toContain("panic"); - expect(stderr).not.toContain("Segmentation fault"); - expect(stderr).not.toContain("poisoned"); - expect(stdout.trim()).toBe("ok"); - expect(exitCode).toBe(0); + expect({ stdout, exitCode, stderrTail: exitCode === 0 ? "" : stderr.slice(-2000) }).toEqual({ + stdout: "ok", + exitCode: 0, + stderrTail: "", + }); } -}, 120_000); +}); const fixture = /* js */ ` -const N = 65; // > ssl_context_cache_max_size (60) +const N = 65; // > SSL_CONTEXT_CACHE_MAX_SIZE (60) + +// TLS handshakes against this server hang forever: it accepts the TCP +// connection and never writes, so every fetch stays active (handshaking). +let opened = 0; +const allConnected = Promise.withResolvers(); +const hangServer = Bun.listen({ + hostname: "127.0.0.1", + port: 0, + socket: { + open() { + if (++opened === N) allConnected.resolve(); + }, + data() {}, + }, +}); + +// Grab a port that refuses connections: bind, then close the listener. +const refusedListener = Bun.listen({ hostname: "127.0.0.1", port: 0, socket: { open() {}, data() {} } }); +const refusedPort = refusedListener.port; +refusedListener.stop(true); + const controllers = []; const promises = []; -// Phase 1: 65 distinct TLS configs to a hung target. The 61st+ trigger -// evictOldestSslContext, which (before the fix) closed the oldest context's -// socket via no-op callbacks and left the tracker entry dangling. +// Phase 1: 65 distinct TLS configs. The 61st+ trigger evictOldestSslContext +// while every cache entry still has an active in-flight socket. for (let i = 0; i < N; i++) { const ac = new AbortController(); controllers.push(ac); promises.push( - fetch("https://192.0.2.1/", { + fetch("https://127.0.0.1:" + hangServer.port + "/", { signal: ac.signal, tls: { serverName: "host" + i + ".test" }, }).catch(() => {}) ); } +// Every request has reached the server, so all 65 contexts exist and each +// has an active socket registered with the abort tracker. +await allConnected.promise; -// Creating 60+ SSL contexts is slow in debug+ASAN builds. -await Bun.sleep(5000); - -// Phase 2: spam non-SSL us_connecting_socket_t allocs (same mimalloc size -// class as the evicted SSL semi-socket) so the freed slots are reused with -// closed==0 instead of the stale closed==1 — that's what makes the dangling -// tracker entry actually fault in release builds. +// Phase 2: refused connects allocate (and promptly free) connecting sockets +// in the same size class, so the evicted entries' freed slots get reused +// before the aborts below — that's what made the pre-fix UAF actually fault. +const spam = []; for (let i = 0; i < 200; i++) { - const ac = new AbortController(); - controllers.push(ac); - promises.push( - fetch("http://does-not-resolve-" + i + ".invalid/", { signal: ac.signal }).catch(() => {}) - ); + spam.push(fetch("http://127.0.0.1:" + refusedPort + "/").catch(() => {})); } -await Bun.sleep(500); +await Promise.all(spam); // Abort everything — drainQueuedShutdowns walks the tracker. for (const ac of controllers) ac.abort(); await Promise.all(promises); +hangServer.stop(true); console.log("ok"); `; + +// At process exit (BUN_DESTRUCT_VM_ON_EXIT=1, the ASAN/LSan CI mode), +// dealloc_in_flight_for_exit releases each in-flight client's +// custom-SSL-context ref. For a context already evicted from the cache that +// deref is the LAST one: HTTPContext::drop must not close_all() mid-teardown — +// dispatching into the half-torn-down (or already freed) clone is a UAF and +// double-frees the ThreadlocalAsyncHttp box. +test("exiting with in-flight fetches on evicted custom SSL contexts does not crash", async () => { + await using proc = Bun.spawn({ + cmd: [bunExe(), "-e", exitFixture], + env: { ...bunEnv, BUN_DESTRUCT_VM_ON_EXIT: "1" }, + stderr: "pipe", + stdout: "pipe", + }); + + const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); + expect({ stdout: stdout.trim(), exitCode, stderrTail: exitCode === 0 ? "" : stderr.slice(-2000) }).toEqual({ + stdout: "ok", + exitCode: 0, + stderrTail: "", + }); +}); + +const exitFixture = /* js */ ` +const N = 65; // > SSL_CONTEXT_CACHE_MAX_SIZE (60): the oldest entries get evicted + +let opened = 0; +const allConnected = Promise.withResolvers(); +const hangServer = Bun.listen({ + hostname: "127.0.0.1", + port: 0, + socket: { + open() { + if (++opened === N) allConnected.resolve(); + }, + data() {}, + }, +}); + +for (let i = 0; i < N; i++) { + fetch("https://127.0.0.1:" + hangServer.port + "/", { + tls: { serverName: "host" + i + ".test" }, + }).catch(() => {}); +} +// The server never replies, so once every request has connected all N are +// still in flight — exit now, with the oldest contexts already evicted. +await allConnected.promise; +console.log("ok"); +process.exit(0); +`; diff --git a/test/js/bun/http/proxy.test.ts b/test/js/bun/http/proxy.test.ts index 57d8569afa38..b5f539f3c9c6 100644 --- a/test/js/bun/http/proxy.test.ts +++ b/test/js/bun/http/proxy.test.ts @@ -380,6 +380,24 @@ test("unsupported protocol", async () => { ); }); +test("unsupported protocol with custom TLS rejects on every request", async () => { + // Custom-TLS requests route through the SSL-context cache; the proxy scheme + // must be rejected on the cache-hit path too, not just on the first (miss) + // request. + for (let i = 0; i < 2; i++) { + await expect( + fetch("https://httpbin.org/get", { + proxy: "socks5://127.0.0.1:1080", + tls: { ca: tlsCert.cert }, + }), + ).rejects.toThrowError( + expect.objectContaining({ + code: "UnsupportedProxyProtocol", + }), + ); + } +}); + /** * Creates an HTTP proxy server that captures Proxy-Authorization headers. * The server forwards requests to their destination and pipes responses back. diff --git a/test/js/bun/http/serve-epoll-add-fail.test.ts b/test/js/bun/http/serve-epoll-add-fail.test.ts index 931e33c374a6..5a952bf3e113 100644 --- a/test/js/bun/http/serve-epoll-add-fail.test.ts +++ b/test/js/bun/http/serve-epoll-add-fail.test.ts @@ -10,7 +10,9 @@ const cc = Bun.which("cc") || Bun.which("gcc") || Bun.which("clang"); // FAIL_EPOLL_ADD=listener: listening TCP sockets (SO_ACCEPTCONN). // FAIL_EPOLL_ADD=accepted: connected SOCK_STREAM. FAIL_EPOLL_ADD=udp: SOCK_DGRAM. -// Non-socket fds (timerfd, eventfd) always pass through. +// Only AF_INET/AF_INET6 sockets are failed: spawned stdio pipes are AF_UNIX +// socketpairs, and failing their registration would deafen the fixture's own +// stdin/stdout. Non-socket fds (timerfd, eventfd) always pass through. const SHIM_C = /* c */ ` #define _GNU_SOURCE #include @@ -32,7 +34,11 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) { if (op == EPOLL_CTL_ADD) { int acceptconn = 0, type = 0; socklen_t len = sizeof(int); - if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &len) == 0) { + struct sockaddr_storage ss; + socklen_t sslen = sizeof(ss); + if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &len) == 0 && + getsockname(fd, (struct sockaddr *)&ss, &sslen) == 0 && + (ss.ss_family == AF_INET || ss.ss_family == AF_INET6)) { len = sizeof(int); getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &acceptconn, &len); int is_stream = (type == SOCK_STREAM); diff --git a/test/js/bun/net/socket-syscall-fault.test.ts b/test/js/bun/net/socket-syscall-fault.test.ts index 8c578aed3c44..27797e36b303 100644 --- a/test/js/bun/net/socket-syscall-fault.test.ts +++ b/test/js/bun/net/socket-syscall-fault.test.ts @@ -1,10 +1,160 @@ +import type { Socket } from "bun"; import { socketFaultInjection as fault } from "bun:internal-for-testing"; -import { expect, test } from "bun:test"; +import { afterEach, describe, expect, test } from "bun:test"; import { bunEnv, bunExe, isWindows } from "harness"; import { join } from "node:path"; const skip = !fault.available() || isWindows; +afterEach(() => fault.clear()); + +async function bunConnectedPair(handlers: { + serverData?: (s: Socket, chunk: Buffer) => void; + clientData?: (s: Socket, chunk: Buffer) => void; + clientError?: (s: Socket, err: Error) => void; + clientClose?: (s: Socket, err?: Error) => void; + clientDrain?: (s: Socket) => void; +}) { + const serverSock = Promise.withResolvers(); + const listener = Bun.listen({ + hostname: "127.0.0.1", + port: 0, + socket: { + open(s) { + serverSock.resolve(s); + }, + data(s, chunk) { + handlers.serverData?.(s, chunk as Buffer); + }, + error() {}, + close() {}, + }, + }); + const client = await Bun.connect({ + hostname: "127.0.0.1", + port: listener.port, + socket: { + open() {}, + data(s, chunk) { + handlers.clientData?.(s, chunk as Buffer); + }, + error(s, err) { + handlers.clientError?.(s, err); + }, + close(s, err) { + handlers.clientClose?.(s, err); + }, + drain(s) { + handlers.clientDrain?.(s); + }, + connectError() {}, + }, + }); + const server = await serverSock.promise; + return { + listener, + client, + server, + [Symbol.dispose]() { + client.end(); + server.end(); + listener.stop(true); + }, + }; +} + +describe.skipIf(skip)("Bun.connect/Bun.listen under injected syscall faults", () => { + test("recv → ECONNRESET surfaces via close(socket, error)", async () => { + // Bun-native sockets deliver read errors as the close() error argument + // (same contract as a real peer RST), not via the error() handler. + const closed = Promise.withResolvers(); + using p = await bunConnectedPair({ + clientClose: (_s, err) => closed.resolve(err), + }); + fault.set({ syscall: "recv", action: "errno", errno: "ECONNRESET", repeat: 1 }); + // Trigger a recv() on the client by writing from the server. + p.server.write("hello"); + const err = (await closed.promise) as NodeJS.ErrnoException; + expect(err?.code).toBe("ECONNRESET"); + }); + + test("recv → 1-byte short reads still deliver the complete payload", async () => { + const payload = Buffer.from(Array.from({ length: 256 }, (_, i) => i & 0xff)); + const chunks: Buffer[] = []; + const done = Promise.withResolvers(); + using p = await bunConnectedPair({ + clientData: (_s, chunk) => { + chunks.push(Buffer.from(chunk)); + if (Buffer.concat(chunks).length >= payload.length) done.resolve(); + }, + clientError: (_s, err) => done.reject(err), + }); + fault.set({ syscall: "recv", action: "short", bytes: 1, repeat: -1 }); + p.server.write(payload); + await done.promise; + expect(Buffer.concat(chunks).equals(payload)).toBe(true); + }); + + test("send → 16-byte short writes still deliver the complete payload to the peer", async () => { + const payload = Buffer.alloc(512, "b"); + let received = Buffer.alloc(0); + const done = Promise.withResolvers(); + let offset = 0; + // Bun-native sockets report partial writes; the app resumes on drain(). + const pump = (s: Socket) => { + while (offset < payload.length) { + const n = s.write(payload.subarray(offset)); + if (n <= 0) break; + offset += n; + } + }; + using p = await bunConnectedPair({ + serverData: (_s, chunk) => { + received = Buffer.concat([received, chunk]); + if (received.length >= payload.length) done.resolve(); + }, + clientError: (_s, err) => done.reject(err), + clientDrain: s => pump(s), + }); + fault.set({ syscall: "send", action: "short", bytes: 16, repeat: -1 }); + pump(p.client); + await done.promise; + expect(received.equals(payload)).toBe(true); + }); + + test("connect → ECONNREFUSED rejects Bun.connect and fires connectError", async () => { + const listener = Bun.listen({ + hostname: "127.0.0.1", + port: 0, + socket: { open() {}, data() {}, close() {} }, + }); + try { + fault.set({ syscall: "connect", action: "errno", errno: "ECONNREFUSED", repeat: 1 }); + const connectErr = Promise.withResolvers(); + const rejection = await Bun.connect({ + hostname: "127.0.0.1", + port: listener.port, + socket: { + open() {}, + data() {}, + close() {}, + connectError(_s, err) { + connectErr.resolve(err); + }, + }, + }).then( + () => null, + err => err, + ); + expect(rejection).not.toBeNull(); + const err = (await connectErr.promise) as NodeJS.ErrnoException; + expect(["ECONNREFUSED", "ConnectionRefused"]).toContain(err.code); + } finally { + listener.stop(true); + } + }); +}); + // uSockets' TLS low-priority handshake queue (loop->data.low_prio_head) // shares its prev/next links with group->head_sockets. A socket already // parked in the queue used to be parked a SECOND time whenever a writable diff --git a/test/js/bun/net/socket.test.ts b/test/js/bun/net/socket.test.ts index d3938c757ee1..0be47fe3d9ec 100644 --- a/test/js/bun/net/socket.test.ts +++ b/test/js/bun/net/socket.test.ts @@ -900,6 +900,91 @@ console.log("completed", done, "cycles without crashing"); expect(stdout.trim()).toBe("completed 64 cycles without crashing"); expect(exitCode).toBe(0); }, 30_000); // subprocess + debug/ASAN startup is slow + + it("survives thousands of connect/upgradeTLS/close cycles interleaved with GC", async () => { + // Stresses the raw-socket adopt path (upgradeTLS transfers the native + // socket onto a fresh TLS context) both inside the open dispatch and + // after it, with Bun.gc(true) finalizing dead twins mid-flight. + const fixture = /* js */ ` + const TLS = { + socket: { open() {}, data() {}, error() {}, close() {}, handshake() {}, end() {}, timeout() {}, drain() {} }, + tls: { rejectUnauthorized: false, servername: "localhost" }, + }; + const listener = Bun.listen({ + hostname: "127.0.0.1", + port: 0, + socket: { open() {}, data() {}, error() {}, close() {}, drain() {} }, + }); + const TOTAL = 2048, CONCURRENCY = 32; + let started = 0, completed = 0, upgraded = 0; + + function upgradeAndClose(sock) { + try { + const pair = sock.upgradeTLS(TLS); + if (pair) { + upgraded++; + const [raw, tls] = pair; + try { tls.end(); } catch {} + try { raw.end(); } catch {} + } + } catch {} + try { sock.end(); } catch {} + } + + function oneCycle(insideOpen) { + return new Promise(resolve => { + let settled = false; + const fin = () => { if (!settled) { settled = true; resolve(); } }; + const p = Bun.connect({ + hostname: "127.0.0.1", + port: listener.port, + socket: { + open(sock) { + if (insideOpen) { upgradeAndClose(sock); fin(); } + }, + data() {}, drain() {}, + connectError() { fin(); }, error() { fin(); }, close() { fin(); }, + }, + }); + if (!insideOpen) { + p.then(sock => { upgradeAndClose(sock); fin(); }, fin); + } else { + p.catch(fin); + } + }); + } + + async function worker() { + while (started < TOTAL) { + const i = started++; + await oneCycle(i % 2 === 0); + completed++; + if (completed % 64 === 0) Bun.gc(true); + } + } + await Promise.all(Array.from({ length: CONCURRENCY }, worker)); + Bun.gc(true); + listener.stop(true); + Bun.gc(true); + // The upgrade path is the code under test — a run where every + // upgradeTLS threw would pass vacuously without this. + console.log("completed", completed, "cycles,", upgraded > 0 ? "with upgrades" : "with zero upgrades"); + `; + await using proc = Bun.spawn({ + cmd: [bunExe(), "-e", fixture], + env: bunEnv, + stdout: "pipe", + stderr: "pipe", + }); + const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); + expect({ + stdout: stdout.trim(), + signalCode: proc.signalCode, + exitCode, + stderrTail: exitCode === 0 ? "" : stderr.slice(-2000), + }).toEqual({ stdout: "completed 2048 cycles, with upgrades", signalCode: null, exitCode: 0, stderrTail: "" }); + // 2048 TLS context creations on a debug+ASAN build take a while. + }, 120_000); }); it.skipIf(isWindows)("should not crash when a socket from a file descriptor is closed after opening", async () => { diff --git a/test/js/bun/perf/linker-order.test.ts b/test/js/bun/perf/linker-order.test.ts index 4d7197e6f03c..c1758f5a7e8f 100644 --- a/test/js/bun/perf/linker-order.test.ts +++ b/test/js/bun/perf/linker-order.test.ts @@ -1,10 +1,12 @@ import { describe, expect, it } from "bun:test"; import { bunEnv, bunExe, nodeExe, tempDir } from "harness"; +import { writeFileSync } from "node:fs"; import { join } from "node:path"; import { mustGenerateOrderFile, orderFileEligible, shouldGenerateOrderFile, + verifyOrderFileApplied, type OrderFileContext, } from "../../../../scripts/build/ci.ts"; import type { Config } from "../../../../scripts/build/config.ts"; @@ -206,6 +208,67 @@ async function compile(args: string[]) { expect(exitCode).toBe(0); } +/** + * A canary inherits the previous build's order file, and lld silently skips + * every name it cannot resolve (--no-warn-symbol-ordering, above). After a + * mass symbol rename the inherited file must be called stale — that verdict is + * what makes build.ts retrace instead of republishing the stale file for every + * later build to inherit, which would silently forfeit ~MBs of resident .text. + */ +describe.skipIf(process.platform !== "linux" || !compiler || !(Bun.which("llvm-nm") || Bun.which("nm")))( + "verifying an inherited order file", + () => { + it("calls mass symbol churn stale, and a file that still matches applied", async () => { + // 3000 functions so the 1000-symbol verification sample is available, + // with distinct bodies so nothing folds. + const functions = Array.from({ length: 3000 }, (_, i) => `int fn${i}(void) { return ${i}; }`); + using dir = tempDir("linker-order-verify", { + "many.c": functions.join("\n") + "\nint main(void) { return fn0(); }\n", + }); + const buildDir = String(dir); + const exe = join(buildDir, "many"); + await compile(["-o", exe, join(buildDir, "many.c")]); + + // The binary's defined text symbols, in address order — same parse as the verifier. + const nm = Bun.spawnSync({ cmd: [Bun.which("llvm-nm") ?? Bun.which("nm")!, "--defined-only", exe] }); + const symbols = nm.stdout + .toString() + .split("\n") + .map(line => /^([0-9a-f]+) ([tT]) (\S+)$/.exec(line)) + .filter(m => m !== null) + .sort((a, b) => parseInt(a[1]!, 16) - parseInt(b[1]!, 16)) + .map(m => m[3]!); + expect(symbols.length).toBeGreaterThanOrEqual(3000); + + const config = cfg({ buildDir }); + const orderFile = (names: string[]) => writeFileSync(join(buildDir, "linker.order"), names.join("\n") + "\n"); + const renamed = (n: number) => Array.from({ length: n }, (_, i) => `gone_fn${i}`); + + // Fresh: the hottest 1000 sit at the front of .text, every name resolves. + orderFile(symbols.slice(0, 1000)); + const applied = verifyOrderFileApplied(config, ctx(), exe, { strict: false }); + + // A rename wave took out 60% of the symbol set — inheriting this forever + // would be worse than retracing once. + orderFile([...symbols.slice(0, 400), ...renamed(600)]); + const mostlyRenamed = verifyOrderFileApplied(config, ctx(), exe, { strict: false }); + + // Nothing matches at all (wholesale rename, or the wrong target's file). + orderFile(renamed(1000)); + const nothingMatches = verifyOrderFileApplied(config, ctx(), exe, { strict: false }); + + expect({ applied, mostlyRenamed, nothingMatches }).toEqual({ + applied: "applied", + mostlyRenamed: "stale", + nothingMatches: "stale", + }); + + // Strict mode — verifying a file traced from this exact binary — still hard-fails. + expect(() => verifyOrderFileApplied(config, ctx(), exe)).toThrow(/symbol order/); + }); + }, +); + /** * One of the traced workloads runs on a pseudo-terminal, because bun's stdio, * tty and readline code take a path there that a pipe never reaches, and an diff --git a/test/js/node/http/node-http-syscall-fault.test.ts b/test/js/node/http/node-http-syscall-fault.test.ts index 893a24faaf0d..c1539b50e495 100644 --- a/test/js/node/http/node-http-syscall-fault.test.ts +++ b/test/js/node/http/node-http-syscall-fault.test.ts @@ -10,7 +10,9 @@ afterEach(() => fault.clear()); // In-process http tests share the process-wide fault table between client // and server, which makes errno injection ambiguous. Tests that need a -// one-sided fault run the faulted side in a subprocess. +// one-sided fault run the faulted side in a subprocess. Each such test +// spawns a debug/ASAN child (multi-second startup), so they carry explicit +// 60s timeouts instead of the 5s default. describe.skipIf(skip)("node:http under injected syscall faults", () => { test("upRes.pipe(res) with res.destroy() racing a queued drain (subprocess)", async () => { @@ -95,7 +97,7 @@ describe.skipIf(skip)("node:http under injected syscall faults", () => { } finally { upstream.close(); } - }); + }, 60_000); test("Bun.serve streaming response under 1-byte sends with client abort mid-body (subprocess)", async () => { // Covers the uWS HttpResponse path (AsyncSocket → us_socket_write → @@ -143,7 +145,7 @@ describe.skipIf(skip)("node:http under injected syscall faults", () => { stderr: expect.any(String), }); expect(exitCode).toBe(0); - }); + }, 60_000); test("node:http server: short sends + client destroy at first byte does not leak the response (subprocess)", async () => { const fixture = /* js */ ` @@ -189,7 +191,7 @@ describe.skipIf(skip)("node:http under injected syscall faults", () => { stderr: expect.any(String), }); expect(exitCode).toBe(0); - }); + }, 60_000); }); describe.skipIf(skip)("node:http seeded backpressure fuzz", () => { @@ -262,5 +264,5 @@ describe.skipIf(skip)("node:http seeded backpressure fuzz", () => { proc.kill("SIGTERM"); await proc.exited; } - }); + }, 60_000); }); diff --git a/test/js/node/net/connect-autoselectfamily-cancel-loop-fixture.js b/test/js/node/net/connect-autoselectfamily-cancel-loop-fixture.js new file mode 100644 index 000000000000..c0623aecfb3a --- /dev/null +++ b/test/js/node/net/connect-autoselectfamily-cancel-loop-fixture.js @@ -0,0 +1,54 @@ +// Cancel path for happy-eyeballs connects: destroy() while the lookup and/or +// first attempt is still in flight must free the connecting-socket state +// without a stale per-attempt timer firing after the wrapper is gone. +const net = require("node:net"); + +process.on("uncaughtException", e => { + console.error("UNCAUGHT:", e.message); + process.exit(1); +}); + +function main() { + const srv = net.createServer(c => c.destroy()); + srv.listen(0, "127.0.0.1", () => { + const port = srv.address().port; + const TOTAL = 200; + let completed = 0; + + function oneCycle() { + const s = net.connect({ + host: "localhost", + port, + autoSelectFamily: true, + autoSelectFamilyAttemptTimeout: 10, + // Two families so the attempt scheduler actually engages; nextTick + // keeps the destroy() below ahead of the first attempt. + lookup(host, opts, cb) { + process.nextTick(cb, null, [ + { address: "::1", family: 6 }, + { address: "127.0.0.1", family: 4 }, + ]); + }, + }); + s.on("error", () => {}); + s.on("close", () => { + completed++; + if (completed < TOTAL) { + oneCycle(); + } else { + // Outlive the largest per-attempt window; a stale timer surviving + // destroy() would fire in here and trip the uncaughtException trap. + setTimeout(() => { + srv.close(); + console.log(`OK ${completed}`); + }, 50); + } + }); + // Cancel immediately: lookup and/or the first attempt is still pending. + s.destroy(); + } + oneCycle(); + }); +} + +main(); diff --git a/test/js/node/net/connect-autoselectfamily-stale-timer.test.ts b/test/js/node/net/connect-autoselectfamily-stale-timer.test.ts index d42d88f45fe9..bf2f90f7ff38 100644 --- a/test/js/node/net/connect-autoselectfamily-stale-timer.test.ts +++ b/test/js/node/net/connect-autoselectfamily-stale-timer.test.ts @@ -46,3 +46,15 @@ test.concurrent( expect(stdout).toContain("OK"); }, ); + +test.concurrent( + "autoSelectFamily: connect + immediate destroy loops release every connecting socket cleanly", + async () => { + const { stdout, stderr, exitCode } = await run("connect-autoselectfamily-cancel-loop-fixture.js"); + expect({ exitCode, stdout: stdout.trim(), stderr: exitCode === 0 ? "" : stderr.slice(-2000) }).toEqual({ + exitCode: 0, + stdout: "OK 200", + stderr: "", + }); + }, +); diff --git a/test/js/node/tls/tls-syscall-fault.test.ts b/test/js/node/tls/tls-syscall-fault.test.ts index 8eab4622d393..a15cc6cbd9d0 100644 --- a/test/js/node/tls/tls-syscall-fault.test.ts +++ b/test/js/node/tls/tls-syscall-fault.test.ts @@ -33,9 +33,9 @@ test.skipIf(!fault.available())( stderr: "pipe", }); const [stdout, stderr] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); - // `CrashReason::OutOfMemory` phrasing varies with SHOW_CRASH_TRACE, so - // match the shared substring (see run-crash-handler.test.ts). - const outOfMemory = stderr.toLowerCase().includes("out of memory"); + // `CrashReason::OutOfMemory` has exactly two phrasings (crash_handler): + // "Bun ran out of memory" with SHOW_CRASH_TRACE, else "Bun has run out of memory". + const outOfMemory = stderr.includes("Bun ran out of memory") || stderr.includes("Bun has run out of memory"); expect({ markers: stdout .split("\n") diff --git a/test/js/valkey/unit/connect-error.test.ts b/test/js/valkey/unit/connect-error.test.ts new file mode 100644 index 000000000000..61a8174c1266 --- /dev/null +++ b/test/js/valkey/unit/connect-error.test.ts @@ -0,0 +1,70 @@ +import { expect, test } from "bun:test"; +import { bunEnv, bunExe, isWindows } from "harness"; +import net from "node:net"; + +// A refused direct (literal-IP) connect must surface the error AND close the +// half-open socket in the core: a handler that only detaches its handle used +// to leave the failed fd registered forever — leaking one fd per attempt and +// spinning the event loop at 100% CPU. +test.concurrent("refused connect surfaces an error without leaking fds or spinning the event loop", async () => { + // Grab a port that nothing listens on: bind, read it back, close. + const server = net.createServer(); + await new Promise(resolve => server.listen(0, "127.0.0.1", resolve)); + const port = (server.address() as net.AddressInfo).port; + await new Promise(resolve => server.close(resolve)); + + const src = ` + const fs = require("node:fs"); + const fdDir = process.platform === "darwin" ? "/dev/fd" : "/proc/self/fd"; + const countFds = () => (process.platform === "win32" ? 0 : fs.readdirSync(fdDir).length); + + async function failedConnect() { + const client = new Bun.RedisClient("redis://127.0.0.1:${port}", { + autoReconnect: false, + connectionTimeout: 5000, + }); + try { + await client.connect(); + return null; + } catch (error) { + return error?.code ?? String(error); + } finally { + client.close(); + } + } + + const code = await failedConnect(); + const before = countFds(); + for (let i = 0; i < 20; i++) await failedConnect(); + const after = countFds(); + + // Spin check: with every failed socket closed, sleeping should use + // almost no CPU; a leaked half-open fd keeps the poller hot. + const t0 = performance.now(); + const cpu0 = process.cpuUsage(); + while (performance.now() - t0 < 250) await Bun.sleep(25); + const wallMs = performance.now() - t0; + const cpu = process.cpuUsage(cpu0); + console.log(JSON.stringify({ code, fdGrowth: after - before, cpuMs: (cpu.user + cpu.system) / 1000, wallMs })); + `; + + await using proc = Bun.spawn({ + cmd: [bunExe(), "-e", src], + env: bunEnv, + stdout: "pipe", + stderr: "pipe", + }); + const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); + + const result = JSON.parse(stdout.trim() || "{}"); + expect({ code: result.code, stderr: exitCode === 0 ? "" : stderr }).toEqual({ + code: "ERR_REDIS_CONNECTION_CLOSED", + stderr: "", + }); + if (!isWindows) { + expect(result.fdGrowth).toBeLessThanOrEqual(2); + } + expect(result.cpuMs).toBeLessThan(result.wallMs * 0.5); + expect(proc.signalCode).toBeNull(); + expect(exitCode).toBe(0); +}); diff --git a/test/js/web/fetch/http-chunked-server.c b/test/js/web/fetch/http-chunked-server.c index 3a16c29888d0..ba73fb8d8b56 100644 --- a/test/js/web/fetch/http-chunked-server.c +++ b/test/js/web/fetch/http-chunked-server.c @@ -63,18 +63,19 @@ int main(int argc, char *argv[]) { exit(EXIT_FAILURE); } + // Listen BEFORE publishing the port: the test connects as soon as it reads + // stdout, and a SYN arriving pre-listen() gets RST -> ConnectionRefused. + if (listen(server_fd, 1) < 0) { + perror("listen"); + exit(EXIT_FAILURE); + } + // Print port to stdout so test can read it printf("%d\n", ntohs(address.sin_port)); fflush(stdout); // Close stdout so we can simply read it. close(1); - // Listen - if (listen(server_fd, 1) < 0) { - perror("listen"); - exit(EXIT_FAILURE); - } - // Accept connection if ((client_fd = accept(server_fd, (struct sockaddr *)&address, (socklen_t *)&addrlen)) < 0) { diff --git a/test/js/web/websocket/websocket-close-connecting.test.ts b/test/js/web/websocket/websocket-close-connecting.test.ts index f4dc7dfcf620..6efea73b9887 100644 --- a/test/js/web/websocket/websocket-close-connecting.test.ts +++ b/test/js/web/websocket/websocket-close-connecting.test.ts @@ -7,6 +7,7 @@ import { heapStats } from "bun:jsc"; import { describe, expect, it } from "bun:test"; +import { bunEnv, bunExe, isWindows } from "harness"; import { createServer, type AddressInfo } from "net"; describe.each(["close", "terminate"] as const)("%s() during CONNECTING", method => { @@ -88,3 +89,64 @@ describe.each(["close", "terminate"] as const)("%s() during CONNECTING", method } }); }); + +// A refused connect must fire error + close AND close the half-open socket in +// the core: detaching the handle before the close used to leave the failed fd +// registered forever — leaking one fd per attempt and spinning the event loop. +describe("failed connect (connection refused)", () => { + it("fires error + close without leaking fds or spinning the event loop", async () => { + // Grab a port that nothing listens on: bind, read it back, close. + const listening = Promise.withResolvers(); + const server = createServer(() => {}).listen(0, "127.0.0.1", listening.resolve); + await listening.promise; + const port = (server.address() as AddressInfo).port; + await new Promise(resolve => server.close(resolve)); + + const src = ` + const fs = require("node:fs"); + const fdDir = process.platform === "darwin" ? "/dev/fd" : "/proc/self/fd"; + const countFds = () => (process.platform === "win32" ? 0 : fs.readdirSync(fdDir).length); + + function failedConnect() { + return new Promise((resolve, reject) => { + const ws = new WebSocket("ws://127.0.0.1:${port}"); + let errored = false; + ws.onopen = () => reject(new Error("unexpected open")); + ws.onerror = () => { errored = true; }; + ws.onclose = () => resolve(errored); + }); + } + + const errored = await failedConnect(); + const before = countFds(); + for (let i = 0; i < 20; i++) await failedConnect(); + const after = countFds(); + + // Spin check: with every failed socket closed, sleeping should use + // almost no CPU; a leaked half-open fd keeps the poller hot. + const t0 = performance.now(); + const cpu0 = process.cpuUsage(); + while (performance.now() - t0 < 250) await Bun.sleep(25); + const wallMs = performance.now() - t0; + const cpu = process.cpuUsage(cpu0); + console.log(JSON.stringify({ errored, fdGrowth: after - before, cpuMs: (cpu.user + cpu.system) / 1000, wallMs })); + `; + + await using proc = Bun.spawn({ + cmd: [bunExe(), "-e", src], + env: bunEnv, + stdout: "pipe", + stderr: "pipe", + }); + const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); + + const result = JSON.parse(stdout.trim() || "{}"); + expect({ errored: result.errored, stderr: exitCode === 0 ? "" : stderr }).toEqual({ errored: true, stderr: "" }); + if (!isWindows) { + expect(result.fdGrowth).toBeLessThanOrEqual(2); + } + expect(result.cpuMs).toBeLessThan(result.wallMs * 0.5); + expect(proc.signalCode).toBeNull(); + expect(exitCode).toBe(0); + }); +}); diff --git a/test/napi/napi-app/async_tests.cpp b/test/napi/napi-app/async_tests.cpp index 8b1434e3f927..86886aa53bd5 100644 --- a/test/napi/napi-app/async_tests.cpp +++ b/test/napi/napi-app/async_tests.cpp @@ -322,6 +322,50 @@ napi_value test_cancel_async_work(const Napi::CallbackInfo &info) { return result; } +// Process-global on purpose: created on a Worker's env, released from the +// main thread after that Worker (and its env/event loop) is gone. +static napi_threadsafe_function orphaned_tsfn = nullptr; + +static void orphaned_tsfn_callback(napi_env env, napi_value js_callback, + void *context, void *data) {} + +// Creates a TSFN on the calling env (run this inside a Worker) and unrefs it +// so the Worker's event loop can exit while the TSFN is still acquired. +napi_value create_orphaned_tsfn(const Napi::CallbackInfo &info) { + napi_env env = info.Env(); + napi_value resource_name = Napi::String::New(env, "napitests::orphaned_tsfn"); + NODE_API_CALL(env, napi_create_threadsafe_function( + env, info[0], nullptr, resource_name, + // max_queue_size, initial_thread_count + 1, 1, + // thread_finalize_data, thread_finalize_cb + nullptr, nullptr, + // context + nullptr, orphaned_tsfn_callback, &orphaned_tsfn)); + NODE_API_CALL(env, napi_unref_threadsafe_function(env, orphaned_tsfn)); + return info.Env().Undefined(); +} + +// Run this on the main thread AFTER the Worker exited: with the owning event +// loop dead, both call modes must report napi_closing (Node semantics) +// instead of queueing into a loop that will never drain the item. +napi_value call_orphaned_tsfn(const Napi::CallbackInfo &info) { + bool blocking = info[0].As().Value(); + napi_status status = napi_call_threadsafe_function( + orphaned_tsfn, nullptr, + blocking ? napi_tsfn_blocking : napi_tsfn_nonblocking); + return Napi::Number::New(info.Env(), status); +} + +// Run this on the main thread AFTER the Worker exited: the release must not +// touch the dead Worker's event loop (heap-use-after-free under ASAN). +napi_value release_orphaned_tsfn(const Napi::CallbackInfo &info) { + napi_status status = + napi_release_threadsafe_function(orphaned_tsfn, napi_tsfn_release); + orphaned_tsfn = nullptr; + return Napi::Number::New(info.Env(), status); +} + void register_async_tests(Napi::Env env, Napi::Object exports) { REGISTER_FUNCTION(env, exports, create_promise); REGISTER_FUNCTION(env, exports, create_promise_with_napi_cpp); @@ -329,6 +373,9 @@ void register_async_tests(Napi::Env env, Napi::Object exports) { REGISTER_FUNCTION(env, exports, create_async_work_with_null_execute); REGISTER_FUNCTION(env, exports, create_async_work_with_null_complete); REGISTER_FUNCTION(env, exports, test_cancel_async_work); + REGISTER_FUNCTION(env, exports, create_orphaned_tsfn); + REGISTER_FUNCTION(env, exports, call_orphaned_tsfn); + REGISTER_FUNCTION(env, exports, release_orphaned_tsfn); } } // namespace napitests diff --git a/test/napi/napi.test.ts b/test/napi/napi.test.ts index 770dcbe1b9a7..3f56150de017 100644 --- a/test/napi/napi.test.ts +++ b/test/napi/napi.test.ts @@ -936,6 +936,74 @@ describe.concurrent.skipIf(!canBuildNodeAddons())("napi", () => { ); }); +describe.skipIf(!canBuildNodeAddons())("napi_threadsafe_function", () => { + it("can be released after the Worker that created it exited", async () => { + // next-swc shape: an addon creates an unref'd TSFN on a Worker's env, the + // Worker exits (freeing its VM and event loop), and only then does another + // thread release the TSFN — the release must not touch the dead loop. + const fixture = /* js */ ` + const path = ${JSON.stringify(join(__dirname, "napi-app/build/Debug/napitests.node"))}; + const { Worker } = require("node:worker_threads"); + const worker = new Worker( + "require(" + JSON.stringify(path) + ").create_orphaned_tsfn(() => {});", + { eval: true }, + ); + await new Promise((resolve, reject) => { + worker.on("exit", resolve); + worker.on("error", reject); + }); + const status = require(path).release_orphaned_tsfn(); + console.log("release_status=" + status); + `; + await using proc = Bun.spawn({ + cmd: [bunExe(), "-e", fixture], + env: bunEnv, + stdout: "pipe", + stderr: "pipe", + }); + const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); + // 0 == napi_ok; a UAF aborts the process (empty stdout, nonzero exit). + expect({ stdout: stdout.trim(), exitCode }).toEqual({ stdout: "release_status=0", exitCode: 0 }); + }); + + it("napi_call_threadsafe_function returns napi_closing after the Worker that created it exited", async () => { + // With the owning event loop dead nothing will ever drain the queue: + // both the non-blocking arm and the blocking-with-space arm must report + // napi_closing (Node semantics) instead of napi_ok on a silently + // stranded item. The queue has room (max_queue_size 1, empty), so + // pre-fix both arms skipped the dead-loop check and returned 0. + const fixture = /* js */ ` + const path = ${JSON.stringify(join(__dirname, "napi-app/build/Debug/napitests.node"))}; + const { Worker } = require("node:worker_threads"); + const worker = new Worker( + "require(" + JSON.stringify(path) + ").create_orphaned_tsfn(() => {});", + { eval: true }, + ); + await new Promise((resolve, reject) => { + worker.on("exit", resolve); + worker.on("error", reject); + }); + const addon = require(path); + const nonblocking = addon.call_orphaned_tsfn(false); + const blocking = addon.call_orphaned_tsfn(true); + const release = addon.release_orphaned_tsfn(); + console.log(JSON.stringify({ nonblocking, blocking, release })); + `; + await using proc = Bun.spawn({ + cmd: [bunExe(), "-e", fixture], + env: bunEnv, + stdout: "pipe", + stderr: "pipe", + }); + const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); + // 16 == napi_closing, 0 == napi_ok. + expect({ stdout: stdout.trim(), exitCode }).toEqual({ + stdout: JSON.stringify({ nonblocking: 16, blocking: 16, release: 0 }), + exitCode: 0, + }); + }); +}); + // Kept outside describe.concurrent("napi") so RSS measurement isn't skewed by // the other tests' subprocesses and doesn't add load to the --compile tests. describe.skipIf(!canBuildNodeAddons())("napi_create_string_latin1", () => {